-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dashboard: add panels for expirationd module statistics
Statistics for expirationd module was introduced in expirationd 1.2.0 [1]. Statistics integrated with metrics and enabled by default. To disable statistics integrated with metrics, call: expirationd.cfg({ metrics = false }) This patch adds panels for counters: - expirationd_checked_count - expirationd_expired_count - expirationd_restarts - expirationd_working_time The meaning of counters is same as for expirationd.stats() [2]. expirationd panels are stored in "expirationd module statistics" section. Mostly it copy-paste from TDG's dashboard [3][4]. 1. https://github.com/tarantool/expirationd/releases/tag/1.2.0 2. https://tarantool.github.io/expirationd/#stats 3. ca6e0e1 4. https://github.com/tarantool/grafana-dashboard/blob/0c623e0fae8e526976ed70da5e5f5a6640856275/dashboard/panels/tdg/expirationd.libsonnet Closes #149
- Loading branch information
1 parent
0c623e0
commit dee2252
Showing
11 changed files
with
2,159 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
local common_utils = import 'common.libsonnet'; | ||
local grafana = import 'grafonnet/grafana.libsonnet'; | ||
|
||
local influxdb = grafana.influxdb; | ||
local prometheus = grafana.prometheus; | ||
|
||
{ | ||
row:: common_utils.row('expirationd module statistics'), | ||
|
||
local target( | ||
datasource, | ||
metric_name, | ||
job=null, | ||
policy=null, | ||
measurement=null, | ||
) = | ||
if datasource == '${DS_PROMETHEUS}' then | ||
prometheus.target( | ||
expr=std.format('%s{job=~"%s"}', [metric_name, job]), | ||
legendFormat='{{name}} — {{alias}}', | ||
) | ||
else if datasource == '${DS_INFLUXDB}' then | ||
influxdb.target( | ||
policy=policy, | ||
measurement=measurement, | ||
group_tags=[ | ||
'label_pairs_alias', | ||
'label_pairs_name', | ||
], | ||
alias='$tag_label_pairs_name — $tag_label_pairs_alias', | ||
).where('metric_name', '=', metric_name) | ||
.selectField('value').addConverter('mean'), | ||
|
||
local rps_target( | ||
datasource, | ||
metric_name, | ||
job=null, | ||
rate_time_range=null, | ||
policy=null, | ||
measurement=null, | ||
) = | ||
if datasource == '${DS_PROMETHEUS}' then | ||
prometheus.target( | ||
expr=std.format('rate(%s{job=~"%s"}[%s])', | ||
[metric_name, job, rate_time_range]), | ||
legendFormat='{{name}} — {{alias}}', | ||
) | ||
else if datasource == '${DS_INFLUXDB}' then | ||
influxdb.target( | ||
policy=policy, | ||
measurement=measurement, | ||
group_tags=[ | ||
'label_pairs_alias', | ||
'label_pairs_name', | ||
], | ||
alias='$tag_label_pairs_name — $tag_label_pairs_alias', | ||
).where('metric_name', '=', metric_name) | ||
.selectField('value').addConverter('mean').addConverter('non_negative_derivative', ['1s']), | ||
|
||
tuples_checked( | ||
title='Tuples checked', | ||
description=common_utils.rate_warning(||| | ||
A number of task tuples checked for expiration (expired + skipped). | ||
Graph shows mean tuples per second. | ||
|||), | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
rate_time_range=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='tuples per second', | ||
panel_width=12, | ||
).addTarget(rps_target( | ||
datasource, | ||
'expirationd_checked_count', | ||
job, | ||
rate_time_range, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
tuples_expired( | ||
title='Tuples expired', | ||
description=common_utils.rate_warning(||| | ||
A number of task expired tuples. | ||
Graph shows mean tuples per second. | ||
|||, datasource), | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
rate_time_range=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
labelY1='tuples per second', | ||
panel_width=12, | ||
).addTarget(rps_target( | ||
datasource, | ||
'expirationd_expired_count', | ||
job, | ||
rate_time_range, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
restarts( | ||
title='Restart count', | ||
description=||| | ||
A number of task restarts since start. | ||
From the start is equal to 1. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
decimals=0, | ||
panel_width=12, | ||
).addTarget(target( | ||
datasource, | ||
'expirationd_restarts', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
|
||
operation_time( | ||
title='Operation time', | ||
description=||| | ||
A task's operation time. | ||
|||, | ||
datasource=null, | ||
policy=null, | ||
measurement=null, | ||
job=null, | ||
):: common_utils.default_graph( | ||
title=title, | ||
description=description, | ||
datasource=datasource, | ||
format='s', | ||
panel_width=12, | ||
).addTarget(target( | ||
datasource, | ||
'expirationd_working_time', | ||
job, | ||
policy, | ||
measurement, | ||
)), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.