1247 lines
		
	
	
	
		
			31 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			1247 lines
		
	
	
	
		
			31 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|   "annotations": {
 | |
|     "list": [
 | |
|       {
 | |
|         "builtIn": 1,
 | |
|         "datasource": "-- Grafana --",
 | |
|         "enable": true,
 | |
|         "hide": true,
 | |
|         "iconColor": "rgba(0, 211, 255, 1)",
 | |
|         "name": "Annotations & Alerts",
 | |
|         "type": "dashboard"
 | |
|       },
 | |
|       {
 | |
|         "datasource": "-- Grafana --",
 | |
|         "enable": true,
 | |
|         "hide": true,
 | |
|         "iconColor": "#73BF69",
 | |
|         "limit": 100,
 | |
|         "name": "PromEx service start",
 | |
|         "showIn": 0,
 | |
|         "tags": ["prom_ex", "pinchflat", "start"],
 | |
|         "type": "tags"
 | |
|       },
 | |
|       {
 | |
|         "datasource": "-- Grafana --",
 | |
|         "enable": true,
 | |
|         "hide": true,
 | |
|         "iconColor": "#FF9830",
 | |
|         "limit": 100,
 | |
|         "name": "PromEx service stop",
 | |
|         "showIn": 0,
 | |
|         "tags": ["prom_ex", "pinchflat", "stop"],
 | |
|         "type": "tags"
 | |
|       }
 | |
|     ]
 | |
|   },
 | |
|   "description": "All the data that is presented here is captured by the PromEx Ecto plugin (https://github.com/akoutmos/prom_ex/blob/master/lib/prom_ex/plugins/ecto.ex)",
 | |
|   "editable": false,
 | |
|   "gnetId": null,
 | |
|   "graphTooltip": 1,
 | |
|   "id": null,
 | |
|   "links": [
 | |
|     {
 | |
|       "asDropdown": false,
 | |
|       "icon": "bolt",
 | |
|       "includeVars": false,
 | |
|       "keepTime": false,
 | |
|       "tags": [],
 | |
|       "targetBlank": true,
 | |
|       "title": "Sponsor PromEx",
 | |
|       "tooltip": "",
 | |
|       "type": "link",
 | |
|       "url": "https://github.com/sponsors/akoutmos"
 | |
|     },
 | |
|     {
 | |
|       "asDropdown": false,
 | |
|       "icon": "doc",
 | |
|       "includeVars": false,
 | |
|       "keepTime": false,
 | |
|       "tags": [],
 | |
|       "targetBlank": true,
 | |
|       "title": "Ecto Plugin Docs",
 | |
|       "tooltip": "",
 | |
|       "type": "link",
 | |
|       "url": "https://hexdocs.pm/prom_ex/PromEx.Plugins.Ecto.html"
 | |
|     }
 | |
|   ],
 | |
