beegfs/mon/scripts/grafana/client_ops_user_telegraf_influxdbv2.json
2025-08-10 01:34:16 +02:00

583 lines
14 KiB
JSON

{
"__inputs": [
{
"name": "DS_BEEGFS_MON_INFLUXDB",
"label": "beegfs_mon_influxdb",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.0"
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 2,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 13,
"panels": [],
"title": "Operation List",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "user"
},
"properties": [
{
"id": "unit",
"value": "none"
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 1
},
"id": 8,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 0,
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.3.0",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"query": " from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"metaClientOpsByUser\")\r\n |> filter(fn: (r) => r.user =~ /${userid:regex}/)\r\n |> sum()\r\n |> group()\r\n |> pivot(rowKey:[\"user\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n",
"refId": "A"
}
],
"title": "Meta Operation List",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"sum {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": true
},
"indexByName": {},
"renameByName": {
"mdsInf {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": "mdsInf",
"sChDrct {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": "sChDrct",
"stat {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": "stat",
"sum {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": "",
"user {_start=\"2023-01-11 23:29:59.44 +0000 UTC\", _stop=\"2023-01-12 05:30:59.646295406 +0000 UTC\"}": "User"
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "center",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "user"
},
"properties": [
{
"id": "unit",
"value": "none"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "^B-wr"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "^B-rd"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 8
},
"id": 2,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 0,
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "_value"
}
]
},
"pluginVersion": "9.3.0",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"storageClientOpsByUser\")\r\n |> filter(fn: (r) => r.user =~ /${userid:regex}/)\r\n |> sum()\r\n |> group()\r\n |> pivot(rowKey:[\"user\"], columnKey: [\"_field\"], valueColumn: \"_value\")",
"refId": "A"
}
],
"title": "Storage Operation List",
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 15
},
"id": 18,
"panels": [],
"title": "Meta Operation Per User",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 16
},
"id": 4,
"maxPerRow": 4,
"options": {
"displayLabels": [
"percent",
"name"
],
"legend": {
"displayMode": "table",
"placement": "right",
"showLegend": true,
"values": [
"value"
]
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"repeat": "userid",
"repeatDirection": "h",
"targets": [
{
"alias": "",
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"metaClientOpsByUser\")\r\n |> sum()\r\n |> group()\r\n |> pivot(rowKey:[\"user\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> filter(fn: (r) => r.user =~ /$userid$/)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table"
}
],
"title": "User ID $userid",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"sum": true,
"user": true
},
"indexByName": {},
"renameByName": {}
}
}
],
"type": "piechart"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 24
},
"id": 23,
"panels": [],
"title": "Storage Operation Per User",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "^B-wr"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "^B-rd"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 25
},
"id": 33,
"maxPerRow": 4,
"options": {
"displayLabels": [
"percent",
"name"
],
"legend": {
"displayMode": "table",
"placement": "right",
"showLegend": true,
"values": [
"value"
]
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"repeat": "userid",
"repeatDirection": "h",
"targets": [
{
"alias": "",
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"storageClientOpsByUser\")\r\n |> sum()\r\n |> group()\r\n |> pivot(rowKey:[\"user\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> filter(fn: (r) => r.user =~ /$userid$/)",
"rawQuery": true,
"refId": "A",
"resultFormat": "table"
}
],
"title": "User ID $userid",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"sum": true,
"user": true
},
"indexByName": {},
"renameByName": {}
}
}
],
"type": "piechart"
}
],
"refresh": "",
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": ".*",
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"definition": "import \"influxdata/influxdb/schema\"schema.measurementTagValues( bucket: \"${bucket}\", tag: \"user\", measurement: \"storageClientOpsByUser\")",
"hide": 0,
"includeAll": true,
"label": "User ID",
"multi": true,
"name": "userid",
"options": [],
"query": "import \"influxdata/influxdb/schema\"schema.measurementTagValues( bucket: \"${bucket}\", tag: \"user\", measurement: \"storageClientOpsByUser\")",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_BEEGFS_MON_INFLUXDB}"
},
"definition": "buckets()",
"hide": 0,
"includeAll": false,
"label": "Bucket",
"multi": false,
"name": "bucket",
"options": [],
"query": "buckets()",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "BeeGFS Client Operations (by User)",
"uid": "RBCm2Vk",
"version": 3,
"weekStart": ""
}