Creating a custom Munin plugin

Configuration Input

When the plugin runs with the config argument, it provides the Munin master with details about how to draw and outfit the appropriate graph. This feature requires no complicated logic – all you need to do is echo some parameter-value pairs on standard output.

There are two types of configuration parameters: those with an underscore and those with a dot serving as delimiter in the parameter name. The underscore provides information about the entire diagram; parameters with a dot tell the Munin master how to plot the individual graphs.

graph_title defines the headline for the diagram, and graph_vlabel specifies the label for the y-axis. graph_args expects command-line options to be forwarded to RRDTool (see man rdgraph). In this case, 1 k (kilo) equals 1000, and the displayed y-axis will always include the origin.

The Munin master generates only one single HTML page per host, including all daily and weekly diagrams. Categories are used to group plugins within this page. Plugins that don't tell Munin to which graph_category they belong will appear in the Other category.

The amsdeparting.label parameter defines the legend entry for the graph showing the Amsterdam departing values, while amsdeparting.draw defines that this plot (green in Figure 6) is drawn as a one-pixel-thick line (LINE1). For the two plots showing the number of canceled flights (amscanceled and muccancelled) the Munin master is supposed to use a pen of three-pixel size (LINE3), which is the thickest line available. Munin also supports area plots (*.draw type AREA) and stacked plots (STACK), with some more options available from version 1.3.3.

Inflexible Web Pages

Although Munin provides sufficient configuration options to display most diagrams, the tool is short on options for customizing the appearance of the generated HTML pages. Also, for hosts with many plugins, Munin can take considerable time to load the host overview. A better solution would be to generate individual pages for each plugin category on a host.

Another item on the wish list would be a page that compares the graphs of one plugin on several hosts.

On the other hand, Munin integrates perfectly with Nagios [6]. Or, if you are looking for a notification tool but Nagios seems too big of a solution, you can configure Munin to send alerts on its own [7].

Infos

  1. Edward R. Tufte: "The Visual Display of Quantitative Information," Graphics Press, Cheshire Connecticut, 2ed 2001: http://www.edwardtufte.com/tufte/books_vdqi
  2. Linpro: http://www.linpro.no/en
  3. RRDTool: http://oss.oetiker.ch/rrdtool/
  4. Magic Markers: http://munin.projects.linpro.no/wiki/plugin-fields
  5. MuninExchange: http://muninexchange.projects.linpro.no/
  6. Integration with Nagios: http://munin.projects.linpro.no/wiki/HowToContactNagios
  7. Alerts: http://munin.projects.linpro.no/wiki/HowToContac

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Charly's Column

    Ornithologists already know that magpies don’t really deserve their reputation. The true kleptomaniac in the world of birds is the raven. And it’s worthwhile for data dealers to make the acquaintance of Munin, a monitoring tool named after one fabled raven.

  • Charly's Column – Munin

    What do you do if the Munin system monitoring tool does not have a native Munin client for a device? Sys admin Charly has a solution.

  • Automation Tips and Tricks

    We asked some of our authors to share their favorite automation tricks.

  • Extra Packages for Enterprise Linux (EPEL) 6 Released

    Kevin Fenzi, one of release-engineers for Extra Packages for Enterprise Linux (EPEL) and long time member of the EPEL Fedora Special Interest Group (SIG) discusses the EPEL 6 release.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News