Ticket #958 (closed defect: fixed)

Opened 1 year ago

Last modified 3 months ago

get_warning/get_critical search for defined values in the wrong order

Reported by: whyscream Assigned to: nobody
Priority: normal Milestone: Munin 2.0
Component: node Version: trunk
Severity: normal Keywords:
Cc:

Description

As the comment in plugin.sh already notes:

# Look up warning environment variables in the following order:
# $1 = field name
# $2 = optional override of environment variable name
#
# Hmm, this first looks for field_warning, then $2 then warning.  Not the
# order one expects.

I think the function should look for $2, then $1_warning, then warning, as the comment suggests.

I understand that this would cause some backwards incompatibility, but after doing some grepping on plugins included with munin 1.4.5, I find no plugins that use the second argument when calling this function.

This mean that there is no impact on existing (bundled) plugins. Please consider this small incompatibility change for the major version bump to Munin 2.0.

Change History

06/30/11 01:38:10 changed by bldewolf

  • status changed from new to closed.
  • resolution set to fixed.

Thanks for catching my mistakes. I've fixed this in r4244, they should go in the proper order now (did some whitespace cleanup though so a diff might not turn out so well, sorry).