Suddenl y getting below error CRITICAL - Socket timeout afte

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Suddenl y getting below error CRITICAL - Socket timeout afte

Post by imran_khan »

Hello,

Suddenly getting below error. Sometimes I am getting response from the server.

[root@example.com plugins]# ./check_smtp xyz.com
CRITICAL - Socket timeout after 10 seconds
[root@ example.com plugins]# ./check_smtp xyz.com
SMTP OK - 8.218 sec. response time|time=8.218449s;;;0.000000
[root@ example.com plugins]# ./check_smtp xyz.com
SMTP OK - 6.496 sec. response time|time=6.496059s;;;0.000000
[root@ example.com plugins]# ./check_smtp xyz.com
SMTP OK - 6.530 sec. response time|time=6.529657s;;;0.000000
[root@ example.com plugins]# ./check_smtp xyz.com
CRITICAL - Socket timeout after 10 seconds

I am trying to run above command from Nagios server to smtp sever xyz.com.

Thanks,
Imran Khan.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Suddenl y getting below error CRITICAL - Socket timeout

Post by abrist »

Either you have packet loss issues, or the timeout is occasionally, not enough. Try increasing the timeout first:

Code: Select all

./check_smtp xyz.com -t 20
From: http://nagiosplugins.org/man/check_smtp
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
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: Suddenl y getting below error CRITICAL - Socket timeout

Post by sreinhardt »

Well in all of the checks you have that passed, you are pushing above 60% of the default check time. It likely would help to bump that up a bit with the timeout flag. Try something like this:

./check_smtp -H xyz.com -t 30 -w 10 -c 20

This will set an overall timeout of 30 seconds, with warning at 10 and critical at 20.
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.
Locked