Permalink
Browse files

better example docs

  • Loading branch information...
1 parent 3dd28f7 commit 36dd96cf98dad400c367614a2da1b44617b5bded @jamesgolick committed Jan 5, 2010
Showing with 16 additions and 2 deletions.
  1. +14 −1 README.rdoc
  2. +2 −1 examples/loadavg
View
@@ -4,8 +4,9 @@ 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 -rubygems
+ #!/usr/bin/env ruby
+ require 'rubygems' # or something else
require 'munin_plugin'
munin_plugin do
@@ -20,6 +21,18 @@ Here's the example from the munin site, implmeneted with munin_plugin:
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
View
@@ -1,5 +1,6 @@
-#!/usr/bin/env ruby -rubygems
+#!/usr/bin/env ruby
+require 'rubygems' # or rip or whatever
require 'munin_plugin'
munin_plugin do

0 comments on commit 36dd96c

Please sign in to comment.