I have not been successful in removing telegraf data collected from hosts that are no longer exist. I have reviewed numerous articles and tried everything I could find and get to execute properly, from what I can tell, and the hosts still show up in the Grafana dashboard with no data.
Steps I have taken:
- From the influx directory on the host, influx /#run influxdb client shell
- Use telegraf /# select the telegraf database
- SHOW TAG VALUES FROM win_system WITH KEY=host /# List all host names
- drop series where host=’<for_each_stale_host_name>’ /# Remove host data
- show series where host=’<for_each_stale_host_name>’ /# Confirm host name is gone
- Stop influx db
- Delete all folders under .\data\telegraf\_series
- influx_inspect buildtsi -datadir .\data -waldir .\wal /# Rebuild the indexes
- Restart influxdb
Am I missing a step? Has this worked for anyone else?
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.8