Page 1 of 1

How to set alerts when the values goes below the range

Posted: Fri Oct 04, 2013 4:08 pm
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.

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

Posted: Mon Oct 07, 2013 9:23 am
by tmcdonald
What check/command are you currently using to assess the VPN connections?

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

Posted: Mon Oct 07, 2013 10:00 am
by prashanthm88
check_snmp

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

Posted: Mon Oct 07, 2013 10:09 am
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

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

Posted: Mon Oct 07, 2013 11:03 am
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.

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

Posted: Mon Oct 07, 2013 11:12 am
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?

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

Posted: Mon Oct 07, 2013 11:48 am
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.

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

Posted: Mon Oct 07, 2013 11:53 am
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.