Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1352 lines (1352 sloc) 35.4 KB
{
"__inputs": [
{
"name": "DATASOURCE_NAME",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"annotations": {
"list": []
},
"description": "Performance metrics for Postgres",
"editable": true,
"gnetId": 455,
"graphTooltip": 0,
"hideControls": false,
"id": 10,
"links": [],
"refresh": "10s",
"rows": [
{
"collapse": false,
"height": "250px",
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DATASOURCE_NAME}",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 1,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "fetched",
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_tup_fetched{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "fetched",
"measurement": "postgresql",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tup_fetched"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "fetched",
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_tup_returned{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "returned",
"measurement": "postgresql",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tup_fetched"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "fetched",
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_tup_inserted{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "inserted",
"measurement": "postgresql",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tup_fetched"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "fetched",
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_tup_updated{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "updated",
"measurement": "postgresql",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tup_fetched"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "fetched",
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_tup_deleted{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "deleted",
"measurement": "postgresql",
"policy": "default",
"refId": "E",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"tup_fetched"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Rows",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "${DATASOURCE_NAME}",
"decimals": 0,
"editable": true,
"error": false,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"height": "55px",
"id": 11,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"span": 2,
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": true,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"dsType": "prometheus",
"expr": "sum(irate(pg_stat_database_xact_commit{datname=~\"$db\",app=\"$host\"}[5m])) + sum(irate(pg_stat_database_xact_rollback{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"measurement": "postgresql",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"xact_commit"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"step": 4,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": "",
"title": "QPS",
"transparent": true,
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DATASOURCE_NAME}",
"decimals": 1,
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"hideZero": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 6,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "Buffers Allocated",
"dsType": "prometheus",
"expr": "irate(pg_stat_bgwriter_buffers_alloc{app='$host'}[5m])",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "buffers_alloc",
"measurement": "postgresql",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"buffers_alloc"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "Buffers Allocated",
"dsType": "prometheus",
"expr": "irate(pg_stat_bgwriter_buffers_backend_fsync{app='$host'}[5m])",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "buffers_backend_fsync",
"measurement": "postgresql",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"buffers_alloc"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "Buffers Allocated",
"dsType": "prometheus",
"expr": "irate(pg_stat_bgwriter_buffers_backend{app='$host'}[5m])",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "buffers_backend",
"measurement": "postgresql",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"buffers_alloc"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "Buffers Allocated",
"dsType": "prometheus",
"expr": "irate(pg_stat_bgwriter_buffers_clean{app='$host'}[5m])",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "buffers_clean",
"measurement": "postgresql",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"buffers_alloc"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "Buffers Allocated",
"dsType": "prometheus",
"expr": "irate(pg_stat_bgwriter_buffers_checkpoint{app='$host'}[5m])",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "buffers_checkpoint",
"measurement": "postgresql",
"policy": "default",
"refId": "E",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"buffers_alloc"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Buffers",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DATASOURCE_NAME}",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 3,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 6,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "conflicts",
"dsType": "prometheus",
"expr": "sum(rate(pg_stat_database_deadlocks{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "deadlocks",
"measurement": "postgresql",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"conflicts"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
},
{
"alias": "deadlocks",
"dsType": "prometheus",
"expr": "sum(rate(pg_stat_database_conflicts{datname=~\"$db\",app=\"$host\"}[5m]))",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"intervalFactor": 2,
"legendFormat": "conflicts",
"measurement": "postgresql",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"deadlocks"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [],
"type": "difference"
}
]
],
"step": 2,
"tags": [
{
"key": "host",
"operator": "=~",
"value": "/^$host$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Conflicts/Deadlocks",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": "250px",
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DATASOURCE_NAME}",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 12,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": true,
"pointradius": 1,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 6,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(pg_stat_database_blks_hit{datname=~\"$db\",app=\"$host\"}) / (sum(pg_stat_database_blks_hit{datname=~\"$db\",app=\"$host\"}) + sum(pg_stat_database_blks_read{datname=~\"$db\",app=\"$host\"}))",
"intervalFactor": 2,
"legendFormat": "cache hit rate",
"refId": "A",
"step": 2
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Cache hit ratio",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percentunit",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DATASOURCE_NAME}",
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"id": 13,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 6,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "pg_stat_database_numbackends{datname=~\"$db\",app=\"$host\"}",
"intervalFactor": 2,
"legendFormat": "{{__name__}}",
"refId": "A",
"step": 2
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Number of active connections",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "New row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 250,
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"description": "max duration in seconds any active transaction",
"fill": 1,
"id": 14,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "pg_stat_activity_max_tx_duration{datname=~\"$db\",app=\"$host\"}",
"intervalFactor": 2,
"legendFormat": "{{state}}",
"refId": "A",
"step": 2
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Maximum transaction duration",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
}
],
"schemaVersion": 14,
"style": "dark",
"tags": [
"postgres"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "dusty-buffoon-postgresql",
"value": "dusty-buffoon-postgresql"
},
"datasource": "${DATASOURCE_NAME}",
"hide": 0,
"includeAll": false,
"label": null,
"multi": false,
"name": "host",
"options": [],
"query": "label_values(up{chart=~\"postgres.*\"},app)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": ".*",
"current": {
"text": "booksy",
"value": "booksy"
},
"datasource": "${DATASOURCE_NAME}",
"hide": 0,
"includeAll": true,
"label": "db",
"multi": false,
"name": "db",
"options": [],
"query": "label_values(pg_stat_database_tup_fetched{chart=~\"postgres.*\",app=\"$host\",datname!~\"template.*|postgres\"},datname)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"nowDelay": "",
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Postgres Overview #455",
"version": 9
}