Skip to content
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

Prometheus serializer config params not present in serializer config #6824

Closed
ibspoof opened this issue Dec 26, 2019 · 0 comments · Fixed by #6823
Closed

Prometheus serializer config params not present in serializer config #6824

ibspoof opened this issue Dec 26, 2019 · 0 comments · Fixed by #6823
Labels
area/prometheus bug unexpected problem or unintended behavior
Milestone

Comments

@ibspoof
Copy link
Contributor

ibspoof commented Dec 26, 2019

Prometheus serializer enables several configuration parameters to change the output of the serializer. When using data_format=prometheus with http output telegraf config parsing errors on prometheus_* config params since they are not included in the config -> buildSerializer method.

Relevant telegraf.conf:

  data_format = "prometheus"

  prometheus_export_timestamp = true

System info:

Telegraf version 1.13

Steps to reproduce:

  1. Enable outputs http w/ data_format= prometheus
  2. Set prometheus_* config values in output config
[[outputs.http]]

  url = "http://127.0.0.1:3000/telegraf"

  data_format = "prometheus"
  
  prometheus_export_timestamp = true

  prometheus_sort_metrics = true

  prometheus_string_as_label = true

Expected behavior:

Startup will continue without error and prometheus data_format will serialize output

Actual behavior:

Error running agent: Error parsing ./telegraf.conf, line 17: field corresponding to `prometheus_sort_metrics' is not defined in http.HTTP

Additional info:

PR: #6823

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Dec 26, 2019
@danielnelson danielnelson added this to the 1.13.1 milestone Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants