Page 1 of 1

Nagios Core - NCPA unable to parse plugin arguments

Posted: Thu Jul 30, 2015 3:48 pm
by steven.w41
Hi all,

I am having a problem with Nagios Core and ncpa. I have a few plugins installed locally, but they all result in this error:

ncpa.cfg section:
ssh.my.server.com|ssh_tcp_22= agent/plugin/check_tcp/-H/10.87.20.38/-p/22/-4/-p/444/-t/30

log
2015-07-30 06:01:03,399 11256 WARNING Unable to parse all arguments from instruction. Mis-paired option: agent/plugin/check_tcp/-H/10.87.20.38/-p/22/-4/-p/444/-t/30
2015-07-30 06:01:03,403 11256 ERROR Improper warning/critical format.
Traceback (most recent call last):
File "/root/Development/ncpa/agent/listener/nodes.py", line 210, in run_check
File "/root/Development/ncpa/agent/listener/nodes.py", line 363, in is_within_range
Exception: Improper warning/critical format.

The code in question is non trivial to the human reader and has no debug output
https://github.com/NagiosEnterprises/nc ... r/nodes.py
line 363

I hope that this post is in the right place, and any help debugging this issue would be greatly appreciated.

Thank you!
Steven

Re: Nagios Core - NCPA unable to parse plugin arguments

Posted: Thu Jul 30, 2015 4:22 pm
by lmiltchev
Can you post the actual command that you are running from the command line along with the output of it? Also, post the service and the command definitions + any relevant templates.

Re: Nagios Core - NCPA unable to parse plugin arguments

Posted: Thu Jul 30, 2015 5:34 pm
by steven.w41
Hi, thank you for your response. Here is one of the commands, and it's output:

Code: Select all

 
./check_tcp -H 10.xxx.xxx.xxx -p 22 -4 -p 444 -t 30
TCP OK - 0.001 second response time on 10.xxx.xxx.xxx port 444|time=0.000559s;;;0.000000;30.000000
Here is the service definition:

Code: Select all

define service {
  use                     default-service
  service_description     chef_tcp_444
  hostgroup_name          data_center_hosts
  check_command           check_chef_tcp_444
  active_checks_enabled   0
  passive_checks_enabled  1
}
and the command definition:

Code: Select all

define command {
  command_name  check_chef_tcp_444
  command_line  $USER1$/check_tcp -H $HOSTADDRESS$ -4 -p 444 -t 35
}
It it helps, here is the command that the NCPA listener is executing:

Code: Select all

      <%= host['hostname'] %>|chef_tcp_444= agent/plugin/check_tcp/-H/<%= host['ip'] %>/-4/-p/444/-t/30 
NCPA is monitoring all of the services passively, and it is not able to execute the above commands because it is not able to interpret them correctly.

Thank you!
Steven

Re: Nagios Core - NCPA unable to parse plugin arguments

Posted: Fri Jul 31, 2015 1:53 pm
by tmcdonald
What NCPA version are you running? I might be missing something, but I have never seen the ncpa.cfg file with arguments presented like that. And by "like that" I mean with forward slashes separating the arguments. Mine looks like this:

%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80