Page 3 of 5
Re: Send alert for server uptime
Posted: Mon Aug 03, 2015 9:13 pm
by jamesc23
Looks like performance data shows more meaningful info about the uptime. How do I include this details in the email alert?
Re: Send alert for server uptime
Posted: Mon Aug 03, 2015 10:31 pm
by Box293
jamesc23 wrote:CRITICAL: uptime: 40w 255d 5970:357946 critical
I suspect there is some bug or 32bit counter limitiation or something like that going on. From what I can gather it's reporting "how long it has been up for" AND "greater than critical threshold". Like in this example:
CRITICAL: uptime: 4w 1d 2:9 > critical|'uptime'=2513363000;0;2419200000
What version of NSClient++ are you using?
The developer has added an additional uptime check in the later versions, it's called Check_Uptime.
Command:
check_nrpe -H win2008r2-01 -c Check_Uptime -a 'critical=uptime>7d'
Output:
CRITICAL: uptime: 4w 4d 23:1h, boot: 2015-Jul-02 04:24:40 (UTC)|'uptime'=2847701s;172800;604800
It still doesn't say why it's critical, like "critical threshold of 7d exceed by xxx".
jamesc23 wrote:Looks like performance data shows more meaningful info about the uptime. How do I include this details in the email alert?
Thats kind of complicated. Either you adjust the email template in XI which will send the performance data with all notifications OR create a wrapper script that discects the returned data and does additional calculations on that.
I suggest going to the NSClient++ forums and ask what is going on and why and how to improve it.
Re: Send alert for server uptime
Posted: Mon Aug 03, 2015 11:28 pm
by jamesc23
We're on a very old version of NSCLient++ - 0.3.8.76
Thanks.
Re: Send alert for server uptime
Posted: Tue Aug 04, 2015 9:21 am
by jdalrymple
You should update to a modern version. Bugs are very often found and resolved in that software. The newer versions have some syntax changes in the config file, I would suggest changing now instead of later as it will ultimately be less work for you.
Re: Send alert for server uptime
Posted: Tue Aug 04, 2015 6:32 pm
by jamesc23
jdalrymple wrote:You should update to a modern version. Bugs are very often found and resolved in that software. The newer versions have some syntax changes in the config file, I would suggest changing now instead of later as it will ultimately be less work for you.
Update the client or both client and server? Updating the server might require more work I would think.
Re: Send alert for server uptime
Posted: Tue Aug 04, 2015 6:34 pm
by Box293
Just the client.
Re: Send alert for server uptime
Posted: Wed Aug 05, 2015 8:03 pm
by jamesc23
So just to confirm that the latest client will work with older version of server?
Re: Send alert for server uptime
Posted: Wed Aug 05, 2015 8:15 pm
by Box293
Yes, the server (XI) and client (NSClient++) have no dependencies on each other. The communicate using common protocols.
Re: Send alert for server uptime
Posted: Thu Aug 06, 2015 12:17 am
by jamesc23
Just did a manual upgrade to latest client and I can see number of extra lines have been added to NSC.ini in the new version;
SysTray.dll=
FileLogger.dll=
CheckWMI.dll=
CheckSystem.dll=0
NSClientListener.dll=0
CheckHelpers.dll=0
CheckEventLog.dll=0
CheckDisk.dll=0
CheckExternalScripts.dll=0
CheckNSCP.dll=0
NSCAAgent.dll=0
NRPEListener.dll=0
Do I need to be concerned about the above?
And as expected, most of the services cannot fetch information from the server after client upgrade. I can only get a ping service to work. I suspect that nsc.ini will need a bit of work? I get connection refused on all of the windows services after running monitoring wizard.
Thanks.
Re: Send alert for server uptime
Posted: Thu Aug 06, 2015 12:55 am
by Box293
This guide explains how to enable the relevant modules:
http://sites.box293.com/nagios/guides/n ... t-ini-file
This should fix your problems.