Hi
I’m a new user of InfluxDB so it is possible than I don’t understand some concepts.
I have several measurements and I have created two retention policies because I want a different storage duration beetwen the differents measurements.
> show retention policies on homebd
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
30jours 720h0m0s 24h0m0s 1 false
2ans 17520h0m0s 168h0m0s 1 true
But the data were not written when I tried to write them with the retention policy “30jours”:
curl -i -XPOST 'http://localhost:8086/write?db=homebd&rp=30jours' --data-binary 'sensor_porte_entree contact=1'
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: 92158dee-5188-11ea-8024-0242ac130004
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.7.9
X-Request-Id: 92158dee-5188-11ea-8024-0242ac130004
Date: Mon, 17 Feb 2020 13:22:39 GMT
When I querie measurement “sensor_porte_entree”, I have nothing:
> select * from sensor_porte_entree
>
But if I write data with the other retention policy (the default one) it is OK.
curl -i -XPOST 'http://localhost:8086/write?db=homebd&rp=2ans' --data-binary 'sensor_porte_entree contact=1'
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: e499073a-518d-11ea-8185-0242ac130004
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.7.9
X-Request-Id: e499073a-518d-11ea-8185-0242ac130004
Date: Mon, 17 Feb 2020 14:00:45 GMT
Result:
> select * from sensor_porte_entree
name: sensor_porte_entree
time contact
---- -------
2020-02-17T14:00:45.569485502Z 1
>
So is it possible to use several retention policies in the same database and use one of them as I want to write data in measurements?