mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2024-12-11 17:36:21 +00:00
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,21 +1299,50 @@
|
|||||||
"templating": {
|
"templating": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"allValue": ".*",
|
"hide": 0,
|
||||||
"current": {
|
"includeAll": false,
|
||||||
"selected": false,
|
"label": "Data Source",
|
||||||
"text": "All",
|
"multi": false,
|
||||||
"value": "$__all"
|
"name": "datasource",
|
||||||
},
|
"options": [],
|
||||||
"datasource": "Postgres Overview",
|
"query": "prometheus",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"type": "datasource"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allValue": ".+",
|
||||||
|
"datasource": "$datasource",
|
||||||
|
"definition": "label_values(pg_up, job)",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": true,
|
||||||
|
"label": "job",
|
||||||
|
"multi": true,
|
||||||
|
"name": "job",
|
||||||
|
"options": [],
|
||||||
|
"query": "label_values(pg_up, job)",
|
||||||
|
"refresh": 0,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tags": [],
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allValue": ".+",
|
||||||
|
"datasource": "$datasource",
|
||||||
"definition": "",
|
"definition": "",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": true,
|
"includeAll": true,
|
||||||
"label": null,
|
"label": "instance",
|
||||||
"multi": false,
|
"multi": true,
|
||||||
"name": "instance",
|
"name": "instance",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "label_values(up{job=~\"postgres.*\"},instance)",
|
"query": "label_values(up{job=~\"$job\"},instance)",
|
||||||
"refresh": 1,
|
"refresh": 1,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"skipUrlSync": false,
|
"skipUrlSync": false,
|
||||||
@ -1325,13 +1354,8 @@
|
|||||||
"useTags": false
|
"useTags": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allValue": ".*",
|
"allValue": ".+",
|
||||||
"current": {
|
"datasource": "$datasource",
|
||||||
"selected": false,
|
|
||||||
"text": "All",
|
|
||||||
"value": "$__all"
|
|
||||||
},
|
|
||||||
"datasource": "Postgres Overview",
|
|
||||||
"definition": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
"definition": "label_values(pg_stat_database_tup_fetched{instance=~\"$instance\",datname!~\"template.*|postgres\"},datname)",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": true,
|
"includeAll": true,
|
||||||
@ -1349,56 +1373,6 @@
|
|||||||
"tagsQuery": "",
|
"tagsQuery": "",
|
||||||
"type": "query",
|
"type": "query",
|
||||||
"useTags": false
|
"useTags": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"current": {
|
|
||||||
"selected": false,
|
|
||||||
"text": "Postgres Overview",
|
|
||||||
"value": "Postgres Overview"
|
|
||||||
},
|
|
||||||
"hide": 0,
|
|
||||||
"includeAll": false,
|
|
||||||
"label": "datasource",
|
|
||||||
"multi": false,
|
|
||||||
"name": "datasource",
|
|
||||||
"options": [],
|
|
||||||
"query": "prometheus",
|
|
||||||
"refresh": 1,
|
|
||||||
"regex": "",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"type": "datasource"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allValue": null,
|
|
||||||
"current": {
|
|
||||||
"selected": true,
|
|
||||||
"text": "postgres",
|
|
||||||
"value": "postgres"
|
|
||||||
},
|
|
||||||
"datasource": "$datasource",
|
|
||||||
"definition": "label_values(pg_up, job)",
|
|
||||||
"hide": 0,
|
|
||||||
"includeAll": false,
|
|
||||||
"label": "job",
|
|
||||||
"multi": false,
|
|
||||||
"name": "job",
|
|
||||||
"options": [
|
|
||||||
{
|
|
||||||
"selected": true,
|
|
||||||
"text": "postgres",
|
|
||||||
"value": "postgres"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"query": "label_values(pg_up, job)",
|
|
||||||
"refresh": 0,
|
|
||||||
"regex": "",
|
|
||||||
"skipUrlSync": false,
|
|
||||||
"sort": 0,
|
|
||||||
"tagValuesQuery": "",
|
|
||||||
"tags": [],
|
|
||||||
"tagsQuery": "",
|
|
||||||
"type": "query",
|
|
||||||
"useTags": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user