Page 1 of 2

Canout get output

Posted: Thu Oct 22, 2015 3:40 pm
by dan@thinkip
Put the agent ncpa on my windows 10 box. Any checks that use "xiwizard_ncpa_service" and check_command "check_xi_ncpa_agent; getting "warning" and Status--" (No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''.

What is missing?

Re: Canout get output

Posted: Fri Oct 23, 2015 10:02 am
by hsmith
What version of XI / NCPA are you using? I am not able to reproduce this by using defaults for everything and the latest.

Re: Canout get output

Posted: Fri Oct 23, 2015 3:13 pm
by dan@thinkip
Using version 5.2.0 Nagios XI and 1.8.1 for NCPA

Re: Canout get output

Posted: Fri Oct 23, 2015 3:19 pm
by dan@thinkip
Also another FYI, when I run the commands from the CLI--./check_ncpa.py -H 172.16.3.107 -t xxxx -M disk/logical/C:|/used_percent -w 70 -c 90 -P 5693
This works, but not when it uses
check_xi_ncpa_agent!-t 'xxxxxx' -P 5693 -M cpu/percent -w 20 -c 40

The output on the web
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file

Re: Canout get output

Posted: Fri Oct 23, 2015 3:57 pm
by dan@thinkip
I am now running a tcpdump and noticed that when I force a check, I do not see anything going out on port 5693, but do see it when I send the command manually

Re: Canout get output

Posted: Mon Oct 26, 2015 2:46 pm
by jdalrymple
dan@thinkip wrote:check_xi_ncpa_agent!-t 'xxxxxx' -P 5693 -M cpu/percent -w 20 -c 40
Sorry if this is ridiculously obvious and I'm making assumptions I shouldn't be...

I don't see any specification of the host. Unless you did that in the commands.cfg the command is incomplete.

Re: Canout get output

Posted: Mon Oct 26, 2015 4:02 pm
by dan@thinkip
I have in the command.cfg file:
define command {
command_name check_xi_ncpa_agent
command_line $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
}

If this command wasn't in the command.cfg file I would not be able to restart nagios with the changes.

Re: Canout get output

Posted: Mon Oct 26, 2015 7:48 pm
by Box293
dan@thinkip wrote:The output on the web
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
This makes me think there is a double quote missing.

Can you go to the service in CCM and click the disk icon for that service.

Paste the service definition here please.

Re: Canout get output

Posted: Tue Oct 27, 2015 10:30 am
by dan@thinkip
define service {
name xiwizard_ncpa_service
use xiwizard_generic_service
check_command check_xi_ncpa_agent!!!!!!!!
register 0

}

Why are there !!!!! in the check_command?

Re: Canout get output

Posted: Tue Oct 27, 2015 10:40 am
by tmcdonald
Those are used to separate command arguments in our configs. Does your NCPA token have an exclamation mark in it by chance?