[Nagiosplug-devel] [ nagiosplug-Bugs-3552833 ] check_smtp ignores arguments starting with first (second) no

SourceForge.net noreply at sourceforge.net
Wed Aug 1 00:58:12 CEST 2012


Bugs item #3552833, was opened at 2012-07-31 15:58
Message generated for change (Tracker Item Submitted) made by calestyo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3552833&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Cálestyo (calestyo)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_smtp ignores arguments starting with first (second) no

Initial Comment:
Hi.

This is from the old / soon to be disabled again Nagios Plugins bug tracker that used to be at Nagios itself.
I've just copied this bug over. I'm not the original reporter and have no idea about the thoughts about this bug.

This used to be: http://tracker.nagios.org/view.php?id=226
--------------------------------------------------------------------------------
qha:
--------------------------------------------------------------------------------
check_smtp stops processing arguments on the first non option (or on the second one if hostname is not given with -H or --hostname).

This is not particularly helpful, I'd have expected a usage message and return code STATE_UNKNOWN if optind points to remaining arguments after processing options and possibly trying to take hostname from the remaining arguments.

Instead I received return code STATE_OK after check_smtp checked only the first message from the server and how soon it arrived ignoring the response checks I'd specified later.

In my case I'd been particularly clumsy in defining the services in Nagios but I'm sure this could be triggered by fairly hard to spot mistakes. 


To reproduce:

/usr/lib64/nagios/plugins/check_smtp -H mx.example.com -f nagios at example.com -C rcpt to: no-such-local-part at example.com -R 550 5.1.1 -6

will result in:

SMTP OK - 0,125 sec. response time|time=0,124762s;;;0,000000

and return code 0.

--------------------------------------------------------------------------------
qha:
--------------------------------------------------------------------------------
Apologies for bumping this isssue, but I still haven't seen any message about it on nagiosplug-devel. 

--------------------------------------------------------------------------------
Inny:
--------------------------------------------------------------------------------
Please encapsulate any arguments containing spaces in parentheses, this should resolve your issue. Ex.:

./check_smtp -H mx.example.com -f nagios at example.com -C "rcpt to: no-such-local-part at example.com" -R 550 -6 

--------------------------------------------------------------------------------
qha:
--------------------------------------------------------------------------------
Yes, that is how I got my service to work the way I intended.

This bug is about making check_smtp help me catch such mistakes by flagging them with status unknown instead of ignoring any arguments supplied that it doesn't understand. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3552833&group_id=29880




More information about the Devel mailing list