{ "__inputs": [ { "name": "DS_INFLUXDB", "label": "InfluxDB", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "6.2.4" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "singlestat", "name": "Singlestat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "text", "name": "Text", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "Ruby on Rails Request Performance Insights based on influxdb-rails", "editable": true, "gnetId": 10429, "graphTooltip": 0, "id": null, "iteration": 1571753874432, "links": [], "panels": [ { "content": "## Details for $method ($request_id)", "gridPos": { "h": 2, "w": 24, "x": 0, "y": 0 }, "id": 4, "links": [], "mode": "markdown", "options": {}, "title": "", "type": "text" }, { "cacheTimeout": null, "colorBackground": false, "colorPrefix": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": "InfluxDB", "description": "", "format": "ms", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 8, "x": 0, "y": 2 }, "id": 2, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "groupBy": [], "measurement": "rails", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "controller" ], "type": "field" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "process_action" } ] } ], "thresholds": "200,300", "title": "Total Controller Action Runtime", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "total" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": "InfluxDB", "format": "ms", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 8, "x": 8, "y": 2 }, "id": 6, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "groupBy": [], "measurement": "rails", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "db" ], "type": "field" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "process_action" } ] } ], "thresholds": "200,300", "title": "Total Database Query Runtime", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "avg" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": "InfluxDB", "format": "ms", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 8, "x": 16, "y": 2 }, "id": 8, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "groupBy": [], "measurement": "rails", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "render_template" } ] } ], "thresholds": "200,300", "title": "Total View Rendering Runtime", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "avg" }, { "columns": [], "datasource": "InfluxDB", "description": "Database queries in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this query\n- Maximum: Slowest occurrence\n- Total: Total amount of time spent in this query", "fontSize": "100%", "gridPos": { "h": 8, "w": 24, "x": 0, "y": 5 }, "id": 12, "links": [], "options": {}, "pageSize": null, "scroll": true, "showHeader": true, "sort": { "col": 4, "desc": true }, "styles": [ { "alias": "Time", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Count", "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": 0, "mappingType": 1, "pattern": "count", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "Query", "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": "number", "unit": "short" }, { "alias": "Mean", "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": "Maximum", "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": "max", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "Total", "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": "sum", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "ms" } ], "targets": [ { "groupBy": [ { "params": [ "name" ], "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": "max" } ], [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "sum" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "sql" } ] } ], "title": "Database Queries", "transform": "table", "type": "table" }, { "columns": [], "datasource": "InfluxDB", "description": "Views rendered in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this query\n- Maximum: Slowest occurrence", "fontSize": "100%", "gridPos": { "h": 9, "w": 12, "x": 0, "y": 13 }, "id": 10, "links": [], "options": {}, "pageSize": null, "scroll": true, "showHeader": true, "sort": { "col": 4, "desc": true }, "styles": [ { "alias": "Time", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Count", "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", "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": "Maximum", "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": "max", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "File", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "filename", "thresholds": [], "type": "number", "unit": "ms" } ], "targets": [ { "groupBy": [ { "params": [ "filename" ], "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": "max" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "render_template" } ] } ], "title": "Views Rendered", "transform": "table", "type": "table" }, { "columns": [], "datasource": "InfluxDB", "description": "Partials rendered in this request.\n\n- Count: Number of occurrences\n- Mean: Average time spent in this partial\n- Maximum: Slowest occurrence\n- Total: Total time spent in this partial", "fontSize": "100%", "gridPos": { "h": 9, "w": 12, "x": 12, "y": 13 }, "id": 16, "links": [], "options": {}, "pageSize": null, "scroll": true, "showHeader": true, "sort": { "col": 4, "desc": true }, "styles": [ { "alias": "Time", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Count", "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": 0, "mappingType": 1, "pattern": "count", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "File", "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": "filename", "thresholds": [], "type": "string", "unit": "short" }, { "alias": "Mean", "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": "Maximum", "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": "max", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "Total", "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": "sum", "thresholds": [], "type": "number", "unit": "ms" }, { "alias": "", "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "ms" } ], "targets": [ { "groupBy": [ { "params": [ "filename" ], "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": "max" } ], [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "sum" } ] ], "tags": [ { "key": "request_id", "operator": "=~", "value": "/^$request_id$/" }, { "condition": "AND", "key": "hook", "operator": "=", "value": "render_partial" } ] } ], "title": "Partials Rendered", "transform": "table", "type": "table" } ], "refresh": false, "schemaVersion": 18, "style": "dark", "tags": [ "performance", "ruby on rails", "influxdb" ], "templating": { "list": [ { "current": { "text": "", "value": "" }, "hide": 2, "label": null, "name": "request_id", "options": [ { "selected": false, "text": "", "value": "" } ], "query": "", "skipUrlSync": false, "type": "textbox" }, { "current": { "text": "", "value": "" }, "hide": 2, "label": null, "name": "method", "options": [ { "selected": false, "text": "", "value": "" } ], "query": "", "skipUrlSync": false, "type": "textbox" } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": { "hidden": true, "refresh_intervals": [ "" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "", "title": "Ruby On Rails Performance (per Request)", "uid": "H8S9fSVWz", "version": 1 }