The Artima Developer Community
Sponsored Link

Python Buzz Forum
Zoomable Munin Graphs

1 reply on 1 page. Most recent reply: Oct 6, 2011 1:39 AM by ender ulusoy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Aaron Brady

Posts: 576
Nickname: insommeuk
Registered: Aug, 2003

Aaron Brady is lead developer for Crestsource
Zoomable Munin Graphs Posted: Jun 22, 2009 9:43 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Aaron Brady.
Original Post: Zoomable Munin Graphs
Feed Title: insom.me.uk
Feed URL: http://feeds2.feedburner.com/insommeuk
Feed Description: Posts related to using Python. Some tricks and tips, observations, hacks, and the Brand New Things.
Latest Python Buzz Posts
Latest Python Buzz Posts by Aaron Brady
Latest Posts From insom.me.uk

Advertisement

While looking for a replacement for Cacti (which we find hard to automate) at work we decided that Munin appeared to have the features that we wanted - except for one. Neil (my boss) cannot live without zoomable graphs.

So, one day of Perl (Hi Perl, how have you been?), PHP and Javascript later, I’ve beaten Munin into doing what I want. Searching around it looks like this is an oft-requested feature, so I thought I’d share.

This is not the cleanest code ever (though I don’t think it’s too bad), and it expects you to have a pretty stock Munin install, as it comes from Ubuntu / Debian, but it should require very little tweaking to get it running on just about any install.

Here’s the README, to entice you to download it:

Installing Zoomable Munin Graphs
================================

You will need the patched munin-graph utility (which I've dubbed mug locally,
as I don't want to interfere with system files). The patch is included, but
an executable copy based on the Munin that ships with Ubuntu 8.04 is here
too.

I've placed mine in /usr/local/bin, and this is where the PHP expects it.
(This is specified in the defines at the top of the file).

The user that your web server runs as will also need to be able run as the
munin user, at least on Debian derived systems. In my setup, I've added the
following to /etc/sudoers:

www-data = (munin) NOPASSWD: /usr/local/bin/mug

Which lets www-data execute this command, and only this command, as the
munin user. See sudoers(5) for more details.

Next, copy zoom.js and zoom.php to your Munin folder (/var/www/munin on
Debian derived systems), and then edit your "munin-serviceview.tmpl" template,
adding a reference to zoom.js in the <head> tags:

    <script src="/munin/zoom.js"></script>

The script will latch itself to any images which are 495px wide, handling
their onclick events.

You may need to run /usr/share/munin/munin-html to update your already
generated HTML files.

Using Zoomable Graphs
=====================

Once the above has been done, you will be able to click through to the detail
page of any service, and click to start selecting. Click again to make your
selection.

At the moment, you must select the left-most point first, then the right.

To cancel making your selection, you can press escape.

I’d appreciate any patches or improvements, but I’m equally eager for someone (with more Perl than me) to take this and turn it into something that could get accepted into Munin itself.

Read: Zoomable Munin Graphs


ender ulusoy

Posts: 1
Nickname: logaritma
Registered: Oct, 2011

Re: Zoomable Munin Graphs Posted: Oct 6, 2011 1:39 AM
Reply to this message Reply
I need download link , the page you pointed is not alive.Could you please share the zoom thing again ?

Flat View: This topic has 1 reply on 1 page
Topic: Feed Current Cost into collectd Previous Topic   Next Topic Topic: Javascript,

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use