Home > English, Techie > HOWTO Rename Munin node without losing history

HOWTO Rename Munin node without losing history

This howto describes how to rename a Munin 1.4.x node and/or move it to another domain without losing history, because just renaming the node in /etc/munin/munin.conf will actually just create a new host. It has been tested on Debian Squeeze (would work on Debian Lenny too, at least when using 1.4 backports). You will need at least a basic understanding of how to configure Munin to use it.

  1. Stop the cronjob (rename the /etc/cron.d/munin to something with a dot in the name, e.g: /etc/cron.d/munin.disabled)
  2. Rename the RRD files. The following command does the job (actually, moved the files by hand to the right directory after renaming them):
    for file in /var/lib/munin/localdomain/*.rrd; do mv $file `echo $file|sed ‘s/localhost\.localdomain/saidhost\.example\.net/’`; done
  3. Edit /etc/munin/munin.conf to change the node name accordingly
  4. Enable back the cronjob (renaming /etc/cron.d/munin.disabled to /etc/cron.d/munin)
  5. Wait at least 5 minutes (the time for munin-update to run at least once)
  6. Depending on your setup (if you are using Munin’s CGI mode), you might need to update some file and/or directory permissions
  7. Go to the web interface to check the result
Categories: English, Techie
  1. Joseph Chu
    May 19, 2016 at 3:00 am

    This worked for me, thanks. However it is important to say that changing the hostname to a short name (without a domain) doesn’t work. You must use hostname.domainname.

  2. August 23, 2012 at 3:17 pm

    Merci de cet apport.
    Cela dit, c’est moi, Jérôme Warnier, qui ai écrit cet article, pas mon frère.

  3. Yannick Warnier
    August 23, 2012 at 4:42 pm

    Je confirme.

  1. August 23, 2012 at 2:48 pm

Leave a comment