Skip to content

Commit

Permalink
Add PCP Vector top consumers dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeifer committed Nov 6, 2024
1 parent 7819d02 commit 99949ef
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
76 changes: 76 additions & 0 deletions src/datasources/vector/dashboards/pcp-vector-top-consumers.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
local grafana = import 'grafonnet/grafana.libsonnet';

grafana.dashboard.new(
'PCP Vector: Top Consumers',
tags=['pcp-vector'],
time_from='now-5m',
time_to='now',
refresh='5s',
)
.addTemplate(
grafana.template.datasource(
'datasource',
'performancecopilot-vector-datasource',
'PCP Vector',
)
)
.addPanel(
grafana.tablePanel.new(
'Top CPU consumers',
datasource='$datasource',
styles=null,
)
.addTargets([
{ expr: 'proc.hog.cpu', format: 'metrics_table', legendFormat: '$metric' },
]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.cpu'}]}}, gridPos={
x: 0,
y: 0,
w: 12,
h: 8,
}
)
.addPanel(
grafana.tablePanel.new(
'Top Memory Consumers',
datasource='$datasource',
styles=null,
)
.addTargets([
{ expr: 'proc.hog.mem', format: 'metrics_table', legendFormat: '$metric' },
]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.mem'}]}}, gridPos={
x: 12,
y: 0,
w: 12,
h: 8,
}
)
.addPanel(
grafana.tablePanel.new(
'Top Disk Consumers',
datasource='$datasource',
styles=null,
)
.addTargets([
{ expr: 'proc.hog.disk', format: 'metrics_table', legendFormat: '$metric' },
]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.disk'}]}}, gridPos={
x: 0,
y: 8,
w: 12,
h: 8,
}
)
.addPanel(
grafana.tablePanel.new(
'Top Network Consumers',
datasource='$datasource',
styles=null,
)
.addTargets([
{ expr: 'proc.hog.net', format: 'metrics_table', legendFormat: '$metric' },
]) + { options+: {sortBy: [{desc: true, displayName: 'proc.hog.net'}]}}, gridPos={
x: 12,
y: 8,
w: 12,
h: 8,
}
)
5 changes: 5 additions & 0 deletions src/datasources/vector/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"type": "dashboard",
"name": "PCP Vector: UWSGI Overview",
"path": "dashboards/pcp-vector-uwsgi-overview.json"
},
{
"type": "dashboard",
"name": "PCP Vector: Top Consumers",
"path": "dashboards/pcp-vector-top-consumers.json"
}
]
}

0 comments on commit 99949ef

Please sign in to comment.