Skip to content

Commit 999860b

Browse files
committed
Add phlare head statistics
1 parent 5c18ad9 commit 999860b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

operations/phlare/jsonnet/phlare-mixin/phlare-mixin/dashboards/dashboard-utils.libsonnet

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,13 @@ local utils = import 'mixin-utils/utils.libsonnet';
234234
},
235235
},
236236

237+
panelDescription(title, description):: {
238+
description: |||
239+
### %s
240+
%s
241+
||| % [title, description],
242+
},
243+
237244
containerDiskSpaceUtilizationPanel(title, containerName)::
238245
$.panel(title) +
239246
$.queryPanel('max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{%s} / kubelet_volume_stats_capacity_bytes{%s}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{%s,%s})' % [$.namespaceMatcher(), $.namespaceMatcher(), $.namespaceMatcher(), $.containerLabelMatcher(containerName)], '{{persistentvolumeclaim}}') +

operations/phlare/jsonnet/phlare-mixin/phlare-mixin/dashboards/phlare-writes.libsonnet

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@ local utils = import 'mixin-utils/utils.libsonnet';
8383
dashboards['phlare-writes.json'].matchers.ingester + [utils.selector.re('route', '.*push.*')] + dashboards['phlare-writes.json'].clusterMatchers,
8484
)
8585
)
86+
)
87+
.addRow(
88+
local long_desc = |||
89+
Ingesters maintain a local Head per-tenant. Each
90+
Head maintains the active profiling series; Then
91+
the head gets periodically compacted into a block
92+
on disk. This panel shows the estimated size of
93+
the Head in memory for all ingesters.
94+
|||;
95+
$.row('Ingester - Head')
96+
.addPanel(
97+
local short_desc = 'Head size in bytes per table type';
98+
$.panel(short_desc) +
99+
$.panelDescription(short_desc, long_desc,) +
100+
$.queryPanel('sum(phlare_head_size_bytes{%s}) by (type)' % dashboards['phlare-writes.json'].ingesterSelector, '{{type}}') +
101+
{ yaxes: $.yaxes('bytes') },
102+
)
103+
.addPanel(
104+
local short_desc = 'Head size in bytes per pod';
105+
$.panel(short_desc) +
106+
$.panelDescription(short_desc, long_desc,) +
107+
$.queryPanel('sum(phlare_head_size_bytes{%s}) by (instance)' % dashboards['phlare-writes.json'].ingesterSelector, '{{instance}}') +
108+
{ yaxes: $.yaxes('bytes') },
109+
)
86110
),
87111
},
88112
}

0 commit comments

Comments
 (0)