Skip to content

Commit 92c10f9

Browse files
Add AIX dashboard
Signed-off-by: Johannes Ziemke <[email protected]>
1 parent b9e1405 commit 92c10f9

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

docs/node-mixin/dashboards/node.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
grafanaDashboards+:: {
44
'nodes.json': nodemixin.new(config=$._config, platform='Linux', uid=std.md5('nodes.json')).dashboard,
55
'nodes-darwin.json': nodemixin.new(config=$._config, platform='Darwin', uid=std.md5('nodes-darwin.json')).dashboard,
6+
'nodes-aix.json': nodemixin.new(config=$._config, platform='AIX', uid=std.md5('nodes-aix.json')).dashboard,
67
},
78
}

docs/node-mixin/lib/prom-mixin.libsonnet

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,19 @@ local table = grafana70.panel.table;
147147
||| % config, legendFormat='App Memory'
148148
))
149149
.addTarget(prometheus.target('node_memory_wired_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}' % config, legendFormat='Wired Memory'))
150-
.addTarget(prometheus.target('node_memory_compressed_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}' % config, legendFormat='Compressed')),
150+
.addTarget(prometheus.target('node_memory_compressed_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}' % config, legendFormat='Compressed'))
151+
else if platform == 'AIX' then
152+
memoryGraphPanelPrototype { stack: false }
153+
.addTarget(prometheus.target('node_memory_total_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}' % config, legendFormat='Physical Memory'))
154+
.addTarget(prometheus.target(
155+
|||
156+
(
157+
node_memory_total_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"} -
158+
node_memory_available_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}
159+
)
160+
||| % config, legendFormat='Memory Used'
161+
)),
162+
151163

152164
// NOTE: avg() is used to circumvent a label change caused by a node_exporter rollout.
153165
local memoryGaugePanelPrototype =
@@ -194,8 +206,21 @@ local table = grafana70.panel.table;
194206
*
195207
100
196208
||| % config
209+
))
210+
else if platform == 'AIX' then
211+
memoryGaugePanelPrototype
212+
.addTarget(prometheus.target(
213+
|||
214+
100 -
215+
(
216+
avg(node_memory_available_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"}) /
217+
avg(node_memory_total_bytes{%(nodeExporterSelector)s, instance="$instance", %(clusterLabel)s="$cluster"})
218+
* 100
219+
)
220+
||| % config
197221
)),
198222

223+
199224
local diskIO =
200225
graphPanel.new(
201226
'Disk I/O',
@@ -501,8 +526,8 @@ local table = grafana70.panel.table;
501526
tags=(config.dashboardTags),
502527
timezone='utc',
503528
refresh='30s',
504-
graphTooltip='shared_crosshair',
505-
uid=std.md5(uid)
529+
uid=std.md5(uid),
530+
graphTooltip='shared_crosshair'
506531
)
507532
.addTemplates(templates)
508533
.addRows(rows)
@@ -513,8 +538,20 @@ local table = grafana70.panel.table;
513538
tags=(config.dashboardTags),
514539
timezone='utc',
515540
refresh='30s',
516-
graphTooltip='shared_crosshair',
517-
uid=std.md5(uid)
541+
uid=std.md5(uid),
542+
graphTooltip='shared_crosshair'
543+
)
544+
.addTemplates(templates)
545+
.addRows(rows)
546+
else if platform == 'AIX' then
547+
dashboard.new(
548+
'%sAIX' % config.dashboardNamePrefix,
549+
time_from='now-1h',
550+
tags=(config.dashboardTags),
551+
timezone='utc',
552+
refresh='30s',
553+
uid=std.md5(uid),
554+
graphTooltip='shared_crosshair'
518555
)
519556
.addTemplates(templates)
520557
.addRows(rows),

0 commit comments

Comments
 (0)