Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to configure specific graphs in munin to update every day instead of every 5 minutes?

Tags:

munin

The default update interval in Munin is 5 minutes which is OK for most purposes.

For some cases though 5 minutes is too frequent, useless and sometimes increases load of the servers being watched. For example, I want to graph database sizes once every day and I have plugins written for that. But sampling every 5 minutes could be costly in terms of performance.

So, is it possible to configure Munin for specific graphs to update every day or every hour instead of every 5 minutes?

like image 345
cyberp Avatar asked Nov 14 '22 01:11

cyberp


1 Answers

You can change the interval for all graphs see the munin FAQ

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.

But I think you do not want it ? :)

I think you can optimize your script, you can store the result in a file and for each call you can verify if the file modify date is the same of the current date. If not, just call the database for retrieve the database size and all others time you return the content file. It should consume less resource.

like image 166
Bruno Adelé Avatar answered May 16 '23 08:05

Bruno Adelé