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 metrics formatting is changing after request #344

Open
leonardpahlke opened this issue Aug 28, 2023 · 6 comments
Open

Prometheus metrics formatting is changing after request #344

leonardpahlke opened this issue Aug 28, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@leonardpahlke
Copy link

Bug description

The exported prmetheus metrics structure changes if I query it from terminal and are only partially in prometheus format.

To Reproduce

  1. start scaphandre via docker
  2. open metrics via browser localhost:8080/metrics
  3. metrics appear and everything is normal also on refresh
  4. curl the website curl localhost:8080/metrics
  5. exported metrics change and only partially comply with Prometheus schema

Expected behavior

exported metrics do not change regardless how i query it

Environment

  • Linux distribution version Fedora 38 workstation
  • Kernel version 6.4.11-200.fc38.x86_64 GNU/Linux

Additional context

cmd to start the container:

docker run -v /sys/class/powercap:/sys/class/powercap -v /proc:/proc -p 8080:8080 -ti hubblo/scaphandre prometheus
@leonardpahlke leonardpahlke added the bug Something isn't working label Aug 28, 2023
@mmadoo
Copy link
Contributor

mmadoo commented Aug 28, 2023

I am able to scrape scaphandre metrics using prometheus without anay issue.
Do you have the same issue with docker image hubblo/scaphandre prometheus:dev ?

@leonardpahlke
Copy link
Author

  1. start scaphandre via docker

  2. open metrics via browser localhost:8080/metrics
    Screenshot from 2023-08-28 18-17-58

  3. metrics appear and everything is normal also on refresh

  4. curl the website curl localhost:8080/metrics

now the metrics changed?
Screenshot from 2023-08-28 18-19-34

@leonardpahlke
Copy link
Author

leonardpahlke commented Aug 28, 2023

If I run docker run -v /sys/class/powercap:/sys/class/powercap -v /proc:/proc -p 8080:8080 -ti hubblo/scaphandre:dev prometheus I always get to the second screenshot.

This is prob. just a small thing. Which looks to be already solved in the dev image if the metrics in the second screenshot are the expected output? Idk if you can turn off all the extra metrics and go back to the more simplistic overview?

@mmadoo
Copy link
Contributor

mmadoo commented Aug 28, 2023

You screen capture does not show all response, can you export metrics in a file for each case.

@leonardpahlke
Copy link
Author

sure!
logs1.txt

logs2.txt

@leonardpahlke
Copy link
Author

the first is 3.2kb, the second one 529.4kb

@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to Triage 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: Triage
Development

No branches or pull requests

2 participants