<< Back to man.ChinaUnix.net

2. Knowing Where Nagios Lives

One thing I highly recommend (especially for new BSD users) is to update your locate database as described earlier, and run locate nagios. This will show you the exact paths where Nagios is installed. You will need this information later. The following commands will save this information into text files for your reference; perhaps you might find it useful to print them.

List all file locations:

locate nagios | grep -v /usr/ports | grep -v /var/db > nagios_file_locations_FULL.txt

List a trimmed down version of locations:

locate nagios | grep -v /usr/ports | grep -v /var/db | grep -v /usr/local/share/nagios/ | grep -v /usr/local/libexec/nagios/ > nagios_file_locations_TRIMMED.txt

Here is the output of the trimmed version:

/usr/local/bin/nagios
/usr/local/bin/nagiostats
/usr/local/etc/nagios
/usr/local/etc/nagios/cgi.cfg
/usr/local/etc/nagios/checkcommands.cfg
/usr/local/etc/nagios/minimal.cfg
/usr/local/etc/nagios/misccommands.cfg
/usr/local/etc/nagios/nagios.cfg
/usr/local/etc/nagios/resource.cfg
/usr/local/etc/nagios/samples
/usr/local/etc/nagios/samples/bigger.cfg-sample
/usr/local/etc/nagios/samples/cgi.cfg-sample
/usr/local/etc/nagios/samples/checkcommands.cfg-sample
/usr/local/etc/nagios/samples/minimal.cfg-sample
/usr/local/etc/nagios/samples/misccommands.cfg-sample
/usr/local/etc/nagios/samples/nagios.cfg-sample
/usr/local/etc/nagios/samples/resource.cfg-sample
/usr/local/etc/rc.d/nagios.sh
/usr/local/libexec/nagios
/usr/local/share/nagios
/var/mail/nagios
/var/spool/nagios
/var/spool/nagios/archives
/var/spool/nagios/comments.dat
/var/spool/nagios/downtime.dat
/var/spool/nagios/nagios.lock
/var/spool/nagios/nagios.log
/var/spool/nagios/objects.cache
/var/spool/nagios/retention.dat
/var/spool/nagios/rw
/var/spool/nagios/status.dat
/var/spool/nagios/status.sav