CHECK_NRPE: Receive header underflow - only 0 bytes received
CHECK_NRPE: Receive header underflow - only 0 bytes received
I am using github issue to record my issue.
Please see details at https://github.com/NagiosEnterprises/nrpe/issues/218
let me know if you need more info.
Please see details at https://github.com/NagiosEnterprises/nrpe/issues/218
let me know if you need more info.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hello @nagmoto,
I believe you are hitting this issue and need to compile NRPE with enable command arguments.
https://github.com/NagiosEnterprises/nrpe/issues/92
See: NRPE - How To Install NRPE v3 From Source
I believe you are hitting this issue and need to compile NRPE with enable command arguments.
https://github.com/NagiosEnterprises/nrpe/issues/92
See: NRPE - How To Install NRPE v3 From Source
Code: Select all
cd /tmp/nrpe-nrpe-3.2.1/
./configure --enable-command-args
make all
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
I am using stock nrpe-3.2.1-8 rpm for centos 7.
the src.rpm was downloaded to see if EPEL missed the " --enable-command-args" ?
But it does have this argument in configure script.
<snipped from nagios.spec>
%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{?__global_ldflags}" \
%configure \
--with-init-dir=%{_initrddir} \
--with-nrpe-port=%{nsport} \
--with-nrpe-user=nrpe \
--with-nrpe-group=nrpe \
--with-piddir=/var/run/nrpe \
--bindir=%{_sbindir} \
--libdir=/doesnt/matter/ \
--libexecdir=%{_libdir}/nagios/plugins \
--datadir=%{_datadir}/nagios \
--sysconfdir=%{_sysconfdir}/nagios \
--localstatedir=%{_localstatedir}/run/ \
--enable-command-args
<snipped>
Also following showing check_nrpe is able to accept arguments from check_time test.
the src.rpm was downloaded to see if EPEL missed the " --enable-command-args" ?
But it does have this argument in configure script.
<snipped from nagios.spec>
%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{?__global_ldflags}" \
%configure \
--with-init-dir=%{_initrddir} \
--with-nrpe-port=%{nsport} \
--with-nrpe-user=nrpe \
--with-nrpe-group=nrpe \
--with-piddir=/var/run/nrpe \
--bindir=%{_sbindir} \
--libdir=/doesnt/matter/ \
--libexecdir=%{_libdir}/nagios/plugins \
--datadir=%{_datadir}/nagios \
--sysconfdir=%{_sysconfdir}/nagios \
--localstatedir=%{_localstatedir}/run/ \
--enable-command-args
<snipped>
Also following showing check_nrpe is able to accept arguments from check_time test.
Code: Select all
[pi@nagios4 src]$ ./check_nrpe -H localhost -2 -4 -c check_logfiles_4A -a "/var/log/nagios/nagios.log" "nagios-log" ".*] Error:.*" ".*NOERROR.*"
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[pi@nagios4 src]$ check_nrpe -H localhost -c check_time -a localhost 1 2
OK - timedrift=0 seconds | timedrift=0s;1;2
[pi@nagios4 src]$
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hello @nagmoto,
Hope you had a great weekend. Make sure you have the configuration file set to receive arguments.
If your not sure, you can post the nrpe.cfg file from the remote host to the thread.
Hope you had a great weekend. Make sure you have the configuration file set to receive arguments.
Code: Select all
dont_blame_nrpe=1
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hi
Please see the checking of "don't blame" setting at https://github.com/NagiosEnterprises/nrpe/issues/218
I also compile nrpe and check_nrpe from the instruction, to replace binaries from nrpe centos packages. Result is the same.
"check_nrpe -H localhost -c check_time -a localhost 1 2" command is working as expected.
Please see the checking of "don't blame" setting at https://github.com/NagiosEnterprises/nrpe/issues/218
I also compile nrpe and check_nrpe from the instruction, to replace binaries from nrpe centos packages. Result is the same.
"check_nrpe -H localhost -c check_time -a localhost 1 2" command is working as expected.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hello @nagmoto
We did a few different tests and the results are that we can run your version directly from the command line but there's an issue with escaping your regex expression. For example, the following version work:
One option is to hard code the matching argument, nagios-log" ".*] Error:.*, in the command definition or possible modify the expression as we had difficulty escaping the [ bracket.
We did a few different tests and the results are that we can run your version directly from the command line but there's an issue with escaping your regex expression. For example, the following version work:
Code: Select all
./check_nrpe -H 192.168.18.151 -c check_logfiles_4A -a /usr/local/nagios/var/nagios.log nagios-log .*[^]] Error.* .*NOERROR.*
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Thanks for the great pointer for R.E. argument passing issue. I am able to use the walk around to do the logfile checking.
Can this issue be classified as bug and fix it in future NRPE release ?
Can this issue be classified as bug and fix it in future NRPE release ?
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hello @nagmoto,
Happy to hear you got the logfile check working. We did q number of tests until we found the particular regex character that was causing the error.
As far as if this is a bug or not with NRPE, would you be able update the GitHib issue you posted for a developer to review?
Happy to hear you got the logfile check working. We did q number of tests until we found the particular regex character that was causing the error.
As far as if this is a bug or not with NRPE, would you be able update the GitHib issue you posted for a developer to review?
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Thanks for you reply again. Please close this ticket.
I will update github issue with more detail for developer to review.
I will update github issue with more detail for developer to review.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Hello @nagmoto,
I'll mark this as resolved. Please feel free to open anther post if you have any new questions.
Much appreciated.I will update github issue with more detail for developer to review
I'll mark this as resolved. Please feel free to open anther post if you have any new questions.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!