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

Specify arbitrary headers when calling prometheus #43

Open
abohne opened this issue Nov 14, 2023 · 0 comments
Open

Specify arbitrary headers when calling prometheus #43

abohne opened this issue Nov 14, 2023 · 0 comments

Comments

@abohne
Copy link

abohne commented Nov 14, 2023

In my environment, we've got prometheus fronted by a Cloudflare Access tunnel. I'd like to use promql in a script, but to do so, I would need to be able to pass a cf-access-token: XXX header. It would be useful to be able to specify whatever headers you want/need when calling prometheus.

zph added a commit to zph/promql-cli that referenced this issue May 10, 2024
Enables custom headers that will be sent to prometheus endpoint.

Usage:

```
promql -H 'Cookie: a=b' --header 'cf-access-token: XXX' metric{}
```

This addresses an issue registered on Github: nalbury#43
zph added a commit to zph/promql-cli that referenced this issue May 10, 2024
Enables custom headers that will be sent to prometheus endpoint.

Usage:

```
promql -H 'Cookie: a=b' --header 'cf-access-token: XXX' metric{}
```

This addresses an issue registered on Github: nalbury#43

Requires updating prometheus/common to gain access to mechanism to
provide headers.

Since I was updating that package, I pulled forward the other packages
to recent versions.
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

1 participant