Page 2 of 2
Re: nagios restart affects nagvis
Posted: Fri May 06, 2016 12:19 pm
by doneil326
so this script works and does what i need it to, but since it runs as a check (so there is a gui option like the apply config button for other users) it does not return any type of perfdata as stdout to nagios to be able to identify if it ran successfully like
echo "SUCCESS! Completed successfully!"
return 0
So is there a way to persist this data through nagios reconfigure to a check so we know its status? or is there a way to reload configs without restarting nagios?
Re: nagios restart affects nagvis
Posted: Fri May 06, 2016 12:23 pm
by rkennedy
Could you run it on CRON?
There isn't going to be a way to reload configs, without starting Nagios. It has to restart in order for it to pick up configuration changes.
Re: nagios restart affects nagvis
Posted: Fri May 06, 2016 1:45 pm
by SteveBeauchemin
I have a question...
this takes quite some time in our env, up to 60-90 seconds to recover. These dashboards are highly visible, so we would like to do whatever we can to minimize their downtime.
What NagVis back end are you using. I have many more tests than you and my NagVis downtime after a commit is very much shorter than yours.
I have 4500+ hosts and 33,000+ services in Nagios XI at this time.
I have implemented the Ramdisk for performance reasons, but I am also using the livestatus back end for NagVis. I bet that's why my NagVis turns blue momentarily, and is back is to normal in less than a few seconds. Sometimes I barely notice NagVis change.
We live and die by NagVis on our dashboards.
Steve B
Re: nagios restart affects nagvis
Posted: Fri May 06, 2016 2:02 pm
by tmcdonald
doneil326 wrote:it does not return any type of perfdata
Perfdata is not needed to determine if a check was successful, that would be the exit code. Exit with 0 for OK, 1 for Warning, and 2 for Critical. Then adjust your stdout appropriately with a human-readable message.
Edit: Oh, I think I get it now. The reason this is not working is because you are running this check which then immediately restarts nagios, so it never has time to return the results. Honestly I don't know of a great way around this that doesn't involve a lot of modification to the source code and leave your system in an unsupportable state.