New prometheus remote write parser#8967
Conversation
| } else { | ||
| t = now | ||
| } | ||
| metric, err := metric.New("prometheusremotewrite", tags, fields, t) |
There was a problem hiding this comment.
should "prometheusremotewrite" be the metricName from above?
There was a problem hiding this comment.
so the metric name from above is being used as the fieldname, it's a similar thing to whats in our prometheus parser so the telegraf metric name is hardcoded and the metric name from prometheus is used within an fieldname. Otherwise the output would become:
scrape_samples_scraped,instance=localhost:9090,job=prometheus scrape_samples_scraped=390 1615920053859000000
do you think I should change it to make it clearer that it's not becoming the telegraf metric name? Could add a comment in the code or similar.
There was a problem hiding this comment.
seems like that should maybe be a configuration option. I know it's possible to do it with the rename plugin, but this seems relevant. a name prefix might also be helpful.
Co-authored-by: Steven Soroka <ssoroka@influxdata.com>
…a/telegraf into prometheus-remote-write-parser
Closes #8682
Extension from PR #8702
Basic implementation of Prometheus Remote Write Protocol. Includes:
Prometheus Remote Write parser, tests and readme
Updated list of data input formats
Must be used with http_listener_v2
Separate pr for snappy support within http_listener_v2 #8966