Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
munin_plugin.gemspec

README.rdoc

Munin Plugin

A friendly API for creating munin plugins in ruby.

Here's the example from the munin site, implmeneted with munin_plugin:

#!/usr/bin/env ruby

require 'rubygems' # or something else
require 'munin_plugin'

munin_plugin do
  graph_title  "Load average"
  graph_vlabel "load"
  load.label   "load"

  collect do
    load.value `cat /proc/loadavg`.split(" ")[1]
  end
end

That's it.

Save your file as loadavg and run it with ./loadavg.

Example output:

[james@ubuntu munin_plugin (master)]$ examples/loadavg config
graph_title Load average
graph_vlabel load
load.label load

[james@ubuntu munin_plugin (master)]$ examples/loadavg 
load.value 0.03

Install

sudo gem install munin_plugin

Copyright

Copyright © 2010 James Golick. See LICENSE for details.

Something went wrong with that request. Please try again.