diff --git a/grafana/README.md b/grafana/README.md index 10383b6..7be2941 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -2,8 +2,10 @@ ## Import -To import the dashboard into your grafana, download the [dashboard.json](https://raw.githubusercontent.com/esanchezm/prometheus-qbittorrent-exporter/master/grafana/dashboard.json) file and import it into your server. Select your prometheus instance and that should be all. +To import the dashboard into your grafana, download the [dashboard.json](https://raw.githubusercontent.com/nohamr/prometheus-qbittorrent-exporter/master/grafana/dashboard.json) file and import it into your server. Select your prometheus instance and that should be all. ## Screenshot -![](./screenshot.png) +![](./screenshot1.png) +![](./screenshot2.png) +![](./screenshot3.png) diff --git a/grafana/dashboard.json b/grafana/dashboard.json index 9eec74d..c84821e 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -810,15 +810,27 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", "expr": "rate(qbittorrent_dl_info_data_total[2m])", "interval": "", "legendFormat": "Download", + "range": true, "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", "expr": "rate(qbittorrent_up_info_data_total[2m])", "interval": "", "legendFormat": "Upload", + "range": true, "refId": "B" } ], @@ -838,11 +850,15 @@ }, "yaxes": [ { + "$$hashKey": "object:90", "format": "binBps", + "label": "", "logBase": 1, + "max": "20000000", "show": true }, { + "$$hashKey": "object:91", "format": "binBps", "logBase": 1, "show": true @@ -865,7 +881,7 @@ "fillGradient": 0, "gridPos": { "h": 10, - "w": 14, + "w": 21, "x": 0, "y": 18 }, @@ -955,12 +971,39 @@ }, "mappings": [] }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "movies", + "tools", + "shows" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] }, "gridPos": { "h": 10, - "w": 10, - "x": 14, + "w": 3, + "x": 21, "y": 18 }, "id": 12, @@ -995,6 +1038,995 @@ ], "title": "Torrents by categories", "type": "piechart" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${data_source}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 9, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "sum(qbittorrent_total_peer_connections_total)", + "interval": "", + "legendFormat": "Peers", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Peers", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:526", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:527", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${data_source}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 7, + "x": 9, + "y": 28 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "sum(qbittorrent_average_time_queue_total)", + "interval": "", + "legendFormat": "Time queue", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Average time queue", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:317", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:318", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${data_source}" + }, + "fieldConfig": { + "defaults": { + "unit": "dectbytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 28 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "(qbittorrent_free_space_on_disk_total)", + "interval": "", + "legendFormat": "Free", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Free space", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:605", + "format": "dectbytes", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:606", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${data_source}" + }, + "fieldConfig": { + "defaults": { + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 9, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "rate(qbittorrent_write_cache_overload_total[1m])*10", + "interval": "", + "legendFormat": "Write", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "rate(qbittorrent_read_cache_overload_total[1m])*10", + "interval": "", + "legendFormat": "Read", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Write/Read cache overload", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:758", + "format": "percent", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:759", + "format": "binBps", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${data_source}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 8, + "x": 9, + "y": 36 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 0, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "(qbittorrent_queued_io_jobs_total)", + "interval": "", + "legendFormat": "Jobs", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Queued io jobs", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:680", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:681", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in": "light-red", + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_in下载": "green", + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_cni0_out上传": "yellow", + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_in下载": "purple", + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out": "purple", + "cn-shenzhen.i-wz9cq1dcb6zwc39ehw59_eth0_out上传": "blue" + }, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 6, + "w": 7, + "x": 17, + "y": 36 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "show": false, + "sort": "current", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": false, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:2970", + "alias": "/.*_transmit$/", + "transform": "negative-Y" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "increase(node_network_receive_bytes_total{instance=~\"192.168.1.58:9100\",device=\"eth0\"}[60m])", + "interval": "60m", + "intervalFactor": 1, + "legendFormat": "{{device}}_receive", + "metric": "", + "range": true, + "refId": "A", + "step": 600, + "target": "" + }, + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "increase(node_network_transmit_bytes_total{instance=~\"192.168.1.58:9100\",device=~\"eth0\"}[60m])", + "hide": false, + "interval": "60m", + "intervalFactor": 1, + "legendFormat": "{{device}}_transmit", + "range": true, + "refId": "B", + "step": 600 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Internet traffic per hour $device", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2977", + "format": "bytes", + "label": "transmit(-)/receive(+)", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:2978", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "netdatacloud-netdata-datasource", + "uid": "ed2f4fad-8548-43ea-b428-bfe24ccb5c90" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unit": "rotrpm" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "contextId": "sensors.fan", + "datasource": { + "type": "netdatacloud-netdata-datasource", + "uid": "ed2f4fad-8548-43ea-b428-bfe24ccb5c90" + }, + "nodes": [ + "f653f384-677c-405e-8bfd-c66ee8c2f2ac" + ], + "refId": "A", + "roomId": "b07dbb9f-f5c4-408c-afe1-cf8078674428", + "spaceId": "2037393c-06ce-43f2-bbbf-b182bef71e9c" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Fan", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "rotrpm", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "192.168.200.241:9100_Total": "dark-red", + "Idle - Waiting for something to happen": "#052B51", + "guest": "#9AC48A", + "idle": "#052B51", + "iowait": "#EAB839", + "irq": "#BF1B00", + "nice": "#C15C17", + "sdb_每秒I/O操作%": "#d683ce", + "softirq": "#E24D42", + "steal": "#FCE2DE", + "system": "#508642", + "user": "#5195CE", + "磁盘花费在I/O操作占比": "#ba43a9" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "decimals": 2, + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 13, + "w": 8, + "x": 16, + "y": 42 + }, + "hiddenSeries": false, + "id": 31, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 6, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:3051", + "alias": "/.*Total/", + "color": "#C4162A", + "fill": 0 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "avg(rate(node_cpu_seconds_total{instance=~\"192.168.1.58:9100\",mode=\"system\"}[2m])) by (instance) *100", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "System", + "refId": "A", + "step": 20 + }, + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "avg(rate(node_cpu_seconds_total{instance=~\"192.168.1.58:9100\",mode=\"user\"}[2m])) by (instance) *100", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "User", + "range": true, + "refId": "B", + "step": 240 + }, + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "avg(rate(node_cpu_seconds_total{instance=~\"192.168.1.58:9100\",mode=\"iowait\"}[2m])) by (instance) *100", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Iowait", + "refId": "D", + "step": 240 + }, + { + "datasource": { + "type": "prometheus", + "uid": "d4352f38-27bf-4c16-9fae-00e9ced664a1" + }, + "editorMode": "code", + "expr": "(1 - avg(rate(node_cpu_seconds_total{instance=~\"192.168.1.58:9100\",mode=\"idle\"}[2m])) by (instance))*100", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Total", + "range": true, + "refId": "F", + "step": 240 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU% Basic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:11294", + "decimals": 0, + "format": "percent", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:11295", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "netdatacloud-netdata-datasource", + "uid": "ed2f4fad-8548-43ea-b428-bfe24ccb5c90" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unit": "celsius" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 50 + }, + "hiddenSeries": false, + "id": 29, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "contextId": "sensors.temperature", + "datasource": { + "type": "netdatacloud-netdata-datasource", + "uid": "ed2f4fad-8548-43ea-b428-bfe24ccb5c90" + }, + "nodes": [ + "f653f384-677c-405e-8bfd-c66ee8c2f2ac" + ], + "refId": "A", + "roomId": "b07dbb9f-f5c4-408c-afe1-cf8078674428", + "spaceId": "2037393c-06ce-43f2-bbbf-b182bef71e9c" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Temperature", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "celsius", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } } ], "refresh": "10s", @@ -1063,6 +2095,6 @@ "timezone": "", "title": "Qb", "uid": "eKyTETFMj", - "version": 4, + "version": 25, "weekStart": "" } \ No newline at end of file diff --git a/grafana/screenshot.png b/grafana/screenshot.png deleted file mode 100644 index 2f6dbe9..0000000 Binary files a/grafana/screenshot.png and /dev/null differ diff --git a/grafana/screenshot1.png b/grafana/screenshot1.png new file mode 100644 index 0000000..83a4f3c Binary files /dev/null and b/grafana/screenshot1.png differ diff --git a/grafana/screenshot2.png b/grafana/screenshot2.png new file mode 100644 index 0000000..fca4419 Binary files /dev/null and b/grafana/screenshot2.png differ diff --git a/grafana/screenshot3.png b/grafana/screenshot3.png new file mode 100644 index 0000000..f8c283d Binary files /dev/null and b/grafana/screenshot3.png differ