check_nrpe: Receive header underflow - only 0 bytes receive
Posted: Wed Apr 29, 2020 10:23 am
Hello again,
For my sins, I have been asked to perform a simple task: monitor a process on a remote server.
No problem! Nagios provides a handy-dandy plugin called check_procs, which should do the trick and be amazingly easy to install and configure.
So I do the following:
>yum --enablerepo=epel -y install nrpe nagios-plugins
(nb: this is on RHEL 7.x and I had just installed the latest EPEL repo on this box)
But wait -- we're missing both check_nrpe AND check_proc. I can fix this easy-peasy!
>install nagios-plugins-procs
>install nagios-plugins-nrpe
>systemctl enable nrpe
>systemctl start nrpe
>ps -ef | grep nrpe
nrpe 7024 1 0 07:56 ? 00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
Hooray, I'm up and running! Certainly, this is going to be a wonderful day that will in no way be marred by technical difficulties that will leave me slamming my head against my desk for three hours and praying to catch CV-19 just to end my suffering.
>./check_nrpe -H localhost
NRPE v4.0.2
Close! So close! Now, we just need to test it all out:
>./check_nrpe -H localhost -c check_proc -a 'procname'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
AAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!
Ok, don't panic, I can handle this; Google is your friend.
(Google, Google, Google, AH-HA!)
Oh, it's some SSL nonsense, because obviously just having things work would take the fun out of life. Alrighty, all I need to do is add a "-n" to the command line and check_nrpe will bypass the SSL check:
>./check_nrpe -H localhost -n -c check_proc -a 'procname'
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).
AAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!
Having now been at this for three irreplaceable hours of my life, and upon answering the fourth email today from my boss asking if this simple task is complete, I come to you a-begging: oh great Masters of Nagios, whyfor doesn't this #$@#$@#!!!ing thing work?
Thank you,
-- Mike Beebe
For my sins, I have been asked to perform a simple task: monitor a process on a remote server.
No problem! Nagios provides a handy-dandy plugin called check_procs, which should do the trick and be amazingly easy to install and configure.
So I do the following:
>yum --enablerepo=epel -y install nrpe nagios-plugins
(nb: this is on RHEL 7.x and I had just installed the latest EPEL repo on this box)
But wait -- we're missing both check_nrpe AND check_proc. I can fix this easy-peasy!
>install nagios-plugins-procs
>install nagios-plugins-nrpe
>systemctl enable nrpe
>systemctl start nrpe
>ps -ef | grep nrpe
nrpe 7024 1 0 07:56 ? 00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
Hooray, I'm up and running! Certainly, this is going to be a wonderful day that will in no way be marred by technical difficulties that will leave me slamming my head against my desk for three hours and praying to catch CV-19 just to end my suffering.
>./check_nrpe -H localhost
NRPE v4.0.2
Close! So close! Now, we just need to test it all out:
>./check_nrpe -H localhost -c check_proc -a 'procname'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)
AAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!
Ok, don't panic, I can handle this; Google is your friend.
(Google, Google, Google, AH-HA!)
Oh, it's some SSL nonsense, because obviously just having things work would take the fun out of life. Alrighty, all I need to do is add a "-n" to the command line and check_nrpe will bypass the SSL check:
>./check_nrpe -H localhost -n -c check_proc -a 'procname'
CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).
AAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!
Having now been at this for three irreplaceable hours of my life, and upon answering the fourth email today from my boss asking if this simple task is complete, I come to you a-begging: oh great Masters of Nagios, whyfor doesn't this #$@#$@#!!!ing thing work?
Thank you,
-- Mike Beebe