2

I want to delete some hosts that I'm not using anymore because show up on grafana with templates and I don't want that.

I execute drop series from measurement where host = 'hostName' Then I execute show series from measurement

The host still there. Any idea?

drop series from cpu where host = 'hostName'
show series from cpu where host = 'hostName'
cpu,cpu=cpu-total,host=hostName
cpu,cpu=cpu0,host=hostName
cpu,cpu=cpu1,host=hostName
FranAguiar
  • 637
  • 3
  • 14
  • 31
  • 1
    What version of InfluxDB are you using? There seems to be a bug with the newer versions (1.4+) not dropping data: https://github.com/influxdata/influxdb/issues/9246 – Tom Feb 26 '18 at 12:47
  • Yes, that could be. I have 1.4.2. Post as an answer to give you your points. This is weird, apt update does not retrieve the new version and was released a month ago – FranAguiar Feb 26 '18 at 13:54

2 Answers2

3

In some later version of influx another bug (behavior) exists - after dropping all series by tag you should restart influxdb server to reset/cleanup/rebuild some in-memory data. In my case hosts disapeared only after restart. See this issue later discussions for more details: https://github.com/influxdata/influxdb/issues/5092

Ivan
  • 321
  • 3
  • 4
2

There was a bug with the newer versions (1.4+) not dropping data: github.com/influxdata/influxdb/issues/9246

The bug was fixed, so you should upgrade your installation.

Install and start the InfluxDB service (older linux dist): sudo apt-get update && sudo apt-get install influxdb sudo service influxdb start

If your operating system is using systemd (Ubuntu 15.04+, Debian 8+): sudo apt-get update && sudo apt-get install influxdb sudo systemctl start influxdb

For full documentation: https://docs.influxdata.com/influxdb/v1.4/introduction/installation/

Tom
  • 1,105
  • 8
  • 17