Skip to content

New prometheus remote write parser #8967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Mar 18, 2021
Merged

Conversation

helenosheaa
Copy link
Member

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

@telegraf-tiger telegraf-tiger bot added new plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins labels Mar 10, 2021
Copy link
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤝 ✅ CLA has been signed. Thank you!

} else {
t = now
}
metric, err := metric.New("prometheusremotewrite", tags, fields, t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should "prometheusremotewrite" be the metricName from above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@helenosheaa helenosheaa merged commit 67f588c into master Mar 18, 2021
@helenosheaa helenosheaa deleted the prometheus-remote-write-parser branch March 18, 2021 15:34
jblesener pushed a commit to jblesener/telegraf that referenced this pull request Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Prometheus Remote Write Parser
2 participants