Updated Grafana dashboard to make correct use of gauge max values.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2024-10-17 12:14:28 +02:00
parent efed6f196e
commit f9d9849300

View File

@@ -34,7 +34,7 @@
}, },
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
@@ -42,7 +42,11 @@
}, },
{ {
"color": "yellow", "color": "yellow",
"value": 1 "value": 0.01
},
{
"color": "dark-red",
"value": 50
} }
] ]
} }
@@ -745,9 +749,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"risks\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"risks\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "dabd3b1d-a74e-4ae6-9dfd-e1344e589ba0"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Risk", "title": "Risk",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "gauge" "type": "gauge"
} }
} }
@@ -2767,9 +2798,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"breed\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"breed\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Breed", "title": "Breed",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "gauge" "type": "gauge"
}, },
{ {
@@ -2965,9 +3023,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_detected_count\" or\n r._field == \"flow_guessed_count\" or\n r._field == \"flow_not_detected_count\")\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_detected_count\" or\n r._field == \"flow_guessed_count\" or\n r._field == \"flow_not_detected_count\")\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Detection", "title": "Detection",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "gauge" "type": "gauge"
}, },
{ {
@@ -2990,7 +3075,7 @@
}, },
{ {
"color": "#EAB839", "color": "#EAB839",
"value": 80 "value": 50
} }
] ]
} }
@@ -3508,9 +3593,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"category\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"category\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Category", "title": "Category",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "gauge" "type": "gauge"
}, },
{ {
@@ -3591,9 +3703,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"state\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"state\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "State", "title": "State",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "stat" "type": "stat"
}, },
{ {
@@ -3841,9 +3980,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"confidence\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"confidence\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Confidence", "title": "Confidence",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "bargauge" "type": "bargauge"
}, },
{ {
@@ -3861,8 +4027,7 @@
"mode": "percentage", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@@ -3931,8 +4096,7 @@
"mode": "percentage", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@@ -4104,9 +4268,36 @@
}, },
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"severity\"\n )", "query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"severity\"\n )",
"refId": "A" "refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB}"
},
"hide": false,
"query": "from(bucket: \"${ndpid_db_name}\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"detection\" and\n (r._field == \"flow_active_count\")\n )",
"refId": "B"
} }
], ],
"title": "Risk Severity", "title": "Risk Severity",
"transformations": [
{
"id": "configFromData",
"options": {
"configRefId": "B",
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
},
{
"fieldName": "flow_active_count",
"handlerKey": "max"
}
]
}
}
],
"type": "bargauge" "type": "bargauge"
}, },
{ {
@@ -4182,8 +4373,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "yellow", "color": "yellow",
@@ -4937,8 +5127,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -5113,8 +5302,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@@ -5148,8 +5336,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "yellow", "color": "yellow",
@@ -5176,8 +5363,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -5251,8 +5437,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "yellow", "color": "yellow",
@@ -6032,8 +6217,7 @@
"mode": "percentage", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@@ -6156,8 +6340,7 @@
"mode": "percentage", "mode": "percentage",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@@ -6280,6 +6463,6 @@
"timezone": "", "timezone": "",
"title": "nDPId", "title": "nDPId",
"uid": "e57b37c0-d0ba-4f50-9b2d-f83e71ae8c27", "uid": "e57b37c0-d0ba-4f50-9b2d-f83e71ae8c27",
"version": 101, "version": 111,
"weekStart": "" "weekStart": ""
} }