[Nagiosplug-devel] [ nagiosplug-Bugs-3552853 ] Warn when check_command argument is passed but the definitio

SourceForge.net noreply at sourceforge.net
Wed Aug 1 01:25:09 CEST 2012


Bugs item #3552853, was opened at 2012-07-31 16:25
Message generated for change (Tracker Item Submitted) made by calestyo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3552853&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: Warn when check_command argument is passed but the definitio

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=167
--------------------------------------------------------------------------------
candlerb:
--------------------------------------------------------------------------------
I propose that a warning is issued when parsing the config, if a check_command is invoked with arguments, but the command definition does not make use of those arguments.

Example: (This issue came up when using Ubuntu/Debian package of nagios 3.2.0)

The nagios documentation shows that if you want to monitor a different URI path, you use something like this:

     check_command check_http!-u /myapp/

However, the Debianized configs define check_http in /etc/nagios-plugins/config/http.cfg as:

# 'check_http' command definition
define command{
        command_name check_http
        command_line /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$'
        }

Note that there is no $ARG1$.

This means that if you provide arguments to check_http!.... they are accepted but silently ignored.

As a result, you may think you are monitoring a different uri path / port etc, but actually you are monitoring the server root. You may not discover this until the app dies and Nagios doesn't alert :-(

Furthermore: View Config > Services shows the arguments, leading to a further false sense of security.


<sarcasm>
"Debian Always Knows Best"
</sarcasm>

But this is a circumstance in which a warning is arguably useful in general. Suggested wording:

Warning: Extra arguments passed to service check command 'check_http' specified in service 'NAGIOS' will be ignored

(or maybe it should be an Error?)

As a bonus, it would be useful to report the file where the command was defined. This is because the fragmented Debian config doesn't include the 'define command' sections under /etc/nagios3/conf.d where you'd expect them, so you have to go hunting. Again, you can hardly blame nagios for this.

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

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




More information about the Devel mailing list