CRITICAL - Plugin timed out while executing system call.

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

CRITICAL - Plugin timed out while executing system call.

Postby abdultayyeb » Sat Aug 24, 2019 12:45 pm

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

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

Postby mcapra » Mon Aug 26, 2019 1:49 pm

A related thread:
viewtopic.php?f=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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3587
Joined: Thu May 05, 2016 3:54 pm

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

Postby ssax » Mon Aug 26, 2019 4:36 pm

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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4402
Joined: Wed Feb 11, 2015 12:54 pm


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 8 guests