wiki:Munin_Template_dynamic

Experimental Dynamic Template

This is not just a graphic redesign template, it's a full rethink of the munin interface. It use jQuery to boost the javascript engine used in the template for generating the pages!

I tested the template just on munin 1.4.4, but should work on every 1.4 release.

If you need to contact me just mail <dave AT gurumeditation DOT it>

Main features:

  • Full dynamic generation of the pages using javascript.
  • Configurable overwiew page: you can choose the graphs to show in the main page.
  • Pages show small thumbnails of the graphs that you can click to zoom real size.
  • Fixed lateral menu, you don't have to scroll to reach it ;)
  • Automatic reload of the images, so that you always look at the latest graph.
  • Ability to switch time period (week,day,year, etc) on the fly, just reloading the images.
  • and more...

Known limitations:

  • tested only on munin 1.4
  • no multigraph support
  • subgroups?

Installation:

  • download or clone the template from github at https://github.com/DaveMDS/munin_dynamic_template
  • the repo contain 2 version: one for munin 1.x and one for munin 2.x
  • from the template folder (munin1) copy the two .js files and style.css into your munin www directory (usually /var/cache/munin/www)
  • choose your new template in munin.conf (usually /etc/munin/munin.conf)

Usage:

  • to select the graph in the homepage just edit the file munin-overview.tmpl in the template folder.

How to enable the 6/1h graphs

As everyone request this feature, this is the trick to enable the 6/1h graphs:

You just need to hack the file: /usr/share/perl5/Munin/Master/GraphOld.pm

you need to add 2 line in 3 structs:

my %draw = (
  "hour"  => 1,
  "6hour"  => 1,
  "day"     => 1,
  "week"    => 1,
  "month"   => 1,
  "year"    => 1,
  "sumyear" => 1,
  "sumweek" => 1
);

my %times = (
  "hour"  => "-1h",
  "6hour"   => "-7h",
  "day"   => "-30h",
  "week"  => "-8d",
  "month" => "-33d",
  "year"  => "-400d"
);

my %resolutions = (
  "hour"  => "12",
  "6hour"   => "75",
  "day"   => "300",
  "week"  => "1500",
  "month" => "7200",
  "year"  => "86400"
);

just search in the file and add the new lines.

enjoy :)

Screen shots:

Last modified at 2013-11-27T14:51:26+01:00 Last modified on 2013-11-27T14:51:26+01:00

Attachments (2)

Download all attachments as: .zip