add selected gateway as tag in influxdb

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
This commit is contained in:
Florian Maurer 2023-09-18 00:42:50 +02:00
parent 22f67e2d4d
commit 61ed2208c6
No known key found for this signature in database
GPG Key ID: D5B29CD0C9E06237
1 changed files with 3 additions and 1 deletions

View File

@ -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