From d5338400689d8c07897cb86b32ed077f506ca85c Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 17 May 2022 12:48:44 +0300 Subject: [PATCH] dashboard: set InfluxDB default policy to autogen `default` InfluxDB policy keyword cannot be used as a value in raw InfluxDB queries. `autogen` retention policy is created by default [1]: When you create a database, InfluxDB automatically creates a retention policy called autogen with an infinite duration, a replication factor set to one, and a shard group duration set to seven days thus it is well-suited to be a default value. 1. https://www.influxdata.com/blog/simplifying-influxdb-retention-policy-best-practices/ Part of #143 --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- dashboard/influxdb_dashboard.libsonnet | 2 +- tests/InfluxDB/dashboard_compiled.json | 2 +- .../dashboard_with_custom_panels_compiled.json | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b4f0aa..5172771 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +### Changed +- Set default InfluxDB policy to `autogen` + +### Fixed + + ## [1.0.0] - 2022-05-06 Grafana revisions: [InfluxDB revision 9](https://grafana.com/api/dashboards/12567/revisions/9/download), [Prometheus revision 10](https://grafana.com/api/dashboards/13054/revisions/10/download) diff --git a/README.md b/README.md index 575eeb2..41bbbf1 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Refer to dashboard [documentation page](https://www.tarantool.io/en/doc/latest/b You need to set the following variables for InfluxDB datasource: - `Measurement`, - - `Policy` (default valie is `default`). + - `Policy` (default valie is `autogen`). You need to set the following variables for Prometheus datasource: diff --git a/dashboard/influxdb_dashboard.libsonnet b/dashboard/influxdb_dashboard.libsonnet index 56180ca..c13c826 100644 --- a/dashboard/influxdb_dashboard.libsonnet +++ b/dashboard/influxdb_dashboard.libsonnet @@ -55,7 +55,7 @@ dashboard.new( name='INFLUXDB_POLICY', label='Policy', type='constant', - value='default', + value='autogen', description='InfluxDB Tarantool metrics policy' ) ).addPanels( diff --git a/tests/InfluxDB/dashboard_compiled.json b/tests/InfluxDB/dashboard_compiled.json index 54a74ef..d887b60 100644 --- a/tests/InfluxDB/dashboard_compiled.json +++ b/tests/InfluxDB/dashboard_compiled.json @@ -19,7 +19,7 @@ "label": "Policy", "name": "INFLUXDB_POLICY", "type": "constant", - "value": "default" + "value": "autogen" } ], "__requires": [ diff --git a/tests/InfluxDB/dashboard_with_custom_panels_compiled.json b/tests/InfluxDB/dashboard_with_custom_panels_compiled.json index 18d8beb..74bcfac 100644 --- a/tests/InfluxDB/dashboard_with_custom_panels_compiled.json +++ b/tests/InfluxDB/dashboard_with_custom_panels_compiled.json @@ -19,7 +19,7 @@ "label": "Policy", "name": "INFLUXDB_POLICY", "type": "constant", - "value": "default" + "value": "autogen" } ], "__requires": [