Skip to content

Commit

Permalink
dashboard: set InfluxDB default policy to autogen
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
DifferentialOrange committed May 17, 2022
1 parent 18d2c98 commit d533840
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion dashboard/influxdb_dashboard.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dashboard.new(
name='INFLUXDB_POLICY',
label='Policy',
type='constant',
value='default',
value='autogen',
description='InfluxDB Tarantool metrics policy'
)
).addPanels(
Expand Down
2 changes: 1 addition & 1 deletion tests/InfluxDB/dashboard_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"label": "Policy",
"name": "INFLUXDB_POLICY",
"type": "constant",
"value": "default"
"value": "autogen"
}
],
"__requires": [
Expand Down
2 changes: 1 addition & 1 deletion tests/InfluxDB/dashboard_with_custom_panels_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"label": "Policy",
"name": "INFLUXDB_POLICY",
"type": "constant",
"value": "default"
"value": "autogen"
}
],
"__requires": [
Expand Down

0 comments on commit d533840

Please sign in to comment.