Nagios Core - NCPA unable to parse plugin arguments

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
steven.w41
Posts: 2
Joined: Thu Jul 30, 2015 2:12 pm

Nagios Core - NCPA unable to parse plugin arguments

Post 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
Last edited by tmcdonald on Thu Jul 30, 2015 3:51 pm, edited 1 time in total.
Reason: Fixed title from "NCPE" to "NCPA"
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios Core - NCPA unable to parse plugin arguments

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
steven.w41
Posts: 2
Joined: Thu Jul 30, 2015 2:12 pm

Re: Nagios Core - NCPA unable to parse plugin arguments

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

Re: Nagios Core - NCPA unable to parse plugin arguments

Post 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
Former Nagios employee
Locked