Reloading nagios config
Tiernan, Michael C.
mtiernan at draper.com
Wed May 24 17:16:20 CEST 2006
I have found that since /etc/init.d/nagios is unavailable to the nagios
user since it requires root privs (in my paranoid world), I created a
simple script owned by nagios itself called "trigger-restart" based on
one of the samples which says:
# This is a sample shell script showing how you can submit the
RESTART_PROGRAM command
# to Nagios. Adjust variables to fit your environment as necessary.
now=$( ${DATE} +%s )
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
${PRINTF} "Requesting restart at [%lu]\n" ${now}
${PRINTF} "[%lu] RESTART_PROGRAM\n" ${now} > ${commandfile}
This gives me a reliable restart/reload without having to be worried
about zombies.
I have a "check" command done before this on the current config files to
make sure there's no surprises coming my way too, if it passes, it does
the restart.
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list