Page 1 of 2

Service Check pending - Fail

Posted: Thu Dec 01, 2016 3:42 pm
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,

Re: Service Check pending - Fail

Posted: Thu Dec 01, 2016 4:08 pm
by ruffsense
Add a timeout -t 30

Re: Service Check pending - Fail

Posted: Thu Dec 01, 2016 6:00 pm
by avandemore
Are you saying adding a timeout resolved your issue?

Re: Service Check pending - Fail

Posted: Fri Dec 02, 2016 11:40 am
by maartin.pii
I have added the timeout value. However, I am still getting the same error.

Regards,

Re: Service Check pending - Fail

Posted: Fri Dec 02, 2016 3:09 pm
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?

Re: Service Check pending - Fail

Posted: Tue Dec 06, 2016 12:51 pm
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,

Re: Service Check pending - Fail

Posted: Tue Dec 06, 2016 4:18 pm
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

Re: Service Check pending - Fail

Posted: Tue Dec 06, 2016 5:28 pm
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

Re: Service Check pending - Fail

Posted: Wed Dec 07, 2016 3:27 am
by ruffsense
@lmiltchev i was asking him. :=)

Re: Service Check pending - Fail

Posted: Wed Dec 07, 2016 10:07 am
by lmiltchev
@ruffsense
My bad. I thought you were asking us. :)