Page 1 of 1

UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 second

Posted: Tue Oct 25, 2016 5:05 am
by comfone
Hi All
We are using Nagios XI (5.3.1) VM appliance.
I'm trying to query our NetApp Storage aboard with SNMP using the pluging "check_netapp3.pl".
The timeout of 60 seconds is not enough, but the Plugins does not let me to increase this value.
If I try I "./check_netapp3.pl -H IP -v PERINODE -t 120", I get "UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 seconds"
An other strange thing is that only requests for "PERINODE - percentage inode space avail" and "PERUSED - percentage space used" are timing out.
Can anybody help?

Re: UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 se

Posted: Tue Oct 25, 2016 9:05 am
by tgriep
That plugin uses the NET::SNMP perl module and it has a default maximum timeout set to 60. Follow these steps to increase that to 120 seconds.
Edit this file

Code: Select all

/usr/share/perl5/Net/SNMP/Transport.pm
Fine this line

Code: Select all

sub TIMEOUT_MAXIMUM() { 60.0 }
and change it to

Code: Select all

sub TIMEOUT_MAXIMUM() { 120.0 }
That will set the max timeout to 120 seconds.
If you update the NET:SNMP perl modules in the future on your server, you will have to change this again.

Re: UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 se

Posted: Fri Oct 28, 2016 4:50 am
by comfone
Worked. Thank you.

Re: UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 se

Posted: Tue Dec 20, 2016 5:44 am
by comfone
Hi All
I tried to set the timeout in "/usr/share/perl5/Net/SNMP/Transport.pm" to 480 seconds.
But I still get the message:
SERVICE ALERT: hostname;NetApp percentage space used;CRITICAL;SOFT;1;(Service check timed out after 120.01 seconds)
Why does the setting not take effect?

Re: UNKNOWN:Invalid timeout value [120], range 1.0 - 60.0 se

Posted: Tue Dec 20, 2016 10:50 am
by tgriep
The timeout setting in the nagios.cfg file has to be increased to the same timeout value you need for your check or it will timeout the check as well.
Edit the following file

Code: Select all

/use/local/nagios/etc/nagios.cfg
Change this from

Code: Select all

service_check_timeout=120
to

Code: Select all

service_check_timeout=480
Save the file and restart the nagios processes by running

Code: Select all

service nagios restart