Rename Munin Node Without Losing History
- Stop the cronjob (rename the /etc/cron.d/munin to something with a dot in the name, e.g: /etc/cron.d/munin.disabled)
- 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
- Edit /etc/munin/munin.conf to change the node name accordingly
- Enable back the cronjob (renaming /etc/cron.d/munin.disabled to /etc/cron.d/munin)
- Wait at least 5 minutes (the time for munin-update to run at least once)
- Depending on your setup (if you are using Munin’s CGI mode), you might need to update some file and/or directory permissions
- Go to the web interface to check the result