telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Add prometheus timestamp example to readme

Open sjwang90 opened this issue 3 years ago • 2 comments

Based off previous issue: https://github.com/influxdata/telegraf/issues/11283#issuecomment-1155722659

  • [ ] Add prometheus timestamp example to: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/README.md#source
  • [ ] Add test case to: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/parser_test.go

sjwang90 avatar Jun 30 '22 18:06 sjwang90

There is already a parser unit test that shows that timestamps are in milliseconds. It isn't in the unit tests for the input plugin, but in the parser plugin.

https://github.com/influxdata/telegraf/blob/379b8ea04e8df8017611316cb9069cdf8f1512b9/plugins/parsers/prometheus/parser_test.go#L317

I've updated the issue description to show that this is done and we only need to add an example to the readme for this issue.

reimda avatar Jun 30 '22 20:06 reimda

@reimda do you think you can do add the example to the readme?

sjwang90 avatar Sep 15 '22 18:09 sjwang90