Skip to content

Commit eb0990b

Browse files
dashboard: set default InfluxDB measurement
Set default InfluxDB measurement to "tarantool_http". After this patch, it will be possible to import dashboard with community.ansible.ansible_dashboard, if Telegraf is configured to collect Tarantool metrics with http plugin and "tarantool_" prefix. This patch also changes all examples measurement names to "tarantool_http". Closes #138
1 parent 5901dd9 commit eb0990b

16 files changed

+392
-388
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
## Changed
1313
- Set default Prometheus job to `tarantool`
14+
- Set default InfluxDB measurement to `tarantool_http`
1415

1516

1617
## [1.3.0] - 2022-06-29

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
JOB ?= tarantool
22
RATE_TIME_RANGE ?= 2m
33
POLICY ?= autogen
4+
MEASUREMENT ?= tarantool_http
45
OUTPUT_STATIC_DASHBOARD ?= dashboard.json
56

67
.PHONY: build-deps
@@ -38,10 +39,7 @@ ifndef DATASOURCE
3839
false
3940
endif
4041
# POLICY is optional, default is "autogen"
41-
ifndef MEASUREMENT
42-
@echo 1>&2 "MEASUREMENT must be set"
43-
false
44-
endif
42+
# MEASUREMENT is optional, default is "tarantool_http"
4543
jsonnet -J ./vendor -J . \
4644
--ext-str DATASOURCE=${DATASOURCE} \
4745
--ext-str POLICY=${POLICY} \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ You can also interact with Prometheus at [localhost:9090](http://localhost:9090/
7676

7777
To set up an InfluxDB dashboard for monitoring example app, use the following variables:
7878

79-
- `Measurement`: `tarantool_app_http`;
79+
- `Measurement`: `tarantool_http`;
8080
- `Policy`: `default`.
8181

8282
To set up an Prometheus dashboard for monitoring example app, use the following variables:
@@ -134,7 +134,7 @@ Variables for Prometheus targets:
134134
Variables for InfluxDB targets:
135135
- `DATASOURCE`: name of a InfluxDB data source;
136136
- `POLICY` (optional, default `autogen`): InfluxDB metrics retention policy;
137-
- `MEASUREMENT`: name of a InfluxDB measurement with your application metrics;
137+
- `MEASUREMENT` (optional, default `tarantool_http`): name of a InfluxDB measurement with your application metrics;
138138
- `OUTPUT_STATIC_DASHBOARD` (optional, default `dashboard.json`): compiled dashboard file.
139139

140140
You can also compile configurable Prometheus dashboard template (the same we publish to

dashboard/build/influxdb/dashboard.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dashboard_raw(
1818
name='INFLUXDB_MEASUREMENT',
1919
label='Measurement',
2020
type='constant',
21+
value='tarantool_http',
2122
description='InfluxDB Tarantool metrics measurement'
2223
).addInput(
2324
name='INFLUXDB_POLICY',

dashboard/build/influxdb/tdg_dashboard.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ tdg_dashboard_raw(
1818
name='INFLUXDB_MEASUREMENT',
1919
label='Measurement',
2020
type='constant',
21+
value='tarantool_http',
2122
description='InfluxDB Tarantool metrics measurement'
2223
).addInput(
2324
name='INFLUXDB_POLICY',

doc/monitoring/grafana_dashboard.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ to Telegraf configuration including each Tarantool instance metrics URL:
123123
insecure_skip_verify = true
124124
interval = "10s"
125125
data_format = "json"
126-
name_prefix = "example_project_"
126+
name_prefix = "tarantool_"
127127
fieldpass = ["value"]
128128
129129
Be sure to include each label key as ``label_pairs_<key>`` so it will be
@@ -172,11 +172,11 @@ For TDG dashboard, please use
172172
insecure_skip_verify = true
173173
interval = "10s"
174174
data_format = "json"
175-
name_prefix = "example_project_"
175+
name_prefix = "tarantool_"
176176
fieldpass = ["value"]
177177
178178
If you connect Telegraf instance to InfluxDB storage, metrics will be stored
179-
with ``"<name_prefix>http"`` measurement (``"example_project_http"`` in our example).
179+
with ``"<name_prefix>http"`` measurement (``"tarantool_http"`` in our example).
180180

181181
.. _monitoring-grafana_dashboard-import:
182182

example_cluster/telegraf/telegraf.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
insecure_skip_verify = true
2727
interval = "10s"
2828
data_format = "json"
29-
name_prefix = "tarantool_app_"
29+
name_prefix = "tarantool_"
3030
fieldpass = ["value"]
3131

3232
[[inputs.internal]]

example_cluster/telegraf/telegraf.localapp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
insecure_skip_verify = true
2727
interval = "10s"
2828
data_format = "json"
29-
name_prefix = "tarantool_app_"
29+
name_prefix = "tarantool_"
3030
fieldpass = ["value"]
3131

3232
[[inputs.internal]]

example_cluster/telegraf/telegraf.tdg.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
insecure_skip_verify = true
3535
interval = "10s"
3636
data_format = "json"
37-
name_prefix = "tarantool_app_"
37+
name_prefix = "tarantool_"
3838
fieldpass = ["value"]
3939

4040
[[inputs.internal]]

tests/InfluxDB/dashboard_compiled.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"description": "InfluxDB Tarantool metrics measurement",
1313
"label": "Measurement",
1414
"name": "INFLUXDB_MEASUREMENT",
15-
"type": "constant"
15+
"type": "constant",
16+
"value": "tarantool_http"
1617
},
1718
{
1819
"description": "InfluxDB Tarantool metrics policy",

0 commit comments

Comments
 (0)