Page 1 of 1

NRPE payload return

Posted: Fri Aug 10, 2018 12:19 pm
by SteveBeauchemin
I have a need to get many lines of data returned from a service test using check_nrpe.
At this time, the return is being truncated to 8189 bytes.
This is my returned data on my Nagios XI host

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H [remote-host] -c roll-logs -a "oraarchlog pr1" > /tmp/x.x
wc /tmp/x.x
 179  796 8189 /tmp/x.x
This is the file on the remote host that I need to have in the Nagios Status Information display. This is the expected return data.

Code: Select all

wc oracle-archive.log
445 1812 18899 oracle-archive.log
The data above needs to be seen by the Data Center operators.

The version of nrpe on both hosts is 3.2.1
Remote host is HP-UX. I compiled and deployed the nrpe.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H [remote-host]
NRPE v3.2.1
The Nagios XI host. Also compiled by me.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -V
NRPE Plugin for Nagios
Version: 3.2.1
Are there some code edits I need to make to get a 64K packet size to work?

Please advise...

Thanks

Steve B

Re: NRPE payload return

Posted: Fri Aug 10, 2018 1:20 pm
by syang
Hello Steve,

Please take a look at this link explaining how to increase NRPE payload: https://support.nagios.com/kb/article.php?id=518
Hope this helps!

See

Re: NRPE payload return

Posted: Fri Aug 10, 2018 1:29 pm
by scottwilkerson
What if you add a larger payload length to the check_nrpe command -P 32768

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H [remote-host] -P 32768 -c roll-logs -a "oraarchlog pr1" > /tmp/x.x
wc /tmp/x.x

Re: NRPE payload return

Posted: Fri Aug 10, 2018 1:37 pm
by SteveBeauchemin
From what I can tell, the -P [buffer-size] command only works if you use the -2 to force it into Version 2 mode.

Code: Select all

./check_nrpe -H dbusrpr1 -P 32768 -c roll-logs -a "oraarchlog pr1"
Error: if a fixed payload size is specified, '-2' must also be specified

Incorrect command line arguments supplied

Code: Select all

./check_nrpe -H dbusrpr1 -2 -P 32768 -c roll-logs -a "oraarchlog pr1"
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
Steve B

Re: NRPE payload return

Posted: Fri Aug 10, 2018 2:22 pm
by SteveBeauchemin
syang

I looked at that KB article, and others. I always research before posting. Posting is my last resource... my final step if I cannot fix something.

I am not using NSClient++ for this test.

Both sides of the communication channel are nrpe that I compiled. Version 3.2.1

From what I understand, the packet size is supposed to be able to get up to 64K. I need less than 20K. I am getting 8K.

The -P parameter only works for Version 2 communication to NSClient++

I think the solution I need requires a code edit to fix the problem. I think this is a bug. I read that 64K packet size now works. Make it so. Please.

In the nrpe changelog for release 3.0.0 - 2016-08-01
  • Added support for version 3 variable sized packets up to 64KB. nrpe will accept either version from check_nrpe. check_nrpe will try to send a version 3 packet first, and fall back to version 2. check_nrpe can be forced to only send version 2 packets if the switch -2 is used.

Steve B

Re: NRPE payload return

Posted: Fri Aug 10, 2018 4:12 pm
by npolovenko
@SteveBeauchemin, Would you be able to open a new issue on the Github page?
https://github.com/NagiosEnterprises/nrpe/issues/new
That way you can continue troubleshooting this problem directly with our Dev team.

Re: NRPE payload return

Posted: Mon Aug 13, 2018 9:39 am
by SteveBeauchemin

Re: NRPE payload return

Posted: Mon Aug 13, 2018 10:36 am
by npolovenko
@SteveBeauchemin, Great, you can also reference this thread in the description of the issue on GitHub. I will be closing this forum thread.