Reputation: 74
I'm using open source version of InfluxDB on Windows with default settings. I tried 1.6.4 and 1.7.1. When I specify any retention policy then default, the data is not stored.
For test purposes I've created two identical retention policies - default and non_default:
show retention policies
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
default 168h0m0s 24h0m0s 1 true
non_default 168h0m0s 24h0m0s 1 false
When I'm posting data with the non_default retention policy nothing happens. The server returns a success but there is no data in metrics.
$ curl -i -XPOST " http://influx1:8086/write?db=test&rp=non_default" --data-binary 'TestViaHttp,mytag=a myfield=90'
When I'm posting data with default retention policy it is inserted successfully.
$ curl -i -XPOST " http://influx1:8086/write?db=test&rp=default" --data-binary 'TestViaHttp,mytag=a myfield=90'
Does anyone have an idea how to fix this?
Upvotes: 0
Views: 183
Reputation: 74
Figured out, that you should specify retention policy in select statement.
SELECT * FROM "non_default"."TestViaHttp"
Looks like retention policies are similar to schemas in MS SQL.
Upvotes: 1