From 3afecb06a509c421d592833026c26d6897c374e4 Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Tue, 1 Dec 2020 11:50:53 +0100 Subject: [PATCH] Fixes promtail mixin dashboard. e14463b removed a metric that was used previously in a dashboard could not find a better way yet to use the new metric so instead I added back the recording rules. Also fixes a missing template expansion from 899e8cc. Signed-off-by: Cyril Tovena --- production/promtail-mixin/dashboards.libsonnet | 2 +- production/promtail-mixin/recording_rules.libsonnet | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/production/promtail-mixin/dashboards.libsonnet b/production/promtail-mixin/dashboards.libsonnet index 6c65a66b0d82..461b78f4997f 100644 --- a/production/promtail-mixin/dashboards.libsonnet +++ b/production/promtail-mixin/dashboards.libsonnet @@ -76,7 +76,7 @@ local utils = import 'mixin-utils/utils.libsonnet'; g.row('Requests') .addPanel( g.panel('QPS') + - g.qpsPanel('promtail_request_duration_seconds_count{%s}') + g.qpsPanel('promtail_request_duration_seconds_count{%s}' % dashboards['promtail.json'].selector) ) .addPanel( g.panel('Latency') + diff --git a/production/promtail-mixin/recording_rules.libsonnet b/production/promtail-mixin/recording_rules.libsonnet index 80e41dce888e..c88932f907a3 100644 --- a/production/promtail-mixin/recording_rules.libsonnet +++ b/production/promtail-mixin/recording_rules.libsonnet @@ -5,6 +5,7 @@ local utils = import 'mixin-utils/utils.libsonnet'; groups+: [{ name: 'promtail_rules', rules: + utils.histogramRules('promtail_request_duration_seconds', ['job']) + utils.histogramRules('promtail_request_duration_seconds', ['job', 'namespace']) + utils.histogramRules('promtail_request_duration_seconds', ['job', 'status_code', 'namespace']), }],