Here is the relevant output
As you can see from below I am receiving this last_established entry from GNMI every 10 seconds. But if I do a query on the influx measurement there is just one value per peer…
Dec 15 20:09:04 techops01.ny2 telegraf: bgp_neighbor_state_updated,/network-instances/network-instance/protocols/protocol/name=BGP,host=techops01.ny2,identifier=BGP,name=default,neighbor_address=10.96.64.247,source=10.85.99.20 last_established=159988450903i 1606323597361262083
Here is the config
Address and port of the GNMI GRPC server
addresses = [“redacted:6030”]
username = “redacted”
password = “redacted”
redial in case of failures after
redial = “10s”
tagexclude = [“openconfig-network-instance:/network-instances/network-instance/protocols/protocol/name”]
## Name of the field to map
field = “session_state”
IDLE = 1
CONNECT = 2
ACTIVE = 3
OPENSENT = 4
OPENCONFIRM = 5
ESTABLISHED = 6
For whatever reason the telegraf plugin is sending the data in such a way so that it inserts the last_established date “1606323597361262083” as the timestamp and this other value “159988450903” as the established date. This is obviously not ideal. First the data value “159988450903” makes no sense. As a straight conversion it is January 25th 1975. So I have no idea what that value is supposed to represent.
The timestamp it sends, however, is the actual established date.
This creates all sorts of issues with reporting obviously. The date can be months in the past and also Grafana and other visualization tools don’t usually report the time stamp as the data value.