Ticket #7 (closed enhancement: fixed)

Opened 8 years ago

Last modified 8 years ago

'Wildcard' modules

Reported by: mark Assigned to: mark
Priority: blocker Milestone: 2.0_release
Component: resmon Version: 2.0
Keywords: Cc: jdixon


A wildcard module is a module where you don't manually specify individual checks. The module itself will return multiple sets of metrics from a single invocation.

An example config would be:

Core::WildcardSample {
    * : arg1 => foo, arg2 => bar

and the module would return something like:

    'check_name_1' => {
        'metric1' => ['foo', 's'],
        'metric2' => ['foo', 's']
    'check_name_1' : {
        'metric1' => ['bar', 's'],
        'metric2' => ['bar', 's']

(I.e. it returns a hashref that contains multiple sets of metrics with the check names as the keys).

Change History

05/12/10 21:48:29 changed by mark

  • priority changed from major to blocker.
  • status changed from new to assigned.
  • component changed from modules to resmon.
  • milestone changed from release to 2.0_release.

05/20/10 02:21:21 changed by mark

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

(In [386]) Support wildcard modules (fixes #7)

This is done using a wildcard_handler method in addition to the normal handler method. The wildcard_handler method is called if * is in the config file as the check name, and the handler module is called for normal checks. By default, both methods will die with "Not implemented", meaning modules can implement one or both of the methods, depending on whether they support normal checks, wildcard checks, or some combination of both.