diff --git a/contrib/grafana-dashboard.json b/contrib/grafana-dashboard.json index a39f565..7bcb64f 100644 --- a/contrib/grafana-dashboard.json +++ b/contrib/grafana-dashboard.json @@ -15,13 +15,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "10.2.3" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" + "version": "12.3.0" }, { "type": "datasource", @@ -61,7 +55,6 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 32, "links": [ { "asDropdown": false, @@ -79,6 +72,812 @@ } ], "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 10, + "panels": [], + "title": "General", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^version$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(friendica_server_info{instance=\"$instance\"}[1d])", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Current version", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "available_version", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(friendica_update_available{instance=\"$instance\"}[1d])", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Available update", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^version$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(friendica_php_info{instance=\"$instance\"}[1d])", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "PHP version", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 0, + "text": "failed" + }, + "1": { + "index": 1, + "text": "OK" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(friendica_update_db_status{instance=\"$instance\"}[1d])", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "DB update", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 700 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "time()-last_over_time(max(friendica_cron_last_execution{instance=\"$instance\"}[1d]))", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Last cron", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 16, + "panels": [], + "title": "Posts", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(friendica_posts_inbound{instance=\"$instance\"})", + "interval": "", + "legendFormat": "{{type}}", + "range": true, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Inbound", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(friendica_posts_outbound{instance=\"$instance\"})", + "interval": "", + "legendFormat": "{{type}}", + "range": true, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Outbound", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 9, + "panels": [], + "title": "Packets", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(friendica_packets_inbound{instance=\"$instance\"})", + "interval": "", + "legendFormat": "{{protocol}}", + "range": true, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Inbound", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.3.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(friendica_packets_outbound{instance=\"$instance\"})", + "interval": "", + "legendFormat": "{{protocol}}", + "range": true, + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } + } + ], + "title": "Outbound", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 6, + "panels": [], + "title": "Worker", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -113,6 +912,7 @@ "type": "linear" }, "showPoints": "never", + "showValues": false, "spanNulls": false, "stacking": { "group": "A", @@ -128,7 +928,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -143,7 +943,7 @@ "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 24 }, "id": 3, "options": { @@ -154,18 +954,23 @@ "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "11.3.0", + "pluginVersion": "12.3.0", "targets": [ { "editorMode": "code", "expr": "friendica_worker_jpm{instance=\"$instance\"}", "legendFormat": "{{frequency}}", "range": true, - "refId": "A" + "refId": "A", + "datasource": { + "type": "prometheus", + "uid": "${DS_LOCAL}" + } } ], "title": "Jobs per Minute", @@ -205,6 +1010,7 @@ "type": "linear" }, "showPoints": "never", + "showValues": false, "spanNulls": false, "stacking": { "group": "A", @@ -220,7 +1026,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -236,7 +1042,7 @@ "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 24 }, "id": 2, "options": { @@ -247,11 +1053,12 @@ "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "11.3.0", + "pluginVersion": "12.3.0", "targets": [ { "datasource": { @@ -302,6 +1109,7 @@ "type": "linear" }, "showPoints": "never", + "showValues": false, "spanNulls": false, "stacking": { "group": "A", @@ -317,7 +1125,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -333,7 +1141,7 @@ "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 32 }, "id": 1, "options": { @@ -344,11 +1152,12 @@ "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "11.3.0", + "pluginVersion": "12.3.0", "targets": [ { "datasource": { @@ -367,17 +1176,14 @@ } ], "preload": false, - "schemaVersion": 40, + "schemaVersion": 42, "tags": [ "friendica" ], "templating": { "list": [ { - "current": { - "text": "Prometheus", - "value": "prometheus" - }, + "current": {}, "label": "Datasource", "name": "DS_LOCAL", "options": [], @@ -387,10 +1193,7 @@ "type": "datasource" }, { - "current": { - "text": "opensocial-friendica-exporter:9205", - "value": "opensocial-friendica-exporter:9205" - }, + "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_LOCAL}" @@ -418,6 +1221,6 @@ "timezone": "browser", "title": "Friendica Statistics", "uid": "ce1viveblgbnkb", - "version": 10, + "version": 12, "weekStart": "" }