From 61ed2208c63131b4149e9f8afd91550b01aeb654 Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Mon, 18 Sep 2023 00:42:50 +0200 Subject: [PATCH] add selected gateway as tag in influxdb Signed-off-by: Florian Maurer --- database/influxdb/node.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database/influxdb/node.go b/database/influxdb/node.go index eb13f4b..07d3fcf 100644 --- a/database/influxdb/node.go +++ b/database/influxdb/node.go @@ -173,7 +173,9 @@ func (conn *Connection) InsertNode(node *runtime.Node) { fields["airtime"+suffix+".frequency"] = airtime.Frequency tags.SetString("frequency"+suffix, strconv.Itoa(int(airtime.Frequency))) } - + // Add selected gateway mac as tag + tags.SetString("gateway", stats.GatewayIPv4) + tags.SetString("gateway6", stats.GatewayIPv6) conn.addPoint(MeasurementNode, tags, fields, time) // Add DHCP statistics