Dashboard linting improvements for mixin
Signed-off-by: Ryan J. Geyer <me@ryangeyer.com>
This commit is contained in:
parent
1e9b5c4bfc
commit
9003ac8f0a
|
@ -25,7 +25,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
{
|
{
|
||||||
"alias": "fetched",
|
"alias": "fetched",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_tup_fetched{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_tup_fetched{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
{
|
{
|
||||||
"alias": "fetched",
|
"alias": "fetched",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_tup_returned{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_tup_returned{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
{
|
{
|
||||||
"alias": "fetched",
|
"alias": "fetched",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_tup_inserted{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_tup_inserted{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
{
|
{
|
||||||
"alias": "fetched",
|
"alias": "fetched",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_tup_updated{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_tup_updated{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -293,7 +293,7 @@
|
||||||
{
|
{
|
||||||
"alias": "fetched",
|
"alias": "fetched",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_tup_deleted{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_tup_deleted{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
"rgba(237, 129, 40, 0.89)",
|
"rgba(237, 129, 40, 0.89)",
|
||||||
"rgba(50, 172, 45, 0.97)"
|
"rgba(50, 172, 45, 0.97)"
|
||||||
],
|
],
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"decimals": 0,
|
"decimals": 0,
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
|
@ -460,7 +460,7 @@
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(irate(pg_stat_database_xact_commit{datname=~\"$db\",instance=~\"$instance\"}[5m])) + sum(irate(pg_stat_database_xact_rollback{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(irate(pg_stat_database_xact_commit{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])) + sum(irate(pg_stat_database_xact_rollback{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -530,7 +530,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"decimals": 1,
|
"decimals": 1,
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
|
@ -584,7 +584,7 @@
|
||||||
{
|
{
|
||||||
"alias": "Buffers Allocated",
|
"alias": "Buffers Allocated",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "irate(pg_stat_bgwriter_buffers_alloc_total{instance='$instance'}[5m])",
|
"expr": "irate(pg_stat_bgwriter_buffers_alloc{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -636,7 +636,7 @@
|
||||||
{
|
{
|
||||||
"alias": "Buffers Allocated",
|
"alias": "Buffers Allocated",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "irate(pg_stat_bgwriter_buffers_backend_fsync_total{instance='$instance'}[5m])",
|
"expr": "irate(pg_stat_bgwriter_buffers_backend_fsync{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -688,7 +688,7 @@
|
||||||
{
|
{
|
||||||
"alias": "Buffers Allocated",
|
"alias": "Buffers Allocated",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "irate(pg_stat_bgwriter_buffers_backend_total{instance='$instance'}[5m])",
|
"expr": "irate(pg_stat_bgwriter_buffers_backend{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -740,7 +740,7 @@
|
||||||
{
|
{
|
||||||
"alias": "Buffers Allocated",
|
"alias": "Buffers Allocated",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "irate(pg_stat_bgwriter_buffers_clean_total{instance='$instance'}[5m])",
|
"expr": "irate(pg_stat_bgwriter_buffers_clean{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -792,7 +792,7 @@
|
||||||
{
|
{
|
||||||
"alias": "Buffers Allocated",
|
"alias": "Buffers Allocated",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "irate(pg_stat_bgwriter_buffers_checkpoint_total{instance='$instance'}[5m])",
|
"expr": "irate(pg_stat_bgwriter_buffers_checkpoint{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -889,7 +889,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
|
@ -939,7 +939,7 @@
|
||||||
{
|
{
|
||||||
"alias": "conflicts",
|
"alias": "conflicts",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(rate(pg_stat_database_deadlocks{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(rate(pg_stat_database_deadlocks{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -991,7 +991,7 @@
|
||||||
{
|
{
|
||||||
"alias": "deadlocks",
|
"alias": "deadlocks",
|
||||||
"dsType": "prometheus",
|
"dsType": "prometheus",
|
||||||
"expr": "sum(rate(pg_stat_database_conflicts{datname=~\"$db\",instance=~\"$instance\"}[5m]))",
|
"expr": "sum(rate(pg_stat_database_conflicts{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"groupBy": [
|
"groupBy": [
|
||||||
{
|
{
|
||||||
|
@ -1088,7 +1088,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
|
@ -1136,10 +1136,10 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(pg_stat_database_blks_hit{datname=~\"$db\",instance=~\"$instance\"}) / (sum(pg_stat_database_blks_hit{datname=~\"$db\",instance=~\"$instance\"}) + sum(pg_stat_database_blks_read{datname=~\"$db\",instance=~\"$instance\"}))",
|
"expr": "sum by (datname) (rate(pg_stat_database_blks_hit{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])) / (sum by (datname)(rate(pg_stat_database_blks_hit{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])) + sum by (datname)(rate(pg_stat_database_blks_read{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}[$__rate_interval])))",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
"legendFormat": "cache hit rate",
|
"legendFormat": "{{datname}} - cache hit rate",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"step": 240
|
"step": 240
|
||||||
}
|
}
|
||||||
|
@ -1191,7 +1191,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "Postgres Overview",
|
"datasource": "$datasource",
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
|
@ -1239,10 +1239,10 @@
|
||||||
"steppedLine": false,
|
"steppedLine": false,
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "pg_stat_database_numbackends{datname=~\"$db\",instance=~\"$instance\"}",
|
"expr": "pg_stat_database_numbackends{datname=~\"$db\",job=~\"$job\",instance=~\"$instance\"}",
|
||||||
"format": "time_series",
|
"format": "time_series",
|
||||||
"intervalFactor": 2,
|
"intervalFactor": 2,
|
||||||
"legendFormat": "{{__name__}}",
|
"legendFormat": "{{datname}} - {{__name__}}",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"step": 240
|
"step": 240
|
||||||
}
|
}
|
||||||
|
@ -1299,66 +1299,9 @@
|
||||||
"templating": {
|
"templating": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"allValue": ".*",
|
|
||||||
"current": {
|
|
||||||
"selected": false,
|
|
||||||
"text": "All",
|
|
||||||
"value": "$__all"
|
|
||||||
},
|
|
||||||
"datasource": "Postgres Overview",
|
|
||||||
"definition": "",
|
|
||||||
"hide": 0,
|
|
||||||
"includeAll": true,
|
|
||||||
"label": null,
|
|
||||||
"multi": false,
|
|
||||||
"name": "instance",
|
|
||||||
"options": [],
|
|
||||||
"query": "label_values(up{job=~\"postgres.*\"},instance)",
|
|
||||||
"refresh": 1,
|
|
||||||
"regex": "",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"sort": 0,
|
|
||||||
"tagValuesQuery": "",
|
|
||||||
"tags": [],
|
|
||||||
"tagsQuery": "",
|
|
||||||
"type": "query",
|
|
||||||
"useTags": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allValue": ".*",
|
|
||||||
"current": {
|
|
||||||
"selected": false,
|
|
||||||
"text": "All",
|
|
||||||
"value": "$__all"
|
|
||||||
},
|
|
||||||
"datasource": "Postgres Overview",
|
|
||||||
"definition": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
|
||||||
"hide": 0,
|
|
||||||
"includeAll": true,
|
|
||||||
"label": "db",
|
|
||||||
"multi": false,
|
|
||||||
"name": "db",
|
|
||||||
"options": [],
|
|
||||||
"query": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
|
||||||
"refresh": 1,
|
|
||||||
"regex": "",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"sort": 0,
|
|
||||||
"tagValuesQuery": "",
|
|
||||||
"tags": [],
|
|
||||||
"tagsQuery": "",
|
|
||||||
"type": "query",
|
|
||||||
"useTags": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"current": {
|
|
||||||
"selected": false,
|
|
||||||
"text": "Postgres Overview",
|
|
||||||
"value": "Postgres Overview"
|
|
||||||
},
|
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"includeAll": false,
|
||||||
"label": "datasource",
|
"label": "Data Source",
|
||||||
"multi": false,
|
"multi": false,
|
||||||
"name": "datasource",
|
"name": "datasource",
|
||||||
"options": [],
|
"options": [],
|
||||||
|
@ -1369,26 +1312,15 @@
|
||||||
"type": "datasource"
|
"type": "datasource"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allValue": null,
|
"allValue": ".+",
|
||||||
"current": {
|
|
||||||
"selected": true,
|
|
||||||
"text": "postgres",
|
|
||||||
"value": "postgres"
|
|
||||||
},
|
|
||||||
"datasource": "$datasource",
|
"datasource": "$datasource",
|
||||||
"definition": "label_values(pg_up, job)",
|
"definition": "label_values(pg_up, job)",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"includeAll": true,
|
||||||
"label": "job",
|
"label": "job",
|
||||||
"multi": false,
|
"multi": true,
|
||||||
"name": "job",
|
"name": "job",
|
||||||
"options": [
|
"options": [],
|
||||||
{
|
|
||||||
"selected": true,
|
|
||||||
"text": "postgres",
|
|
||||||
"value": "postgres"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"query": "label_values(pg_up, job)",
|
"query": "label_values(pg_up, job)",
|
||||||
"refresh": 0,
|
"refresh": 0,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
|
@ -1399,6 +1331,48 @@
|
||||||
"tagsQuery": "",
|
"tagsQuery": "",
|
||||||
"type": "query",
|
"type": "query",
|
||||||
"useTags": false
|
"useTags": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allValue": ".+",
|
||||||
|
"datasource": "$datasource",
|
||||||
|
"definition": "",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "instance",
|
||||||
|
"multi": true,
|
||||||
|
"name": "instance",
|
||||||
|
"options": [],
|
||||||
|
"query": "label_values(up{job=~\"$job\"},instance)",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tags": [],
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allValue": ".+",
|
||||||
|
"datasource": "$datasource",
|
||||||
|
"definition": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "db",
|
||||||
|
"multi": false,
|
||||||
|
"name": "db",
|
||||||
|
"options": [],
|
||||||
|
"query": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tags": [],
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue