logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Tirex::Munin - Parent class for Munin scripts

Description

       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).

perl v5.40.1                                       2025-08-07                                  Tirex::Munin(3pm)

Name

       Tirex::Munin - Parent class for Munin scripts

Synopsis

        my $m = Tirex::Munin::SomeSubclass->new(...)

        if ($ARGV[0] eq 'config') {
            print $m->config();
        } else {
            $m->init(...) or die;
            print $m->fetch();
        }

See Also