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

How to expose prometheus endpoint without ServiceMonitor ? #720

Open
kedare opened this issue Feb 9, 2024 · 0 comments · May be fixed by #722
Open

How to expose prometheus endpoint without ServiceMonitor ? #720

kedare opened this issue Feb 9, 2024 · 0 comments · May be fixed by #722

Comments

@kedare
Copy link

kedare commented Feb 9, 2024

Hello.

I am trying to make Prometheus scrape the APISIX endpoint without success.

I don't want to use the ServiceMonitor because it's not managed directly in the cluster, so basically I just need to add the annotations (done via apisix.podAnnotations) and then expose the port, which is the blocking part.

It looks like there is no way to expose more ports from the pods ?
I tried the gateway.http.additionalContainerPorts but then it get in conflicts as it's also setting up APISIX to listen on this port.

I'm quite surprised to use ServiceMonitor that is not really standard nor useful for this kind of case, as all what it is setting up can be setup using pod annotations and would work even without dependencies installed (here I can't use the ServiceMonitor because the CRD is not supported)

Should we add a simple gateway.prometheus.enabled variable that set this up ? Also an gateway.additionalContainerPorts that only add ports to the pod would make sense.

Thank you.

@kedare kedare linked a pull request Feb 12, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant