Socket timeout after 10 seconds

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Socket timeout after 10 seconds

Post by WillemDH »

Hello,

We are monitoring a bunch of website url's, and a lot of them give regularely the following error: "Socket timeout after 10 seconds". I read it's possible to add "-t 20" to make the timeout larger. I can see how to do this for the services, but the hosts also give socket timeouts. Checking the CCM, in host management of one of the websites giving problems, there doesn't seem to be a check command. So where should I configure this "-t 20" as a parameter for the host check.

For example:

Website URL www.example.be
Host example.be, adress www.example.be
with services with check "$USER1$/check_http -H $HOSTADDRESS$ $ARG1$"
- URL Content
- URL Status
For the services, I can add the t argument, but I don't see where to add it for the host and it's both the host and the service that give sometimes socket timeout errors....

Thanks for any help.
Nagios XI 5.8.1
https://outsideit.net
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Socket timeout after 10 seconds

Post by abrist »

Add the timeout to the command in the CCM "commands" interface. Go to commands --> choose the command in question --> add the timeout to the command so that is reads:

Code: Select all

$USER1$/check_http -H $HOSTADDRESS$ -t 30
You can replace "30" with the desired timeout.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Socket timeout after 10 seconds

Post by sreinhardt »

Yes considering you are using check_http you can absolutely use -t 20 to extend the timeout. There are several options to choose from, either add the extra parameter to an in use $ARG#$ variable or use the next empty $ARG#$ variable to specify it as well. Finally you could modify the command definition to include the -t 20 parameter in every use of the command and not need to specify it in the service checks.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Socket timeout after 10 seconds

Post by WillemDH »

Thanks for the replies. I changed "check_xi_service_http" into this:

$USER1$/check_http -t 30 -H $HOSTADDRESS$ $ARG1$

I'll monitor the coming days if there are less socket timeouts..
Nagios XI 5.8.1
https://outsideit.net
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Socket timeout after 10 seconds

Post by WillemDH »

Ok, I managed to add the -t 30 to the check_http service command and I no longer get scoket timeouts for the services. But as I said in the first post, the hosts also give socket timeouts. But when I go to the host management for the specific hosts giving the socket timeouts, I don't see any check command used. The check box is empty for the host. In what command should I put the -t 30 for the host checks? (the host is the URL)
Nagios XI 5.8.1
https://outsideit.net
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Socket timeout after 10 seconds

Post by sreinhardt »

Do the hosts have a template applied to them, and possibly a host check defined in that template? Most times it is a simple ping check with check_ping or xi_check_ping. Both of these commands can have the -t parameter added as well.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Socket timeout after 10 seconds

Post by WillemDH »

Hi,

Thanks found out that the xiwizard_website_host is used. If I add -t 30 in thsi template, is this setting immediately used by all hosts using this template or is this setting only copied from the moment a host is created using this template?

Grtz
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Socket timeout after 10 seconds

Post by slansing »

If you made the change to the template then yes all the hosts using it will receive the change as they are all reading from that config. Did that resolve the issue?
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Socket timeout after 10 seconds

Post by WillemDH »

Yes, our issue with the monitoring of web applications is resolved. We do not receive timeouts anymore after changing the value to 30 seconds. Thread can be closed
Nagios XI 5.8.1
https://outsideit.net
Locked