nagios restart affects nagvis

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
doneil326
Posts: 82
Joined: Fri Aug 14, 2015 3:26 pm

Re: nagios restart affects nagvis

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: nagios restart affects nagvis

Post 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.
Former Nagios Employee
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: nagios restart affects nagvis

Post 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
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nagios restart affects nagvis

Post 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.
Former Nagios employee
Locked