A Plugin to monitor OpenTracker Servers and their Performance


[opentracker*] *default* env.port 6969 *default* env.uri /stats *default*


 host = opentracker host to connect to
 port = opentracker http port to connect to
 uri = stats uri for appending requests for data

 I need this information so I can later build the full url which normally
 looks like the following example when put together:


Matt West < >




#%# family=auto #%# capabilities=autoconf suggest

Graph Declarations

    This block of code builds up all of the graph info for all root / sub graphs.

    %graphs   is a container for all of the graph definition information. In here is where you'll
           find the configuration information for munin's graphing procedure.

    $graph{graph_name} => {
        config => {
            { key => value }, You'll find the main graph config stored here.
            { ... },
        keys => [ 'Name', 'Name', 'Name', ... ], Used for building results set.
        datasrc => [
            # Name: name given to data value
            # Attr: Attribute for given value, attribute must be valid plugin argument
            { name => 'Name', info => 'info about graph' },
            { ... },
        results => {
            { key => value }, You'll find the results info from fetch_stats call stored here.
            { ... },

Munin Checks

    These checks look for config / autoconf / suggest params

Config Check

    This block of code looks at the argument that is possibly supplied,
    should it be config, it then checks to make sure the plugin
    specified exists, assuming it does, it will run the do_config
    subroutine for the plugin specified, otherwise it dies complaining
    about an unknown plugin.

Autoconf Check

    This block of code looks at the argument that is possibly supplied,
    should it be autoconf, we are going to print yes at this point since
    we've already tested for our binary to exist and be executable, the
    process will then exit.

Suggest Check

    This block of code looks at the argument that is possibly supplied,
    should it be suggest, we are going to print the possible plugins
    which can be specified.


    Begin Subroutine calls to output data / config information


    This subroutine is the main call for printing data for the plugin.
    No parameters are taken as this is the default call if no arguments
    are supplied from the command line.


    This block of code prints out the return values for our graphs. It takes
    one parameter $plugin. Returns when completed

        $plugin;    graph we are calling up to print data values for

    Example: print_output($plugin);


    This subroutine prints out the main config information for all of the graphs.
    It takes one parameters, $plugin

        $plugin;    graph being called up to print config for

    Example:  print_config($plugin);


    This subroutine actually fetches data from opentracker with the plugin specified
    It will then parse the data using the keys assigned in an array.
    Two parameters are passed, $plugin and @keys, and it will return when complete.

        $plugin;    graph we are calling up, we use this to store the results in the hash
                    for easy recall later.
        @keys;      keys we want the values for from opentracker stats url.

    Example: fetch_stats($plugin,@keys);