Commit 777db841 authored by Sean McGivern's avatar Sean McGivern

Merge branch '212882-add-instance-variable' into 'master'

Add an instance variable to self monitoring dashboard

See merge request gitlab-org/gitlab!34084
parents 62329379 d72bb0c4
---
title: Add ability to filter self monitoring resource usage charts by instance name
merge_request: 34084
author:
type: changed
dashboard: 'Default dashboard'
priority: 1
templating:
variables:
instance:
type: 'text'
label: 'Instance label regex'
options:
default_value: '.+'
panel_groups:
- group: 'Resource usage'
......@@ -9,7 +18,7 @@ panel_groups:
y_label: "% memory used"
metrics:
- id: node_memory_usage_percentage
query_range: '(1 - (node_memory_MemAvailable_bytes or node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes + node_memory_Slab_bytes) / node_memory_MemTotal_bytes) * 100'
query_range: '(1 - (node_memory_MemAvailable_bytes{instance=~"{{instance}}"} or (node_memory_MemFree_bytes{instance=~"{{instance}}"} + node_memory_Buffers_bytes{instance=~"{{instance}}"} + node_memory_Cached_bytes{instance=~"{{instance}}"} + node_memory_Slab_bytes{instance=~"{{instance}}"})) / node_memory_MemTotal_bytes{instance=~"{{instance}}"}) * 100'
unit: "%"
label: instance
......@@ -18,7 +27,7 @@ panel_groups:
y_label: "% CPU used"
metrics:
- id: node_cpu_usage_percentage
query_range: '(avg without (mode,cpu) (1 - irate(node_cpu_seconds_total{mode="idle"}[5m]))) * 100'
query_range: '(avg without (mode,cpu) (1 - irate(node_cpu_seconds_total{mode="idle",instance=~"{{instance}}"}[5m]))) * 100'
unit: "%"
label: instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment