Return code of 255 is out of bounds
Return code of 255 is out of bounds
Hello Team,
I am monitoring a Windows server in Nagios. All the services are being monitored properly but, I am facing issue with only one service, i.e., "Physical Memory Utilization". I was getting error "Socket timeout after 30 seconds" which I could resolve by creating a copy of check_nrpe command and changing the "-t" value to 300 which was 30 by default ($USER1$/check_nrpe -H $HOSTADDRESS$ -t 300 -c $ARG1$ $ARG2$).
Now I am getting another error as "(Return code of 255 is out of bounds)". I googled about it and found that it usually comes if NSC++ is not running. I reinstalled the NSC++ client and started the service, but I am still getting the same error.
Kindly, please help me with this issue.
I am monitoring a Windows server in Nagios. All the services are being monitored properly but, I am facing issue with only one service, i.e., "Physical Memory Utilization". I was getting error "Socket timeout after 30 seconds" which I could resolve by creating a copy of check_nrpe command and changing the "-t" value to 300 which was 30 by default ($USER1$/check_nrpe -H $HOSTADDRESS$ -t 300 -c $ARG1$ $ARG2$).
Now I am getting another error as "(Return code of 255 is out of bounds)". I googled about it and found that it usually comes if NSC++ is not running. I reinstalled the NSC++ client and started the service, but I am still getting the same error.
Kindly, please help me with this issue.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Return code of 255 is out of bounds
Hello, @RIDS_I2MP. Please upload the nsclient.ini file from the Windows server as well as the nsclient.log file. Also, please show the command you're using to check the Memory Utilization.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Return code of 255 is out of bounds
Hello,
I am attaching the nsclient.ini file from the Windows server as well as the nsclient.log file.
Also, attaching the details related to command for physical memory utilization.
Thank you for your reply
I am attaching the nsclient.ini file from the Windows server as well as the nsclient.log file.
Also, attaching the details related to command for physical memory utilization.
Thank you for your reply
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Return code of 255 is out of bounds
Does it give the same output when you run it from the command line?
- Note: Make sure to change X.X.X.X to the IP address of the host
Additionally, what version of NSClient++ do you have running?
- Note: Make sure to change X.X.X.X to the IP address of the host
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%Re: Return code of 255 is out of bounds
Hello,
I have ran the below command by opening command prompt in Windows server.
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
It returned an error saying "The system cannot find the path specified". I am attchiing the output here.
Also, I tried checking NSClient++ version in properties, attaching the output for the same.
I have ran the below command by opening command prompt in Windows server.
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
It returned an error saying "The system cannot find the path specified". I am attchiing the output here.
Also, I tried checking NSClient++ version in properties, attaching the output for the same.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Return code of 255 is out of bounds
Sorry, you need to run this command from the XI server:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H X.X.X.X -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%Re: Return code of 255 is out of bounds
Hello,
I ran the below command in Nagios XI server:
Nagios server : 10.144.223.155
Monitoring server: 10.151.1.90
[nagios@eu1papu002 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
CHECK_NRPE: Error - Could not complete SSL handshake.
[nagios@eu1papu002 ~]$
[nagios@eu1papu002 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.151.1.90 -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
connect to address 10.151.1.90 port 5666: Connection timed out
connect to host 10.151.1.90 port 5666: Connection timed out[nagios@eu1papu002 ~]$ ^C
[nagios@eu1papu002 ~]$
I ran the below command in Nagios XI server:
Nagios server : 10.144.223.155
Monitoring server: 10.151.1.90
[nagios@eu1papu002 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
CHECK_NRPE: Error - Could not complete SSL handshake.
[nagios@eu1papu002 ~]$
[nagios@eu1papu002 ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.151.1.90 -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%
connect to address 10.151.1.90 port 5666: Connection timed out
connect to host 10.151.1.90 port 5666: Connection timed out[nagios@eu1papu002 ~]$ ^C
[nagios@eu1papu002 ~]$
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Return code of 255 is out of bounds
Looking at the config name (NSC.ini), I would guess that you are using a very old version of NSClient++, probably 0.3.9? Let't try to find out the version number, so that we could try recreating the issue in-house.
Run the following command from the command line on the Nagios XI server, and show the output (obfuscate sensitive info):
Also, can you try adding "-2" to your command to see if this is going to fix the issue?
Run the following command from the command line on the Nagios XI server, and show the output (obfuscate sensitive info):
Code: Select all
/usr/local/nagios/libexec/check_nt -H <windows server ip> -p 12489 -s <password> -v CLIENTVERSIONCode: Select all
/usr/local/nagios/libexec/check_nrpe -2 -H 10.144.223.155 -t 300 -c CheckMEM -a ShowAll type=physical MaxWarn=90% MaxCrit=95%Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Return code of 255 is out of bounds
Hello,
I have ran the commands in XI server and attached the output here.
Just wanted to add one more thing, there are other services like CPU utilization, C drive disk pace utilization, etc. are also being monitored on that server, but all of them are running fine. I am just facing issue with physical memory utilization. So I do not think that there would be any version problem here.
I have ran the commands in XI server and attached the output here.
Just wanted to add one more thing, there are other services like CPU utilization, C drive disk pace utilization, etc. are also being monitored on that server, but all of them are running fine. I am just facing issue with physical memory utilization. So I do not think that there would be any version problem here.
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Return code of 255 is out of bounds
You must have special characters in the password as bash complained. Try wrapping the password in single quotes, rerun the command and show the output:
The "-2" flag didn't work as this option was not available in the old NRPE (v. 2.15) - I didn't realize you were using that version.
Change the following line in the NSC.ini under the [NRPE] section from this:
to this:
Next, change the following lines under the [External Script] section from this:
to this:
and restart nsclient++ service.
Next run the commands below, and show the output:
If these commands fail, upload the nsclient.log on the forum.
Code: Select all
/usr/local/nagios/libexec/check_nt -H <windows server ip> -p 12489 -s '<password>' -v CLIENTVERSIONAre the "working" services use check_nrpe or check_nt?Just wanted to add one more thing, there are other services like CPU utilization, C drive disk pace utilization, etc. are also being monitored on that server, but all of them are running fine. I am just facing issue with physical memory utilization. So I do not think that there would be any version problem here.
Change the following line in the NSC.ini under the [NRPE] section from this:
Code: Select all
;allow_nasty_meta_chars=0Code: Select all
allow_nasty_meta_chars=1Code: Select all
;allow_arguments=0
;allow_nasty_meta_chars=0
Code: Select all
allow_arguments=1
allow_nasty_meta_chars=1
Next run the commands below, and show the output:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c alias_cpu
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c alias_mem
/usr/local/nagios/libexec/check_nrpe -H 10.144.223.155 -c CheckMEM -a MaxWarn=90% MaxCrit=95% ShowAll type=physicalBe sure to check out our Knowledgebase for helpful articles and solutions!