Threshold woes monitoring license expiry with SNMP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
afdevbank
Posts: 14
Joined: Wed Jul 13, 2011 1:31 pm

Threshold woes monitoring license expiry with SNMP

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Threshold woes monitoring license expiry with SNMP

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
afdevbank
Posts: 14
Joined: Wed Jul 13, 2011 1:31 pm

Re: Threshold woes monitoring license expiry with SNMP

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Threshold woes monitoring license expiry with SNMP

Post 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?
Former Nagios Employee
Locked