Chronograf: how can I remove hosts?

I’ve asked this question in a few places and searched endlessly. I’m unable to find a reliable and consistent means to delete hosts from chronograf. The commands noted below are NOT working at this time. Some of these commands may have worked at some point in the past. Either due to certain conditions, or a version --but they are not working now.

I’ve had trouble getting responses from this forum in the past. If someone with some knowledge could kindly offer a few suggestions this would save us a whole bunch of trouble (and the possibility of having to ditch the use and development of chronograf/telegraf/influx altogether).

drop series from system where host = 'web001'
delete from system where host = 'web001'
DELETE FROM "telegraf"."autogen"."system" WHERE "host" = 'web001'

Is this still the case:

Hi :wave:. This is the first entry in google when searching for this topic and I had to hunt around a bit. It seems that since the hosts are stored in the measurements, you have to remove the series that have the host. Thanks to this post I was able to put this together using the influxdb command line:

> use telegraf
Using database telegraf
> 
> 
> show series where host='skynet'
key
---
cpu,cpu=cpu-total,host=skynet
cpu,cpu=cpu0,host=skynet
cpu,cpu=cpu1,host=skynet
cpu,cpu=cpu2,host=skynet
cpu,cpu=cpu3,host=skynet
disk,device=rootfs,fstype=rootfs,host=skynet,path=/
disk,device=sda1,fstype=ext4,host=skynet,path=/
disk,device=sda1,fstype=ext4,host=skynet,path=/var/lib/docker/aufs
diskio,host=skynet,name=sda
diskio,host=skynet,name=sda1
diskio,host=skynet,name=sda2
diskio,host=skynet,name=sda5
kernel,host=skynet
mem,host=skynet
processes,host=skynet
swap,host=skynet
system,host=skynet

> 
> 
> drop series where host='skynet'
> 
> 
> show series where host='skynet'
> 
> 
3 Likes

It’s still the first hit in Google, and your recipy still works fine on InfluxDB 1.8!

If the visitor’s goal was to remove stale hosts from Chronograf’s host list, due to bug #10285, the removed host data will still visible. For me, restarting influxdb did not resolve the issue and I had to rebuild the indexes as per afenioux’s workaround

1 Like

Thanks for this tip!

I was also curious how to merge 2 host. I’ve accidentally named host with capital letter and right now I have 2 hostname for the same machine.

Any suggestion?

Thanks!

1 Like