|   "panels": [
 | |
|     {
 | |
|       "collapsed": false,
 | |
|       "datasource": null,
 | |
|       "gridPos": {
 | |
|         "h": 1,
 | |
|         "w": 24,
 | |
|         "x": 0,
 | |
|         "y": 0
 | |
|       },
 | |
|       "id": 19,
 | |
|       "panels": [],
 | |
|       "title": "Overview",
 | |
|       "type": "row"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The time the connection spent waiting before being checked out for the query.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "ms"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 8,
 | |
|         "w": 6,
 | |
|         "x": 0,
 | |
|         "y": 1
 | |
|       },
 | |
|       "id": 24,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "area",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["lastNotNull"],
 | |
|           "fields": "",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_query_idle_time_milliseconds_sum{instance=\"$instance\", job=\"$job\", repo=\"$repo\"} / pinchflat_prom_ex_ecto_repo_query_idle_time_milliseconds_count{instance=\"$instance\", job=\"$job\", repo=\"$repo\"}",
 | |
|           "instant": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Connection Idle Time (Average)",
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The time spent waiting to check out a database connection.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "ms"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 8,
 | |
|         "w": 6,
 | |
|         "x": 6,
 | |
|         "y": 1
 | |
|       },
 | |
|       "id": 29,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "area",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["lastNotNull"],
 | |
|           "fields": "",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_query_queue_time_milliseconds_sum{instance=\"$instance\", job=\"$job\", repo=\"$repo\"} / pinchflat_prom_ex_ecto_repo_query_queue_time_milliseconds_count{instance=\"$instance\", job=\"$job\", repo=\"$repo\"}",
 | |
|           "instant": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Connection Queue Time (Average)",
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The time spent decoding the data received from the database.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "ms"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 8,
 | |
|         "w": 6,
 | |
|         "x": 12,
 | |
|         "y": 1
 | |
|       },
 | |
|       "id": 30,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "area",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["lastNotNull"],
 | |
|           "fields": "",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_query_decode_time_milliseconds_sum{instance=\"$instance\", job=\"$job\", repo=\"$repo\"} / pinchflat_prom_ex_ecto_repo_query_decode_time_milliseconds_count{instance=\"$instance\", job=\"$job\", repo=\"$repo\"}",
 | |
|           "instant": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Connection Decode Time (Average)",
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The time spent executing the query. This value is the average time across all query types (SELECT, DELETE, etc).",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "ms"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 8,
 | |
|         "w": 6,
 | |
|         "x": 18,
 | |
|         "y": 1
 | |
|       },
 | |
|       "id": 31,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "area",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["lastNotNull"],
 | |
|           "fields": "",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_sum{instance=\"$instance\", job=\"$job\", repo=\"$repo\"}) / sum(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_count{instance=\"$instance\", job=\"$job\", repo=\"$repo\"})",
 | |
|           "instant": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Connection Execution Time (Average)",
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The name of the Ecto Repo module",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "none"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 4,
 | |
|         "w": 3,
 | |
|         "x": 0,
 | |
|         "y": 9
 | |
|       },
 | |
|       "id": 21,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "none",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["last"],
 | |
|           "fields": "/^repo$/",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_init_status_info{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}",
 | |
|           "instant": true,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Ecto Repo",
 | |
|       "transformations": [
 | |
|         {
 | |
|           "id": "labelsToFields",
 | |
|           "options": {}
 | |
|         }
 | |
|       ],
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The host of the database that the Repo is connected to.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "none"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 4,
 | |
|         "w": 3,
 | |
|         "x": 3,
 | |
|         "y": 9
 | |
|       },
 | |
|       "id": 26,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "none",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["last"],
 | |
|           "fields": "/^database_host$/",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_init_status_info{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}",
 | |
|           "instant": true,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Database Host",
 | |
|       "transformations": [
 | |
|         {
 | |
|           "id": "labelsToFields",
 | |
|           "options": {}
 | |
|         }
 | |
|       ],
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The name of the database that the Repo is connected to.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "none"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 4,
 | |
|         "w": 3,
 | |
|         "x": 6,
 | |
|         "y": 9
 | |
|       },
 | |
|       "id": 25,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "none",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["last"],
 | |
|           "fields": "/^database_name$/",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_init_status_info{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}",
 | |
|           "instant": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Database Name",
 | |
|       "transformations": [
 | |
|         {
 | |
|           "id": "labelsToFields",
 | |
|           "options": {}
 | |
|         }
 | |
|       ],
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The pool size that the repo was initialized with.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "none"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 4,
 | |
|         "w": 3,
 | |
|         "x": 9,
 | |
|         "y": 9
 | |
|       },
 | |
|       "id": 27,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "none",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["last"],
 | |
|           "fields": "/init_pool_size/",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_init_pool_size{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}",
 | |
|           "instant": true,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Pool Size",
 | |
|       "transformations": [
 | |
|         {
 | |
|           "id": "labelsToFields",
 | |
|           "options": {}
 | |
|         }
 | |
|       ],
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The timeout duration that the Repo was initialized with.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {},
 | |
|           "mappings": [],
 | |
