check_snmp Plugin timed out while executing system

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.
cg28oh
Posts: 31
Joined: Mon Aug 18, 2014 9:38 am

check_snmp Plugin timed out while executing system

Post by cg28oh »

Trouble with Nagios Plugins v2.1.1

When a service check_snmp timeouts with no reponse, Nagios produces CRITICAL - Plugin timed out while executing system call alert. It should show the timeout alert. I'm not able to find what is producing this error. Playing with the timeout and retries have no impact.

CentOS 7 complied from source.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp Plugin timed out while executing system

Post by Box293 »

Can you run check_snmp with the -v argument and post the results here please (including the full command executed).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cg28oh
Posts: 31
Joined: Mon Aug 18, 2014 9:38 am

Re: check_snmp Plugin timed out while executing system

Post by cg28oh »

./check_snmp -H xx.xx.xx.xx -C COMM -o sysName.0 -v
/usr/bin/snmpget -Le -t 3 -r 5 -m ALL -v 1 [authpriv] xx.xx.xx.xx:161 sysName.0
CRITICAL - Plugin timed out while executing system call
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_snmp Plugin timed out while executing system

Post by hsmith »

Is this with all SNMP checks, or just a single one?
Former Nagios Employee.
me.
cg28oh
Posts: 31
Joined: Mon Aug 18, 2014 9:38 am

Re: check_snmp Plugin timed out while executing system

Post by cg28oh »

When the host is down or the snmp timeout. The hosts I'm monitoring are on high latency links (radio), typical response time is 1 to 2 seconds but can go upwards to 5 to 10 seconds. I would expect that there would be a UNKNOWN No SNMP response received before timeout snmp alert and not the CRITICAL - Plugin timed out while executing system call.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_snmp Plugin timed out while executing system

Post by hsmith »

I believe the plugin has a ten second timeout by default. Can you try using -t 30 in your check to see if it helps?
Former Nagios Employee.
me.
cg28oh
Posts: 31
Joined: Mon Aug 18, 2014 9:38 am

Re: check_snmp Plugin timed out while executing system

Post by cg28oh »

No change when there is a timeout. However when specifying the -t 30, a -t 7 is passed to the snmpget?

# ./check_snmp -t 30 -C COMM -H xx.xx.xx.xx -o sysName.0 -vvv
/usr/bin/snmpget -Le -t 7 -r 5 -m ALL -v 1 [authpriv] xx.xx.xx.xx:161 sysName.0
CRITICAL - Plugin timed out while executing system call
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_snmp Plugin timed out while executing system

Post by hsmith »

That's pretty strange. Can you try a few other values? I don't have a host with SNMP set up in my lab environment currently, and will be in a meeting for the next couple hours. Try something like 60s, 90s for timeout.
Former Nagios Employee.
me.
cg28oh
Posts: 31
Joined: Mon Aug 18, 2014 9:38 am

Re: check_snmp Plugin timed out while executing system

Post by cg28oh »

Changing the -t still produced the Plugin timed out. Now it seems that if I set the check_snmp -t in multiples of 4, it will send 1 to the snmpget binary.

check-snmp -t 1-4 = /usr/bin/snmpget -Le -t 1
check-snmp -t 5-9 = /usr/bin/snmpget -Le -t 2
check-snmp -t 10-14 = /usr/bin/snmpget -Le -t 3
check-snmp -t 15-19 = /usr/bin/snmpget -Le -t 4

so on... so on...
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_snmp Plugin timed out while executing system

Post by hsmith »

First I tried

Code: Select all

[root@xi libexec]# ./check_snmp -H 172.16.0.200 -o sysName.0 -vvv
/usr/bin/snmpget -Le -t 1 -r 5 -m ALL -v 1 [authpriv] 172.16.0.200:161 sysName.0
SNMPv2-MIB::sysName.0 = STRING: potus
Processing oid 1 (line 1)
  oidname: SNMPv2-MIB::sysName.0
  response: STRING: potus
SNMP OK - potus |
Looks good, so I tried

Code: Select all

[root@xi libexec]# ./check_snmp -H 172.16.0.200 -o sysName.0 -vvv -t 10
/usr/bin/snmpget -Le -t 10 -r 5 -m ALL -v 1 [authpriv] 172.16.0.200:161 sysName.0
SNMPv2-MIB::sysName.0 = STRING: potus
Processing oid 1 (line 1)
  oidname: SNMPv2-MIB::sysName.0
  response: STRING: potus
SNMP OK - potus |
Still looks good...

Code: Select all

[root@xi libexec]# ./check_snmp -H 172.16.0.200 -o sysName.0 -vvv -t 50000
/usr/bin/snmpget -Le -t 50000 -r 5 -m ALL -v 1 [authpriv] 172.16.0.200:161 sysName.0
SNMPv2-MIB::sysName.0 = STRING: potus
Processing oid 1 (line 1)
  oidname: SNMPv2-MIB::sysName.0
  response: STRING: potus
SNMP OK - potus |
It all looks fine. Let's compare versions:

Code: Select all

[root@xi libexec]# ./check_snmp -V
check_snmp v2.0.3 (nagios-plugins 2.0.3)
Former Nagios Employee.
me.
Locked