Chronograf: Add support to delete a host

Created on 24 Jan 2017  路  17Comments  路  Source: influxdata/chronograf

Most helpful comment

To be clear for any passers by, you will need to single quote the host's name in that query:

drop series where host='OldServer01'

All 17 comments

image
Hi, if i delete or rename a host , does chronograf has a method to delete the old server's data?

Hi @guozequn , thanks for writing in! Currently, chronograf cannot delete an old server's data.

We've been thinking about how we'd like to support it in chronograf. We could either blacklist the host and not show them in the list, or, remove the data from the telegraf database.

Of those two options which do you like better?

Thank you for getting back to me.
I think the first option is better to me, if a server is in a wrong state instead of crash, i can just hide it manually, and there is no need to care about the the history data, it will be cleaned up automatically by influxdb if the retention policies is specified.

i would like to have both options.

If possible, I'd love the ability to rename the host data, since we just changed the hostname the box is reporting in telegraph.

What is the correct procedure to remove hosts from the chronograf "host list"?
I have servers which are not in use anymore.

hi all, any progress to this? i have some hosts that i don't want to see in the host list.. how can i remove?

At the moment, the only way I've found to delete a host is to run the following command on Influxdb host.
drop series where host=<hostname>
This will delete all the data held for that host on the database, so use with caution (ie. only when the host is gone for good)

To be clear for any passers by, you will need to single quote the host's name in that query:

drop series where host='OldServer01'

How long does it take for the updated host list to be reflected in the UI once the series records for the hosts have been dropped?

It should be on the next reload. Chronograf pulls the host list from a SHOW SERIES command, so if the host does not show up there, it shouldn't show up in chronograf

I am doing this drop series where host='oldhost' but even minutes after the drop deadman still throws an alert on the host.

'oldhost' is turned off. Influx data is dropped. Minutes later I have a deadman alert. How can I get chronograf to ignore the 'oldhost' so I don't get this false deadman?

after drop series the deleted hosts still show up in the host list with 0.00% 0.00

@rif same here. I had to restart InfluxDB in order to get rid of the removed hosts in Chronograf host list. systemctl restart influxdb

Besides, InfluxDB also supports regex. So if ever you need to clean a bunch of Docker hosts (with docker id as hostname), you can do something like:

$ influx -database telegraf
> drop series where host =~ /^[0-9a-f]{12}$/

@onlime thanks for the tip, it did the job :+1:
The regex support is also a good suggestion!

Hi, I have same issue, but when I do DROP SERIES WHERE host = some_host I still see tag value some_host even I restart influxdb. Just updated from previous version to 1.6.0 and problem is still there.

so chronograf isn't caching anything on the current host page. so if the host is showing up in the UI, it still exists in your influxdb cluster somewhere.

That being said, in the updated host list page (#682 ), we will add a time component which would allow old hosts to eventually drop off the list if you like.

Was this page helpful?
0 / 5 - 0 ratings