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

Duplicated HELP and TYPE lines in prometheus exporter #165

Closed
fabrepe opened this issue May 3, 2022 · 3 comments · Fixed by #192
Closed

Duplicated HELP and TYPE lines in prometheus exporter #165

fabrepe opened this issue May 3, 2022 · 3 comments · Fixed by #192
Assignees
Labels
bug Something isn't working

Comments

@fabrepe
Copy link

fabrepe commented May 3, 2022

Bug description

I am trying to scrape prometheus output using InfluxDB's Telegraf client, which is supported in Telegraf.

It fails with the following errors

[inputs.prometheus] Error in plugin: error reading metrics for http://localhost:9090/metrics: reading text format failed: text format parsing error in line 4: second HELP line for metric name "scaph_process_power_consumption_microwatts"

In fact metrics sent by prometheus exporter contains several HELP and TYPE definition for the same metric.

# HELP scaph_process_power_consumption_microwatts Power consumption due to the process, measured on at the topology level, in microwatts
# TYPE scaph_process_power_consumption_microwatts gauge
scaph_process_power_consumption_microwatts{cmdline="",pid="305600",exe="kworker/2:2-mm_percpu_wq"} 0
# HELP scaph_process_power_consumption_microwatts Power consumption due to the process, measured on at the topology level, in microwatts
# TYPE scaph_process_power_consumption_microwatts gauge

Expected behavior

prometheus TYPE and HELP definition for a given metric should only be defined once (prometheus/common#265)

Environment

  • Linux distribution version : Debian 11
  • Kernel version : 5.10.0-8-amd64
@fabrepe fabrepe added the bug Something isn't working label May 3, 2022
@bpetit bpetit added this to the Release v0.5.0 milestone Jul 13, 2022
@bpetit bpetit self-assigned this Jul 13, 2022
@bpetit
Copy link
Contributor

bpetit commented Jul 13, 2022

Hi, thanks a lot for the notice !

Could you give a try to this branch ? #192

@dmazhar-cogniance
Copy link

Hey @bpetit , I had the same problem for the latest release. Tried to build the latest dev branch and it resolved the problem.

@bpetit
Copy link
Contributor

bpetit commented Aug 2, 2022

Hi @dmazhar-cogniance !

Thanks a lot for the feedback ! Closing until contrary feedback

@bpetit bpetit closed this as completed Aug 2, 2022
@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to Previous releases in General Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Previous releases
3 participants