Service Check pending - Fail

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
maartin.pii
Posts: 84
Joined: Wed May 18, 2016 1:39 pm

Service Check pending - Fail

Post by maartin.pii »

Hi Guys,

I have configured a few service checks for a Cisco ASA with the check_cisco.pl script.

My problem is that since I have configured it I always see it as 'service check is pending' but it never executes, and if I force to execute it now I receive the following error:

"your request was not processed in a timely manner...."

Code: Select all

CORE CMD: SCHEDULE_FORCED_SVC_CHECK;ASA1;NET : CPU;1480624762
SUBMITTING A NAGIOSCORE COMMAND...
................[root@MGMON101 var]# tail cmdsubsys.log
Array
(
    [host_name] => ASA1
    [service_name] => NET : CPU
    [cmd] => 54
    [start_time] => 1480624762
)
CORE CMD: SCHEDULE_FORCED_SVC_CHECK;ASA1;NET : CPU;1480624762
SUBMITTING A NAGIOSCORE COMMAND...
.................
But nothing happens...

However, if I go CCM -> Services -> ASA1 -> Test Check Command - The check executes it ok and the result is ok too.

So I am not pretty sure what is going on here. I also have the same issue with some checks that works in some servers but not for others and the steps to reproduce them are the same.

I attach some screenshots of it.

Regards,
You do not have the required permissions to view the files attached to this post.
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: Service Check pending - Fail

Post by ruffsense »

Add a timeout -t 30
I don't insult, I diagnose.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Service Check pending - Fail

Post by avandemore »

Are you saying adding a timeout resolved your issue?
Previous Nagios employee
maartin.pii
Posts: 84
Joined: Wed May 18, 2016 1:39 pm

Re: Service Check pending - Fail

Post by maartin.pii »

I have added the timeout value. However, I am still getting the same error.

Regards,
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Service Check pending - Fail

Post by mcapra »

It could be that the Perl script is hanging for some reason. Can you show us the full check_command definition for these services that are not working? Can you also attach the check_cisco.pl script you are using?
Former Nagios employee
https://www.mcapra.com/
maartin.pii
Posts: 84
Joined: Wed May 18, 2016 1:39 pm

Re: Service Check pending - Fail

Post by maartin.pii »

Hi Guys,

I am having the same issue with two other checks (both are snmp checks). If execute them from 'test check command' or by hand on cli they work ok, but from Nagios they are alway as 'scheduled for' - all other checks work ok on Nagios.

This two checks are 'check_snmp_mem.pl' and monitor switch/router wizar - Example:

$USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -I cisco -C $ARG1$ -w $ARG2$ -c $ARG3$

$USER1$/check_ifoperstatus -H $HOSTADDRESS$ -C $ARG1$ -k $ARG2$

I would really appreciate any kind of help-

Regards,
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: Service Check pending - Fail

Post by ruffsense »

where is the -t?
./check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m] [-t <timeout>] [-V]

-v, --verbose

print extra debugging information (including interface list on the system)

-h, --help

print this help message

-H, --hostname=HOST

name or IP address of host to check

-C, --community=COMMUNITY NAME

community name for the host's SNMP agent (implies SNMP v1 or v2c with option)

-2, --v2c

Use snmp v2c

-l, --login=LOGIN ; -x, --passwd=PASSWD

Login and auth password for snmpv3 authentication

If no priv password exists, implies AuthNoPriv

-X, --privpass=PASSWD

Priv password for snmpv3 (AuthPriv protocol)

-L, --protocols=<authproto>,<privproto>

<authproto> : Authentication protocol (md5|sha : default md5)

<privproto> : Priv protocole (des|aes : default des)

-P, --port=PORT

SNMP port (Default 161)

-w, --warn=INTEGER | INT,INT

warning level for memory in percent (0 for no checks)

Default (-N switch) : comma separated level for Real Memory and Swap

-I switch : warning level

-c, --crit=INTEGER | INT,INT

critical level for memory in percent (0 for no checks)

Default (-N switch) : comma separated level for Real Memory and Swap

-I switch : critical level

-N, --netsnmp (default)

check linux memory & swap provided by Net SNMP

-m, --memcache

include cached memory in used memory (only with Net-SNMP)

-I, --cisco

check cisco memory (sum of all memory pools)

-E, --hp

check HP proccurve memory

-f, --perfdata

Performance data output

-t, --timeout=INTEGER

timeout for SNMP in seconds (Default: 5)

-V, --version

prints version number
I don't insult, I diagnose.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Check pending - Fail

Post by lmiltchev »

@maartin.pii
Can you show us the check that "works" run from the command line along with the output of it? Also, post the service & the command definition. You can grab the configs by going to the Core Config Manager->Services and Core Config Manager->Commands, and clicking on the "View config" button (the diskette icon).

BTW, I tested the plugin by setting a service with a check command defined as this:

Code: Select all

check_command			check_snmp_mem.pl!mycommunity!80!90!!!!!
My command is defined like this:

Code: Select all

$USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG1$ -2 -I -w $ARG2$ -c $ARG3$
Here's what I see in the GUI:
example01.PNG
@ruffsense
where is the -t?
example02.PNG
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: Service Check pending - Fail

Post by ruffsense »

@lmiltchev i was asking him. :=)
I don't insult, I diagnose.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Check pending - Fail

Post by lmiltchev »

@ruffsense
My bad. I thought you were asking us. :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked