Tirex::Munin(3pm)

Tirex::Munin3pm

Parent class for munin scripts

Usage

 my $m = Tirex::Munin::SomeSubclass->new(...)
 if ($ARGV[0] eq 'config') {
     print $m->config();
 } else {
     $m->init(...) or die;
     print $m->fetch();
 }

Overview

Parent class for Munin scripts. This class is never instantiated, create subclasses instead.

Methods

Tirex::Munin::SomeSubclass->new( map => [ 'map1', 'map2' ], z => [$zr1, $zr2] )

Create new munin object.

$m->do(...)

Do the right Munin action depending on command line.

All command line args are passed to init_data().

$m->init()

Initialize config source.

This method is called from new(), in the Tirex::Munin class it does nothing, but can be overwritten in subclasses.

$m->config()

Return config in Munin format.

This method must be overwritten in subclasses.

$m->init_data()

Initialize data source.

This method must be called before fetch(), in the Tirex::Munin class it does nothing, but can be overwritten in subclasses.

$m->fetch()

Return data in Munin format.

This method must be overwritten in subclasses.

Tirex::Munin::make_id($name)

Create Id from name by changing all characters except A-Z, a-z, and 0-9 to a _ (underscore).

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From tirex 0.7.1-3+b2 in Debian 13 (Trixie). Parsed by carta from the page's man source.