Page 1 of 1

Threshold woes monitoring license expiry with SNMP

Posted: Thu May 26, 2016 9:35 am
by afdevbank
Hi all,
I'm trying to monitor the license expiry on one of my Digium Switchvox using SNMP. There are two OIDs one for the expiry date and the other for the number of days left. I have used the SNMP wizard to create a monitor but I have a big challenge with the thresholds. When I configure the thresholds with 60 as the warning and 30 as the critical I get CRITICAL alerts with the current value read from the device being 563. I have tried ranges for the warning and critical but with the same result. The result is always CRITICAL 563;warning_threshod;critical_threshold. I'm not sure if there is a bug in the script or am doing something wrong with the thresholds. I'd be grateful if anyone can help me figure out what I'm doing wrong.

Code: Select all

$USER1$/check_snmp  -o .1.3.6.1.4.1.22736.10.7.2 -C <community string> -P 2c -u Days -w 6o -c 30
The result is

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_snmp -H myhost  -o .1.3.6.1.4.1.22736.10.7.2 -C <community string> -P 2c -u Days -w 60 -c 30
OUTPUT: SNMP CRITICAL - *563* Days | iso.3.6.1.4.1.22736.10.7.2=563Days;60;30;

Close
I am miffed.

Kind regards

Osay

Re: Threshold woes monitoring license expiry with SNMP

Posted: Thu May 26, 2016 4:35 pm
by tgriep
Try defining the thresholds like this.

Code: Select all

-w 60: -c 30:
It should give you a warning for less than 60 days and critical for less than 30 days.
Take a look at this link for more examples.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

Re: Threshold woes monitoring license expiry with SNMP

Posted: Mon May 30, 2016 1:33 am
by afdevbank
Thanks man. It works like a charm. I think I was reading the wrong docs. There's one that was talking about new syntax with stuff like

Code: Select all

--th metric=age
etc. I think that might have confused me. Need to be more vigilant next time.
Cheers man.
Osay

Re: Threshold woes monitoring license expiry with SNMP

Posted: Tue May 31, 2016 9:31 am
by rkennedy
That could have been specific to a certain plugin, not sure to be honest.

Are we good to mark this thread as resolved?