{ "__inputs": [ { "name": "mattermost", "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" } ], "__requires": [ { "type": "panel", "id": "singlestat", "name": "Singlestat", "version": "" }, { "type": "panel", "id": "graph", "name": "Graph", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "4.0.2" }, { "type": "datasource", "id": "mattermost", "name": "Mattermost", "version": "1.0.0" } ], "id": null, "title": "Mattermost Performance KPI Metrics", "tags": [ "mattermost", "mattermost-perf" ], "style": "dark", "timezone": "browser", "editable": true, "sharedCrosshair": false, "hideControls": false, "time": { "from": "now-6h", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "templating": { "list": [ { "allValue": null, "current": {}, "datasource": "mattermost", "hide": 0, "includeAll": false, "label": "server", "multi": true, "name": "server", "options": [], "query": "label_values(job)", "refresh": 1, "regex": "", "sort": 0, "tagValuesQuery": null, "tagsQuery": null, "type": "query" } ] }, "annotations": { "list": [] }, "refresh": "30s", "schemaVersion": 13, "version": 32, "links": [], "gnetId": 2539, "rows": [ { "title": "Dashboard Row", "panels": [ { "cacheTimeout": null, "colorBackground": false, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": true, "thresholdLabels": false, "thresholdMarkers": true }, "id": 9, "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": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "max(irate(mattermost_process_cpu_seconds_total{job=~\"$server\"}[1m])* 100)", "interval": "5s", "intervalFactor": 1, "legendFormat": "", "metric": "mattermost_process_cpu_seconds_total", "refId": "A", "step": 5 } ], "thresholds": "50,80", "title": "Max CPU utilization rate (%)", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "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": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "id": 21, "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": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "sum(rate(mattermost_post_total{job=~\"$server\"}[1m])*50)", "interval": "1m", "intervalFactor": 1, "legendFormat": "", "refId": "A", "step": 60 } ], "thresholds": "", "title": "Number of messages / min", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "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": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "id": 20, "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": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "sum(rate(mattermost_http_errors_total{job=~\"$server\"}[1m])*50)", "interval": "1m", "intervalFactor": 1, "refId": "A", "step": 60 } ], "thresholds": "", "title": "Number of API errors / min", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 1000, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "id": 13, "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": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "sum(mattermost_http_websockets_total{job=~\"$server\"})", "interval": "5s", "intervalFactor": 1, "refId": "A", "step": 5 } ], "thresholds": "500, 800", "title": "Number of connected devices", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "id": 17, "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": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "sum(mattermost_db_master_connections_total{job=~\"$server\"})", "interval": "5s", "intervalFactor": 1, "refId": "A", "step": 5 } ], "thresholds": "50, 80", "title": "Number of master DB conns", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "cacheTimeout": null, "colorBackground": false, "colorValue": false, "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(237, 129, 40, 0.89)", "rgba(245, 54, 54, 0.9)" ], "datasource": "mattermost", "editable": true, "error": false, "format": "none", "gauge": { "maxValue": 1000, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "id": 12, "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": " MB", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "span": 2, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "targets": [ { "expr": "sum(go_memstats_alloc_bytes{job=~\"$server\"})/1024/1024", "interval": "5s", "intervalFactor": 1, "refId": "A", "step": 5 } ], "thresholds": "500, 800", "title": "Server memory usage (in MB)", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" } ], "showTitle": false, "titleSize": "h6", "height": 143, "repeat": null, "repeatRowId": null, "repeatIteration": null, "collapse": false }, { "title": "Dashboard Row", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 2, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "irate(mattermost_post_total{job=~\"$server\"}[1m])*10", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_post_total", "refId": "A", "step": 5 }, { "expr": "sum(irate(mattermost_post_total{job=~\"$server\"}[1m])*10)", "interval": "5s", "intervalFactor": 1, "legendFormat": "Total", "metric": "mattermost_post_total", "refId": "B", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Number of Messages per Second", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Count", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 5, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "irate(mattermost_http_errors_total{job=~\"$server\"}[1m])*10", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_http_errors_total", "refId": "A", "step": 5 }, { "expr": "sum(irate(mattermost_http_errors_total{job=~\"$server\"}[1m])*10)", "interval": "5s", "intervalFactor": 1, "legendFormat": "Total", "metric": "mattermost_http_errors_total", "refId": "B", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Number of API Errors per Second", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Count", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "showTitle": false, "titleSize": "h6", "height": "250", "repeat": null, "repeatRowId": null, "repeatIteration": null, "collapse": false }, { "title": "Dashboard Row", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 8, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "1000.0 * rate(mattermost_http_request_duration_seconds_sum{job=~\"$server\"}[1m]) / rate(mattermost_http_request_duration_seconds_count{job=~\"$server\"}[1m])", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_http_request_duration_seconds_sum", "refId": "A", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Mean API Request Time (in milliseconds)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Milliseconds (ms)", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 19, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "mattermost_db_master_connections_total{job=~\"$server\"}", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_db_master_connections_total", "refId": "A", "step": 5 }, { "expr": "sum(mattermost_db_master_connections_total{job=~\"$server\"})", "interval": "5s", "intervalFactor": 1, "legendFormat": "Total", "metric": "mattermost_db_master_connections_total", "refId": "B", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Number of Connections to Master Database", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Count", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "showTitle": false, "titleSize": "h6", "height": 252, "repeat": null, "repeatRowId": null, "repeatIteration": null, "collapse": false }, { "title": "Dashboard Row", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 1, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "1000.0 * rate(mattermost_cluster_cluster_request_duration_seconds_sum{job=~\"$server\"}[1m]) / rate(mattermost_cluster_cluster_request_duration_seconds_count{job=~\"$server\"}[1m])", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_cluster_cluster_request_duration_seconds_sum", "refId": "A", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Mean Cluster Request Time (in milliseconds)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Milliseconds (ms)", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 23, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "mattermost_db_read_replica_connections_total{job=~\"$server\"}", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_db_read_replica_connections_total", "refId": "A", "step": 5 }, { "expr": "sum(mattermost_db_read_replica_connections_total{job=~\"$server\"})", "interval": "5s", "intervalFactor": 1, "legendFormat": "Total", "metric": "mattermost_db_read_replica_connections_total", "refId": "B", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Number of Connections to Read Replica Databases", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Count", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "showTitle": false, "titleSize": "h6", "height": 250, "repeat": null, "repeatRowId": null, "repeatIteration": null, "collapse": false }, { "title": "Dashboard Row", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 22, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "irate(mattermost_process_cpu_seconds_total{job=~\"$server\"}[1m])* 100", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "mattermost_process_cpu_seconds_total", "refId": "A", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "CPU Utilization Rate (%)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Utilization Rate (%)", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "aliasColors": {}, "bars": false, "datasource": "mattermost", "editable": true, "error": false, "fill": 1, "id": 18, "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": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "expr": "go_goroutines{job=~\"$server\"}", "interval": "5s", "intervalFactor": 1, "legendFormat": "{{job}}", "metric": "go_goroutines", "refId": "A", "step": 5 }, { "expr": "sum(go_goroutines{job=~\"$server\"})", "interval": "5s", "intervalFactor": 1, "legendFormat": "Total", "metric": "go_goroutines", "refId": "B", "step": 5 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Number of Go Routines", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Count", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] } ], "showTitle": false, "titleSize": "h6", "height": 250, "repeat": null, "repeatRowId": null, "repeatIteration": null, "collapse": false } ], "description": "Mattermost Performance KPI Metrics using Prometheus" }