wiki:MuninTemplates

Templates used by Munin

This page is for version 1.3.4 and above, as the components described went through significant changes at that time.

Munin uses four main sets of templates, overview (the first page), group (drill-down of the first), node (shows all services on a host) and service (shows day/week/month/year graph of a service). This is a list of what variables are available in each of the templates.

In addition, Munin also uses comparison templates for groups with multiple comparable nodes.

"overview" template

  • timestamp: String with the date and time of the page generation
  • groups: Array of child group nodes (see own section)

"group" template

  • timestamp: String with date and time of the page generation
  • csspath: String with path to the css
  • compare: Boolean value set to "1" if comparison links should be available for the group
  • parent: String with name of parent node
  • path: Array of strings with name of each node from parent up to (not including) root node
  • peers: Array of strings with names of sibling groups
  • groups: Array of child group nodes (see own section)

"node" template

  • timestamp: String with date and time of the page generation
  • csspath: String with path to the css
  • parent: String with name of parent node
  • name: String with name of current node
  • path: Array of strings with name of each node from parent up to (not including) root node
  • peers: Array of strings with names of sibling groups
  • groups: Array of child group nodes (see own section)
  • categories: Array of strings with names of categories in current group
  • ncategories: String with number of categories in current group

"service" template

  • timestamp: String with date and time of the page generation
  • csspath: String with path to the css
  • path: Array of strings with name of each node from parent up to (not including) root node
  • peers: Array of strings with names of sibling groups
  • category: String with name of service category
  • services: Array with a single element containing the service metadata

Comparison templates

  • timestamp: String with date and time of the page generation
  • csspath: String with path to the css
  • parent: String with name of parent node
  • name: String with name of current node
  • path: Array of strings with name of each node from parent up to (not including) root node
  • peers: Array of strings with names of sibling groups
  • groups: Array of child group nodes (see own section)
  • categories: Array of strings with names of categories in current group
  • ncategories: String with number of categories in current group

Metadata hierarchy ("groups" array)

The following list is probably not complete, but should hopefully include most fields useful in a template:

  • name: String with the name of the group (be it a hostname, service name, domain name, or whatever)
  • url: String with a relative url linking to the group from the level of the group (i.e. from the group itself or a peer).
  • url1: String with a relative url linking to the group from the level above the group (i.e. from the parent).
  • url2: ...etc, you get the point.
  • depth: String with the depth (from the root node) of this group
  • filename: What on-disk file name this group should have (with full path)
  • csspath: String with path to the css
  • ngroups: String with number of child groups without graphs in them
  • groups: Array of child group nodes without graphs in them (see this section :) )
  • ngraphs: String with number of child groups with graphs in them
  • graphs: Array of child group nodes with graphs in them
  • path: Array of strings with name of each node from parent up to (not including) root node
  • categories: Array of strings with names of categories in current group
  • ncategories: String with number of categories in current group
  • peers: Array of strings with names of sibling groups
  • compare: String with boolean value, set to "1" if compare links should be available in this group
  • comparegroups: String with number of sub-groups should be compared (only if compare is set)
  • ncomparegroups: Array of strings with sub-groups that should be compared (only if compare is set)
  • ncomparecategories: String with number of categories in this group that should be compared (only if compare is set)
  • comparecategories: Array of strings with names of categories in this group that should be compared (only if compare is set)
Last modified at 2008-03-02T18:55:38+01:00 Last modified on 2008-03-02T18:55:38+01:00