From fdb3ad71b3bdfbf393a5a5571ab2527649fe0dda Mon Sep 17 00:00:00 2001 From: Tristan Date: Fri, 12 Jan 2024 11:27:18 -0500 Subject: [PATCH] agent-flow-mixin: add aggregated remote write panel (#6116) --- CHANGELOG.md | 2 ++ .../prometheus.remote_write.libsonnet | 33 ++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4519cef6f6d0..2a6bfa0bccea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ Main (unreleased) - Removed support for Windows 2012 in line with Microsoft end of life. (@mattdurham) +- Split instance ID and component groupings into separate panels for `remote write active series by component` in the Flow mixin. (@tristanburgess) + v0.39.0 (2024-01-09) -------------------- diff --git a/operations/agent-flow-mixin/dashboards/prometheus.remote_write.libsonnet b/operations/agent-flow-mixin/dashboards/prometheus.remote_write.libsonnet index 32fe51506047..d9e0d8d170b4 100644 --- a/operations/agent-flow-mixin/dashboards/prometheus.remote_write.libsonnet +++ b/operations/agent-flow-mixin/dashboards/prometheus.remote_write.libsonnet @@ -290,7 +290,7 @@ local stackedPanelMixin = { received a sample for. Active series are garbage collected whenever a truncation of the WAL occurs. |||) + - panel.withPosition({ x: 0, y: 20, w: 12, h: 10 }) + + panel.withPosition({ x: 0, y: 20, w: 8, h: 10 }) + panel.withQueries([ panel.newQuery( expr=||| @@ -301,25 +301,48 @@ local stackedPanelMixin = { ]) ), + // Active series (by instance/component) + ( + panel.new(title='Active series (by instance/component)', type='timeseries') + + panel.withUnit('short') + + panel.withDescription(||| + Total number of active series which are currently being tracked by + prometheus.remote_write components, with separate lines for each agent instance. + + An "active series" is a series that prometheus.remote_write recently + received a sample for. Active series are garbage collected whenever a + truncation of the WAL occurs. + |||) + + panel.withPosition({ x: 8, y: 20, w: 8, h: 10 }) + + panel.withQueries([ + panel.newQuery( + expr=||| + agent_wal_storage_active_series{cluster="$cluster", namespace="$namespace", instance=~"$instance", component_id!="", component_id=~"$component", url=~"$url"} + |||, + legendFormat='{{instance}} / {{component_id}}', + ), + ]) + ), + // Active series (by component) ( panel.new(title='Active series (by component)', type='timeseries') + panel.withUnit('short') + panel.withDescription(||| Total number of active series which are currently being tracked by - prometheus.remote_write components. + prometheus.remote_write components, aggregated across all instances. An "active series" is a series that prometheus.remote_write recently received a sample for. Active series are garbage collected whenever a truncation of the WAL occurs. |||) + - panel.withPosition({ x: 12, y: 20, w: 12, h: 10 }) + + panel.withPosition({ x: 16, y: 20, w: 8, h: 10 }) + panel.withQueries([ panel.newQuery( expr=||| - agent_wal_storage_active_series{cluster="$cluster", namespace="$namespace", instance=~"$instance", component_id=~"$component", url=~"$url"} + sum by (component_id) (agent_wal_storage_active_series{cluster="$cluster", namespace="$namespace", instance=~"$instance", component_id!="", component_id=~"$component", url=~"$url"}) |||, - legendFormat='{{instance}} / {{component_id}}', + legendFormat='{{component_id}}', ), ]) ),