Page 1 of 2
Socket Timeout after 10 Seconds
Posted: Tue Oct 24, 2017 10:20 am
by amitgupta19
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?
Re: Socket Timeout after 10 Seconds
Posted: Tue Oct 24, 2017 11:50 am
by dwhitfield
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.
Re: Socket Timeout after 10 Seconds
Posted: Wed Oct 25, 2017 4:00 am
by amitgupta19
Remote Host is a Windows Server.
I am using the NSClient to fetch the data from the remote host.
Re: Socket Timeout after 10 Seconds
Posted: Wed Oct 25, 2017 12:05 pm
by dwasswa
Hi
@ amitgupta19 ,
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>
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.
Re: Socket Timeout after 10 Seconds
Posted: Thu Oct 26, 2017 10:08 am
by amitgupta19
I have checked and made the suggested changes.
But still same error.
Please suggest.
Re: Socket Timeout after 10 Seconds
Posted: Thu Oct 26, 2017 2:36 pm
by dwasswa
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.
Re: Socket Timeout after 10 Seconds
Posted: Mon Nov 06, 2017 8:38 am
by amitgupta19
I have attached all the Files
Please have a look.
It should be helpful for you.
Re: Socket Timeout after 10 Seconds
Posted: Mon Nov 06, 2017 5:39 pm
by dwasswa
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:
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
Please make the changes stated above, restart Nagios and let me know if that solves your issue.
Re: Socket Timeout after 10 Seconds
Posted: Mon Nov 06, 2017 6:09 pm
by dwasswa
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:
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.
Re: Socket Timeout after 10 Seconds
Posted: Tue Nov 07, 2017 5:45 am
by amitgupta19
@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.