How to reload nagios configuration as user nagios.

Hopefully you’re running Nagios under a special user with restricted permissions – mine is named nagios. There are many times when we’re adding and removing configuration files that we need to reload the configuration without restarting the service. The /sbin/service command usually requires elevated permissions and thus isn’t a tool that we can use to restart nagios.

Thankfully, there are signals that we can send Nagios as user nagios. You can do something like this (send the hang up signal) to reload your Nagios configuration files:

kill -HUP `cat /usr/local/nagios/var/nagios.lock`;
This entry was posted in Nagios and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.