CHECK_NRPE: Receive header underflow

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

CHECK_NRPE: Receive header underflow

Post by RIDS_I2MP »

Hello Team,

We have one AIX server whcih we have been monitoring from a long time, all he services were monitored properly through our Nagios XI.

Not sure why, the services went into UNKNOWN status and we are getting below error for all of them:

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

[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.147.109.107
NRPE v2.12
[nagios@eu2napu003 ~]$
[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -V
NRPE Plugin for Nagios
Version: 3.2.1
[nagios@eu2napu003 ~]$

eu2napu003 - Nagios XI server
Remote host: 10.147.109.107

Please check and help us to resolve this issue.
Thanks & Regards,
I2MP Team.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: CHECK_NRPE: Receive header underflow

Post by benjaminsmith »

Hello @RIDS_I2MP,

Did you make any changes to either the XI server or AIX server recently?

Please run of those those checks from the command line on the Nagios XI server, however, use the -2 option for version 2 packets, and post the output to the thread.

For example,

Code: Select all

/usr/local/nagios/libexec/check_nrpe -2 -H remote-host check_command
Reference:
Nagios XI - How To Test Check Commands From The Command-line
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: CHECK_NRPE: Receive header underflow

Post by RIDS_I2MP »

Hello,

I have ran test check from command line and getting the same output for all of them.

[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 check_disk
NRPE v2.12
[nagios@eu2napu003 ~]$ ^C
[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.147.109.107 check_disk
NRPE v2.12
[nagios@eu2napu003 ~]$
[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 check_services
NRPE v2.12
[nagios@eu2napu003 ~]$
[nagios@eu2napu003 ~]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 check_cpu_custom
NRPE v2.12
[nagios@eu2napu003 ~]$


There was a failover activity on last weekend in which this server was also present, we are not sure if any changes were made.
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Receive header underflow

Post by lmiltchev »

Actually, the correct syntax is to use "-c" to pass the command, e.g.:

Code: Select all

./check_nrpe -H <client ip> -c <command>
so try:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_disk
/usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_services
/usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_cpu_custom
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: CHECK_NRPE: Receive header underflow

Post by RIDS_I2MP »

Hello,

[nagios@eu2napu003 libexec]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_cpu_custom
CPU OK - 112.3% CPU out of entitlement|cpu_ent=112%;;;0;300
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_disk -a '-w 15% -c 10% -p /home'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_disk -a '-w 13% -c 5% -p /u02'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$
[nagios@eu2napu003 libexec]$ /usr/local/nagios/libexec/check_nrpe -2 -H 10.147.109.107 -c check_services -a 'syslogd'
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[nagios@eu2napu003 libexec]$
Thanks & Regards,
I2MP Team.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Receive header underflow

Post by lmiltchev »

The problem seems to be with passing arguments. When you installed NRPE on the client, did you enable command arguments?

Example:

Code: Select all

./configure --enable-command-args
Even if you set up:

Code: Select all

dont_blame_nrpe=1
in the nrpe.cfg, passing arguments would not work, unless you compiled the agent with --enable-command-args.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: CHECK_NRPE: Receive header underflow

Post by RIDS_I2MP »

Hello,

We have set the below value in nrpe.cfg file:

dont_blame_nrpe=1

But, did not enable the below:

./configure --enable-command-args

Please let me know what am I supposed to do now?
Thanks & Regards,
I2MP Team.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CHECK_NRPE: Receive header underflow

Post by scottwilkerson »

RIDS_I2MP wrote:But, did not enable the below:

./configure --enable-command-args
You would then need to re-compile NRPE from source with that configure flag
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: CHECK_NRPE: Receive header underflow

Post by RIDS_I2MP »

Hello,

I tried running that but getting below error:

NON-PROD> [email protected]: /usr/local/nagios/etc > ./configure --enable-command-args
ksh: ./configure: not found.
NON-PROD> [email protected]: /usr/local/nagios/etc >
Thanks & Regards,
I2MP Team.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CHECK_NRPE: Receive header underflow

Post by scottwilkerson »

You need to download the package and be in that directory when you run it

https://support.nagios.com/kb/article.php?id=8
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked