0.9.4_nightly build. Retention policy is not getting enforced
Hi,
I tried with all version of influxdb 0.9 series but was not able to enforce retention policy. Here is the retention policy I created.
show retention policies on mydb; name duration replicaN default
default 1h0m0s 1 true
I can still see all the data points since the db started.
This is not enough information to reproduce your ticket. Please do the following:
-- write data with timestamps more than 1 hour in the past into your system. -- confirm, via a query, that the data is still there. -- after 30 minutes, query for that data again. Is it still visible?
If so, please show us each stage via a curl command/
@otoolep
Thanks for the quick update. I tried adding historical data and then tried querying it later. I can see the shards got deleted message. The data points was not available half an hour later. Wondering why data points I am ingesting using collectd are still there.
Are there any documentation I can refer to, which explains how retention policy works in influxdb? Is it possible to change retention policy on series which are already created with infinite policy ?
[root ~]# curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu/percent-system,host=grafana-xxxx.com value=0.64 1442155881' HTTP/1.1 204 No Content Request-Id: cd3f2ea2-5a37-11e5-a46d-000000000000 X-Influxdb-Version: 0.9.4-nightly-23e6fb8 Date: Sun, 13 Sep 2015 16:52:21 GMT
$ curl -G 'http://localhost:8086/query' --data-urlencode "db=mydb" --data-urlencode "epoch=s" --data-urlencode "q=SELECT value FROM "cpu/percent-system" WHERE time=1442155881" {"results":[{"series":[{"name":"cpu/percent-system","columns":["time","value"],"values":[[1,0.64]]}]}]}
$ TZ=GMT date Sun Sep 13 17:09:14 GMT 2015
$ curl -G 'http://localhost:8086/query' --data-urlencode "db=mydb" --data-urlencode "epoch=s" --data-urlencode "q=SELECT value FROM "cpu/percent-system" WHERE time=1442155881" {"results":[{}]}
$ grep -i retention /var/log/influxdb/influxd.log |tail -4 [http] 2015/09/13 22:17:30 ::1 - - [13/Sep/2015:22:17:30 +0530] GET /query?db=mydb&q=show+retention+policies+on+mydb%3B HTTP/1.1 200 117 - InfluxDBShell/0.9.4-nightly-23e6fb8 1f9e16cc-5a37-11e5-a44a-000000000000 1.191776ms
2015/09/13 22:44:11 deleted shard group 140 from database mydb, retention policy default
Thanks again for the help.
We have extensive documentation available here:
https://influxdb.com/docs/v0.9/introduction/overview.html
Feel free to send further general questions to the Google Groups mailing list.