Closed mohsin106 closed 1 year ago
We have been having trouble getting the JTI plugin to work well, and I think are seeing the same or a similar issue. I'm neither a Go developer nor a streaming telemetry expert by any stretch so my code-diving might be wrong, but I suspect it's related to this: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/jti_openconfig_telemetry/openconfig_telemetry.go#L204
The timestamp sent back by the device appears to vary even between sequences sent in the same batch. If my response generates say 10 "sequences" this is problematic because each will have a slightly different timestamp and it appears that a "single" piece of data can bridge multiple sequences. Asking for "/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor" as the sensor is a good example of this in my testing.
Below is a rough output I put together from debug logging. Note that the response for A.B.C.D IPv4_Unicast is broken up between sequence 75 and 76 and with a different timestamp. This makes reassembly impossible (?) in telegraf I think. I have tried the merge aggregator but since it factors in timestamp I don't think will work, but perhaps I didn't use it correctly.
Apologies - this is a bit long/ugly. If there's a better way to format I would be happy to do so.
sequence_number: 75
timestamp: 1587480906419
key: __timestamp__
uint_value: 1587480906693
key: __junos_re_stream_creation_timestamp__
uint_value: 1587480905730
key: __junos_re_payload_get_timestamp__
uint_value: 1587480906410
key: __prefix__
str_value: /network-instances/network-instance[instance-name='master']/
.....stuff earlier in sequence..........
key: protocols/protocol/bgp/neighbors/neighbor[neighbor-address='A.B.C.D']/afi-safis/afi-safi[afi-safi-name='IPV4_UNICAST']/state/prefixes/received
uint_value: 218
key: protocols/protocol/bgp/neighbors/neighbor[neighbor-address='A.B.C.D']/afi-safis/afi-safi[afi-safi-name='IPV4_UNICAST']/state/prefixes/sent
uint_value: 20804
sequence_number: 76
timestamp: 1587480906429
key: __timestamp__
uint_value: 1587480906786
key: __junos_re_stream_creation_timestamp__
uint_value: 1587480905730
key: __junos_re_payload_get_timestamp__
uint_value: 1587480906419
key: __prefix__
str_value: /network-instances/network-instance[instance-name='master']/
key: protocols/protocol/bgp/neighbors/neighbor[neighbor-address='A.B.C.D']/afi-safis/afi-safi[afi-safi-name='IPV4_UNICAST']/state/prefixes/installed
uint_value: 218
key: protocols/protocol/bgp/neighbors/neighbor[neighbor-address='A.B.C.D']/afi-safis/afi-safi[afi-safi-name='IPV4_UNICAST']/state/prefixes/accepted
uint_value: 218
@mohsin106 does this issue still exist in current Telegraf versions?
I haven't tried that sensor path in a while. I'm tied up with another project at the moment. We are trying to move away from the JTI plugin and use gNMI plugin instead.
@mohsin106 so what should we do with this PR? If you cannot test anymore I'd say we close it!?
@srebhan i agree we should close it. Maybe someone else who experiences this problem in the future can reopen if need be.
Relevant telegraf.conf:
System info:
Telegraf v1.11 running in Docker Juniper PTX 10K running NA 17.3
Steps to reproduce:
Expected behavior:
"out-octets" is from the interfaces sensor and "description" is from the interfaces description sensor. I was expecting to see values for both fields print out together for the same timestamp.
Actual behavior:
Additional info:
I'm looking to join the interfaces sensor data with interfaces description sensor data. I thought this method of combining two sensors into one metric would accomplish that.
When telegraf starts, is it trying to collect both sensor data at the same time concurrently?