Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[+] use predefined Grafana dashboards uid, fixes #474 #480

Merged
merged 3 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grafana_dashboards/delete_all_old_pw2_dashes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export PGUSER=postgres
export PGDATABASE=pgwatch2_grafana

DRY_RUN=1
PW2_DASHBOARD_NAMES=`ls -1 postgres/v6/`
PW2_DASHBOARD_NAMES=`ls -1 postgres/v8/`

if [ "$?" -ne 0 ]; then
echo "could not list dashboards...are you in the dashboards root dir?"
Expand Down
2 changes: 1 addition & 1 deletion grafana_dashboards/import_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "$GRAFANA_MAJOR_VER" -gt 4 ] ; then

GUID=$(echo "$JSON" | md5sum | egrep -o "^.{9}")
SQL='insert into dashboard (version, org_id, created, updated, updated_by, created_by, gnet_id, slug, title, data, uid) values (0, 1, now(), now(), 1, 1, 0'
for d in "$slug" "$TITLE" "$JSON" "$GUID" ; do
for d in "$slug" "$TITLE" "$JSON" "$slug" ; do
SQL+=",\$SQL\$${d}\$SQL\$"
done

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,6 @@
},
"timezone": "browser",
"title": "AWS CloudWatch overview",
"uid": null,
"uid": "aws-cloudwatch",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,6 @@
},
"timezone": "",
"title": "Biggest relations treemap",
"uid": null,
"uid": "biggest-relations",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,6 @@
},
"timezone": "browser",
"title": "Change events",
"uid": null,
"uid": "change-events",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,6 @@
},
"timezone": "",
"title": "Checkpointer / Bgwriter / Block IO Stats",
"uid": null,
"uid": "checkpointer-bgwriter-stats",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,6 @@
},
"timezone": "browser",
"title": "DB overview Unprivileged / Developer mode",
"uid": null,
"uid": "db-overview-developer",
"version": 1
}
2 changes: 1 addition & 1 deletion grafana_dashboards/influxdb/v8/db-overview/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,6 @@
},
"timezone": "browser",
"title": "DB overview",
"uid": null,
"uid": "db-overview",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@
},
"timezone": "browser",
"title": "Documentation",
"uid": null,
"uid": "documentation",
"version": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,6 @@
},
"timezone": "browser",
"title": "Global DB overview",
"uid": null,
"uid": "global-db-overview",
"version": 1
}
58 changes: 29 additions & 29 deletions grafana_dashboards/influxdb/v8/health-check/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
{
"targetBlank": true,
"title": "'Postgres Version Overview' dashboard",
"url": "/dashboard/db/postgres-version-overview?orgId=1"
"url": "/d/postgres-version-overview?orgId=1"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -416,7 +416,7 @@
{
"targetBlank": true,
"title": "Open 'DB overview :: shared buffers' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=8&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=8&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -544,7 +544,7 @@
{
"targetBlank": true,
"title": "'DB overview :: backends' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=11&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=11&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -671,7 +671,7 @@
{
"targetBlank": true,
"title": "'DB overview :: backends' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=11&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=11&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -779,7 +779,7 @@
{
"targetBlank": true,
"title": "'Lock details' dashboard",
"url": "/dashboard/db/lock-details?$__all_variables"
"url": "/d/lock-details?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -907,7 +907,7 @@
{
"targetBlank": true,
"title": "'DB overview :: Backends' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=11&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=11&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1035,7 +1035,7 @@
{
"targetBlank": true,
"title": "'DB overview :: Rollback Ratio' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=8&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=8&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1157,7 +1157,7 @@
{
"targetBlank": true,
"title": "'DB overview Unprivileged / Developer :: TPS' panel",
"url": "/dashboard/db/db-overview-developer?$__all_variables&panelId=15&fullscreen"
"url": "/d/db-overview-developer?$__all_variables&panelId=15&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1279,7 +1279,7 @@
{
"targetBlank": true,
"title": "'DB overview Unprivileged / Developer :: QPS' panel",
"url": "/dashboard/db/db-overview-developer?$__all_variables&panelId=15&fullscreen"
"url": "/d/db-overview-developer?$__all_variables&panelId=15&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1401,7 +1401,7 @@
{
"targetBlank": true,
"title": "'DB overview:: Query runtime' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=12&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=12&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1523,7 +1523,7 @@
{
"targetBlank": true,
"title": "'DB overview :: DB size' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=10&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=10&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1645,7 +1645,7 @@
{
"targetBlank": true,
"title": "'DB overview :: DB size' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=10&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=10&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -1767,7 +1767,7 @@
{
"targetBlank": true,
"title": "Open 'System Stats :: Free disk ' panel",
"url": "/dashboard/db/system-stats?$__all_variables&panelId=8&fullscreen"
"url": "/d/system-stats?$__all_variables&panelId=8&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2015,7 +2015,7 @@
{
"targetBlank": true,
"title": "'DDL / Config change events' dash",
"url": "/dashboard/db/change-events?$__all_variables"
"url": "/d/change-events?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2143,7 +2143,7 @@
{
"targetBlank": true,
"title": "'DDL / Config change events' dash",
"url": "/dashboard/db/change-events?$__all_variables"
"url": "/d/change-events?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2403,7 +2403,7 @@
{
"targetBlank": true,
"title": "'DB overview :: WAL' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=10&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=10&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2537,7 +2537,7 @@
{
"targetBlank": true,
"title": "\"Index overview\" dashboard",
"url": "/dashboard/db/index-overview"
"url": "/d/index-overview"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2653,7 +2653,7 @@
{
"targetBlank": true,
"title": "'Index overview' dashboard",
"url": "/dashboard/db/index-overview?$__all_variables"
"url": "/d/index-overview?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -2775,7 +2775,7 @@
{
"targetBlank": true,
"title": "Opens \"Checkpointer / Bgwriter / Block IO Stats :: Checkpoints\" dashboard",
"url": "/dashboard/db/checkpointer-bgwriter-stats?$__all_variables"
"url": "/d/checkpointer-bgwriter-stats?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3019,7 +3019,7 @@
{
"targetBlank": true,
"title": "'Tables Top :: Inserts' panel",
"url": "/dashboard/db/tables-top?$__all_variables&panelId=6&fullscreen"
"url": "/d/tables-top?$__all_variables&panelId=6&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3153,7 +3153,7 @@
{
"targetBlank": true,
"title": "'Tables Top :: Updates' panel",
"url": "/dashboard/db/tables-top?$__all_variables&panelId=7&fullscreen"
"url": "/d/tables-top?$__all_variables&panelId=7&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3287,7 +3287,7 @@
{
"targetBlank": true,
"title": "'Tables Top :: Deletes' panel",
"url": "/dashboard/db/tables-top?$__all_variables&panelId=8&fullscreen"
"url": "/d/tables-top?$__all_variables&panelId=8&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3421,7 +3421,7 @@
{
"targetBlank": true,
"title": "'Tables Top :: Most scans' panel",
"url": "/dashboard/db/tables-top?$__all_variables&panelId=4&fullscreen"
"url": "/d/tables-top?$__all_variables&panelId=4&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3555,7 +3555,7 @@
{
"targetBlank": true,
"title": "'DB overview :: CPU load' panel",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=12&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=12&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -3677,7 +3677,7 @@
{
"targetBlank": true,
"title": "DB overview",
"url": "/dashboard/db/db-overview?$__all_variables&panelId=18&fullscreen"
"url": "/d/db-overview?$__all_variables&panelId=18&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -4177,7 +4177,7 @@
{
"targetBlank": true,
"title": "'Replication :: XMIN age' panel",
"url": "/dashboard/db/replication?$__all_variables&panelId=10&fullscreen"
"url": "/d/replication?$__all_variables&panelId=10&fullscreen"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -4342,7 +4342,7 @@
{
"targetBlank": true,
"title": "'Replication lag' dashboard",
"url": "/dashboard/db/replication?$__all_variables"
"url": "/d/replication?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -4464,7 +4464,7 @@
{
"targetBlank": true,
"title": "'Replication lag' dashboard",
"url": "/dashboard/db/replication?$__all_variables"
"url": "/d/replication?$__all_variables"
}
],
"mappingType": 1,
Expand Down Expand Up @@ -4681,6 +4681,6 @@
},
"timezone": "browser",
"title": "Health-check",
"uid": null,
"uid": "health-check",
"version": 1
}
10 changes: 5 additions & 5 deletions grafana_dashboards/influxdb/v8/index-overview/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"link": true,
"linkTargetBlank": true,
"linkTooltip": "Opens 'Table details' dashboard",
"linkUrl": "/dashboard/db/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"linkUrl": "/d/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"mappingType": 1,
"pattern": "table_full_name",
"thresholds": [],
Expand Down Expand Up @@ -211,7 +211,7 @@
"link": true,
"linkTargetBlank": true,
"linkTooltip": "Opens 'Table details' dashboard",
"linkUrl": "/dashboard/db/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"linkUrl": "/d/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"mappingType": 1,
"pattern": "table_full_name",
"thresholds": [],
Expand Down Expand Up @@ -332,7 +332,7 @@
"link": true,
"linkTargetBlank": true,
"linkTooltip": "Opens 'Table details' dashboard",
"linkUrl": "/dashboard/db/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"linkUrl": "/d/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"mappingType": 1,
"pattern": "table_full_name",
"thresholds": [],
Expand Down Expand Up @@ -453,7 +453,7 @@
"link": true,
"linkTargetBlank": true,
"linkTooltip": "Opens 'Table details' dashboard",
"linkUrl": "/dashboard/db/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"linkUrl": "/d/table-details?var-dbname=${__cell_1}&var-table_full_name=${__cell}",
"mappingType": 1,
"pattern": "table_full_name",
"thresholds": [],
Expand Down Expand Up @@ -633,6 +633,6 @@
},
"timezone": "browser",
"title": "Index overview",
"uid": null,
"uid": "index-overview",
"version": 1
}
2 changes: 1 addition & 1 deletion grafana_dashboards/influxdb/v8/lock-details/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@
},
"timezone": "browser",
"title": "Lock details",
"uid": null,
"uid": "lock-details",
"version": 1
}
Loading