Re: NRDS Monitoring Problem
Posted: Tue Jan 27, 2015 4:11 am
Of course I did.....
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
tasklist | find "ncpa"I tried using the NCPA client. The host appeared in the unconfigured objects but the never sent any data.
Code: Select all
tasklist | find "ncpa"[listener]
uid = nagios
certificate = adhoc
loglevel = debug
ip = 0.0.0.0
gid = nagcmd
logfile = var/ncpa_listener.log
port = 5693
pidfile = var/ncpa_listener.pid
[passive]
uid = nagios
handlers = nrds,nrdp
loglevel = debug
gid = nagcmd
sleep = 300
logfile = var/ncpa_passive.log
pidfile = var/ncpa_passive.pid
[nrdp]
token =VzgGWzIdN1eFE87vqv1okE481vB3zj6H
hostname =PALTS02
parent =https://monitor.edpcloud.co.il/nrdp/
[nrds]
url =https://monitor.edpcloud.co.il/nrdp/
CONFIG_VERSION =0
token =VzgGWzIdN1eFE87vqv1okE481vB3zj6H
CONFIG_NAME =WIN_GENERIC
CONFIG_OS = None
PLUGIN_DIR=plugins/
UPDATE_CONFIG=1
UPDATE_PLUGINS=1
[api]
community_string =
[plugin directives]
plugin_path = plugins/
.sh = /bin/sh $plugin_name $plugin_args
.ps1 = powershell -ExecutionPolicy Unrestricted -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
2015-01-29 21:33:24,905:INFO:__init__:Looking for config at: C:\Program Files (x86)\Nagios\NCPA\etc\ncpa.cfg
2015-01-29 21:33:24,905:INFO:__init__:Looking for plugins at: C:\Program Files (x86)\Nagios\NCPA\plugins
2015-01-29 21:33:24,905:INFO:__init__:Establishing passive handler: Handler
2015-01-29 21:33:24,905:ERROR:__init__:Encountered error while getting NRDS config values: No option 'URL' in section: 'nrds'
2015-01-29 21:33:24,905:ERROR:__init__:local variable 'nrds_url' referenced before assignment
Traceback (most recent call last):
File "C:\ncpa\agent\ncpa_windows.py", line 174, in run_all_handlers
File "C:\Program Files (x86)\Nagios\NCPA\passive\nrds.py", line 31, in run
for directive in [nrds_url, nrds_config, nrds_config_version, nrds_token]:
UnboundLocalError: local variable 'nrds_url' referenced before assignment
2015-01-29 21:33:24,905:INFO:__init__:Establishing passive handler: Handler
2015-01-29 21:33:24,905:DEBUG:__init__:Parsing config for passive commands...
2015-01-29 21:33:24,905:DEBUG:__init__:Initializing NCPA check with /cpu/percent --warning 20 --critical 30
2015-01-29 21:33:24,905:DEBUG:__init__:Initializing NCPA check with /memory/swap/percent --warning 40 --critical 80
2015-01-29 21:33:24,905:DEBUG:__init__:Initializing NCPA check with /memory/virtual/percent --warning 60 --critical 80
2015-01-29 21:33:24,921:INFO:__init__:Running check: /cpu/percent --warning 20 --critical 30
2015-01-29 21:33:24,921:DEBUG:__init__:Getting API url for instruction /cpu/percent --warning 20 --critical 30
2015-01-29 21:33:24,921:DEBUG:__init__:Parsing command line style instruction: /cpu/percent --warning 20 --critical 30
2015-01-29 21:33:24,921:DEBUG:__init__:Determined instruction to be: /cpu/percent --warning 20 --critical 30
2015-01-29 21:33:24,921:DEBUG:__init__:Access the API with /api/cpu/percent/?warning=20&critical=30&check=1
2015-01-29 21:33:24,921:DEBUG:__init__:Getting accessor: cpu/percent/
2015-01-29 21:33:25,934:DEBUG:__init__:Handling JSON response: {
"value": {
"returncode": 0,
"stdout": "OK: percent was 0%,0%,6%,9% | 'percent_0'=0%;20;30; 'percent_1'=0%;20;30; 'percent_2'=6%;20;30; 'percent_3'=9%;20;30;"
}
}
2015-01-29 21:33:25,934:DEBUG:__init__:JSON response handled found stdout='OK: percent was 0%,0%,6%,9% | 'percent_0'=0%;20;30; 'percent_1'=0%;20;30; 'percent_2'=6%;20;30; 'percent_3'=9%;20;30;', returncode=0
2015-01-29 21:33:25,934:INFO:__init__:Running check: /memory/swap/percent --warning 40 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Getting API url for instruction /memory/swap/percent --warning 40 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Parsing command line style instruction: /memory/swap/percent --warning 40 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Determined instruction to be: /memory/swap/percent --warning 40 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Access the API with /api/memory/swap/percent/?warning=40&critical=80&check=1
2015-01-29 21:33:25,934:DEBUG:__init__:Getting accessor: memory/swap/percent/
2015-01-29 21:33:25,934:DEBUG:__init__:Handling JSON response: {
"value": {
"returncode": 0,
"stdout": "OK: percent was 11% | 'percent_0'=11%;40;80;"
}
}
2015-01-29 21:33:25,934:DEBUG:__init__:JSON response handled found stdout='OK: percent was 11% | 'percent_0'=11%;40;80;', returncode=0
2015-01-29 21:33:25,934:INFO:__init__:Running check: /memory/virtual/percent --warning 60 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Getting API url for instruction /memory/virtual/percent --warning 60 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Parsing command line style instruction: /memory/virtual/percent --warning 60 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Determined instruction to be: /memory/virtual/percent --warning 60 --critical 80
2015-01-29 21:33:25,934:DEBUG:__init__:Access the API with /api/memory/virtual/percent/?warning=60&critical=80&check=1
2015-01-29 21:33:25,934:DEBUG:__init__:Getting accessor: memory/virtual/percent/
2015-01-29 21:33:25,934:DEBUG:__init__:Handling JSON response: {
"value": {
"returncode": 0,
"stdout": "OK: percent was 13% | 'percent_0'=13%;60;80;"
}
}
2015-01-29 21:33:25,934:DEBUG:__init__:JSON response handled found stdout='OK: percent was 13% | 'percent_0'=13%;60;80;', returncode=0
2015-01-29 21:33:25,950:DEBUG:__init__:XML to be submitted: <?xml version="1.0" ?><checkresults><checkresult type="service"><servicename>cpu usage</servicename><hostname>PALTS02</hostname><state>0</state><output>OK: percent was 0%,0%,6%,9% | 'percent_0'=0%;20;30; 'percent_1'=0%;20;30; 'percent_2'=6%;20;30; 'percent_3'=9%;20;30;</output></checkresult><checkresult type="service"><servicename>swap usage</servicename><hostname>PALTS02</hostname><state>0</state><output>OK: percent was 11% | 'percent_0'=11%;40;80;</output></checkresult><checkresult type="service"><servicename>memory usage</servicename><hostname>PALTS02</hostname><state>0</state><output>OK: percent was 13% | 'percent_0'=13%;60;80;</output></checkresult></checkresults>
2015-01-29 21:33:25,950:INFO:connectionpool:Starting new HTTPS connection (1): monitor.edpcloud.co.il
2015-01-29 21:33:26,528:DEBUG:connectionpool:"POST /nrdp/ HTTP/1.1" 200 170
2015-01-29 21:33:26,528:DEBUG:__init__:Content response from URL: <?xml version="1.0" encoding="utf-8"?>
<result>
<status>0</status>
<message>OK</message>
<meta>
<output>3 checks processed.</output>
</meta>
</result>
Code: Select all
url =https://monitor.edpcloud.co.il/nrdp/
token =VzgGWzIdN1eFE87vqv1okE481vB3zj6H
Code: Select all
URL =https://monitor.edpcloud.co.il/nrdp/
TOKEN =VzgGWzIdN1eFE87vqv1okE481vB3zj6H