Canout get output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Canout get output

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Canout get output

Post 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.
Former Nagios Employee.
me.
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Re: Canout get output

Post by dan@thinkip »

Using version 5.2.0 Nagios XI and 1.8.1 for NCPA
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Re: Canout get output

Post 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
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Re: Canout get output

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Canout get output

Post 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.
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Re: Canout get output

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Canout get output

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dan@thinkip
Posts: 8
Joined: Fri Oct 16, 2015 1:28 pm

Re: Canout get output

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Canout get output

Post by tmcdonald »

Those are used to separate command arguments in our configs. Does your NCPA token have an exclamation mark in it by chance?
Former Nagios employee
Locked