Open Vebryn opened 4 years ago
@Vebryn thanks for the issue. The _internal
database will use autogen
as the name of the default retention policy. If you'd like to change the default, you can do so by running the CREATE RETENTION POLICY command with the DEFAULT flag.
Hi @russorat, thanks for your answer.
I create a "pouf" database and a default rp one_day. I set pouf as statistics store-database.
show retention policies
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
one_day 24h0m0s 168h0m0s 1 true
influxdb.conf
[meta]
retention-autocreate = false
[monitor]
store-database = "pouf"
Influx expect a monitor rp to store statistics. Monitor rp name is hard written and influx doesn't use database default rp.
ts=2020-04-16T09:40:30.014194Z lvl=info msg="failed to store statistics" log_id=0MCabZcG000 service=monitor error="retention policy not found: monitor"
Steps to reproduce: According to following commits:
5 sept. 2015 Monitor retention policy is configurable https://github.com/influxdata/influxdb/commit/214cfea53c05fcc7105ca60d222572528153713c Retention policy name is configured using store-retention-policy = "monitor"
11 sept. 2015 By default write stats to default retention policy https://github.com/influxdata/influxdb/commit/3cb29d92411251f58155d49d539425d43a22ff12 Retention policy is now using default retention policy
15 sept. 2015 Create and configure _internal retention policy https://github.com/influxdata/influxdb/pull/4108 A "monitor" retention policy is used as retention policy. Retention policy is no more customizable ar creation. Metrics are written into default retention policy.
17 feb. 2016 Set the retention policy on the store https://github.com/influxdata/influxdb/commit/08ca1487249719042bfe461100f4e41f127b7d5b Metrics are written into "monitor" retention policy.
Expected behavior: monitor retention policy expect to be customizable.
Actual behavior: monitor retention policy is hard written.
Environment info: