Skip to content

Commit

Permalink
namespaced Prometheus queries
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
  • Loading branch information
Zbynek Roubalik committed Jan 28, 2022
1 parent 2f46be2 commit 7da7bb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/docs/2.6/scalers/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ triggers:
metricName: http_requests_total # Note: name to identify the metric, generated value would be `prometheus-http_requests_total`
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response
threshold: '100'
# Optional fields:
namespace: foo # for namespaced queries eg. Thanos
```
**Parameter list:**
Expand All @@ -28,6 +30,7 @@ triggers:
- `metricName` - Name to identify the Metric in the external.metrics.k8s.io API. If using more than one trigger it is required that all `metricName`(s) be unique.
- `query` - Query to run.
- `threshold` - Value to start scaling for.
- `namespace` - Optional. A namespace that should be used for namespaced queries. These are required by some highly available Prometheus setups, such as [Thanos](https://thanos.io).

### Authentication Parameters

Expand Down

0 comments on commit 7da7bb5

Please sign in to comment.