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

Allow anonymous OpenMetrics scraping #24725

Open
lozbrown opened this issue Jan 16, 2025 · 1 comment
Open

Allow anonymous OpenMetrics scraping #24725

lozbrown opened this issue Jan 16, 2025 · 1 comment

Comments

@lozbrown
Copy link
Contributor

lozbrown commented Jan 16, 2025

Most applications don't consider metrics to be privileged information (although that could be config controlled)

Problem:
In a typical deployment, scraping open metrics is significantly overcomplicated by the requirement for the user and sometimes password and that coordinator and worker cannot be scraped in the same way.

    • Username and password will be required to scrape metrics from the coordinator, becuase this password exists this must be via https (in many situations https is provided by a separate load balancer so requests must go to the external cluster address rather than the node/pods internal address )
    • Username (but not password) is required to scrape metrics from the workers, this can go to the internal address given that there is usually no ingress to workers

In many kubernetes deployments its typical to configure scraping by adding annotations to the pods

This causes the pods internal address to be scraped anonymously, as described above this wont work for either coordinators or workers. as both will need custom scrapes.

It is possible for an engineer to configure these but its unnecessarily complicated and and is outside the normal standards for scraping metrics.

This complexity is the main reason many are still using the jmx_exporter to the point its been introduces into the helm chart as it allows anonymous scrape.

@mattstep @nineinchnick @mosabua

@lozbrown lozbrown changed the title Allow anonymous openmetrics scraping Allow anonymous OpenMetrics scraping Jan 17, 2025
@mosabua
Copy link
Member

mosabua commented Jan 20, 2025

Considering that they are currently protected I think it would be reasonable to leave them protected but have a setting that allows you to open the endpoint up. Then we do not introduce a breaking change for existing users yet enable the simpler metrics access for those who want to do that. What do you think @electrum @dain @mattstep ?

And would somebody be interested to send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants