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

Configure Prometheus to allow a custom scrape query param #1095

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

dghubble
Copy link
Member

@dghubble dghubble commented Dec 29, 2021

  • Set prometheus.io/param on a Kubernetes Service to scrape the service endpoints and pass a custom query parameter
  • For example, scrape Consul with ?format=prometheus
kind: Service
metadata:
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '8500'
    prometheus.io/path: /v1/agent/metrics
    prometheus.io/param: format=prometheus

Closes #1061

* Set `prometheus.io/param` on a Kubernetes Service to scrape
the service endpoints and pass a custom query parameter
* For example, scrape Consul with `?format=prometheus`

```yaml
kind: Service
metadata:
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '8500'
    prometheus.io/path: /v1/agent/metrics
    prometheus.io/param: format=prometheus
```
@dghubble dghubble merged commit a9f9c59 into master Dec 29, 2021
@dghubble dghubble deleted the scrape-param branch December 29, 2021 19:49
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 this pull request may close these issues.

support prometheus ingresses probing with the same annotation than services
1 participant