Hi,
I'm looking for a plugin that will send alert on servers with specific uptime (days). Can anyone please direct me to the right place?
I'm new to Nagios.
Thanks.
Alerts on long uptime
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Alerts on long uptime
check_uptime is one of the base plugins in the nagios-plugins package:
http://nagios-plugins.org/downloads/
http://nagios-plugins.org/downloads/
Code: Select all
[root@localhost libexec]# ./check_uptime -w 12 -c 18 -u hours
Uptime CRITICAL: 0 day(s) 23 hour(s) 26 minute(s) | uptime=23.000000;12.000000;18.000000;Re: Alerts on long uptime
Are you monitoring Linux or Windows? For Linux, you can use "check_uptime":
This way, you will be alerted if the number of days exceeds the warning or critical thresholds. If you want to be alerted if the number is less than the thresholds, you could use the plugin this way:
Code: Select all
[root@testbox libexec]# ./check_uptime -u days -w 20 -c 40
Uptime WARNING: 36 day(s) 18 hour(s) 38 minute(s) | uptime=36.000000;20.000000;40.000000;
[root@testbox libexec]# ./check_uptime -u days -w 20 -c 30
Uptime CRITICAL: 36 day(s) 18 hour(s) 38 minute(s) | uptime=36.000000;20.000000;30.000000;Code: Select all
[root@testbox libexec]# ./check_uptime -u days -w 40: -c 20:
Uptime WARNING: 36 day(s) 18 hour(s) 41 minute(s) | uptime=36.000000;0.000000;0.000000;
[root@testbox libexec]# ./check_uptime -u days -w 40: -c 50:
Uptime CRITICAL: 36 day(s) 18 hour(s) 40 minute(s) | uptime=36.000000;0.000000;0.000000;Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Alerts on long uptime
Sorry. Just realised I double posted.
Please see this - https://support.nagios.com/forum/viewto ... 96#p147196
Thanks.
Please see this - https://support.nagios.com/forum/viewto ... 96#p147196
Thanks.