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 7, 2024
1 parent 7819d02 commit 220f26f
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 9 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Change Log

## 5.1.2 (unreleased)

## 5.2.0

* **valkey**: new PCP Valkey datasource (replacement for PCP Redis)
* **redis**: PCP Redis datasource renamed to PCP Valkey due to licensing
* **dashboards**: new PCP Vector Top Consumers dashboard
* **dashboards**: new PCP Vector UWSGI overview dashboard
* **dashboards**: new PCP Prometheus Host Overview dashboard
* **test**: update cypress tests for grafana 10
* **docs**: update donations page link with new fiscal sponsor details
* **docs**: add .readthedocs.yaml file to keep grafana-pcp.readthedocs.io working
* **docs**: fix command in installation doc to allow loading unsigned plugins
* **build**: update grafana/plugin-validator and pin nodejs version
* **build**: update Go and node dependencies
* **search**: metric search turned off until Valkey replacement arrives for RediSearch


## 5.1.1 (2022-10-27)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "performancecopilot-pcp-app",
"description": "Performance Co-Pilot Grafana Plugin",
"version": "5.1.2",
"version": "5.2.0",
"scripts": {
"build": "grafana-toolkit plugin:build",
"test": "grafana-toolkit plugin:test",
Expand Down
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"
}
]
}
18 changes: 12 additions & 6 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,18 @@
"includes": [
{
"type": "datasource",
"name": "PCP Valkey"
"name": "PCP Valkey",
"path": "datasources/valkey/plugin.json"
},
{
"type": "datasource",
"name": "PCP Vector"
"name": "PCP Vector",
"path": "datasources/vector/plugin.json"
},
{
"type": "datasource",
"name": "PCP bpftrace"
"name": "PCP bpftrace",
"path": "datasources/bpftrace/plugin.json"
},
{
"type": "page",
Expand All @@ -70,15 +73,18 @@
},
{
"type": "panel",
"name": "PCP Flame Graph"
"name": "PCP Flame Graph",
"path": "panels/flamegraph/plugin.json"
},
{
"type": "panel",
"name": "PCP Troubleshooting Panel"
"name": "PCP Troubleshooting Panel",
"path": "panels/troubleshooting/plugin.json"
},
{
"type": "panel",
"name": "PCP Breadcrumbs panel"
"name": "PCP Breadcrumbs panel",
"path": "panels/breadcrumbs/plugin.json"
},
{
"type": "dashboard",
Expand Down

0 comments on commit 220f26f

Please sign in to comment.