CRITICAL - Plugin timed out while executing system call.

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

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 iso.
iso. = Timeticks: (86716) 0:14:27.16

abdultayyeb@ubuntu:~$ snmpwalk -v 2c -c abdultayyeb
iso. = STRING: "Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)
Technical Support:
Copyright (c) 1986-2014 by Cisco Systems, Inc.
Compiled Thu 20-Feb-14 06:51 by prod_rel_team"
iso. = OID: iso.
iso. = 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.'
check_interval 1
retry_interval 1

Any help would be highly appreciable.

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:

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: ... 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
User avatar
Posts: 3600
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
Dreams In Code
Posts: 5021
Joined: Wed Feb 11, 2015 12:54 pm

Return to Community Support

Who is online

Users browsing this forum: tom101, yodaeichen and 43 guests