check_smtp timeout fix/bug
Christopher McCrory
chrismcc at pricegrabber.com
Fri May 23 19:55:37 CEST 2003
Hello...
I noticed this a long time ago, but never really looked at it until
today.
check_smtp -H mailserver
will timeout and FAIL if mailserver's primary DNS server is down (e.g.
rebooting, config update, etc)
The fix I used was:
check_smtp -t 11 -H mailserver
( default is -t 10 )
or:
nagios]$ diff -u checkcommands.cfg-sample checkcommands.cfg
--- checkcommands.cfg-sample Tue Apr 29 12:14:13 2003
+++ checkcommands.cfg Fri May 23 10:34:53 2003
@@ -78,7 +78,7 @@
# 'check_smtp' command definition
define command{
command_name check_smtp
- command_line $USER1$/check_smtp -H $HOSTADDRESS$
+ command_line $USER1$/check_smtp -t 11 -H $HOSTADDRESS$
}
nagios]$ ./check_smtp --version
check_smtp (nagios-plugins 1.3.0) 1.9
nagios]$ ./check_smtp -H mail
SMTP OK - 0 second response time
[chrismcc at thumper nagios]$ ./check_smtp -H cruella
Socket timeout after 10 seconds
[chrismcc at thumper nagios]$ ./check_smtp -t 11 -H cruella
SMTP OK - 10 second response time
--
Christopher McCrory
"The guy that keeps the servers running"
chrismcc at pricegrabber.com
http://www.pricegrabber.com
Let's face it, there's no Hollow Earth, no robots, and
no 'mute rays.' And even if there were, waxed paper is
no defense. I tried it. Only tinfoil works.
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list