Change of hostgroups.cfg without restarting nagios
Posted: Thu Jun 28, 2018 8:11 pm
If I changed the cfg files in objects/ (e.g. hostgroups.cfg), is there a way to make nagios pick up the
config changes without restarting the nagios service?
The server is running RHEL7.
Using the unit file below.
What should the ExecReload command be like? This doesn't work
ExecReload=/usr/bin/kill -HUP $MAINPID
Thanks!
config changes without restarting the nagios service?
The server is running RHEL7.
Using the unit file below.
Code: Select all
[Unit]
Description=Nagios Network Monitoring
After=network.target
Documentation=https://www.nagios.org/documentation/
[Service]
Type=forking
User=nagios
Group= nagios
PIDFile=/app/var/nagios/nagios.pid
#----------------------------------------------------------
# Verify Nagios config before start as upstream suggested
#----------------------------------------------------------
ExecStartPre=/usr/sbin/nagios -v /app/etc/nagios/nagios.cfg
ExecStart=/usr/sbin/nagios -d /app/etc/nagios/nagios.cfg
ExecStopPost=/usr/bin/rm -f /app/var/nagios/rw/nagios.cmd
[Install]
WantedBy=multi-user.target
What should the ExecReload command be like? This doesn't work
ExecReload=/usr/bin/kill -HUP $MAINPID
Thanks!