CHECK_NRPE: Receive header underflow - only 0 bytes received

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby raydx » Wed Nov 07, 2018 5:45 pm

Attached shows output from requested commands. Thanks!
Attachments
Nagios_issue.docx
(549.32 KiB) Downloaded 12 times
raydx
 
Posts: 16
Joined: Thu Jun 28, 2018 3:51 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby lmiltchev » Thu Nov 08, 2018 10:01 am

I asked you to change the path to the check_nrpe plugin if needed, if it is different on your system... How did you install NRPE? Do you know where is check_nrpe located on your system? Let's try to find it - run the following command and post the output:

Code: Select all
find / -name *nrpe


One you locate check_nrpe, run:
Code: Select all
/path/to/check_nrpe -H <windows server ip>
/path/to/check_nrpe -H <windows server ip> -p 5666 -c CheckMem -a MaxWarn=80% MaxCrit=90% ShowAll type=physical

and show the output.
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!
User avatar
lmiltchev
QA Manager
 
Posts: 11084
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby raydx » Fri Nov 09, 2018 1:44 pm

I did a sanity check and ran:
sudo apt-get install nagios-nrpe-plugin

The plug-in did install - no message about the plugin already installed.

However, I'm still getting check_nrpe: command not found after running /path/to/check_nrpe -H <windows server ip>

The plug-in is in /usr/local/nagios/libexec and /usr/lib/nagios/plugins/check_nrpe
raydx
 
Posts: 16
Joined: Thu Jun 28, 2018 3:51 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby lmiltchev » Fri Nov 09, 2018 2:21 pm

You probably didn't have to install NRPE from a repo. Now you have check_nrpe in two different locations. You don't need two plugins...

Note: Your command didn't work because you didn't run it as I asked you to... I asked you to run:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <windows server ip>

You CD-ed to libexec directory instead and ran:
Code: Select all
check_nrpe -H 10.11.96.194

That's why you got the "check_nrpe: command not found" message. Since you were already inside the libexec directory, you should've run:
Code: Select all
./check_nrpe -H 10.11.96.194


Let's see which plugin works for you. Run the command below, and show the output:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.11.96.194
/usr/local/nagios/libexec/check_nrpe -H 10.11.96.194 -p 5666 -c CheckMem -a MaxWarn=80% MaxCrit=90% ShowAll type=physical

/usr/lib/nagios/plugins/check_nrpe -H 10.11.96.194
/usr/lib/nagios/plugins/check_nrpe -H 10.11.96.194 -p 5666 -c CheckMem -a MaxWarn=80% MaxCrit=90% ShowAll type=physical
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!
User avatar
lmiltchev
QA Manager
 
Posts: 11084
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby raydx » Fri Nov 09, 2018 5:12 pm

Thank you for your assistance (and patience).

administrator@SVNagios02:/usr/local/nagios/libexec$ ./check_nrpe -H 10.11.96.194
I (0.5.2.35 2018-01-28) seem to be doing fine...
administrator@SVNagios02:/usr/local/nagios/libexec$ ./check_nrpe -H 10.11.96.194 -p 5666 -c CheckMem -a MaxWarn=80% MaxCrit=90% ShowAll type=physical
OK: physical: Total: 7.99GB - Used: 1.037GB (12%) - Free: 6.953GB (87%)|'physical'=1.0372GB;6.39235;7.19139;0;7.99044 'physical %'=13%;80;90;0;100
raydx
 
Posts: 16
Joined: Thu Jun 28, 2018 3:51 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby lmiltchev » Mon Nov 12, 2018 1:07 pm

The check_nrpe in libexec directory seems to be working fine, so let's try again the check that was failing:

Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe -H 10.11.96.194 -c check_eventlog -a "filter=provider = 'SLMD UV Monitor Loader' and id = 0 and message like 'Config socket blocked' OR message like 'Inconsistent state'"


Do you have a section in the nsclient.ini file, named [/settings/eventlog]? Can you show us what are the directives that are defined under this section? If the check above fails, please post the nsclient.log from the Windows server.
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!
User avatar
lmiltchev
QA Manager
 
Posts: 11084
Joined: Mon May 23, 2011 12:15 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby raydx » Mon Nov 12, 2018 2:08 pm

nsclient.log
(11.42 KiB) Downloaded 7 times


Running the check that failed:
administrator@SVNagios02:/usr/local/nagios/libexec$ ./check_nrpe -H 10.11.96.194 -c check_eventlog -a "filter=provider = 'SLMD UV onitor Loader' and id =0 and message like 'Config socket blocked' OR message like 'Inconsistent state'"
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.

nsclient.ini has the following sections:
; NRPE server settings
[/settings/NRPE/server]
allow arguments = true
allow nasty characters = true
insecure = true
verify mode = none

; NRPE modules
[/modules]
NRPEServer = enabled
CheckExternalScripts = enabled
CheckHelpers = enabled
CheckNSCP = enabled
CheckEventLog = enabled
CheckDisk = enabled
CheckSystem = enabled

The nsclient.ini is identical to the one on the server where this check does function without issue.

nsclient.log is attached. Thanks.
raydx
 
Posts: 16
Joined: Thu Jun 28, 2018 3:51 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby tgriep » Mon Nov 12, 2018 3:23 pm

To be sure, edit the nsclient.ini file and verify that the following options for the eventlog check are in the file and setup like the following.
Code: Select all
[/settings/eventlog]
; DEBUG - Log more information when filtering (useful to detect issues with filters) not useful in production as it is a bit of a resource hog.
debug = 0

; BUFFER_SIZE - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
buffer size = 131072

; LOOKUP NAMES - Lookup the names of eventlog files
lookup names = 1

; SYNTAX - Set this to use a specific syntax string for all commands (that don't specify one).
syntax = UNKNOWN


Save and restart NSClient++

Another thing, the default timeout of the plugin is fairly short and if it takes some time to run the check, it could fail with the same message.

In the check_nrpe command, add a -t 59 to the command to increase it to 59 seconds.

Code: Select all
./check_nrpe -H 10.11.96.194 -c check_eventlog -t 59 -a "filter=provider = 'SLMD UV onitor Loader' and id =0 and message like 'Config socket blocked' OR message like 'Inconsistent state'"
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!
User avatar
tgriep
Madmin
 
Posts: 7237
Joined: Thu Oct 30, 2014 9:02 am

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby raydx » Mon Nov 12, 2018 5:01 pm

Ran the ./check_nrpe with -t 59 and returned:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

In running with the up-date nsclient.ini file:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

The server where this check is functional, its nsclient.ini file does not have the options for the eventlog check and setup.
raydx
 
Posts: 16
Joined: Thu Jun 28, 2018 3:51 pm

Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece

Postby tgriep » Mon Nov 12, 2018 5:10 pm

Can you post the full nsclient.ini file here so we can view in in case there is another configuration setting that is causing the check to fail?
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!
User avatar
tgriep
Madmin
 
Posts: 7237
Joined: Thu Oct 30, 2014 9:02 am

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 20 guests