Update dashboard.json

Changed Top Ports to only show top 10 as to not bomb machine running influxdb
This commit is contained in:
YuruC3 2025-10-03 21:02:57 +03:00
parent 03deca7466
commit ffe50a751b

View File

@ -18,13 +18,13 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": 2, "id": 34,
"links": [], "links": [],
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "eeipdlx4ecav4c" "uid": "bdp80jf4cy328f"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -43,7 +43,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "dark-purple" "color": "dark-purple",
"value": 0
} }
] ]
} }
@ -137,10 +138,11 @@
"id": "zero", "id": "zero",
"lat": 0, "lat": 0,
"lon": 0, "lon": 0,
"noRepeat": false,
"zoom": 1 "zoom": 1
} }
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"targets": [ "targets": [
{ {
"query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstCntr\")\n |> map(fn: (r) => ({ r with location: r._value })) // materialize _value to location\n |> group(columns: [\"location\"])\n |> count()\n |> rename(columns: {_value: \"value\"})\n |> group()\n", "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstCntr\")\n |> map(fn: (r) => ({ r with location: r._value })) // materialize _value to location\n |> group(columns: [\"location\"])\n |> count()\n |> rename(columns: {_value: \"value\"})\n |> group()\n",
@ -153,7 +155,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "eeipdlx4ecav4c" "uid": "bdp80jf4cy328f"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -168,6 +170,9 @@
"valueDisplayMode": "color" "valueDisplayMode": "color"
}, },
"filterable": false, "filterable": false,
"footer": {
"reducers": []
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@ -175,7 +180,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": 0
}, },
{ {
"color": "yellow", "color": "yellow",
@ -202,9 +208,12 @@
{ {
"id": "custom.cellOptions", "id": "custom.cellOptions",
"value": { "value": {
"type": "color-text", "type": "color-text"
"wrapText": false
} }
},
{
"id": "custom.wrapText",
"value": false
} }
] ]
} }
@ -219,15 +228,7 @@
"id": 3, "id": 3,
"options": { "options": {
"cellHeight": "sm", "cellHeight": "sm",
"footer": { "enablePagination": false,
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true, "showHeader": true,
"sortBy": [ "sortBy": [
{ {
@ -236,7 +237,7 @@
} }
] ]
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"targets": [ "targets": [
{ {
"query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"srcAddr\")\n |> map(fn: (r) => ({ r with ip: r._value }))\n |> group(columns: [\"ip\"])\n |> count()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})\n |> group()\n", "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"srcAddr\")\n |> map(fn: (r) => ({ r with ip: r._value }))\n |> group(columns: [\"ip\"])\n |> count()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})\n |> group()\n",
@ -249,7 +250,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "eeipdlx4ecav4c" "uid": "bdp80jf4cy328f"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -264,6 +265,9 @@
"valueDisplayMode": "color" "valueDisplayMode": "color"
}, },
"filterable": false, "filterable": false,
"footer": {
"reducers": []
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@ -271,7 +275,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": 0
}, },
{ {
"color": "yellow", "color": "yellow",
@ -298,9 +303,12 @@
{ {
"id": "custom.cellOptions", "id": "custom.cellOptions",
"value": { "value": {
"type": "color-text", "type": "color-text"
"wrapText": false
} }
},
{
"id": "custom.wrapText",
"value": false
} }
] ]
} }
@ -315,15 +323,7 @@
"id": 6, "id": 6,
"options": { "options": {
"cellHeight": "sm", "cellHeight": "sm",
"footer": { "enablePagination": false,
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true, "showHeader": true,
"sortBy": [ "sortBy": [
{ {
@ -332,7 +332,7 @@
} }
] ]
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"targets": [ "targets": [
{ {
"query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstAddr\")\n |> map(fn: (r) => ({ r with ip: r._value }))\n |> group(columns: [\"ip\"])\n |> count()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})\n |> group()\n", "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstAddr\")\n |> map(fn: (r) => ({ r with ip: r._value }))\n |> group(columns: [\"ip\"])\n |> count()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})\n |> group()\n",
@ -363,14 +363,14 @@
"content": "<img src=\"https://data.fubukus.net/assets/others/illust_123291962_20250408_085815.png\">", "content": "<img src=\"https://data.fubukus.net/assets/others/illust_123291962_20250408_085815.png\">",
"mode": "html" "mode": "html"
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"title": "", "title": "",
"type": "text" "type": "text"
}, },
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "eeipdlx4ecav4c" "uid": "bdp80jf4cy328f"
}, },
"description": "Ports 0 are omitted as they are most likely link layer protocols, like ARP.", "description": "Ports 0 are omitted as they are most likely link layer protocols, like ARP.",
"fieldConfig": { "fieldConfig": {
@ -386,6 +386,9 @@
"valueDisplayMode": "color" "valueDisplayMode": "color"
}, },
"filterable": false, "filterable": false,
"footer": {
"reducers": []
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@ -393,7 +396,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "blue" "color": "blue",
"value": 0
} }
] ]
} }
@ -424,15 +428,7 @@
"id": 4, "id": 4,
"options": { "options": {
"cellHeight": "sm", "cellHeight": "sm",
"footer": { "enablePagination": false,
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true, "showHeader": true,
"sortBy": [ "sortBy": [
{ {
@ -441,10 +437,10 @@
} }
] ]
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"targets": [ "targets": [
{ {
"query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstPort\")\n |> group()\n |> map(fn: (r) => ({ r with port: string(v: r._value) }))\n |> group(columns: [\"port\"])\n |> filter(fn: (r) => r._value != 0)\n |> count()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})\n |> group()", "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"${Measurement}\")\n |> filter(fn: (r) => r.ROUTER == \"${Router}\")\n |> filter(fn: (r) => r._field == \"dstPort\")\n |> filter(fn: (r) => r._value != 0) // 👈 omit port 0\n |> map(fn: (r) => ({ r with port: string(v: r._value) }))\n |> window(every: inf)\n |> group(columns: [\"port\"])\n |> count()\n |> group()\n |> sort(columns: [\"_value\"], desc: true)\n |> limit(n: 10)\n |> rename(columns: {_value: \"count\"})",
"refId": "A" "refId": "A"
} }
], ],
@ -454,7 +450,7 @@
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
"uid": "eeipdlx4ecav4c" "uid": "bdp80jf4cy328f"
}, },
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -498,13 +494,14 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"sort": "desc",
"tooltip": { "tooltip": {
"hideZeros": false, "hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "11.6.0", "pluginVersion": "12.2.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@ -522,7 +519,7 @@
], ],
"preload": false, "preload": false,
"refresh": "10s", "refresh": "10s",
"schemaVersion": 41, "schemaVersion": 42,
"tags": [ "tags": [
"FluxQL", "FluxQL",
"InfluxDB", "InfluxDB",
@ -533,7 +530,7 @@
{ {
"current": { "current": {
"text": "influxdb", "text": "influxdb",
"value": "eeipdlx4ecav4c" "value": "bdp80jf4cy328f"
}, },
"label": "Source", "label": "Source",
"name": "influxdbsrc", "name": "influxdbsrc",
@ -545,8 +542,8 @@
}, },
{ {
"current": { "current": {
"text": "NETFLOW-7", "text": "NETFLOW",
"value": "NETFLOW-7" "value": "NETFLOW"
}, },
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
@ -567,8 +564,8 @@
}, },
{ {
"current": { "current": {
"text": "testNetFlowPython-script", "text": "measurement-script",
"value": "testNetFlowPython-script" "value": "measurement-script"
}, },
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
@ -586,8 +583,8 @@
}, },
{ {
"current": { "current": {
"text": "HQ", "text": "HAOS",
"value": "HQ" "value": "HAOS"
}, },
"datasource": { "datasource": {
"type": "influxdb", "type": "influxdb",
@ -611,7 +608,7 @@
}, },
"timepicker": {}, "timepicker": {},
"timezone": "browser", "timezone": "browser",
"title": "NetFlow", "title": "HAOS",
"uid": "beiq35nt3d1j4b", "uid": "beiq35nt3d1j4b",
"version": 27 "version": 4
} }