check_smtp returning critical errorwheneverything is working fine.

Craig Marchant craigm at ace.com.au
Mon May 26 02:04:48 CEST 2003


Hi Karl,

Thanks for the suggestion with adding the -f options to check_smtp. It
now works like a charm.

Once again thanks.

Craig Marchant

>>> Karl DeBisschop <karl at debisschop.net> 19/05/03 8:39:31 pm >>>
On Mon, 2003-05-19 at 02:46, Craig Marchant wrote:
> Hi Karl,
> 
> Sorry should have been a little more detailed. It's been a long day.
> 
> I'm currently using Redhat Linux Version 8.0, with Postfix 2.0.9.
> The server im actually querying is: mail.acenet.com.au
> 
> Nagios: 1.0 Release Date: 11/24/2002 <-- Downloaded from the
website,
> so i'm guessing it's the release version
> Nagios Plugins: 1.3.0 <-- Downloaded from the sourceforge web site,
> once again I guess release version. 
> 
> Service definition:
> -------------------------------
> 
> # Service definition
> define service{
>         use                             generic-service         ;
Name
> of service template to use
> 
>         host_name                       mail1
>         service_description          SMTP Service
>         is_volatile                         0
>         check_period                    24x7
>         max_check_attempts       3
>         normal_check_interval      5
>         retry_check_interval         1
>         contact_groups                  linux-admins
>         notification_interval           60
>         notification_period             24x7
>         notification_options            w,u,c,r
>         check_command                   check_smtp
>         }
> 
> Command Definition:
> -------------------------
> 
> # 'check_smtp' command definition
> define command{
>         command_name    check_smtp
>         command_line    $USER1$/check_smtp -H $HOSTADDRESS$
>         }
> 
> Here is the output from check_smtp:
> -------------------------------------------
> [root at osiris libexec]# ./check_smtp --version
> check_smtp (nagios-plugins 1.3.0) 1.9
> 
> [root at osiris libexec]# ./check_smtp -H mail.acenet.com.au -w 3 -c 5;
> echo $?
> SMTP OK - 1 second response time
> Socket timeout after 10 seconds
> 2
> [root at osiris libexec]#
> ----------------------------------------------

It seems to work for me.

[kdebisschop at miles sf]$ nagiosplug/build-redhat/plugins/check_smtp \
-H mail.acenet.com.au -w 28 -c 29 -t 30 ; echo $?
SMTP OK - 11.042 sec. response time|time=11.042
0

I did note that the server passes back a syntax error when there is no
user in the MAILTO you might want to try the -f option.

[kdebisschop at miles sf]$ nagiosplug/build-redhat/plugins/check_smtp \
-H mail.acenet.com.au -f kdebisschop at infoplease.com -w 28 -c 29 -t 30;
\
echo $?
SMTP OK - 1.062 sec. response time|time=1.062
0

It might be worth trying the CVS from the r1_3_0 branch (or get a
nightly snapshot from the stable branch). I did commit a fix for a
timer
loop that could be involved here. 

Good luck, and keep up posted.

--
Karl



-------------------------------------------------------
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