opencost icon indicating copy to clipboard operation
opencost copied to clipboard

Whether Support for Custom Headers in Prometheus Query Requests

Open hkmdxlftjf opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. I need to add a custom header (instanceid) in the promethues request for authentication, but I can't find the relevant configuration. Does it support custom headers? I have looked through the documentation but haven't found a clear answer to this. Any guidance or direction on how to achieve this, if possible, would be greatly appreciated.

Describe the solution you'd like If supported, please tell me how to configure it. In case Prometheus requests does not currently support custom headers, I am interested in contributing to the codebase to implement this feature. Could you guide me on how to proceed with such a contribution, or point me towards the relevant documentation or discussion threads related to this topic?

hkmdxlftjf avatar Dec 30 '23 20:12 hkmdxlftjf

There's quite a bit of Prometheus configuration exposed in the Helm chart: https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/values.yaml#L248, but I'm not familiar with your issue specifically. Take a look there and let us know if that helps

mattray avatar Jan 16 '24 11:01 mattray

I have a proxy that forwards requests to different Prometheus through headers. Currently, I do not see any configuration for custom headers. Could you please guide us on how to achieve this?

hkmdxlftjf avatar Jan 17 '24 09:01 hkmdxlftjf