- nsclient.ini
- (2.08 KiB) Downloaded 379 times
CHECK_NRPE: Receive header underflow - only 0 bytes received
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
There were some duplication and some options in the wrong section of the ini file so I updated it and added it to the post.
Make a backup of your copy and replace it with the attached copy.
Restart the NSClient++ service and see if it works.
Make a backup of your copy and replace it with the attached copy.
Restart the NSClient++ service and see if it works.
- Attachments
-
- nsclient.ini
- (1.98 KiB) Downloaded 413 times
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
I'm getting the same result.
On the server where the check is functional, I used the nclient.ini file that you provided and the check still functions
as expected.
On the server where the check is functional, I used the nclient.ini file that you provided and the check still functions
as expected.
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Are you still receiving this error in the nsclient.log file?
add this
Also in this section
Change this from
to
Save the setting and restart NSClient++ and see if it works and if the errors are gone from the nsclient.log file.
If it still fails, I suggest removing the Nsclient++ agent from the server and deleting the folder that is was installed in.
Install the latest stable 0.4.4.xx version and see if that works.
Then try this, under this sectionconnection.hpp:139: Socket was unexpectedly closed trying to send data (possibly check your timeout settings)
Code: Select all
[settings/NPRE/server]
Code: Select all
timeout = 60
Code: Select all
[/settings/default]
Code: Select all
timeout = 30
Code: Select all
timeout = 60
If it still fails, I suggest removing the Nsclient++ agent from the server and deleting the folder that is was installed in.
Install the latest stable 0.4.4.xx version and see if that works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
I edited my nsclient.ini file per your requests - same result. Same result when timeout increased to 90.
Uninstalled and re-installed:
Socket was unexpectedly closed trying to send data (possibly check your timeout settings) in nsclientlog
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected) displayed on Nagios client for status information
Up-dated nsclient.ini to include timeouts:
Socket was unexpectedly closed trying to send data (possibly check your timeout settings) in nsclientlog
(Service check timed out after 60.01 seconds) displayed on Nagios Client for status information
Uninstalled and re-installed:
Socket was unexpectedly closed trying to send data (possibly check your timeout settings) in nsclientlog
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected) displayed on Nagios client for status information
Up-dated nsclient.ini to include timeouts:
Socket was unexpectedly closed trying to send data (possibly check your timeout settings) in nsclientlog
(Service check timed out after 60.01 seconds) displayed on Nagios Client for status information
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Check the nsclient.log file for any errors and you should check the Windows Eventlogs for any errors as well.
The NSClient++ agent runs as a System login account and maybe it does not have permissions to run the check.
You can test the command on the Windows server using nscp in a command prompt.
Login to the Windows server as an administrator and go to the following folder
Run this to go in to testing mode.
Then, run your command in the test windows and hopefully is will output some sort of error that could help you troubleshoot the Windows server and NSClient++
https://docs.nsclient.org/howto/checks/
If you cannot get it to work, you can look in the NSClient++ forums for any help and post there as well.
The NSClient++ agent runs as a System login account and maybe it does not have permissions to run the check.
You can test the command on the Windows server using nscp in a command prompt.
Login to the Windows server as an administrator and go to the following folder
Code: Select all
C:\Program Files\NSClient++
Code: Select all
nscp test
Code: Select all
check_eventlog "filter=provider = 'SLMD UV Monitor Loader' and id = 0 and message like 'Config socket blocked' OR message like 'Inconsistent state'"
If you cannot get it to work, you can look in the NSClient++ forums for any help and post there as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
Thank you and the Nagios team for your assistance.
I ran nscp and check_eventlog "filter=provider = 'SLMD UV Monitor Loader' and id = 0 and message like 'Config socket blocked' OR message like 'Inconsistent state'":
L cli OK: OK: No entries found
L cli Performance data: 'problem_count'=0;0;0
This is the correct information.
I ran nscp and check_eventlog "filter=provider = 'SLMD UV Monitor Loader' and id = 0 and message like 'Config socket blocked' OR message like 'Inconsistent state'":
L cli OK: OK: No entries found
L cli Performance data: 'problem_count'=0;0;0
This is the correct information.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
You have stated that you are running this query fine on another server, (via PM) are the nsclient.ini files the same on both?
Are they both running the same version of NSClient++?
Can you run any commands successfully on this server (could be firewall check port 5666 and 12489 are open)
Are they both running the same version of NSClient++?
Can you run any commands successfully on this server (could be firewall check port 5666 and 12489 are open)
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
nsclient.ini is identical on both servers.
Both servers have the same version of NSClient++.
Both servers have identical Inbound Rule for NSClient++ Monitoring Agent.
Ports 5666 and 12489 are open.
Both servers have the same version of NSClient++.
Both servers have identical Inbound Rule for NSClient++ Monitoring Agent.
Ports 5666 and 12489 are open.
Re: CHECK_NRPE: Receive header underflow - only 0 bytes rece
When you ran the check_eventlog command on the Windows server in the nscp test window, how long did it take to run?
Add this to the bottom of the nsclient.ini file to enable debugging to the nsclient.log file
Restart the NSClient++ agent.
Run the check again from the Nagios server and get the nsclient.log file from the Windows Host and post it here.
Thanks.
Add this to the bottom of the nsclient.ini file to enable debugging to the nsclient.log file
Code: Select all
[/settings/log]
; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = trace
; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = nsclient.log
; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S
[/settings/log/file]
; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled
max size = 2048000
Run the check again from the Nagios server and get the nsclient.log file from the Windows Host and post it here.
Thanks.
Be sure to check out our Knowledgebase for helpful articles and solutions!