Skip to content

Commit

Permalink
add selected gateway as tag in influxdb
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Maurer <[email protected]>
  • Loading branch information
maurerle committed Sep 19, 2023
1 parent 22f67e2 commit 61ed220
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion database/influxdb/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61ed220

Please sign in to comment.