Skip to content

jamesgolick/munin_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 © 2010 James Golick. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages