How to enable critical alert for uptime

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

How to enable critical alert for uptime

Post by informatica »

Hi Team,

Could you please help me on the how to enable alert for uptime. If any linux/windows is restarted with 2 min we should get alert.
how we can put enable critical alert if the server is not up from last two min.

Ex: if uptime is less then two minutes we should get the alert.
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

Re: How to enable critical alert for uptime

Post by jdunitz »

As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
informatica
Posts: 99
Joined: Thu Jan 28, 2021 9:55 pm

Re: How to enable critical alert for uptime

Post by informatica »

HI Team,

Here you can go some example what exact we required. The below sever uptime is 4 min. If the server is uptime less than 2 min we should get critical alert. We need these kind of help. I tried to change as minutes but its not working please help on threshold changes.

[root@inl77t libexec]# uptime
04:40:28 up 4 min, 1 user, load average: 0.02, 0.10, 0.05


[root@inl77libexec]# ./check_uptime -u minutes -c 2
Uptime CRITICAL: 0 day(s) 0 hour(s) 7 minute(s) | uptime=7.000000;;2.000000;
[root@inl77t libexec]# ./check_uptime -u minutes -c 2
Uptime CRITICAL: 0 day(s) 0 hour(s) 7 minute(s) | uptime=7.000000;;2.000000;
[root@inl77t libexec]# ./check_uptime -u minutes -c 1
Uptime CRITICAL: 0 day(s) 0 hour(s) 7 minute(s) | uptime=7.000000;;1.000000;
[root@inl77 libexec]# ./check_uptime -u minutes -c 10
Uptime OK: 0 day(s) 0 hour(s) 8 minute(s) | uptime=8.000000;;10.000000;

The uptime script is working if the servers is up from 4 min it is givning alert but our concern is if the server is down and if its uptime shows less than 2 min we should get the alert.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: How to enable critical alert for uptime

Post by benjaminsmith »

Hi,

The following check would result in critical if the server has been up less than 2 minutes. The default unit for the plugin is minutes. Let me know if that works for you.

Code: Select all

./negate -s ./check_uptime -c 2
Best Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked