Page 1 of 1

Dynamically modifying Nagios config

Posted: Tue Oct 08, 2013 11:53 am
by yashgt
We have a few services which will startup and shutdown at various times. Due to this it is not possible to include them in the nagios configuration upfront.
I would like to periodically poll a DB or a file to enlist the dynamic services and modify the nagios config so that they show up on the Nagios dashboard.
Is there built-in support for such a thing in nagios? If not I would be restarting Nagios everytime the config is changed by a background process.

Thanks,
Yash

Re: Dynamically modifying Nagios config

Posted: Tue Oct 08, 2013 12:14 pm
by tmcdonald
One solution if you know when they will be down is to configure scheduled/recurring downtime for each service. That way at least they will not alert/notify when down. As for actually removing them from the graphical interface, I do not know of a way to do this personally. I will check with some co-workers and get back to you.

Re: Dynamically modifying Nagios config

Posted: Mon Oct 14, 2013 3:59 am
by wfournier
Add register 0 to remove them but still keep the config. You can reload (kill -1) the nagios process instead of restarting.

Re: Dynamically modifying Nagios config

Posted: Mon Oct 14, 2013 10:44 am
by abrist
wfournier wrote:Add register 0 to remove them but still keep the config. You can reload (kill -1) the nagios process instead of restarting.
correct.
You will only be able to remove the config objects from the frontend, as adding them would require a restart/reload.