I'd like to reset all graphs for a certain host in Munin. Anyone who knows how I can do this?
-
The simplest resolve, is waiting for a year, this is a time when data is by default completly rotated :) But how to real reset data, descriptions you have bottom in answers :) – Znik May 18 '17 at 06:42
5 Answers
Munin data is stored in Round Robin Database files (.rrd). These are stored under /var/lib/munin.
Each host and hostgroup will have it's own subdirectory under /var/lib/munin
Delete the .rrd files under the hostname in question, and your data will be zeroed out. Graphs will be re-generated after a few minutes.

- 22,857
- 19
- 70
- 102
-
Notice, /var/lib/munin is defined by property dbdir in /etc/munin/munin.conf . dbdir /var/lib/munin is the default set, but can be changed. Real path to RRD files is similar to URL path to graphical draw on web interface. – Znik May 18 '17 at 06:37
Or alternatively if you just want to fix the data in the RRD files (for example spike on the network graph on the server reboot), just run:
rrddtool dump /var/lib/munin/xy/z.rrd >z.xml
edit the data in xml file (fix big values, but remember they are in scientific notation) and then just re-create the RRD file:
rrdtool restore z.xml x.rrd
and overwrite the original RRD with this new one. Using this, you can fix the values and still preserve your old data.
EDIT: You can find detailed description and howto here: http://munin-monitoring.org/wiki/SpikeRemoval

- 1,538
- 1
- 14
- 27
Yes, delete all the *.rrd
files in the folder where munin generates the graphs (where the .html files are). /var/lib/munin/xyz/
. It's defined in your munin.conf (dbdir).
The rrd files are regenerated on the next run.

- 4,089
- 1
- 28
- 41
You should also remove the html files that have been created. They are usually located under /var/www/munin/. In that directory, you will find your hostgroup directories. delete the .png files and the .html file of the graph you want to reset.

- 143
- 7
-
The files might indeed be anywhere, if you installed from source, they are likely to be in `/opt/munin/www/docs/
/ – the-wabbit Jul 03 '14 at 07:44`. You especially might want to delete the web files (and the directory) if you have messed with the node's plugins and your new definitions refuse to appear in the host's web page. -
What for removing those files? Main question is, how to reset draw data, not removing or renaming/moving monitored host. – Znik May 18 '17 at 06:40
I remove a single type graph with next at master server:
- Login as root:
sudo su
- Backup current status:
cp -rp /var/lib/munin /var/lib/munin.bak
- Search and confirm all files to delete for plugin graphs nginx_*:
find /var/lib/munin -name *nginx_*.rrd
Confirm all files to delete!
Delete graph files for plugin nginx_*:
find /var/lib/munin -name *nginx_*.rrd -exec rm {} \;

- 192
- 1
- 5