Telegraf; from JTI to Influx; timestamp question

Hi,

pretty simple config.
interval = 2s
flush_interval = 2s
source: JTI/gRPC for Juniper MX routers with collection interval 2s
destination: Influx
i’ve got such artifacts on the interface load graph.

All data comming from JTI has its own timestamps which Juniper router associates with the collected metric.
the question is: what timestamps does Telegraf use when sends data to Influx? does it propogate timestamps from JTI metrics or does it use the Telegraf server OS timestamp when data arrives to Telegraf via gRPC?
how to make Telegraf uses the timestamps inclided in JTI metric collected by Juniper router?

here is some more debug info
this is Telegraf export to file/json
is there a way to make Telegraf use JTI collected ‘_timestamp’ instead of generating its own ‘timestamp’?

Can you file a feature request please Sign in to GitHub · GitHub

I think adding an option to use the response timestamp is something we could do, but I’d like to talk to the team first. The cisco_telemetry_mdt plugin appears to pull the timestamp from a field or measurement.

thanks for the responce. the feature request was filled. the number is #12695.
could you confirm it’s explained clearly?

yes! thanks for the FR, we can take a look

i’ve fixed the timestamp issue with the starlark code

[[processors.starlark]]
source = ‘’’
def apply(metric):
metric.time = metric.fields[‘_timestamp’]*1000000
return metric

but it did not help at all. so it was wrong guess. any other ideas why i get these artifacts every 5 minutes period?

My suggestion would be to output to the file plugin and see what raw data you are getting. Look at the measurements at that time, was there some sort of error? Or is that in fact the real data?

Then go back to your switch and see if there is any historical data you can look at.

It does look like something every 5 mins to causing an increase in traffic there, so maybe it is something running some sort of test?

i’ve got the same picture for all interfaces of all my Juniper MX routers with diffrent JunOS version.
here is some more info i’ve collected.
timestamps.csv.txt (6.2 KB)
Juniper devices generates metrics not exactly every 2000ms. It can be from 2000 upto 2050ms. Average 2030ms.
that is why there is a missing value for visualization. As visualization has exact discretization value 1/2/4 seconds. And later double value for compensation.