4

I'm running a server with Munin installed through WHM cPanel. I've been googling around and I can't seem to find out how to do the following:

A: Change a graph to show a different time period (currently I can only view, day, week, month, year). I would like to possibly view per minute, per hour... or specific intervals such as per 30 minutes, per 4 hours, etc...

B(optional, but preferred): Add new graphs with the above criteria(A).

I am a novice with all things that will possibly be required to do this (such as ssh). I wish I could just go edit a php file as I'm highly experienced in that subject.

Emil Vikström
  • 552
  • 3
  • 11
PiZzL3
  • 143
  • 1
  • 4

2 Answers2

3

Here is documentation on the munin capabilities to change the sample periods: Keep more data with custom retention plans

It depends on which version of munin are you are using. 1.4 has some limited ability to store higher precision data, but what you really want is what will be in 2.0 when it is released. The second alpha was released around a month ago, so it'll likely be a while before it's out and packaged for your use.

Sean Reifschneider
  • 10,720
  • 3
  • 25
  • 28
  • I noticed this. I also noticed in the faq doesn't say much (or isn't specific enough for me to understand) about customizing graphs. The stuff they had was vague on where to even put it... I was also disappointed that there wasn't a forum I could join. There's a mailing list, but I'm very unfamiliar with those and the ones I've seen are annoying to follow. I figured I could go edit a config file through ssh and at least change the time periods of the current graphs. – PiZzL3 Feb 27 '11 at 16:17
  • My blog post at http://www.systemajik.com/blog/monitoring-with-munin/ has some override examples. These were added to the configuration of the individual servers. Depending on where they are in the file they override at different levels, server, group, or site. Time periods are fixed as they tend to be in such monitoring software. Same as for the versions of n2rrd and mrtg I have worked with. – BillThor Feb 27 '11 at 16:49
  • FYI: The last couple of days I've been playing with Zabbix, and it supports setting different intervals for different services and intervals other than 5 minutes. The default is 5 seconds for the network graphs and 300 seconds for system uptime... The thing that it's missing from Munin is a default "all graphs" screen, so it takes a little more setup via the "Screens" configuration to make something like that. However, it can also combine Nagios-like monitoring functionality. Might be worth a look. – Sean Reifschneider Mar 02 '11 at 07:49
0

The code that builds the images is in Perl. I believe you will find period shorter than 1 day will give disappointing results. Sample period is fixed at 5 minutes. Per hour would only have 12 samples.

The rrdtool package should be installed so you can try to generating the images using rrdgraph. Some of the rrd configuration comes from the plugins. Telnet to localhost 4949 to talk to the plugins. The node software has a help command. The rrd data files can be found under /var/lib/munin.

The munin projects site has some help on generating graphs.

EDIT: The information you need to generate a graph or data dump is available from the rrd data files. The structure and file naming under /var/lib/munin is pretty easy to figure out. Directory tree matches your domain structure. File names match plugins on hosts.

Munin-node will give you the information it uses to format a graph for a particular plugin. The command telnet localhost 4949 will connect you to the munin node software on the local host. Once connected the commands most useful for your use are:

  • help - List commands available
  • list - Lists configured plugins
  • config cpu - Lists rrd formatting information for cpu plugin. Substitute your desired plugin for cpu. This is not required to generate the graph, only to match the formatting used by munin. Formatting can be overridden in the munin.conf file.
BillThor
  • 27,737
  • 3
  • 37
  • 69
  • I have to disagree with the value of the results. Even though it only updates every 5 minutes, my graphs still show a great deal of detail. I would just like to ZOOM in on smaller times. As for the rest of what you said, that is beyond my ability right now unless someone has a quick guide? – PiZzL3 Feb 27 '11 at 16:20
  • I can ssh and edit text files fine, just don't know the right files to edit/etc. Munin's doc is written in a way that you would have to have a decent understanding of how munin is setup already. – PiZzL3 Feb 27 '11 at 16:21
  • The man pages for the rrdtools should allow you to quickly generate a graph. If you want to zoom, you may want to look at the raw datapoints, which you can get from rrdtools as well. Once you have the graph generation or dump working, it should be trivial to generate a page in PHP to show the output. – BillThor Feb 27 '11 at 16:24
  • I would get the zooming functionality working first, then look at adding it in to the munin code. It would need generate graphs dynamically. I believe the daily graph gives one pixel width per data point in the raw data. You may find that zooming the image gives you what you are looking for. – BillThor Feb 27 '11 at 16:44