ncpa-1.8.1-1.el7.centos.x86_64
I'm trying the ncpa passive agent for monitoring.
When the agent starts the log shows a syntax error. How do I trouble shoot this?
2015-04-27 18:15:54,929 24699 INFO Establishing passive handler: Handler
2015-04-27 18:15:54,929 24699 ERROR Cannot parse passive directive for loglevel, name malformed, skipping.
2015-04-27 18:15:54,929 24699 ERROR Cannot parse passive directive for logmaxmb, name malformed, skipping.
2015-04-27 18:15:54,930 24699 ERROR Cannot parse passive directive for gid, name malformed, skipping.
2015-04-27 18:15:54,930 24699 ERROR Cannot parse passive directive for logbackups, name malformed, skipping.
2015-04-27 18:15:54,930 24699 ERROR Cannot parse passive directive for uid, name malformed, skipping.
2015-04-27 18:15:54,930 24699 INFO Running check: /cpu/percent --warning 20 --critical 30
2015-04-27 18:15:55,933 24699 INFO Running check: /memory/swap/percent --warning 40 --critical 80
2015-04-27 18:15:55,935 24699 INFO Running check: /memory/virtual/percent --warning 60 --critical 80
2015-04-27 18:15:55,939 24699 INFO Starting new HTTPS connection (1): 160.34.96.38
2015-04-27 18:15:55,951 24699 ERROR syntax error: line 1, column 49
Traceback (most recent call last):
File "ncpa_posix_passive.py", line 41, in run_all_handlers
File "/root/Development/ncpa/agent/passive/nrdp.py", line 112, in run
File "/root/Development/ncpa/agent/passive/nrdp.py", line 166, in submit_to_nagios
File "/root/Development/ncpa/agent/passive/nrdp.py", line 132, in log_result
File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
ExpatError: syntax error: line 1, column 49
[listener]
uid = nagios
certificate = adhoc
loglevel = info
ip = 0.0.0.0
gid = nagcmd
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid
# Available versions: PROTOCOL SSLv2, SSLv3, TLSv1
ssl_version = TLSv1
[passive]
uid = nagios
#handlers = nrds,nrdp
handlers = nrdp
loglevel = info
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token = XYXXY
hostname = test01
parent = https://10.34.96.38
[nrds]
URL = None
CONFIG_VERSION = None
TOKEN = None
CONFIG_NAME = None
CONFIG_OS = None
[api]
community_string = mytoken
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
[passive checks]
%HOSTNAME%|cpu usage = /cpu/percent --warning 20 --critical 30
%HOSTNAME%|swap usage = /memory/swap/percent --warning 40 --critical 80
%HOSTNAME%|memory usage = /memory/virtual/percent --warning 60 --critical 80
ncpa passive agent syntax error
Re: ncpa passive agent syntax error
As it turns out, with logdevel =debug, I can see that the nagios server is responding with HTTP401 auth required when posting results
How do I specify a user/password on the parent = https://..../nrdp/ parameter?
How do I specify a user/password on the parent = https://..../nrdp/ parameter?
Re: ncpa passive agent syntax error
You should be able to use this URL.
Code: Select all
https://username:password@YOURCORESERVER/nrdp