Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to change update interval for munin graphs?

Tags:

munin

I will like to munin to graph after every two minutes to increase the granularity. There are some links pointing out that its somehow possible with munin 2.0 , any idea how?

like image 582
Rizwan Sharif Avatar asked Dec 07 '12 09:12

Rizwan Sharif


2 Answers

I haven't tried it, but this question in the FAQ suggests you cannot:

Munin runs at an interval of every five minutes (*/5) on debian systems by default. Is it possible to change this interval to an arbitrary value?

Just edit /etc/cron.d/munin.

However, this won't change Munin's (or rather RRD's) granularity; all RRD files are constructed to create 5 minutes averages, and no matter how often you update the RRD files the output won't be (much) different. Changing this (default) behaviour has been proposed in Ticket #5.

However, if you look at ticket #5, the last post (closing it) is:

current trunk fully supports custom update_rate, and increase resolution of .rrd files accordingly.

So, if you're using a fairly recent version of munin, it might be worth a try.

like image 95
Mike Avatar answered Sep 29 '22 08:09

Mike


Increasing the resolution of Munin data capture is accomplished at the plugin level, not the munin core level. This means that it is not possible to simply change an entire installation to increase resolution. Instead, each plugin must be modified independently.

The two critical plugin config values that determine resolution are

graph_data_size
update_rate # in seconds
  • graph_data_size determines the size and structure of the RRD file used to store captured data.
  • update_rate indicates how frequently new data is expected.

Since cron has a lower bound of one minute as its tightest possible resolution, that's the easiest to achieve. Simply update the cron to run every minute and modify the plugin config to include these values

graph_data_size custom 1d, 1m for 1w, 5m for 1t, 15m for 1y
update_rate 60

Sub-minute resolution requires caching datapoints in between cron runs and embedding time data (seconds since epoch). I provide full details in these three posts:

http://software.danielwatrous.com/understanding-munin-plugins/

http://software.danielwatrous.com/increase-munin-resolution-to-one-minute/

http://software.danielwatrous.com/increase-munin-resolution-to-sub-minute/

like image 34
Daniel Watrous Avatar answered Sep 29 '22 07:09

Daniel Watrous