I have the following data inserted into a flux db point.
json_body = [
{
"measurement": "network",
"tags": {
"serial": "123456",
},
"time": "2022-04-23T8:02:00Z",
"fields": {
"eth": "10.0.0.1",
"wifi": "10.0.2.1",
"lo": "127.0.0.1",
}
}
]
I am trying to create a query show that I can show the IP address of each entry. So with multiple entries like what is above the resulting table would look like…
Time | Serial | Eth | Wifi
------------------------------------------------------
12:00 | 123456 | 10.0.0.1 | 10.0.0.2
12:01 | 123459 | 10.0.0.4 | 10.0.0.3
And each successive entry would show up on this list. I am new to flux and have bee having a lot of trouble writing the query so that the data will be formatted correctly for the Flux graphical UI Table component. Any help would be appreciated.
Also I was hoping to get the latest data from each serial number only.