How to set alerts when the values goes below the range

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
prashanthm88
Posts: 23
Joined: Wed Jul 24, 2013 2:49 pm

How to set alerts when the values goes below the range

Post by prashanthm88 »

I want to send notifications when the values goes below the assigned range.

Example:

No of VPN connections connected to a router is "3". I want to send notification if the values changes to "2" , "1" or "0".

Thank You.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to set alerts when the values goes below the range

Post by tmcdonald »

What check/command are you currently using to assess the VPN connections?
Former Nagios employee
prashanthm88
Posts: 23
Joined: Wed Jul 24, 2013 2:49 pm

Re: How to set alerts when the values goes below the range

Post by prashanthm88 »

check_snmp
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to set alerts when the values goes below the range

Post by tmcdonald »

I meant the whole command, arguments included. There is a way to define a threshold for some plugins, check_snmp included:

https://www.nagios-plugins.org/doc/guid ... HOLDFORMAT
Former Nagios employee
prashanthm88
Posts: 23
Joined: Wed Jul 24, 2013 2:49 pm

Re: How to set alerts when the values goes below the range

Post by prashanthm88 »

THis is the command I'm looking for.

check_stuff -w10: -c20 Critical if "stuff" is over 20, else warn if "stuff" is below 10 (will be critical if "stuff" is less than 0)

Thank you very much.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to set alerts when the values goes below the range

Post by tmcdonald »

Do you have the check_snmp command working with the ranges you need, or are you asking us to give a working example?
Former Nagios employee
prashanthm88
Posts: 23
Joined: Wed Jul 24, 2013 2:49 pm

Re: How to set alerts when the values goes below the range

Post by prashanthm88 »

Thanks you very much for the quick reply.

I have checked with the command

check_snmp -o XXXXXXXXX -U snmpuser -A password -x AES -X testpassword -L authPriv -P 3 -a MD5 -w3:

Result : SNMP OK - 3 | iso.3.6.1.4.1.9.9.392.1.3.29.0=3


Changed the value to -w4:

Result: SNMP WARNING - *3* | iso.3.6.1.4.1.9.9.392.1.3.29.0=3

Email notification's are also working fine without any issues.

Thank you.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to set alerts when the values goes below the range

Post by tmcdonald »

Glad I could help! If you have any other questions feel free to open a new thread, otherwise I am going to lock this one.
Former Nagios employee
Locked