Please upload that file here into the forums so we can review it's contents.sidserra wrote:That's my windows.cfg in use in my Nagios:
What @nozlaf has said is the cause of your issue.
Please upload that file here into the forums so we can review it's contents.sidserra wrote:That's my windows.cfg in use in my Nagios:
When I restart Nagios service (service nagios restart), all works fine (the Nagios, not the passive services) with this windows.cfg, but in the syslog server stills showing "Unable to find service" to cpu and memory usage services, I mean, the Nagios Nrdp server is receiving the passive checks coming from Windows host but it isn't processing it. I don't want to monitor any services posted here, I just want that Windows hosts are listed as alive (UP) and nothing else...
You will need to update your NRDP configuration on the client so it doesn't do the cpu and memory checks, this is why you are seeing these errors in the logs as there is no service in Nagios to match the incoming passive check result.sidserra wrote:but in the syslog server stills showing "Unable to find service" to cpu and memory usage services,
But one question: how the nrdp server will list the Windows hosts as alive without a passive check sent by NCPA? I mean, using the send_nrdp script (Linux hosts) to send passive checks, a xml file is created and sent to NRDP Nagios server and all Linux hosts are listed as alive. Well, changing the ncpa.cfg as above, the Windows host stills down... I think to give up to use NCPA, I'm losting a lot of time with a thing that I do in a blink of eyes with Linux...[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
loglevel = info
gid = nagcmd
sleep = 600
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token = mytoken
hostname = SectTest
parent = http://x.x.x.x/nrdp/
[nrds]
URL =
CONFIG_VERSION =0
TOKEN =
CONFIG_NAME =
CONFIG_OS = None
PLUGIN_DIR=plugins/
UPDATE_CONFIG=1
UPDATE_PLUGINS=1
[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
.exe = cmd /c $plugin_name $plugin_args
[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
Oh God, hehehe...ParseError: syntax error: line 1, column 0
2016-07-05 11:12:29,437:INFO:__init__:Establishing passive handler: Handler
2016-07-05 11:12:29,437:INFO:connectionpool:Starting new HTTP connection (1): xxx.xxx.xxx.xxx
2016-07-05 11:12:29,723:ERROR:__init__:syntax error: line 1, column 0
Traceback (most recent call last):
File "C:\ncpa\agent\ncpa_windows.py", line 192, in run_all_handlers
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 112, in run
self.submit_to_nagios(checkresults)
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 166, in submit_to_nagios
Handler.log_result(ret_xml)
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 132, in log_result
tree = xml.dom.minidom.parseString(ret_xml)
File "C:\Python27\lib\xml\dom\minidom.py", line 1928, in parseString
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 940, in parseString
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 223, in parseString
ExpatError: syntax error: line 1, column 0
2016-07-05 11:17:29,723:INFO:__init__:Establishing passive handler: Handler
2016-07-05 11:17:29,723:INFO:connectionpool:Starting new HTTP connection (1): xxx.xxx.xxx.xxx
2016-07-05 11:17:29,989:ERROR:__init__:syntax error: line 1, column 0
Traceback (most recent call last):
File "C:\ncpa\agent\ncpa_windows.py", line 192, in run_all_handlers
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrds.py", line 37, in run
if self.config_update_is_required(nrds_url, nrds_token, nrds_config, nrds_config_version):
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrds.py", line 137, in config_update_is_required
response_xml = ET.fromstring(url_request)
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1300, in XML
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1642, in feed
File "C:\Python27\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
ParseError: syntax error: line 1, column 0
2016-07-05 11:17:29,989:INFO:__init__:Establishing passive handler: Handler
2016-07-05 11:17:29,989:INFO:connectionpool:Starting new HTTP connection (1): xxx.xxx.xxx.xxx
2016-07-05 11:17:30,269:ERROR:__init__:syntax error: line 1, column 0
Traceback (most recent call last):
File "C:\ncpa\agent\ncpa_windows.py", line 192, in run_all_handlers
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 112, in run
self.submit_to_nagios(checkresults)
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 166, in submit_to_nagios
Handler.log_result(ret_xml)
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrdp.py", line 132, in log_result
tree = xml.dom.minidom.parseString(ret_xml)
File "C:\Python27\lib\xml\dom\minidom.py", line 1928, in parseString
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 940, in parseString
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 223, in parseString
ExpatError: syntax error: line 1, column 0