Hi All,
I had installed Nagios core on EC2 instance and when trying to check load on the remote server, I am getting the below response by executing the command,
./check_nrpe -H 13.201.39.252 -c check_load -a -w .15,.10,.05 -c .30,.25,.20
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
I read somewhere to run --enable-command-args with ./configure but still not working. Any ideas so as to resolve this ?
Thanks,
Piyush Nikhade
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
Re: CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
Thanks for reaching out @pnikhade,
I found this article especially helpful
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
I was able to replicate your issue and resolve it. You have two options.
Enable Command Line Arguments
Open up /usr/local/nagios/etc/nrpe.cfg or wherever the nrpe configuration is on the remote server you are trying to check
Go to the commands section. You'll see a line like so
Change this to
Then, go to a line that looks like so
Change it to
Restart the nrpe service and try again.
The main issue with this is that it is inherintely insecure because any plugin can effectively control the shell. This is why it's recommended to
Alter the Command In the Configuration File
Instead of changing the check_load command to include $ARG1$, simply update the command line arguments in the config file to be what you want
In this case you won't have to edit anything, and the check command would now be
Let me know if you need any more help
I found this article especially helpful
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
I was able to replicate your issue and resolve it. You have two options.
Enable Command Line Arguments
Open up /usr/local/nagios/etc/nrpe.cfg or wherever the nrpe configuration is on the remote server you are trying to check
Go to the commands section. You'll see a line like so
Code: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
Code: Select all
command[check_load]=/usr/local/nagios/libexec/check_load $ARG1$
Code: Select all
dont_blame_nrpe=0
Code: Select all
dont_blame_nrpe=1
The main issue with this is that it is inherintely insecure because any plugin can effectively control the shell. This is why it's recommended to
Alter the Command In the Configuration File
Instead of changing the check_load command to include $ARG1$, simply update the command line arguments in the config file to be what you want
Code: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -w .15,.10,.05 -c .30,.25,.20
Code: Select all
./check_nrpe -H 13.201.39.252 -c check_load
-
- Posts: 1
- Joined: Thu May 09, 2024 11:56 pm
Re: CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
Thanks, it helps.danderson wrote: ↑Mon Apr 15, 2024 2:23 pm Thanks for reaching out @pnikhade,
I found this article especially helpful
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf
I was able to replicate your issue and resolve it. You have two options.
Enable Command Line Arguments
Open up /usr/local/nagios/etc/nrpe.cfg or wherever the nrpe configuration is on the remote server you are trying to check
Go to the commands section. You'll see a line like soChange this toCode: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
Then, go to a line that looks like soCode: Select all
command[check_load]=/usr/local/nagios/libexec/check_load $ARG1$
Change it toCode: Select all
dont_blame_nrpe=0
Restart the nrpe service and try again.Code: Select all
dont_blame_nrpe=1
The main issue with this is that it is inherintely insecure because any plugin can effectively control the shell uno online. This is why it's recommended to
Alter the Command In the Configuration File
Instead of changing the check_load command to include $ARG1$, simply update the command line arguments in the config file to be what you wantIn this case you won't have to edit anything, and the check command would now beCode: Select all
command[check_load]=/usr/local/nagios/libexec/check_load -w .15,.10,.05 -c .30,.25,.20
Let me know if you need any more helpCode: Select all
./check_nrpe -H 13.201.39.252 -c check_load
Last edited by jehofem507 on Fri May 10, 2024 12:03 am, edited 2 times in total.