Tags in munin

This is a page exploring the possible use of "tags" within munin.

Tags will add searchable metadata, to be used by a web interface for munin.

Today, the main web inteface will group graphs on:

  • "group" in the fqn, which by default is the "domain"
  • "host",
  • "category" for the plugin.
  • "problems", which are plugins outside the "warning" or "critical" thresholds.

This reflects how the graphs are stored in the file system, hierarchically.

Today, munin 2.1 stores metadata in form easy to query with SQL. That means we can add metadata to enable selection of graphs based on more complex queries.


Node definition


address 2001:db8::1
tags    shared infrastructure, mailserver, client:acme, client:foo, client:bar

address 2001:db8::2
tags    shared infrastructure, client:acme, client:foo, client:bar

address 2001:db8:1::1
tags    client:acme, webserver

address 2001:db8:2::1
tags    client:acme, appserver


output of "config" for a set of plugins:

/etc/munin/plugins/one @

graph_title some plugin
graph_tags web application usage, dashboard

/etc/munin/plugins/two @

graph_title some other plugin
graph_tags  application load, dashboard

/etc/munin/plugins/three @

graph_title yet another plugin
graph_tags  errors, problem indicator

/etc/munin/plugins/four @ mailX:

graph_title yet another plugin
graph_tags  debugging

Web query

For a customer dashboard, the web interface selects page with a selection of graphs for the "client:acme" nodes, and the "server load" and "problem indicator" graphs.

API query

Example query against a hypothetical not-yet-implemented munin api:

"curl -X GET-H "Accept: application/json" \,dashboard


  { "name" : "one",
    "description" : "some plugin",
    "tags" : [ "client:acme", "webserver", "web application usage", "dashboard" ],
    "urls"   : {
      "month" : "",
      "week"  : "",
      "day"   : ""
  { "name" : "two",
    "description" : "some other plugin",
    "tags" : [ "client:acme", "webserver", "application load", "dashboard" ],
    "urls"   : {
      "month" : "",
      "week"  : "",
      "day"   : ""
  { "name" : "three",
    "description" : "yet another plugin",
    "tags" : [ "client:acme", "webserver", "errors", "problem indicator", "dashboard" ],
    "urls"   : {
      "month" : "",
      "week"  : "",
      "day"   : ""

(and so on)

Example search for "application load" and "shared infrastructure":

"curl -X GET-H "Accept: application/json" \,problem%20indicator

Multiple parameters query

A quick grammar could be like the one proposed on IRC:

  <@TheSnide> so search for { this is very +important +"munin monitoring" } meant "search every element that have at least one of "this", "is" or "very" and all of
"important" & "munin monitoring"
  <@TheSnide> the resulting SQL was quite easy to generate.
  <@TheSnide> WHERE tags CONTAINS 'important' AND tags CONTAINS 'munin monitoring' AND (tags CONTAINS 'this' OR tags CONTAINS 'is' OR tags CONTAINS 'very')
  <@TheSnide> (the CONTAINS with SQLite is left as an exercise to the reader)

It would be quite easy to parse, and already powerful.

Last modified at 2014-10-06T18:48:32+02:00 Last modified on 2014-10-06T18:48:32+02:00