NRDS Monitoring Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

Of course I did.....
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRDS Monitoring Problem

Post by lmiltchev »

Can you show us the "ncpa.cfg" from the "problem" client? Also, start CMD, run the following command and show us the output:

Code: Select all

tasklist | find "ncpa"
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

hold on, this thread is splitting in to different problems the generic nrds client and the ncpa client which i tried as a substitute on a different host.
So what's our direction here. the simple nrds client or the ncpa which in theory should be better because it's is service based.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRDS Monitoring Problem

Post by lmiltchev »

I asked you this, because of what you posted earlier:
I tried using the NCPA client. The host appeared in the unconfigured objects but the never sent any data.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

ok so let focus on the ncpa
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRDS Monitoring Problem

Post by lmiltchev »

Can you show us the "ncpa.cfg" from the "problem" client? Also, start CMD, run the following command and show us the output:

Code: Select all

tasklist | find "ncpa"
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

Ok I have made some progress. There is a bug in the ncpa client installation.
during the ncpa client install you specify hostname and configname. but actually the hostname is written later on in the ncpa.cfg as the config name and vice versa.
So, you have to switch between then. that some thing that you need to sor out.

but now there is another problem the host is getting the check but while i have the right config name it is not updating, its still version 0 on the host.

this is the ncpa.cfg
[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




and this is the log
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>
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

i think here is the problem
2015-01-29 21:33:24,905:ERROR:__init__:Encountered error while getting NRDS config values: No option 'URL' in section: 'nrds'

but there is a url parameter in the nrds section
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NRDS Monitoring Problem

Post by tgriep »

Try changing these lines in the from this

Code: Select all

url =https://monitor.edpcloud.co.il/nrdp/
token =VzgGWzIdN1eFE87vqv1okE481vB3zj6H
to this

Code: Select all

URL =https://monitor.edpcloud.co.il/nrdp/
TOKEN =VzgGWzIdN1eFE87vqv1okE481vB3zj6H
in your ncpa.cfg file
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: NRDS Monitoring Problem

Post by cklayus »

tried it, no good
Locked