Promethus configuration for awx authenticated metrics endpoint?

Does anyone have an example configuration for Prometheus monitoring of awx that doesn't require putting the api secret in the prometheus config?

awx has an metrics endpoint, but it is authenticated. I can create a new read-only token, and put that in a kubernetes Secret. Our normal prometheus config would be to add annotations to the Service or Pod so prometheus autodiscovery will find the new metrics, and I see that I can do that with awx-operator, by adding service_annotations to the awxs object. However, I don't see a way to refer to the Secret or even the token itself in plain text, as an annotation.

I'd rather not add manual configuration in the prometheus server if I can avoid it. Does anyone have this working?

We are not currently using prometheus-operator.

Thanks,

Howard

Hi!

this PR https://github.com/ansible/awx/pull/12832 attempts to allow the metrics endpoint to be scraped without authentication. We are still discussing whether we’d want this to be unauthenticated, even under a settings knob.

please feel free to drop additional ideas as a comment on that PR

AWX Team