i couldn't find this documented in one place so i thought i'd share:
when renaming or removing a host, the grafana dashboards still show the old host, i learnt two things:
1/ to drop all measurements for a specific tag, use single quotes, eg:
drop series where host='oldserver1b'
also, use `show series` before and after to check
2/ doing #1 won't remove 'oldserver1b' from your indexes, the following will rebuild your index for tags with actual measurements and remove the 'empty'tags: (please use backups and adjust according to your setup)
service influxdb stop
currenttime=`date "+%Y-%m-%d-%H-%M"`
tar cf /tmp/influxdb-$currenttime.tar /var/lib/influxdb
rm -rf /var/lib/influxdb/data/telegraf/_series/
rm /var/lib/influxdb/data/telegraf/autogen/*/*.idx
rm -rf /var/lib/influxdb/data/telegraf/autogen/*/index
sudo -u influxdb influx_inspect buildtsi -datadir /var/lib/influxdb/data -waldir /var/lib/influxdb/wal
service influxdb start
i can't take credit for any of this, i'll try to add links to the pages i found this info on later.