I run a Nagios Core server on a LAN. I have 5 windows machines outside the network I am talking to via five ssh tunnels on 5 different ports listening to five custom NSClient++ apps. All is working well with this configuration, however I am noticing that check_nt MEMUSE is giving us odd numbers, when in fact all we want/need is the actual Physical memory.

After much digging I discovered check_nrpe, which look like it will give me the data I'm looking for.

I put the following in the commands.cfg:

define command {
       command_name    CheckWindowsPhysicalMem
       command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% ShowAll=long type=physical

And I put the following in my windows.cfg

define service{
        use                     generic-service
        host_name               HOSTNAME
        service_description     Physical Memory
        check_command           CheckWindowsPhysicalMem!80!90

I restarted both nagios and nagios-nrpe-server, and now I'm getting this error:

CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)

I am not sure what I missed here, but if seems like a dependency or a package. Google-fu lost on this one.

  • 1
    Are you using the same version of nrpe on both sides? I hit this problem trying to connect to a very old nrpe server. Oct 25, 2017 at 1:31

1 Answer 1


1. Testing NRPE connection

You can test your connection between your windows and Nagios via NRPE like this :

./check_nrpe -H Server
I ( 2015-04-29) seem to be doing fine...

If you don't pass any arguments to your check_nrpe, the server (windows client) will responde with his version number.

2. Testing your command

On your windows client, you can test locally your command in a console with nscp test.

If your command return good result, you can test from your nagios server without arguments :

# ./check_nrpe -H Server -c alias_cpu
OK: CPU load is ok.|'total 5m'=1%;80;90 'total 1m'=1%;80;90 'total 5s'=2%;80;90

3. NRPE arguments

By default, NRPE not allow the send of arguments from Nagios to a remote client for security considerations. So, you must enable it in the nsclient.ini for each windows station.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.