|           "thresholds": {
 | |
|             "mode": "absolute",
 | |
|             "steps": [
 | |
|               {
 | |
|                 "color": "green",
 | |
|                 "value": null
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "unit": "ms"
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 4,
 | |
|         "w": 3,
 | |
|         "x": 12,
 | |
|         "y": 9
 | |
|       },
 | |
|       "id": 28,
 | |
|       "options": {
 | |
|         "colorMode": "value",
 | |
|         "graphMode": "none",
 | |
|         "justifyMode": "auto",
 | |
|         "orientation": "auto",
 | |
|         "reduceOptions": {
 | |
|           "calcs": ["last"],
 | |
|           "fields": "/init_timeout_duration/",
 | |
|           "values": false
 | |
|         },
 | |
|         "textMode": "auto"
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "pinchflat_prom_ex_ecto_repo_init_timeout_duration{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}",
 | |
|           "instant": true,
 | |
|           "interval": "",
 | |
|           "legendFormat": "",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Timeout Duration",
 | |
|       "transformations": [
 | |
|         {
 | |
|           "id": "labelsToFields",
 | |
|           "options": {}
 | |
|         }
 | |
|       ],
 | |
|       "type": "stat"
 | |
|     },
 | |
|     {
 | |
|       "collapsed": false,
 | |
|       "datasource": null,
 | |
|       "gridPos": {
 | |
|         "h": 1,
 | |
|         "w": 24,
 | |
|         "x": 0,
 | |
|         "y": 13
 | |
|       },
 | |
|       "id": 2,
 | |
|       "panels": [],
 | |
|       "title": "Query Details",
 | |
|       "type": "row"
 | |
|     },
 | |
|     {
 | |
|       "aliasColors": {},
 | |
|       "bars": false,
 | |
|       "dashLength": 10,
 | |
|       "dashes": false,
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The average total time to execute and decode a database query.",
 | |
|       "fill": 1,
 | |
|       "fillGradient": 0,
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 0,
 | |
|         "y": 14
 | |
|       },
 | |
|       "hiddenSeries": false,
 | |
|       "id": 32,
 | |
|       "legend": {
 | |
|         "alignAsTable": true,
 | |
|         "avg": false,
 | |
|         "current": true,
 | |
|         "hideEmpty": false,
 | |
|         "hideZero": false,
 | |
|         "max": true,
 | |
|         "min": false,
 | |
|         "rightSide": true,
 | |
|         "show": true,
 | |
|         "total": false,
 | |
|         "values": true
 | |
|       },
 | |
|       "lines": true,
 | |
|       "linewidth": 1,
 | |
|       "nullPointMode": "null as zero",
 | |
|       "percentage": false,
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "pointradius": 2,
 | |
|       "points": false,
 | |
|       "renderer": "flot",
 | |
|       "seriesOverrides": [],
 | |
|       "spaceLength": 10,
 | |
|       "stack": false,
 | |
|       "steppedLine": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(irate(pinchflat_prom_ex_ecto_repo_query_total_time_milliseconds_sum{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by(command) / sum(irate(pinchflat_prom_ex_ecto_repo_query_total_time_milliseconds_count{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by(command)",
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ command }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "thresholds": [],
 | |
|       "timeFrom": null,
 | |
|       "timeRegions": [],
 | |
|       "timeShift": null,
 | |
|       "title": "Average Total Execution Time",
 | |
|       "tooltip": {
 | |
|         "shared": true,
 | |
|         "sort": 2,
 | |
|         "value_type": "individual"
 | |
|       },
 | |
|       "type": "graph",
 | |
|       "xaxis": {
 | |
|         "buckets": null,
 | |
|         "mode": "time",
 | |
|         "name": null,
 | |
|         "show": true,
 | |
|         "values": []
 | |
|       },
 | |
|       "yaxes": [
 | |
|         {
 | |
|           "format": "ms",
 | |
|           "label": "Response Time",
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": "0",
 | |
|           "show": true
 | |
|         },
 | |
|         {
 | |
|           "format": "short",
 | |
|           "label": null,
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": null,
 | |
|           "show": false
 | |
|         }
 | |
|       ],
 | |
|       "yaxis": {
 | |
|         "align": false,
 | |
|         "alignLevel": null
 | |
|       }
 | |
|     },
 | |
|     {
 | |
|       "cards": {
 | |
|         "cardPadding": null,
 | |
|         "cardRound": null
 | |
|       },
 | |
|       "color": {
 | |
|         "cardColor": "#b4ff00",
 | |
|         "colorScale": "sqrt",
 | |
|         "colorScheme": "interpolateOranges",
 | |
|         "exponent": 0.5,
 | |
|         "mode": "spectrum"
 | |
|       },
 | |
|       "dataFormat": "tsbuckets",
 | |
|       "datasource": "prometheus",
 | |
|       "description": "A heatmap showing the total time spread across all Repo query executions (regardless of query type).",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {}
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 12,
 | |
|         "y": 14
 | |
|       },
 | |
|       "heatmap": {},
 | |
|       "hideZeroBuckets": true,
 | |
|       "highlightCards": true,
 | |
|       "id": 6,
 | |
|       "legend": {
 | |
|         "show": true
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "reverseYBuckets": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(irate(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_bucket{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by (le)",
 | |
|           "format": "heatmap",
 | |
|           "hide": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ le }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Total Execution Time",
 | |
|       "tooltip": {
 | |
|         "show": true,
 | |
|         "showHistogram": true
 | |
|       },
 | |
|       "type": "heatmap",
 | |
|       "xAxis": {
 | |
|         "show": true
 | |
|       },
 | |
|       "xBucketNumber": null,
 | |
|       "xBucketSize": null,
 | |
|       "yAxis": {
 | |
|         "decimals": null,
 | |
|         "format": "ms",
 | |
|         "logBase": 1,
 | |
|         "max": null,
 | |
|         "min": null,
 | |
|         "show": true,
 | |
|         "splitFactor": null
 | |
|       },
 | |
|       "yBucketBound": "auto",
 | |
|       "yBucketNumber": null,
 | |
|       "yBucketSize": null
 | |
|     },
 | |
|     {
 | |
|       "aliasColors": {},
 | |
|       "bars": false,
 | |
|       "dashLength": 10,
 | |
|       "dashes": false,
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The average query execution time per Ecto command.",
 | |
|       "fill": 1,
 | |
|       "fillGradient": 0,
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 0,
 | |
|         "y": 27
 | |
|       },
 | |
|       "hiddenSeries": false,
 | |
|       "id": 11,
 | |
|       "legend": {
 | |
|         "alignAsTable": true,
 | |
|         "avg": false,
 | |
|         "current": true,
 | |
|         "hideEmpty": false,
 | |
|         "hideZero": false,
 | |
|         "max": true,
 | |
|         "min": false,
 | |
|         "rightSide": true,
 | |
|         "show": true,
 | |
|         "total": false,
 | |
|         "values": true
 | |
|       },
 | |
|       "lines": true,
 | |
|       "linewidth": 1,
 | |
|       "nullPointMode": "null as zero",
 | |
|       "percentage": false,
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "pointradius": 2,
 | |
|       "points": false,
 | |
|       "renderer": "flot",
 | |
|       "seriesOverrides": [],
 | |
|       "spaceLength": 10,
 | |
|       "stack": false,
 | |
|       "steppedLine": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(irate(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_sum{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by(command) / sum(irate(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_count{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by(command)",
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ command }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "thresholds": [],
 | |
|       "timeFrom": null,
 | |
|       "timeRegions": [],
 | |
|       "timeShift": null,
 | |
|       "title": "Average Query Execution Time",
 | |
|       "tooltip": {
 | |
|         "shared": true,
 | |
|         "sort": 2,
 | |
|         "value_type": "individual"
 | |
|       },
 | |
|       "type": "graph",
 | |
|       "xaxis": {
 | |
|         "buckets": null,
 | |
|         "mode": "time",
 | |
|         "name": null,
 | |
|         "show": true,
 | |
|         "values": []
 | |
|       },
 | |
|       "yaxes": [
 | |
|         {
 | |
|           "format": "ms",
 | |
|           "label": "Response Time",
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": "0",
 | |
|           "show": true
 | |
|         },
 | |
|         {
 | |
|           "format": "short",
 | |
|           "label": null,
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": null,
 | |
|           "show": false
 | |
|         }
 | |
|       ],
 | |
|       "yaxis": {
 | |
|         "align": false,
 | |
|         "alignLevel": null
 | |
|       }
 | |
|     },
 | |
|     {
 | |
|       "cards": {
 | |
|         "cardPadding": null,
 | |
|         "cardRound": null
 | |
|       },
 | |
|       "color": {
 | |
|         "cardColor": "#b4ff00",
 | |
|         "colorScale": "sqrt",
 | |
|         "colorScheme": "interpolateOranges",
 | |
|         "exponent": 0.5,
 | |
|         "mode": "spectrum"
 | |
|       },
 | |
|       "dataFormat": "tsbuckets",
 | |
|       "datasource": "prometheus",
 | |
|       "description": "A heatmap showing the request time spread across all Repo query executions (regardless of query type).",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {}
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 12,
 | |
|         "y": 27
 | |
|       },
 | |
|       "heatmap": {},
 | |
|       "hideZeroBuckets": true,
 | |
|       "highlightCards": true,
 | |
|       "id": 33,
 | |
|       "legend": {
 | |
|         "show": true
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "reverseYBuckets": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(irate(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_bucket{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by (le)",
 | |
|           "format": "heatmap",
 | |
|           "hide": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ le }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Query Execution Time",
 | |
|       "tooltip": {
 | |
|         "show": true,
 | |
|         "showHistogram": true
 | |
|       },
 | |
|       "type": "heatmap",
 | |
|       "xAxis": {
 | |
|         "show": true
 | |
|       },
 | |
|       "xBucketNumber": null,
 | |
|       "xBucketSize": null,
 | |
|       "yAxis": {
 | |
|         "decimals": null,
 | |
|         "format": "ms",
 | |
|         "logBase": 1,
 | |
|         "max": null,
 | |
|         "min": null,
 | |
|         "show": true,
 | |
|         "splitFactor": null
 | |
|       },
 | |
|       "yBucketBound": "auto",
 | |
|       "yBucketNumber": null,
 | |
|       "yBucketSize": null
 | |
|     },
 | |
|     {
 | |
|       "aliasColors": {},
 | |
|       "bars": false,
 | |
|       "dashLength": 10,
 | |
|       "dashes": false,
 | |
|       "datasource": "prometheus",
 | |
|       "description": "The number of operations taking place on each data source.",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {}
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "fill": 1,
 | |
|       "fillGradient": 0,
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 0,
 | |
|         "y": 40
 | |
|       },
 | |
|       "hiddenSeries": false,
 | |
|       "id": 13,
 | |
|       "legend": {
 | |
|         "alignAsTable": true,
 | |
|         "avg": false,
 | |
|         "current": true,
 | |
|         "hideEmpty": false,
 | |
|         "hideZero": false,
 | |
|         "max": true,
 | |
|         "min": false,
 | |
|         "rightSide": true,
 | |
|         "show": true,
 | |
|         "total": false,
 | |
|         "values": true
 | |
|       },
 | |
|       "lines": true,
 | |
|       "linewidth": 1,
 | |
|       "nullPointMode": "null as zero",
 | |
|       "percentage": false,
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "pointradius": 2,
 | |
|       "points": false,
 | |
|       "renderer": "flot",
 | |
|       "seriesOverrides": [],
 | |
|       "spaceLength": 10,
 | |
|       "stack": false,
 | |
|       "steppedLine": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(increase(pinchflat_prom_ex_ecto_repo_query_execution_time_milliseconds_count{instance=\"$instance\", job=\"$job\", repo=\"$repo\"}[$interval])) by(source)",
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ source }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "thresholds": [],
 | |
|       "timeFrom": null,
 | |
|       "timeRegions": [],
 | |
|       "timeShift": null,
 | |
|       "title": "Operations Per Source",
 | |
|       "tooltip": {
 | |
|         "shared": true,
 | |
|         "sort": 2,
 | |
|         "value_type": "individual"
 | |
|       },
 | |
|       "transformations": [],
 | |
|       "type": "graph",
 | |
|       "xaxis": {
 | |
|         "buckets": null,
 | |
|         "mode": "time",
 | |
|         "name": null,
 | |
|         "show": true,
 | |
|         "values": []
 | |
|       },
 | |
|       "yaxes": [
 | |
|         {
 | |
|           "format": "locale",
 | |
|           "label": "Source Operations",
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": "0",
 | |
|           "show": true
 | |
|         },
 | |
|         {
 | |
|           "format": "short",
 | |
|           "label": null,
 | |
|           "logBase": 1,
 | |
|           "max": null,
 | |
|           "min": null,
 | |
|           "show": false
 | |
|         }
 | |
|       ],
 | |
|       "yaxis": {
 | |
|         "align": false,
 | |
|         "alignLevel": null
 | |
|       }
 | |
|     },
 | |
|     {
 | |
|       "cards": {
 | |
|         "cardPadding": null,
 | |
|         "cardRound": null
 | |
|       },
 | |
|       "color": {
 | |
|         "cardColor": "#b4ff00",
 | |
|         "colorScale": "sqrt",
 | |
|         "colorScheme": "interpolateOranges",
 | |
|         "exponent": 0.5,
 | |
|         "mode": "spectrum"
 | |
|       },
 | |
|       "dataFormat": "tsbuckets",
 | |
|       "datasource": "prometheus",
 | |
|       "description": "A heatmap showing the number of results returned from the database (summed up across all operations and sources).",
 | |
|       "fieldConfig": {
 | |
|         "defaults": {
 | |
|           "custom": {}
 | |
|         },
 | |
|         "overrides": []
 | |
|       },
 | |
|       "gridPos": {
 | |
|         "h": 13,
 | |
|         "w": 12,
 | |
|         "x": 12,
 | |
|         "y": 40
 | |
|       },
 | |
|       "heatmap": {},
 | |
|       "hideZeroBuckets": true,
 | |
|       "highlightCards": true,
 | |
|       "id": 12,
 | |
|       "legend": {
 | |
|         "show": true
 | |
|       },
 | |
|       "pluginVersion": "7.1.3",
 | |
|       "reverseYBuckets": false,
 | |
|       "targets": [
 | |
|         {
 | |
|           "expr": "sum(irate(pinchflat_prom_ex_ecto_repo_query_results_returned_bucket{job=\"$job\", instance=\"$instance\", repo=\"$repo\"}[$interval])) by (le)",
 | |
|           "format": "heatmap",
 | |
|           "hide": false,
 | |
|           "interval": "",
 | |
|           "legendFormat": "{{ le }}",
 | |
|           "refId": "A"
 | |
|         }
 | |
|       ],
 | |
|       "timeFrom": null,
 | |
|       "timeShift": null,
 | |
|       "title": "Results Returned",
 | |
|       "tooltip": {
 | |
|         "show": true,
 | |
|         "showHistogram": true
 | |
|       },
 | |
|       "type": "heatmap",
 | |
|       "xAxis": {
 | |
|         "show": true
 | |
|       },
 | |
|       "xBucketNumber": null,
 | |
|       "xBucketSize": null,
 | |
|       "yAxis": {
 | |
|         "decimals": null,
 | |
|         "format": "locale",
 | |
|         "logBase": 1,
 | |
|         "max": null,
 | |
|         "min": null,
 | |
|         "show": true,
 | |
|         "splitFactor": null
 | |
|       },
 | |
|       "yBucketBound": "auto",
 | |
|       "yBucketNumber": null,
 | |
|       "yBucketSize": null
 | |
|     }
 | |
|   ],
 | |
|   "refresh": "5s",
 | |
|   "schemaVersion": 26,
 | |
|   "style": "dark",
 | |
|   "tags": ["PromEx", "Ecto", "pinchflat"],
 | |
|   "templating": {
 | |
|     "list": [
 | |
|       {
 | |
|         "allValue": null,
 | |
|         "datasource": "prometheus",
 | |
|         "definition": "label_values(pinchflat_prom_ex_prom_ex_status_info, job)",
 | |
|         "hide": 0,
 | |
|         "includeAll": false,
 | |
|         "label": "Prometheus Job",
 | |
|         "multi": false,
 | |
|         "name": "job",
 | |
|         "options": [],
 | |
|         "query": "label_values(pinchflat_prom_ex_prom_ex_status_info, job)",
 | |
|         "refresh": 2,
 | |
|         "regex": "",
 | |
|         "skipUrlSync": false,
 | |
|         "sort": 6,
 | |
|         "tagValuesQuery": "",
 | |
|         "tags": [],
 | |
|         "tagsQuery": "",
 | |
|         "type": "query",
 | |
|         "useTags": false
 | |
|       },
 | |
|       {
 | |
|         "allValue": null,
 | |
|         "datasource": "prometheus",
 | |
|         "definition": "label_values(pinchflat_prom_ex_prom_ex_status_info, instance)",
 | |
|         "hide": 0,
 | |
|         "includeAll": false,
 | |
|         "label": "Application Instance",
 | |
|         "multi": false,
 | |
|         "name": "instance",
 | |
|         "options": [],
 | |
|         "query": "label_values(pinchflat_prom_ex_prom_ex_status_info{job=\"$job\"}, instance)",
 | |
|         "refresh": 2,
 | |
|         "regex": "",
 | |
|         "skipUrlSync": false,
 | |
|         "sort": 0,
 | |
|         "tagValuesQuery": "",
 | |
|         "tags": [],
 | |
|         "tagsQuery": "",
 | |
|         "type": "query",
 | |
|         "useTags": false
 | |
|       },
 | |
|       {
 | |
|         "allValue": null,
 | |
|         "datasource": "prometheus",
 | |
|         "definition": "label_values(pinchflat_prom_ex_ecto_repo_init_status_info, repo)",
 | |
|         "hide": 0,
 | |
|         "includeAll": false,
 | |
|         "label": "Ecto Repo",
 | |
|         "multi": false,
 | |
|         "name": "repo",
 | |
|         "options": [],
 | |
|         "query": "label_values(pinchflat_prom_ex_ecto_repo_init_status_info, repo)",
 | |
|         "refresh": 1,
 | |
|         "regex": "",
 | |
|         "skipUrlSync": false,
 | |
|         "sort": 1,
 | |
|         "tagValuesQuery": "",
 | |
|         "tags": [],
 | |
|         "tagsQuery": "",
 | |
|         "type": "query",
 | |
|         "useTags": false
 | |
|       },
 | |
|       {
 | |
|         "auto": false,
 | |
|         "auto_count": 30,
 | |
|         "auto_min": "10s",
 | |
|         "current": {
 | |
|           "selected": false,
 | |
|           "text": "30s",
 | |
|           "value": "30s"
 | |
|         },
 | |
|         "hide": 0,
 | |
|         "label": "Interval",
 | |
|         "name": "interval",
 | |
|         "options": [
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "15s",
 | |
|             "value": "15s"
 | |
|           },
 | |
|           {
 | |
|             "selected": true,
 | |
|             "text": "30s",
 | |
|             "value": "30s"
 | |
|           },
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "1m",
 | |
|             "value": "1m"
 | |
|           },
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "5m",
 | |
|             "value": "5m"
 | |
|           },
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "15m",
 | |
|             "value": "15m"
 | |
|           },
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "30m",
 | |
|             "value": "30m"
 | |
|           },
 | |
|           {
 | |
|             "selected": false,
 | |
|             "text": "1h",
 | |
|             "value": "1h"
 | |
|           }
 | |
|         ],
 | |
|         "query": "15s, 30s, 1m, 5m, 15m, 30m, 1h",
 | |
|         "queryValue": "",
 | |
|         "refresh": 2,
 | |
|         "skipUrlSync": false,
 | |
|         "type": "interval"
 | |
|       }
 | |
|     ]
 | |
|   },
 | |
|   "time": {
 | |
|     "from": "now-1h",
 | |
|     "to": "now"
 | |
|   },
 | |
|   "timepicker": {
 | |
|     "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
 | |
|   },
 | |
|   "timezone": "",
 | |
|   "title": "Pinchflat - PromEx Ecto Dashboard",
 | |
|   "uid": "449823C137E6C016E4480ADDA42E94EE",
 | |
|   "version": 1
 | |
| }
 |