- You must have perl. Information about perl can be found at http://perl.com/.
- You must have a web server installed, configured and running. The Apache web server can be found at http://www.apache.org/.
- You must have an snmpget executable. NRG can be used with snmpget from the CMU SNMP, UCD SNMP, OpenView or NetView snmp packages. Other snmpget executables might work--if they don't email me the error messages and snmpget syntax and I'll fix things up.) If you do not have snmpget, then build and install the UCD SNMP package (see ucd-snmp). The UCD SNMP package (ucd-snmp-4.2.tar.gz) can be found packages directory of the NRG. Information about UCD SNMP can be found at http://www.netsnmp.org/.
- You must have RRDtool installed. Currently NRG is developed tested under version 1.0.33. The rrdtool version 1.0.33 source (rrdtool-1.0.33.tar.gz) can be found in the packages directory of the NRG source tree. Information about RRDtool can be found at http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/.
- NRG usually installs on top of RRDtool. Make sure the RRDtool directory tree is owned by an ordinary (non-root) user so you can install and operate NRG as an ordinary user. Do this as root:
find /usr/local/rrdtool-1.0.x -print | xargs chown your-login
- If you do not want to install NRG on top of RRDtool (eg because you already have an existing RRDtool install), then simply build and install RRDtool using ``./configure --prefix=/usr/local/nrg''
- If you want to graph response times of TCP services, then you need to install the Time::HighRes perl module. Instructions for installing the module are Time-HiRes. The source for Time::HiRes (Time-HiRes-01.20.tar.gz) can be found in the packages directory of the NRG source tree or at http://www.cpan.org/.
- If you want to graph name service response times, then you need to have ``dig'' (a program for doing domain name service queries.) Dig is part of the BIND contrib package which can be found via http://www.isc.org/
- If you want to graph Unix resource utilization (load average memory use, virtual memory use, disk use), then you need to install the UCD SNMP package on each Unix host. Instructions for installing the UCD SNMP package are ucd-snmp. The UCD SNMP package (ucd-snmp-4.2.tar.gz) can be found packages directory of the NRG source tree.
- Do ``./configure''.
- If you have HP OpenView or IBM NetView/6000 snmpget, then do
./configure --with-snmpget-type=netview
- Build roverpingd:
make pingd
- This step may fail if you are not running Linux, Solaris or a BSD-based Unix. If it fails, you will not be able to generate ping latency or ping loss graphs.
- Make the symbolic link /usr/local/nrg that points to RRDtool:
cd /usr/local ln -s rrdtool-1.0.x nrg
- Do ``make install''.
- By default, this will install NRG in the /usr/local/nrg directory tree. To install NRG somewhere else, use ``./configure --prefix=/somewhere/else''. (NRG assumes RRDtool is installed in /somewhere/else, so you should have done/do the same ./configure command for building RRDtool.)
- If you built roverpingd, then do ``make install.pingd''
- Make a directory to hold your NRG web pages. For Apache, try something like:
mkdir /usr/local/apache/html/nrg ;# as root chown your-unix-login /usr/local/apache/html/nrg ;# as root
- For convenience, create a sym link that points /usr/local/nrg/web at your web NRG pages:
ln -s /usr/local/apache/html/nrg /usr/local/nrg/web
- Install the NRG images:
mkdir /usr/local/apache/html/nrg/icons cp images/* /usr/local/apache/html/nrg/icons
- Tell your web server to run as the same user that runs NRG:
vi /usr/local/apache/conf/httpd.conf # generic Apache or vi /etc/httpd/conf/httpd.conf # RedHat linux specific # change "User nobody" to your-unix-login
- Tell your web server to execute .cgi files. For Apache, add the configuration string ``AddHandler cgi-script .cgi'' and restart the httpd daemon:
vi /usr/local/apache/conf/httpd.conf # generic Apache or vi /etc/httpd/conf/httpd.conf # RedHat linux specific # add the following... # <Directory /home/httpd/html/nrg> # Options ExecCGI # </Directory> # AddHandler cgi-script .cgi /etc/rc.d/init.d/httpd restart # RedHat linux specific
- Tell your web server to expire .gif files so the auto-reloading of web pages works. The known method for doing this is to use Apache with mod_expires and the following configuration stuff:
vi /usr/local/apache/conf/httpd.conf # generic Apache or vi /etc/httpd/conf/httpd.conf # RedHat linux specific # add the following: # <Files "*.gif"> # ExpiresActive On # ExpiresDefault M5 # </Files> /etc/rc.d/init.d/httpd restart # RedHat linux specific
You should check your Apache for the ``mod_expires'' module. Do something like:
/usr/sbin/httpd -l | grep expires
If that executes with no output, you don't have Apache with mod_expires and thus auto-reloading of graph web page gifs probably won't work. To get auto-reloading of gifs to work, you should get a version of Apache with the mod_expires module.
Now read configuration