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

Decide if we want to do proxying for Prometheus and pushgateway #60

Open
hatchan opened this issue Jun 27, 2023 · 2 comments
Open

Decide if we want to do proxying for Prometheus and pushgateway #60

hatchan opened this issue Jun 27, 2023 · 2 comments

Comments

@hatchan
Copy link
Contributor

hatchan commented Jun 27, 2023

Currently we are running prometheus and pushgateway on a specific port, and we are also forwarding the content using the listen address of am + /prometheus. This requires us to specify the web-address as a config to either components. The downside is that the origin then uses the new path in the prometheus web server. Which can be confusing for a user since they need to forward their metrics to localhost:9091/pushgateway/metrics which can be confusing.

Pro's of proxying:

  • We are able to swap out the implementation, but explorer would just rely on the proxied endpoint
  • Have a single port for all components
  • No CORS issues when any component is running on the same port as explorer

Con's:

  • Rewrites the path even for the locally running component.
  • Need to explain that the user has to use a different path for pushing metrics.
@brettimus
Copy link
Contributor

The Pros seem compelling.

Could you elaborate on the con of rewriting the path? (What makes that a con specifically?)

And for the "/pushgateway/metrics" issue: Is there a world where we could map all POST requests to /metrics to the pushgateway? Or is that messy to implement?

@hatchan
Copy link
Contributor Author

hatchan commented Jun 29, 2023

Could you elaborate on the con of rewriting the path? (What makes that a con specifically?)

Might be more of familiarity of current users. If let's say you have some other tools that need to interact with Prometheus, but you expect prometheus to run at http://localhost:9090/ then it won't work. Since then actual endpoint is http://localhost:9090/prometheus/.

And for the "/pushgateway/metrics" issue: Is there a world where we could map all POST requests to /metrics to the pushgateway? Or is that messy to implement?

That is a good idea 👍 . If the pushgateway is enabled, we can indeed proxy those POST calls. See #63

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

No branches or pull requests

2 participants