Automatic writing of config files + restart with nagiosql
Posted: Mon Jan 31, 2011 6:43 pm
We recently upgraded to 2009R1.4, and while the upgrade worked fine it unfortunately ended up breaking a script that I was using to automate restarting Nagios. Essentially, I am adding hosts into the NagiosQL database and was then using curl to login to NagiosXI and apply the changes. NagiosQL would write out its contents to config files, Nagios XI would restart, and my new hosts/services would be running.
I realize that NagiosQL doesn't have a commandline or an API to trigger something like this, so I'm wondering if anyone else in the Nagios XI community has a script that would do this in a better way. I might be able to rewrite the curl script but given the changes with the Javascript to fix a security problem, I don't want to spend time on it if there is a better way.
Kevin
I realize that NagiosQL doesn't have a commandline or an API to trigger something like this, so I'm wondering if anyone else in the Nagios XI community has a script that would do this in a better way. I might be able to rewrite the curl script but given the changes with the Javascript to fix a security problem, I don't want to spend time on it if there is a better way.
Kevin