Plugin time out error

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.
barney
Posts: 10
Joined: Wed Jan 15, 2014 5:42 am

Re: Plugin time out error

Post by barney »

slansing wrote:I just wanted to verify the plugins were actually installed to that directory, can you run the following and show the output?
Hi slansing, output below as requested. As you can see the plugin is installed and does run ok from the command line but I am still getting "Plugin timed out after 10 seconds" from the GUI

Code: Select all

> ls -la /app/nagios/libexec/check_ping
-rwxr-xr-x   1 nagios   nagios    143692 Jan 11  2011 /app/nagios/libexec/check_ping

Code: Select all

> /app/nagios/libexec/check_ping -H nile -w 100.0,20% -c 500.0,60% -L 
<A HREF='/nagios/cgi-bin/traceroute.cgi?nile'>PING OK - Packet loss = 0%, RTA = 1.33ms</A>|rta=1.330000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0
thanks
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Plugin time out error

Post by lmiltchev »

Have you tried adding a timeout value in the command definition? For example:
# 'check-host-alive' command definition
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 -t 30
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
barney
Posts: 10
Joined: Wed Jan 15, 2014 5:42 am

Re: Plugin time out error

Post by barney »

lmiltchev wrote:Have you tried adding a timeout value in the command definition? For example:
# 'check-host-alive' command definition
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 -t 30
}
just tried it (again) and still the same failure...

Code: Select all

Current Status:   CRITICAL   (for 13d 22h 24m 7s) 
Status Information: CRITICAL - Plugin timed out after 10 seconds 
Performance Data:  
Current Attempt: 4/4  (HARD state) 
Last Check Time: 24-01-2014 10:46:07 
Check Type: ACTIVE 
Check Latency / Duration: 0.276 / 10.073 seconds 
Next Scheduled Check:   24-01-2014 10:51:07 
Last State Change: 10-01-2014 12:22:15 
Last Notification: N/A (notification 0) 
Is This Service Flapping?   NO   (0.00% state change) 
In Scheduled Downtime?   NO   
Last Update: 24-01-2014 10:46:20  ( 0d 0h 0m 2s ago) 
and from the command line once again...

Code: Select all

/app/nagios/libexec> ./check_ping -H nile -w 3000.0,80% -c 5000.0,100% -p 10 -t 50
PING OK - Packet loss = 0%, RTA = 0.46 ms|rta=0.463200ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Plugin time out error

Post by slansing »

So I looked back at page one and noticed you didn't actually have a check_command defined for your host, if that is the case then I don't know why we are looking at this host, did you post the wrong configuration?? Is your "linux-server" template responsible for running the check_ping command? If so, is this issue effecting other hosts with that template assigned, and can we see that template?
barney
Posts: 10
Joined: Wed Jan 15, 2014 5:42 am

Re: Plugin time out error

Post by barney »

Hi Slansing, I’m on the limit of my Nagios knowledge here so apologies if I’m missing stuff out.

the host has the following entry in the hosts.cfg file (pollux being the name of the server that runs Nagios)

Code: Select all

define host{
        use                     linux-server
        host_name               nile
        alias                   nile
        address                 xxxx.xxxx.xxxx.xxxx
        parents                 pollux
        }
the check_ping job resides in /app/nagios/libexec

Code: Select all

> ls -l /app/nagios/libexec/check_ping
-rwxr-xr-x   1 nagios   nagios    143692 Jan 11  2011 /app/nagios/libexec/check_ping
for some reason unknown to me we have 2 jobs in the commands file that run check_ping…

Code: Select all

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 -t 30
        }

# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 -t 30
        }

the services.cfg file has only one ping check entry…

Code: Select all

define service{
        use                             local-service
        host_name                       *
        service_description             Ping Check
        check_command                   check_ping!100.0,20%!500.0,60%
        }
I presume that the host_name “*” checks every server on site but the check doesn’t fail with any of them.

thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Plugin time out error

Post by scottwilkerson »

If nile is the host that is failing the Ping Check service you need to run the following to test it, replacing with whatever is in the address field of the nile host definition

Code: Select all

./check_ping -H xxx.xxx.xxx.xxx -w 3000.0,80% -c 5000.0,100% -p 5
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
barney
Posts: 10
Joined: Wed Jan 15, 2014 5:42 am

Re: Plugin time out error

Post by barney »

Oops…

I’ve solved it and I’m VERY sorry but it was a stupid typo on my part! :(

The IP address had been accidentally edited in the hosts.cfg to an incorrect value. Every time I was running the script from the command line I was using the host name hence the reason it was working.

Makes absolute sense now but not being a techie I guess I was just looking for too complex an explanation and not thinking it could be something so basic I should have checked before posting up.

A thousand apologies if I’ve wasted your time!

:oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Plugin time out error

Post by tmcdonald »

Not a problem, that's why we're here. I assume it's safe to lock this thread up?
Former Nagios employee
barney
Posts: 10
Joined: Wed Jan 15, 2014 5:42 am

Re: Plugin time out error

Post by barney »

tmcdonald wrote:Not a problem, that's why we're here. I assume it's safe to lock this thread up?
Please feel free to do whatever.

Thanks again.
Locked