Page 1 of 1

Whats the best way to verify temporary configs?

Posted: Fri Jun 27, 2014 11:59 am
by skol
Hey guys,

I have a process which drops newly generated configs on a nagios box, but I want to verify them before copying them over and restarting. I figured copying them to /tmp/configs/$date/nagios.cfg then running nagios -v /tmp/configs/$date/nagios.cfg would do the trick.. but that doesn't work - it just verifies the current running configs (Due to paths inside nagios.cfg the same as the currently running install). Is there a way to run a self contained syntax verify on a set of configs?

Thanks!

Re: Whats the best way to verify temporary configs?

Posted: Fri Jun 27, 2014 12:02 pm
by tmcdonald
Copy the nagios.cfg and edit the paths to point to the temp files, then just run nagios -v against this new config file.