Passive checks sending empty outputs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
snuman
Posts: 7
Joined: Thu May 02, 2019 6:20 am

Passive checks sending empty outputs

Post by snuman »

Dear,

We are running into the following issue with a passive check on one of our systems. There are 3 identical systems like this one that dont give this issue.
The system is using the following configuration for passive checks

----------------------------
[settings]
CONFIG_VERSION=1.6
CONFIG_OS=Windows (64-bit)
CONFIG_NAME=MANUALLY REMOVED
URL=https://MANUALLY REMOVED/nrdp/
TOKEN=MANUALLY REMOVED
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
IGNORE_SSL_CERTIFICATE_ERRORS=1
UPDATE_CONFIG=1
UPDATE_PLUGINS=1


[services]
command[__HOST__] = $PLUGIN_DIR$\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80%
command[System - CPU] = $PLUGIN_DIR$\check_cpu.ps1 -w 70 -c 90
command[System - HDD] = $PLUGIN_DIR$\check_pdm.exe --disk --drive C: -w 75 -c 90
command[System - RAM] = $PLUGIN_DIR$\check_pdm.exe --memory -w 90 -c 99
command[Services -DNS] = $PLUGIN_DIR$\service_nrpe_nt.exe "DNS Client"


[extensions]
vbs = cscript //nologo $CHECK_COMMAND$
ps1 = powershell -ExecutionPolicy Bypass -File $CHECK_COMMAND$
---------------------------

Now the HDD, RAM, and the Host checks give no output when sending this.
When we open a command prompt and manually do the tests they work fine and give a output, but when we check the log "NRDS_Debug" we see the following
1/8/2021 9:45:01 AM XML to be posted to NRDP : token=MANUALLY REMOVED&cmd=submitcheck&XMLDATA=<?xml version='1.0'?><checkresults><checkresult type='host' checktype='1'><hostname>MANUALLY REMOVED</hostname><state>1</state><output></output></checkresult><checkresult type='service' checktype='1'><hostname>MANUALLY REMOVED</hostname><servicename>System - CPU</servicename><state>0</state><output>OK+%2D+CPU+usage+is+at+8+%25%7C%25%3D8%3B70%3B90</output></checkresult><checkresult type='service' checktype='1'><hostname>MANUALLY REMOVED</hostname><servicename>System - HDD</servicename><state>1</state><output></output></checkresult><checkresult type='service' checktype='1'><hostname>MANUALLY REMOVED</hostname><servicename>System - RAM</servicename><state>1</state><output></output></checkresult><checkresult type='service' checktype='1'><hostname>MANUALLY REMOVED</hostname><servicename>Services -DNS</servicename><state>0</state><output>DNS+Client+OK+</output></checkresult></checkresults>

For some reason both the HDD and the RAM give no output in the XML
System - HDD</servicename><state>1</state><output></output>
System - RAM</servicename><state>1</state><output></output>
What we have already tried
1) Remove and do a reinstall of the Nagios agent
2) checked the file privilege's with a known working system to make sure they have the correct access rights.
3) checked the files on this systems with a known working one
4) checked this forum

Does anyone know how we can resolve this?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Passive checks sending empty outputs

Post by vtrac »

Hi snuman,
Looks like both HDD and RAM failed with state="1".

Could you please update the log (below):
C:\Program Files\Nagios\NRDS_Win\logs\NRDS_Debug.log

Also, here's the instruction for setting up "Passive Monitoring With NRDS_Win"
https://assets.nagios.com/downloads/nag ... DS-Win.pdf

Regards,
Vinh
snuman
Posts: 7
Joined: Thu May 02, 2019 6:20 am

Re: Passive checks sending empty outputs

Post by snuman »

vtrac wrote:Hi snuman,
Looks like both HDD and RAM failed with state="1".

Could you please update the log (below):
C:\Program Files\Nagios\NRDS_Win\logs\NRDS_Debug.log

Also, here's the instruction for setting up "Passive Monitoring With NRDS_Win"
https://assets.nagios.com/downloads/nag ... DS-Win.pdf

Regards,
Vinh
I have added the latest log file (only edited out any company details and token)
I know of the NRDS manual, we are running 142 passive hosts on our current Nagios and 4 of those are the same kind of systems. 3 of them are working fine and only 1 (this one) is giving this issue. The same plugin is used in dozens of systems with comparable configuration and neither of them show this behavior either.
When we run the tests manually from PowerShell they give an output value on the screen. Making it really hard to understand why this system is having this issue.
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Passive checks sending empty outputs

Post by vtrac »

Hi snuman,
I have tested this by creating a new NRDS_win on my environment and it is working fine.
I looked at your log and noticed that your [__HOST__], HD and RAM all failed with return code "1".
So, there is NO data to pass to Nagios XI.

Code: Select all

1/11/2021 4:23:05 PM command to be run : C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80%
1/11/2021 4:23:05 PM command line executing : cmd /c C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80% > %temp%\output.txt
1/11/2021 4:23:05 PM return results from plugin : 
1/11/2021 4:23:05 PM return code from plugin : 1

Code: Select all

1/11/2021 4:23:07 PM command to be run : C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --disk --drive C: -w 75 -c 90
1/11/2021 4:23:07 PM command line executing : cmd /c C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --disk --drive C: -w 75 -c 90 > %temp%\output.txt
1/11/2021 4:23:07 PM return results from plugin : 
1/11/2021 4:23:07 PM return code from plugin : 1

Code: Select all

1/11/2021 4:23:07 PM command to be run : C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --memory -w 90 -c 99
1/11/2021 4:23:07 PM command line executing : cmd /c C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --memory -w 90 -c 99 > %temp%\output.txt
1/11/2021 4:23:07 PM return results from plugin : 
1/11/2021 4:23:07 PM return code from plugin : 1
Here's my log output for running "check_pdm.exe" from my scheduled task:
nrds-log.png
Please check that your plugins are correct. Below are the size of my "plugins" just installed today:
plugins.png
Please make sure the permissions are set correctly for "check_pdm.exe" and "check_winping.exe" with "read & execute" allowed.
Also, please check your Task Schedule and make sure settings are correctly set as well.

Also, please run those commands (below) manually and post the results if you can:

Code: Select all

C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_winping.exe -H 127.0.0.1 --warning 200,40% --critical 400,80%
C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --disk --drive C: -w 75 -c 90
C:\PROGRA~1\Nagios\NRDS_Win\plugins\check_pdm.exe --memory -w 90 -c 99
For example:
ex-cmd.png
Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
Locked