CRITICAL - Plugin timed out while executing system call.

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.
Locked
abdultayyeb
Posts: 1
Joined: Sat Aug 24, 2019 3:24 am

CRITICAL - Plugin timed out while executing system call.

Post by abdultayyeb »

Hey Nagios Community,

I have installed Nagios Core on an Ubuntu VMWare machine for monitoring my network appliances. But I am constantly facing trouble running SNMP on Nagios Core. I have added a single Cisco switch under hosts, but I see this error ' CRITICAL - Plugin timed out while executing system call.' The screenshot for the same is attached herewith.

If I am running SNMP WALK or SNMP GET on the Ubuntu terminal, I am able to see proper results for the query. Below shown is the output after running the above-mentioned commands.
abdultayyeb@ubuntu:~$ snmpget -v2c -c abdultayyeb 10.0.0.1 iso.3.6.1.2.1.1.3.0
iso.3.6.1.2.1.1.3.0 = Timeticks: (86716) 0:14:27.16
abdultayyeb@ubuntu:~$ snmpwalk -v 2c -c abdultayyeb 10.0.0.1
iso.3.6.1.2.1.1.1.0 = STRING: "Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.
Compiled Thu 20-Feb-14 06:51 by prod_rel_team"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.9.1.222
iso.3.6.1.2.1.1.3.0 = Timeticks: (99438) 0:16:34.38
In fact, I was able to see SNMP GET requests made by my Ubuntu server and the corresponding SNMP GET RESPONSE in Wireshark when the Nagios Core was running. But still, the service status for that host remained ' CRITICAL - Plugin timed out while executing system call '. Attached is the image of my Wireshark capture, while Nagios Core was running.

Below shown is the service definition in my Switch.cfg file.
define service {
use generic-service
host_name Testing-SN
service_description Switch Uptime
check_command check_snmp!-P2c -C 'abdultayyeb' -o 'iso.3.6.1.2.1.1.3.0'
check_interval 1
retry_interval 1
}
Any help would be highly appreciable.

Thanks.
Attachments
nagios-error.png
wireshark-capture.png
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: CRITICAL - Plugin timed out while executing system call.

Post by mcapra »

A related thread:
https://support.nagios.com/forum/viewto ... =7&t=44016

Nagios has some internal timeouts that apply to all plugin executions. SNMP is sloooowwwww. If your snmpget command takes longer than 60 seconds to return, you may be hitting the service_check_timeout limit, which triggers Nagios to kill the check.

You could start with adjusting the -t argument passed to your check_snmp command definition. Not sure what that command definition looks like on your system, but you may also be able to pass -t 60 directly in your service definition.

Historically, the recommendation with long-running checks has been to schedule them with something like cron and submit the results to Nagios Core passively:
https://assets.nagios.com/downloads/nag ... hecks.html

If you're curious about that option, there's lots of helpful smartypants people here that can help get this check wired up passively.
Former Nagios employee
https://www.mcapra.com/
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: CRITICAL - Plugin timed out while executing system call.

Post by ssax »

Thanks @mcapra!

Those are the recommended starting points and they are spot on.

Additionally, to compare apples to apples you should run the exact same query from the CLI like this:

Code: Select all

su - nagios
time /usr/local/nagios/libexec/yourplugin.ext --with-all-arguments -t 90
time /usr/local/nagios/libexec/yourplugin.ext --with-all-arguments -t 90
time /usr/local/nagios/libexec/yourplugin.ext --with-all-arguments -t 90
That will give you the average time it takes to run it (by prepending the command with time).
Locked