[Nagiosplug-devel] Not receiving expected strings in check_smtp should always be critical

Grant Byers grant.byers at gmail.com
Mon Mar 19 03:54:28 CET 2012


When check_smtp first connects to the SMTP server, we expect a 220 (or
whatever we specify with -e). On subsequent commands specified with -C, we
expect the strings passed in -R. For example ;

$ /usr/lib/nagios/plugins/check_smtp -v -H ... -C "MAIL FROM: <...>" -R 250
220 ... Microsoft ESMTP MAIL Service ready at Mon, 19 Mar 2012 11:52:18
250 2.1.0 Sender OK

IMO, anything other than what is expected should be CRITICAL, not WARNING.

I would expect that in most 24x7 environments where admins receive alerts
via SMS, people will configure SMS contact notification options to not
include warning levels. You only want to be woken up when a service is
critical. ie. service_notification_options c,r. Obviously, you could create
a second contact that receives SMS on warning & use that for the SMS
service, but this doesn't fit well with other checks. If a service is not
behaving as expected, i'd say this is critical.

The attached patch is a quick hack to ensure at least these conditions are
critical. YMMV.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20120319/52efd211/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_smtp.c.critical_unless_expected.diff
Type: application/octet-stream
Size: 607 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20120319/52efd211/attachment.obj>

More information about the Devel mailing list