Socket Timeout after 10 Seconds
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Socket Timeout after 10 Seconds
I added a new server to the Monitoring and immediately it started giving the following Error:
CRITICAL - Socket timeout after 10 seconds
Currently i am monitoring the following services: CPU Load, C Drive, Up Time and memory usage and all the services are giving the same Error.
Please suggest How to correct it?
CRITICAL - Socket timeout after 10 seconds
Currently i am monitoring the following services: CPU Load, C Drive, Up Time and memory usage and all the services are giving the same Error.
Please suggest How to correct it?
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Socket Timeout after 10 Seconds
Are you using NRPE? If so, please take a look at https://support.nagios.com/kb/article/n ... conds.html
Also, please post the nrpe.cfg from the remote machine as an attachment (and /etc/xinetd.d/nrpe, if you have it). Also, please post the output from the remote server of ps -aef | grep nrpe in a code block.
Also, please post the nrpe.cfg from the remote machine as an attachment (and /etc/xinetd.d/nrpe, if you have it). Also, please post the output from the remote server of ps -aef | grep nrpe in a code block.
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Socket Timeout after 10 Seconds
Remote Host is a Windows Server.
I am using the NSClient to fetch the data from the remote host.
I am using the NSClient to fetch the data from the remote host.
Re: Socket Timeout after 10 Seconds
Hi @ amitgupta19 ,
Please go to your windows host and open the nsclient.ini file.
In that file go to the line and make sure your nagios ip is included. if not, please do include it.
After making those changes,please restart the NSClient service on your windows machine. Please make sure its running.
Also,go to your firewall on nagios server and make sure that port 12489 is open.
Here is also a guide on configuring NSClient...https://assets.nagios.com/downloads/nag ... 1493223405
Please confirm those and give me an update.
Please go to your windows host and open the nsclient.ini file.
In that file go to the line
Code: Select all
allowed hosts = 127.0.0.1,::1,<your nagios ip goes here>
After making those changes,please restart the NSClient service on your windows machine. Please make sure its running.
Also,go to your firewall on nagios server and make sure that port 12489 is open.
Here is also a guide on configuring NSClient...https://assets.nagios.com/downloads/nag ... 1493223405
Please confirm those and give me an update.
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Socket Timeout after 10 Seconds
I have checked and made the suggested changes.
But still same error.
Please suggest.
But still same error.
Please suggest.
Re: Socket Timeout after 10 Seconds
Hi @amitgupta19,
Please post how you defined your check command for those services. For example:
check_nt!xxx xxx xxxx or check_nrpe!xxx xxx xxxx
Where is your check command defined? Please send me the file.
It may be located at /usr/local/nagios/etc/objects/commands.cfg on your system, but you will need to locate it if your system is set up differently.
I would also like to see how your services are defined, so please send me the config file in which you have them defined.
Lastly, please attach your nsclient.ini file from your windows machine; I would like to check a few configurations.
Please post how you defined your check command for those services. For example:
check_nt!xxx xxx xxxx or check_nrpe!xxx xxx xxxx
Where is your check command defined? Please send me the file.
It may be located at /usr/local/nagios/etc/objects/commands.cfg on your system, but you will need to locate it if your system is set up differently.
I would also like to see how your services are defined, so please send me the config file in which you have them defined.
Lastly, please attach your nsclient.ini file from your windows machine; I would like to check a few configurations.
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Socket Timeout after 10 Seconds
I have attached all the Files
Please have a look.
It should be helpful for you.
Please have a look.
It should be helpful for you.
- Attachments
-
- checkcommands.cfg
- (25.87 KiB) Downloaded 662 times
-
- nsclient.ini
- (322 Bytes) Downloaded 568 times
-
- services.cfg
- (87.8 KiB) Downloaded 539 times
Re: Socket Timeout after 10 Seconds
Hi @ amitgupta19,
After looking into your checkcommands.cfg file, i noticed that you have your check_nt command defined wrong.
You need to specify port 12489 among the arguments with -p 12489. This is the port through which Nagios communicates with NSClient on windows.
That is why you are getting the
Please see example for ideal check_nt command:
For more information about the check_nt command, please follow this link...check_nt_command
Please make the changes stated above, restart Nagios and let me know if that solves your issue.
After looking into your checkcommands.cfg file, i noticed that you have your check_nt command defined wrong.
You need to specify port 12489 among the arguments with -p 12489. This is the port through which Nagios communicates with NSClient on windows.
That is why you are getting the
Code: Select all
socket time out
Code: Select all
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
Please make the changes stated above, restart Nagios and let me know if that solves your issue.
Re: Socket Timeout after 10 Seconds
After looking into your checkcommands.cfg file, i noticed that you have your check_nt command defined wrong.
You need to specify port 12489 among the arguments with -p 12489. This is the port through which Nagios communicates with NSClient on windows.
That is why you are getting the
Please see example for ideal check_nt command:
For more information about the check_nt command, please follow this link...check_nt_command
Secondly, after looking into your nsclient.ini file, I strongly suggest that you reinstall the NSClient agent. It did not have any configurations.
Please follow this kb article for information on installing NSCLient...Installing-The-Windows-Agent-NSClient
Please follow this kb article for information on configuring NSCLient...Configuring-The-Windows-Agent-NSClient
Please make the changes stated above, restart Nagios and let me know if that solves your issue.
You need to specify port 12489 among the arguments with -p 12489. This is the port through which Nagios communicates with NSClient on windows.
That is why you are getting the
Code: Select all
socket time out
Code: Select all
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
For more information about the check_nt command, please follow this link...check_nt_command
Secondly, after looking into your nsclient.ini file, I strongly suggest that you reinstall the NSClient agent. It did not have any configurations.
Please follow this kb article for information on installing NSCLient...Installing-The-Windows-Agent-NSClient
Please follow this kb article for information on configuring NSCLient...Configuring-The-Windows-Agent-NSClient
Please make the changes stated above, restart Nagios and let me know if that solves your issue.
-
- Posts: 286
- Joined: Fri Sep 08, 2017 5:53 am
Re: Socket Timeout after 10 Seconds
@dwasswa
I changed the port option only for the CPU Load as suggested by you. But not working. Screenshot attached for your referrence.
I went through the link for the check_nt command.
It says that Port is optional.
Also all other servers are being monitored without any error, how come this is the only server requires the port to be specified.
Please suggest.
I changed the port option only for the CPU Load as suggested by you. But not working. Screenshot attached for your referrence.
I went through the link for the check_nt command.
It says that Port is optional.
Also all other servers are being monitored without any error, how come this is the only server requires the port to be specified.
Please suggest.
- Attachments
-
- Port Option.PNG (10.77 KiB) Viewed 10325 times