Page 1 of 1

Plugin timed out while executing system call

Posted: Tue Feb 01, 2022 6:27 pm
by jameyw
I am in the process of migrating everything from XI 5.4.13 to XI 5.8.7. I modified one of my check commands based on answers provided in my UPS Monitor thread.

This command:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 10.x.x.40  -o .1.3.6.1.4.1.2947.1.8.1.0 -C public -P 1 -l "Alarms" -u "Active" -c 0
It returns:
CRITICAL - Plugin timed out while executing system call.

In fact, any new "/usr/local/nagios/libexec/check_snmp" returns the same error.

Re: Plugin timed out while executing system call

Posted: Wed Feb 02, 2022 1:59 pm
by dchurch
Please post the output from executing the command with the "-v" switch:

Code: Select all

/usr/local/nagios/libexec/check_snmp -v -H 10.x.x.40  -o .1.3.6.1.4.1.2947.1.8.1.0 -C public -P 1 -l "Alarms" -u "Active" -c 0

Re: Plugin timed out while executing system call

Posted: Wed Feb 02, 2022 3:17 pm
by jameyw
Here is what I got after running the command:

[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -v -H 10.x.x.40 -o .1.3.6.1.4.1.2947.1.8.1.0 -C public -P 1 -l "Alarms" -u "Active" -c 0 -v
/usr/bin/snmpget -Le -t 3 -r 5 -m '' -v 1 [context] [authpriv] 10.x.x.40:161 .1.3.6.1.4.1.2947.1.8.1.0
CRITICAL - Plugin timed out while executing system call

Re: Plugin timed out while executing system call

Posted: Thu Feb 03, 2022 4:18 pm
by ssax
Do either of these work?

Code: Select all

snmpwalk -v 1 -c 'public' 10.x.x.40
snmpget -v 2c -c 'public' 10.x.x.40
If not, it's likely a firewall blocking it, the wrong SNMP community, or the wrong SNMP version (could be using version 3), or an invalid SNMP configuration/SNMP not running on the remote system. (in that order of likelihood)

Re: Plugin timed out while executing system call

Posted: Thu Feb 03, 2022 6:01 pm
by jameyw
It works fine in XI 5.4.13. I am migrating to a new install of XI 5.8.7 and have been building the checks using the wizard and adding the OID values that I copy and paste from the 5.4.13 system. It was working fine then after making some changes to a check in reference to this thread https://support.nagios.com/forum/viewto ... 16&t=64442 it stopped working for all services on 2 hosts. If I build new hosts and services, they don't work either. Existing host/service checks work fine.

Re: Plugin timed out while executing system call

Posted: Fri Feb 04, 2022 5:18 pm
by ssax
Given it's failing on the new host but works on the old one I'm inclined to think it's a FW/ACL/whitelist/or piece of security software that is not allowing it.

The problem is SNMP uses UDP so there will be no response back, so we can't use nmap or traceroute to prove it's being blocked.

You'll either need to login to the network AND security devices along the network path it should take and review the logs OR grab a packet capture on the XI server and see what it shows when you run the command below as root on the NEW system (and leave it running):

Code: Select all

tcpdump -nni any -w /tmp/tcpdump_capture1.pcap
Then in another SSH session to the NEW server, run the check again to replicate the issue, then hit CTRL+C the tcpdump command to stop it and attach the resulting /tmp/tcpdump_capture1.pcap so we can review it.

Thank you!

Re: Plugin timed out while executing system call

Posted: Mon Feb 07, 2022 11:32 am
by jameyw
You can close the thread. I can correctly monitor the UPS now. The timeout was caused by a typo in the device's allowed SNMP manager settings.

Re: Plugin timed out while executing system call

Posted: Tue Feb 08, 2022 12:59 pm
by pbroste
Excellent, let us know if there is anything further,
Perry