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!
Whats the best way to verify temporary configs?
Re: Whats the best way to verify temporary configs?
Copy the nagios.cfg and edit the paths to point to the temp files, then just run nagios -v against this new config file.
Former Nagios employee