zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

Change Munin Hostname

December 26, 2013 by Igor Drobot Leave a Comment

Munin

If you need to change the hostname of an existing munin node with a lot of data, and you want to retain all this existing historical data, follow this procedure:

Stop service and deactivate all munin crons:

1
2
vim /etc/cron.d/munin-node
vim/etc/cron.d/munin

vim /etc/cron.d/munin-node vim/etc/cron.d/munin

1
cd /var/lib/munin/drobot.de/

cd /var/lib/munin/drobot.de/

Legend:
relay.drobot.de > old host name
jump.drobot.de > new host name

Go one directory higher and please make a backup of the rrd-files directory and go on with:

1
rename -v 's/relay/jump/' relay.*

rename -v 's/relay/jump/' relay.*

Finally remove the old HTML directory:

1
rm -rf /var/www/html/munin/relay.drobot.de

rm -rf /var/www/html/munin/relay.drobot.de

Edit

1
vim /etc/munin/munin.conf

vim /etc/munin/munin.conf

and rename your host in the host definition section:

1
2
3
[jump.drobot.de]
    address 192.168.3.1
    use_node_name yes

[jump.drobot.de] address 192.168.3.1 use_node_name yes

Filed Under: Bash, Linux, Monitoring Tagged With: bash, mass rename, Munin

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *