{ "__inputs": [ { "name": "DS_INFLUXDB-RAILS", "label": "InfluxDB-Rails", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "7.1.1" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "table-old", "name": "Table (old)", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "The sloweds queries in your app in the last hour", "editable": true, "gnetId": null, "graphTooltip": 0, "id": null, "links": [ { "$$hashKey": "object:40", "icon": "external link", "tags": [ "influxdb-rails" ], "type": "dashboards" } ], "panels": [ { "columns": [], "datasource": "InfluxDB", "description": "Data for the selected range by database query.\n\n- Count: Number of occurrences\n- Mean: Average time spent\n- Median: Median time spent\n- Maximum: Slowest occurrence\n\n[Average vs. Median?](https://www.differencebetween.com/difference-between-mean-and-median/)", "fieldConfig": { "defaults": { "custom": {} }, "overrides": [] }, "fontSize": "100%", "gridPos": { "h": 23, "w": 24, "x": 0, "y": 0 }, "id": 2, "links": [], "pageSize": null, "scroll": true, "showHeader": true, "sort": { "col": 6, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Count", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": null, "mappingType": 1, "pattern": "count", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "Mean", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "mean", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "Median", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "median", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "Controller Action", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": true, "linkTargetBlank": true, "linkTooltip": "View data per this Controller Action", "linkUrl": "/d/influxdb-rails-action/ruby-on-rails-performance-per-action?var-Action=${__cell}&from=$__from&to=$__to", "mappingType": 1, "pattern": "location", "thresholds": [], "type": "string", "unit": "short" }, { "alias": "Name of the operation", "align": "auto", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "name", "thresholds": [], "type": "string", "unit": "short", "valueMaps": [ { "text": "Raw", "value": "" } ] }, { "alias": "Maximum", "align": "auto", "colorMode": "value", "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "max", "thresholds": [ "3000", "5000" ], "type": "number", "unit": "ms" } ], "targets": [ { "groupBy": [ { "params": [ "name" ], "type": "tag" }, { "params": [ "location" ], "type": "tag" } ], "measurement": "rails", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "table", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "count" } ], [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ], [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "median" } ], [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "max" } ] ], "tags": [ { "key": "hook", "operator": "=", "value": "sql" } ] } ], "title": "Slowest Database Query", "transform": "table", "type": "table-old" } ], "schemaVersion": 26, "style": "dark", "tags": [ "Performance", "Ruby on Rails", "influxdb-rails" ], "templating": { "list": [] }, "time": { "from": "now-1h", "to": "now" }, "timepicker": { "hidden": false, "refresh_intervals": [ "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "", "title": "Slowlog by SQL Query", "uid": "influxdb-rails-slowlog-sql", "version": 14 }