Server Uptime Alert from Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Server Uptime Alert from Nagios

Post by RIDS_I2MP »

Hi Team,

Can we trigger Warning/Critical alerts from Nagios XI if the Monitored servers (Unix or Windows servers) are up for more than standard time period.

Example:
SERVER UPTIME WARNING Threshold - 12 Days
SERVER UPTIME CRITICAL Threshold - 16 Days

If possible can you help us with steps or documentation link.

Thanks,
Nitin Parate
Thanks & Regards,
I2MP Team.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Server Uptime Alert from Nagios

Post by vtrac »

Hi Nitin,
How are you doing?

NPCA includes a system module that allows you to check the uptime, the response returned is in seconds.

Here's the NCPA agent installation instructions:
https://assets.nagios.com/downloads/ncp ... g-NCPA.pdf

Example:
Windows Uptime checks (NOTE: 86400 seconds (1 day) ):

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.x.x -t yourToken -M 'system/uptime' --critical 86400

CRITICAL: Uptime was 13 days 21 hours 44 minutes 9 seconds | 'uptime'=1201449.20s;;86400;
Linux Uptime checks:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.23.63 -t jsdn3DBltSdcOhYt -M 'system/uptime' --critical 86400

OK: Uptime was 15 minutes 50 seconds | 'uptime'=950.00s;;86400;

Best Regards,
Vinh
Locked