Send alert for server uptime

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Send alert for server uptime

Post by jamesc23 »

Looks like performance data shows more meaningful info about the uptime. How do I include this details in the email alert?
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Send alert for server uptime

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Send alert for server uptime

Post by jamesc23 »

We're on a very old version of NSCLient++ - 0.3.8.76

Thanks.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Send alert for server uptime

Post 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.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Send alert for server uptime

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Send alert for server uptime

Post by Box293 »

Just the client.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Send alert for server uptime

Post by jamesc23 »

So just to confirm that the latest client will work with older version of server?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Send alert for server uptime

Post by Box293 »

Yes, the server (XI) and client (NSClient++) have no dependencies on each other. The communicate using common protocols.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jamesc23
Posts: 82
Joined: Thu Jan 15, 2015 11:55 pm

Re: Send alert for server uptime

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Send alert for server uptime

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked