Page 1 of 2

NRDP Issue

Posted: Wed Feb 27, 2013 1:40 pm
by BanditBBS
I setup NRDS_win on my machine and ran it. I have two issues.

1. If i have config and plugins set to update, they check for updates but never run the checks. Also, it isn't downloading the plugins, is that still for a future release?

2. I manually copied in the plugins and they run and submit the check

Code: Select all

2/27/2013 1:30:58 PM XML to be posted to NRDP : token=9buvmj5t3u02&cmd=submitcheck&XMLDATA=<?xml version='1.0'?><checkresults><checkresult type='host' checktype='1'><hostname>test_machine</hostname><state>0</state><output>WINPING+OK+%2D+Round+trip%3A+0+ms%2C+Packet+loss%3A+0%25%2C+packets%3A+5%7C%27round+trip%27%3D0ms%3B200%3B400%3B+%27packet+loss+rate%27%3D0%25%3B40%3B80%3B+packets%3D5%3B</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_winprocess</servicename><state>2</state><output>PROCESS+CRITICAL+%2D+102+process%28es%29%7Cprocesses%3D102%3B40%3B50%3B</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_process</servicename><state>0</state><output>NOW%3A+Mean%3A6%2E600000%25+Variance%3A+2%2E101600%25+CUMULATIVE%3A+Mean%3A6%2E600000%25+Variance%3A+2%2E101600%25%0D%0A</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_diskspace</servicename><state>0</state><output>DISK+OK+%2D+usage%3A+C%3A+52702%2E2+MB+%2843%2E16%25+of+total+122102%2E0+MB%29%7C%27disk+in+use%27%3D52702%2E2MB%3B+%27disk+usage%27%3D43%2E16%25%3B97%2E5%3B99%2E5%3B+%27disk+total%27%3D122102%2E0MB%3B</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_eventlog</servicename><state>1</state><output>Microsoft%2DWindows%2DWLAN%2DAutoConfig%2810002%29%3A+Err%3D0+Warn%3D1+Instances%3D1+Microsoft%2DWindows%2DWLAN%2DAutoConfig%284001%29%3A+Err%3D0+Warn%3D1+Instances%3D1+Microsoft%2DWindows%2DKernel%2DPnP%28219%29%3A+Err%3D0+Warn%3D1+Instances%3D1+NETLOGON%285719%29%3A+Err%3D1+Warn%3D0+Instances%3D1+Microsoft%2DWindows%2DGroupPolicy%281055%29%3A+Err%3D1+Warn%3D0+Instances%3D1+prot%5F2k%2842%29%3A+Err%3D6+Warn%3D0+Instances%3D6+Communicator%2811%29%3A+Err%3D0+Warn%3D2+Instances%3D2+</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_memload</servicename><state>0</state><output>MEMORY+OK+%2D+Physical+usage%3A+2143+MB+%2866%25+of+3240+MB%29%7C%27memory+in+use%27%3D2143MB%3B+%27memory+usage%27%3D66%25%3B90%3B99%3B+%27memory+total%27%3D3240MB%3B</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_physical_mem</servicename><state>0</state><output>MEMORY+OK+%2D+Pagefile+usage%3A+184+MB+%285%25+of+3240+MB%29%7C%27memory+in+use%27%3D184MB%3B+%27memory+usage%27%3D5%25%3B80%3B95%3B+%27memory+total%27%3D3240MB%3B</output></checkresult><checkresult type='service' checktype='1'><hostname>test_machine</hostname><servicename>nrpe_service</servicename><state>0</state><output>DNS+Client+OK+</output></checkresult></checkresults>
and the next line shows NRDP got it ok

Code: Select all

2/27/2013 1:30:58 PM post response from NRDP : <?xml version="1.0" encoding="utf-8"?>
<result>
  <status>0</status>
  <message>OK</message>
    <meta>
       <output>8 checks processed.</output>
    </meta>
</result>
However, I am seeing nothing appear under unconfigured objects in XI.

Anything I can check?

Re: NRDP Issue

Posted: Wed Feb 27, 2013 1:46 pm
by slansing
Hey Bandit,

Can you post your config.ini file located inside the NRDS_Win directory?

Re: NRDP Issue

Posted: Wed Feb 27, 2013 1:49 pm
by scottwilkerson
I am guessing you are running a RAM Disk...

Check /usr/local/nrdp/server/config.inc.php change the following line to match your checkresults directory

Code: Select all

$cfg["check_results_dir"]="/usr/local/nagios/var/spool/checkresults";
you can see the checkresults path by running

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg|grep check_result_path
we have recently found this was missing from the documentation and added it at
http://assets.nagios.com/downloads/nagi ... giosXI.pdf

Re: NRDP Issue

Posted: Wed Feb 27, 2013 1:56 pm
by BanditBBS
scottwilkerson wrote:I am guessing you are running a RAM Disk...
Nope, we are not actually. It is the one thing I have not done yet. The lines match in the files.
slansing wrote:Hey Bandit,

Can you post your config.ini file located inside the NRDS_Win directory?

Code: Select all

[settings]
CONFIG_VERSION=0.4
CONFIG_OS=Windows (32-bit)
CONFIG_NAME=test
URL=http://svwdcnagios02/nrdp
TOKEN=XXXXXXXXXXX
PLUGIN_DIR=C:\Program Files\Nagios\NRDS_Win\plugins
SEND_NRDP=
TMPDIR=
COMMAND_PREFIX=
LOG_FILE=C:\Program Files\Nagios\NRDS_Win\logs\NRDS_Debug.log
UPDATE_CONFIG=0
UPDATE_PLUGINS=0


[services]
command[__HOST__] = $PLUGIN_DIR$\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80%
command[nrpe_winprocess] = $PLUGIN_DIR$\check_winprocess.exe --warning 40 --critical 50
command[nrpe_process] = $PLUGIN_DIR$\cpuload_nrpe_nt.exe 70 90
command[nrpe_diskspace] = $PLUGIN_DIR$\check_pdm.exe --disk --drive C: -w 97.5 -c 99.5
command[nrpe_eventlog] = $PLUGIN_DIR$\eventlog_nrpe_nt.exe -m 7200
command[nrpe_memload] = $PLUGIN_DIR$\check_pdm.exe --memory -w 90 -c 99
command[nrpe_physical_mem] = $PLUGIN_DIR$\check_pdm.exe --memory pagefile -w 80 -c 95
command[nrpe_service] = $PLUGIN_DIR$\service_nrpe_nt.exe "DNS Client"
As stated, I set the two update lines to zero or the checks were not running, it would just try and update the config and plugins instead.

Re: NRDP Issue

Posted: Wed Feb 27, 2013 2:05 pm
by scottwilkerson
That's strange...

Can we check the permissions on the following

Code: Select all

ls -l /usr/local/nagios/var/spool/checkresults
ls -l /usr/local/nagiosxi/var/cor*
ls -ld /usr/local/nagiosxi/var
Also

Code: Select all

cat /etc/group|grep nag

Re: NRDP Issue

Posted: Wed Feb 27, 2013 2:46 pm
by BanditBBS
scottwilkerson wrote:That's strange...

Can we check the permissions on the following

Code: Select all

ls -l /usr/local/nagios/var/spool/checkresults
ls -l /usr/local/nagiosxi/var/cor*
ls -ld /usr/local/nagiosxi/var
Also

Code: Select all

cat /etc/group|grep nag

Code: Select all

[clarkj@svwdcnagios02 /]$ ls -l /usr/local/nagios/var/spool/checkresults
total 0
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 c8CYU1B.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cG6Kbai.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cItRLTV.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cMaxPXL.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cQXgKP5.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cUhdne8.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cWNTAiY.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cWUj25r.ok
[clarkj@svwdcnagios02 /]$ ls -l /usr/local/nagiosxi/var/cor*
-rw-r--r--. 1 nagios nagios 6 Feb 27 14:46 /usr/local/nagiosxi/var/corelog.data
-rw-r--r--. 1 nagios nagios 0 Feb 27 14:46 /usr/local/nagiosxi/var/corelog.diff
-rwxrwxr-x. 1 nagios nagios 6 Feb 26 13:47 /usr/local/nagiosxi/var/corelog.newobjects
[clarkj@svwdcnagios02 /]$ ls -ld /usr/local/nagiosxi/var
drwxr-xr-x. 4 nagios nagios 4096 Feb 27 14:45 /usr/local/nagiosxi/var
[clarkj@svwdcnagios02 /]$ cat /etc/group|grep nag
nagios:x:502:nagios,apache,ecsuser
nagcmd:x:503:apache

Re: NRDP Issue

Posted: Wed Feb 27, 2013 2:59 pm
by scottwilkerson
This all looks very normal...

I am going to ask the obvious...

Do you already have a host "test_machine" setup on the XI server? If so, it will just populating the results, not go to unconfigured objects...

Are you seeing any apache errors when submitting the results?

Code: Select all

tail -f /var/log/httpd/error_log

Re: NRDP Issue

Posted: Wed Feb 27, 2013 3:05 pm
by BanditBBS
scottwilkerson wrote:This all looks very normal...

I am going to ask the obvious...

Do you already have a host "test_machine" setup on the XI server? If so, it will just populating the results, not go to unconfigured objects...

Are you seeing any apache errors when submitting the results?

Code: Select all

tail -f /var/log/httpd/error_log
I appreciate the harder questions first :)

No, test_machine is not setup in XI.

No errors in the apache log when submitting.

Re: NRDP Issue

Posted: Wed Feb 27, 2013 3:07 pm
by BanditBBS

Code: Select all

[clarkj@svwdcnagios02 /]$ ls -l /usr/local/nagios/var/spool/checkresults
total 0
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 c1Ch2VQ.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 c7fxHc1.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 c8CYU1B.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 c9qEp2J.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 cBZ4wSc.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 ceBVWL3.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 cfZPi4V.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cG6Kbai.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 cGOQpKB.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 chA4qst.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 cI8JqkS.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 ciAeuDY.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 cIdnxU8.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cItRLTV.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cMaxPXL.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 coyxtal.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cQXgKP5.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cUhdne8.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 cUVHBA4.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 cVtiel6.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cWNTAiY.ok
-rw-r--r-- 1 apache apache 0 Feb 27 13:32 cWUj25r.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:05 cxq4sC0.ok
-rw-r--r-- 1 apache apache 0 Feb 27 15:04 cySw9uT.ok
It looks like all the checkresults coming back from NRDP are just being stacked up and not processed. Could this have anything to do with us using gearman?

Re: NRDP Issue

Posted: Wed Feb 27, 2013 6:02 pm
by scottwilkerson
Hmm, something doesn't seem right, these are just the .ok files, can you run

Code: Select all

ls -ld /usr/local/nagios/var/spool/checkresults