Page 1 of 1

Server Uptime Alert from Nagios

Posted: Fri May 28, 2021 10:56 am
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

Re: Server Uptime Alert from Nagios

Posted: Fri May 28, 2021 3:07 pm
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