fix: data source was hardcoded

This commit is contained in:
Chris Johnson 2023-03-16 12:03:33 -07:00
parent 5b2ed75850
commit 1b2cf9065b

View File

@ -14,9 +14,7 @@
"target": {
"limit": 100,
"matchAny": false,
"tags":[
],
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
@ -26,16 +24,14 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"iteration":1651440933266,
"links":[
],
"id": 5,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
@ -79,9 +75,7 @@
]
}
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -104,9 +98,13 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${data_source}"
},
"expr": "qbittorrent_up",
"format": "time_series",
"instant": false,
@ -116,15 +114,13 @@
}
],
"title": "Qbittorrent Status",
"transformations":[
],
"transformations": [],
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
@ -162,9 +158,7 @@
]
}
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -187,7 +181,7 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"expr": "qbittorrent_connected - qbittorrent_firewalled",
@ -199,15 +193,13 @@
}
],
"title": "Bittorrent network",
"transformations":[
],
"transformations": [],
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
@ -242,9 +234,7 @@
]
}
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -267,7 +257,7 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"expr": "qbittorrent_dht_nodes",
@ -278,21 +268,17 @@
}
],
"title": "DHT nodes",
"transformations":[
],
"transformations": [],
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
"mappings":[
],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
@ -304,9 +290,7 @@
},
"unit": "bytes"
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -329,12 +313,12 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"editorMode": "code",
"expr": "sum by (app) (qbittorrent_dl_info_data_total)",
@ -350,13 +334,11 @@
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
"mappings":[
],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
@ -368,9 +350,7 @@
},
"unit": "bytes"
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -393,12 +373,12 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"editorMode": "code",
"expr": "sum by (app) (qbittorrent_up_info_data_total)",
@ -414,13 +394,11 @@
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
"mappings":[
],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
@ -432,9 +410,7 @@
},
"unit": "none"
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -457,12 +433,12 @@
},
"textMode": "auto"
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"editorMode": "code",
"expr": "(sum by (app) (qbittorrent_up_info_data_total)) / (sum by (app) (qbittorrent_dl_info_data_total))",
@ -478,14 +454,12 @@
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
"decimals": 1,
"mappings":[
],
"mappings": [],
"max": 48000000,
"min": 0,
"thresholds": {
@ -503,9 +477,7 @@
},
"unit": "binBps"
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -526,7 +498,7 @@
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"expr": "rate(qbittorrent_dl_info_data_total[2m])",
@ -542,14 +514,12 @@
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
"decimals": 1,
"mappings":[
],
"mappings": [],
"max": 18000000,
"min": 0,
"thresholds": {
@ -567,9 +537,7 @@
},
"unit": "binBps"
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 4,
@ -590,7 +558,7 @@
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"targets": [
{
"expr": "rate(qbittorrent_up_info_data_total[2m])",
@ -605,15 +573,13 @@
"type": "gauge"
},
{
"aliasColors":{
},
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fill": 1,
"fillGradient": 0,
@ -641,13 +607,11 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides":[
],
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
@ -665,12 +629,8 @@
"refId": "B"
}
],
"thresholds":[
],
"timeRegions":[
],
"thresholds": [],
"timeRegions": [],
"title": "Transfer Rates",
"tooltip": {
"shared": true,
@ -681,9 +641,7 @@
"xaxis": {
"mode": "time",
"show": true,
"values":[
]
"values": []
},
"yaxes": [
{
@ -702,15 +660,13 @@
}
},
{
"aliasColors":{
},
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fill": 1,
"fillGradient": 0,
@ -735,21 +691,17 @@
},
"lines": false,
"linewidth": 0,
"links":[
],
"links": [],
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion":"8.5.0",
"pluginVersion": "9.4.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides":[
],
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": true,
@ -761,12 +713,8 @@
"refId": "A"
}
],
"thresholds":[
],
"timeRegions":[
],
"thresholds": [],
"timeRegions": [],
"title": "Torrents by status",
"tooltip": {
"shared": true,
@ -777,9 +725,7 @@
"xaxis": {
"mode": "time",
"show": true,
"values":[
]
"values": []
},
"yaxes": [
{
@ -800,7 +746,7 @@
{
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"fieldConfig": {
"defaults": {
@ -814,13 +760,9 @@
"viz": false
}
},
"mappings":[
]
"mappings": []
},
"overrides":[
]
"overrides": []
},
"gridPos": {
"h": 10,
@ -829,13 +771,12 @@
"y": 14
},
"id": 12,
"links":[
],
"links": [],
"options": {
"legend": {
"displayMode": "list",
"placement":"bottom"
"placement": "bottom",
"showLegend": true
},
"pieType": "pie",
"reduceOptions": {
@ -864,11 +805,10 @@
}
],
"refresh": "10s",
"schemaVersion":36,
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags":[
],
"tags": [],
"templating": {
"list": [
{
@ -880,7 +820,7 @@
},
"datasource": {
"type": "prometheus",
"uid":"PBFA97CFB590B2093"
"uid": "${data_source}"
},
"definition": "label_values(qbittorrent_torrents_count, category)",
"hide": 0,
@ -888,9 +828,7 @@
"label": "Categories",
"multi": true,
"name": "categories",
"options":[
],
"options": [],
"query": {
"query": "label_values(qbittorrent_torrents_count, category)",
"refId": "Prometheus-categories-Variable-Query"
@ -903,6 +841,25 @@
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"selected": true,
"text": "Prometheus",
"value": "Prometheus"
},
"hide": 0,
"includeAll": false,
"label": "Data Source",
"multi": false,
"name": "data_source",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
@ -910,9 +867,7 @@
"from": "now-1h",
"to": "now"
},
"timepicker":{
},
"timepicker": {},
"timezone": "",
"title": "Qbittorrent",
"uid": "eKyTETFMk",