Hi,
I am trying to set alerts for temperature
Normal operating range should be [21°C – 25°C]
19°C => is Low Temperature and
27°C => is High Temperature
I would like to get alerts on:
- critical alert if the temperature is below 19°C,
- critical alert if the temperature is above 27°C
- warning alert if the temperature is between 19°C to 21°C and
- warning alert if the temperature is between 25°C and 27°C
How do I achieve this, I have tried with the command below is it correct way?
/usr/local/nagios/libexec/check_snmp -H 1x.x.1x.x -o .1.3.6.1.4.1.9839.2.1.2.1.0 -w 26:21 -c 27 -C xxx
check_snmp set range for warning and critical
-
martinkuriax
- Posts: 37
- Joined: Tue Jul 01, 2014 12:21 pm
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_snmp set range for warning and critical
From the manpage:martinkuriax wrote:I would like to get alerts on:
- critical alert if the temperature is below 19°C,
- critical alert if the temperature is above 27°C
- warning alert if the temperature is between 19°C to 21°C and
- warning alert if the temperature is between 25°C and 27°C
Code: Select all
-w, --warning=THRESHOLD(s)
Warning threshold range(s)
-c, --critical=THRESHOLD(s)
Critical threshold range(s)
...
- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
So, I propose this:
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 1x.x.1x.x -o .1.3.6.1.4.1.9839.2.1.2.1.0 -w @19:21,@25-27 -c 19:27 -C xxx-
martinkuriax
- Posts: 37
- Joined: Tue Jul 01, 2014 12:21 pm
Re: check_snmp set range for warning and critical
Thanks this worked close this post
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_snmp set range for warning and critical
Great! Lockingmartinkuriax wrote:Thanks this worked close this post