Check_drivesize works differently in testmode and remote


#1

Hello,

when I run the command

check_drivesize drive=c: in test-mode (nescp.exe test) it works correct:

L        cli OK: OK All 1 drive(s) are ok
L        cli  Performance data: 'c: used'=104.51156GB;334.8719;376.73089;0;418.5
8987 'c: used %'=24%;80;90;0;100

But when I run the same command from my nagios server from the shell: /usr/lib/nagios/plugins/check_nrpe -H myserver.com -p 5667 -t 20 -c check_drivesize drive=c: it returns: WARNING : 288.848MB/349.996MB used|'C:\ used'=104.51717GB;334.8719;376.73089;0;418.58987 'C:\ used %'=24%;80;90;0;100 'D:\ used'=2.03591TB;2.91078;3.27462;0;3.63847 'D:\ used %'=55%;79;89;0;100 'X:\ used'=0B;0;0;0;0 '\\?\Volume{836991f8-49e3-41c0-bf9a-e74c3f0214f9}\ used'=288.84765MB;279.99687;314.99648;0;349.99609 '\\?\Volume{836991f8-49e3-41c0-bf9a-e74c3f0214f9}\ used %'=82%;79;89;0;100

It looks like the drive=c: restriction is not honored. Any tips ? Thank You, Andy


#2

Hi, i’ve got same issues on my Windows 7 Machine and other Server 2008 Machines. In test mode (nscp test startet from command line with serviec beeing stopped before) check_nrpe returnes Problems

For Example:

./check_nrpe -H some_IP -p 12489 -c check_resp CRITICAL: MSACCESS 700 SLT-Repository responding:False - MSACCESS 7220 SLT-Repository responding:False - |‘not responding’=2

when i start the nsclient++ normally as a service it returnes nothing

./check_nrpe -H some_IP -p 12489 -c check_resp OK: No non-responding processes found |‘not responding’=0

But there are still 2 processes not responding…

I have same Issues with other remote checks concerning perf-data which comes in test but not in standart mode and so on…

For Data i’m running nscp in the 0.5.0.65 2016-11-13 Version And check_nrpe in Version: 2.15

Nagios XI 5.4.0

The Script i try to execute (and it is executed after all) is a powershell script that returnes non-responding processes. The other Script that reactes differently in test Mode ist the built in check_process which in test mode gives me a process=hung and in normal mode says “all processes are ok”

Does anyone have a clue?

Update:

I tried running the NSClient++ Service logged on with Admin Account and even tried downgrading to Version 0.4.4.23 still it can detect a hanging process only when started locally in test mode… is there a Bug?

I need to make it report hangin Processes. Does anyone have a similar Issue or any suggestions?


#3

check_nrpe needs a -a before the arguments: So use:

/usr/lib/nagios/plugins/check_nrpe ...  -c check_drivesize -a drive=c: