
---- A Full Discussion of NRG Automagic Configuration ----

Maintenance of NRG is performed by using a Makefile (usually in
/usr/local/nrg).  This Makefile knows about one or more .mconf files.
The .mconf files in turn 1) refer to static .conf files and 2) refer
to execution of nrg-discover scripts which cause NRG to dynamically
create .conf files.

Editing .mconf files and static .conf files is the basis for
configuring NRG.  After making changes to config files, one should
do "make update".  This will execute "nrg-autoconf", which does
device auto-discovery: it runs nrg-discover scripts and reports about
changes in the resulting configuration.  The resulting configuration
is written to "autoconfs.NEW".

To generate a new configuration which re-examines all meta-targets, do
"make rediscover"

To generate a new configuration which rediscovers a single, specific
meta-target, do "make MetaTargetName".

If the resulting configuration is acceptable, one should do "make notify".
This will cause NRG to put the last auto-discovery into production by
creating any new .rrd files, re-writing all the .cgi files and creating
a shell script called "run-nrg" (a robust shell script that does
NRG data collection.)

If the resulting configuration is not acceptable, there are three files which
can help you resolve the situtation: 

 - Any .conf configuration strings created by discover scripts can be 
   found in the autoconfs.NEW directory ending in ".conf".  For example, 
   with the default values, configuration strings for MyRouter can be 
   found in autoconfs.NEW/net/MyRouter.conf

 - The details about data discovery can be found in files ending with
   ".debug" in the the autoconfs.NEW directory--for example, details 
   about discovery of the default "MyRouter" meta-target can be found in 
   autoconfs.NEW/net/MyRouter.debug.

 - The autodiscovery process for each meta-target can recreated by using 
   the "rediscovery script".  For example, to rediscover the MyRouter 
   entry, do "autoconfs.NEW/net/MyRouter".


---- Integration with Asset Management Databases ----

NRG has been designed so that legacy database information about resources
you want to monitor can be easily imported into NRG .mconf files.  

Importing legacy data can be done by 1) writing a script which fetches
your legacy data (ie with ftp or rcp or scp) and 2) writing a short script
which converts your legacy data into .mconf format.

Once you convert your legacy data into .mconf format, NRG automates the
entire maintanance of your NRG web site.  The resulting information system
has four layers:

 1) Legacy layer:

      Generate legacy data (eg router database or ping list)

 2) .Metaconf layer:

      Convert legacy data into a dynamic .mconf file via custom script...

 3) .Conf layer:

      Convert .mconfs into .confs via NRG's operations makefile

 4) RRDtool layer:
 
      4.1) Create .rrd files which contain the data in RRD format

      4.2) Execute run-* scripts with gather SNMP and other data into RRDs 

      4.3) View graphs of the data (like MRTG's) via rrdcgi .cgi scripts
