From dc2c5c05de5e9bcc1887d834ecbf48081816a6ad Mon Sep 17 00:00:00 2001 From: Rhys Bailey Date: Sat, 11 Mar 2023 22:18:34 +1100 Subject: [PATCH] add total cpu and mem graphs --- frigate_grafana_model.json | 240 ++++++++++++++++++++++++++++++++++++- 1 file changed, 237 insertions(+), 3 deletions(-) diff --git a/frigate_grafana_model.json b/frigate_grafana_model.json index 38d82c8..1a72101 100644 --- a/frigate_grafana_model.json +++ b/frigate_grafana_model.json @@ -697,6 +697,7 @@ "y": 19 }, "id": 6, + "maxDataPoints": 1000, "options": { "legend": { "calcs": [], @@ -1144,7 +1145,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -1458,6 +1459,7 @@ "y": 51 }, "id": 32, + "maxDataPoints": 1000, "options": { "legend": { "calcs": [ @@ -1479,6 +1481,18 @@ } }, "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(frigate_cpu_usage_percent{type!~\"Camera|Detector\"})", + "hide": false, + "legendFormat": "Other Processes", + "range": true, + "refId": "A" + }, { "datasource": { "type": "prometheus", @@ -1654,6 +1668,7 @@ "y": 59 }, "id": 34, + "maxDataPoints": 1000, "options": { "legend": { "calcs": [ @@ -1686,6 +1701,18 @@ "legendFormat": "{{name}} {{process}} {{pid}}", "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(frigate_mem_usage_percent{type!~\"Camera|Detector\"})", + "hide": false, + "legendFormat": "Other Processes", + "range": true, + "refId": "B" } ], "title": "Memory Usage", @@ -1797,6 +1824,213 @@ ], "title": "Number Processes", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 100, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 67 + }, + "id": 38, + "options": { + "legend": { + "calcs": [ + "mean", + "stdDev", + "min", + "max", + "range" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(frigate_cpu_usage_percent)", + "hide": false, + "legendFormat": "Total", + "range": true, + "refId": "A" + } + ], + "title": "Total CPU Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 75 + }, + "id": 39, + "options": { + "legend": { + "calcs": [ + "mean", + "stdDev", + "min", + "max", + "range" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(frigate_mem_usage_percent)", + "hide": false, + "legendFormat": "Total", + "range": true, + "refId": "B" + } + ], + "title": "Total Memory Usage", + "type": "timeseries" } ], "refresh": "10s", @@ -1808,13 +2042,13 @@ "list": [] }, "time": { - "from": "now-3h", + "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Frigate", "uid": "89VouM14z", - "version": 28, + "version": 37, "weekStart": "" } \ No newline at end of file