Page 1 of 1

Suddenl y getting below error CRITICAL - Socket timeout afte

Posted: Mon Jun 10, 2013 2:57 pm
by imran_khan
Hello,

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

[[email protected] 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.

Re: Suddenl y getting below error CRITICAL - Socket timeout

Posted: Mon Jun 10, 2013 3:18 pm
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)

Re: Suddenl y getting below error CRITICAL - Socket timeout

Posted: Mon Jun 10, 2013 3:18 pm
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.