Skip to content

Commit 6fdd89b

Browse files
authored
Prometheus: Mark queryParameters as an optional field instead of an required field (kedacore#1395)
* Move queryParameters down to the optional field list Signed-off-by: Alec Hinh <alec4555@gmail.com> * Move the query parameters list entries down to optional in the other versions Signed-off-by: Alec Hinh <alec4555@gmail.com> --------- Signed-off-by: Alec Hinh <alec4555@gmail.com>
1 parent bb52d02 commit 6fdd89b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

content/docs/2.13/scalers/prometheus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ triggers:
1717
# Required fields:
1818
serverAddress: http://<prometheus-host>:9090
1919
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response
20-
queryParameters: key-1=value-1,key-2=value-2
2120
threshold: '100.50'
2221
activationThreshold: '5.5'
2322
# Optional fields:
2423
namespace: example-namespace # for namespaced queries, eg. Thanos
2524
cortexOrgID: my-org # DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of customHeaders and will be removed in version 2.12. Use custom headers instead to set X-Scope-OrgID header for Cortex. (see below)
2625
customHeaders: X-Client-Id=cid,X-Tenant-Id=tid,X-Organization-Id=oid # Optional. Custom headers to include in query. In case of auth header, use the custom authentication or relevant authModes.
2726
ignoreNullValues: false # Default is `true`, which means ignoring the empty value list from Prometheus. Set to `false` the scaler will return error when Prometheus target is lost
27+
queryParameters: key-1=value-1,key-2=value-2
2828
unsafeSsl: "false" # Default is `false`, Used for skipping certificate check when having self-signed certs for Prometheus endpoint
2929

3030
```
@@ -33,13 +33,13 @@ triggers:
3333

3434
- `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://<vmselect>:8481/select/0/prometheus`
3535
- `query` - Query to run.
36-
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint.
3736
- `threshold` - Value to start scaling for. (This value can be a float)
3837
- `activationThreshold` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
3938
- `namespace` - A namespace that should be used for namespaced queries. These are required by some highly available Prometheus setups, such as [Thanos](https://thanos.io). (Optional)
4039
- `cortexOrgID` - DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of `customHeaders` and will be removed in version 2.12. Use `customHeaders: X-Scope-OrgID=##` instead to query multi tenant [Cortex](https://cortexmetrics.io/) or [Mimir](https://grafana.com/oss/mimir/). (Optional)
4140
- `customHeaders` - Custom headers to include while querying the prometheus endpoint. In case of authentication headers, use custom authentication or relevant `authModes` instead. (Optional)
4241
- `ignoreNullValues` - Value to reporting error when Prometheus target is lost (Values: `true`,`false`, Default: `true`, Optional)
42+
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint. (Optional)
4343
- `unsafeSsl` - Used for skipping certificate check e.g: using self-signed certs (Values: `true`,`false`, Default: `false`, Optional)
4444

4545
### Authentication Parameters

content/docs/2.14/scalers/prometheus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ triggers:
1717
# Required fields:
1818
serverAddress: http://<prometheus-host>:9090
1919
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response
20-
queryParameters: key-1=value-1,key-2=value-2
2120
threshold: '100.50'
2221
activationThreshold: '5.5'
2322
# Optional fields:
2423
namespace: example-namespace # for namespaced queries, eg. Thanos
2524
cortexOrgID: my-org # DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of customHeaders and will be removed in version 2.12. Use custom headers instead to set X-Scope-OrgID header for Cortex. (see below)
2625
customHeaders: X-Client-Id=cid,X-Tenant-Id=tid,X-Organization-Id=oid # Optional. Custom headers to include in query. In case of auth header, use the custom authentication or relevant authModes.
2726
ignoreNullValues: false # Default is `true`, which means ignoring the empty value list from Prometheus. Set to `false` the scaler will return error when Prometheus target is lost
27+
queryParameters: key-1=value-1,key-2=value-2
2828
unsafeSsl: "false" # Default is `false`, Used for skipping certificate check when having self-signed certs for Prometheus endpoint
2929

3030
```
@@ -33,13 +33,13 @@ triggers:
3333

3434
- `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://<vmselect>:8481/select/0/prometheus`
3535
- `query` - Query to run.
36-
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint.
3736
- `threshold` - Value to start scaling for. (This value can be a float)
3837
- `activationThreshold` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
3938
- `namespace` - A namespace that should be used for namespaced queries. These are required by some highly available Prometheus setups, such as [Thanos](https://thanos.io). (Optional)
4039
- `cortexOrgID` - DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of `customHeaders` and will be removed in version 2.12. Use `customHeaders: X-Scope-OrgID=##` instead to query multi tenant [Cortex](https://cortexmetrics.io/) or [Mimir](https://grafana.com/oss/mimir/). (Optional)
4140
- `customHeaders` - Custom headers to include while querying the prometheus endpoint. In case of authentication headers, use custom authentication or relevant `authModes` instead. (Optional)
4241
- `ignoreNullValues` - Value to reporting error when Prometheus target is lost (Values: `true`,`false`, Default: `true`, Optional)
42+
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint. (Optional)
4343
- `unsafeSsl` - Used for skipping certificate check e.g: using self-signed certs (Values: `true`,`false`, Default: `false`, Optional)
4444

4545
### Authentication Parameters

content/docs/2.15/scalers/prometheus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ triggers:
1717
# Required fields:
1818
serverAddress: http://<prometheus-host>:9090
1919
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response
20-
queryParameters: key-1=value-1,key-2=value-2
2120
threshold: '100.50'
2221
activationThreshold: '5.5'
2322
# Optional fields:
2423
namespace: example-namespace # for namespaced queries, eg. Thanos
2524
cortexOrgID: my-org # DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of customHeaders and will be removed in version 2.12. Use custom headers instead to set X-Scope-OrgID header for Cortex. (see below)
2625
customHeaders: X-Client-Id=cid,X-Tenant-Id=tid,X-Organization-Id=oid # Optional. Custom headers to include in query. In case of auth header, use the custom authentication or relevant authModes.
2726
ignoreNullValues: false # Default is `true`, which means ignoring the empty value list from Prometheus. Set to `false` the scaler will return error when Prometheus target is lost
27+
queryParameters: key-1=value-1,key-2=value-2
2828
unsafeSsl: "false" # Default is `false`, Used for skipping certificate check when having self-signed certs for Prometheus endpoint
2929

3030
```
@@ -33,13 +33,13 @@ triggers:
3333

3434
- `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://<vmselect>:8481/select/0/prometheus`
3535
- `query` - Query to run.
36-
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint.
3736
- `threshold` - Value to start scaling for. (This value can be a float)
3837
- `activationThreshold` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
3938
- `namespace` - A namespace that should be used for namespaced queries. These are required by some highly available Prometheus setups, such as [Thanos](https://thanos.io). (Optional)
4039
- `cortexOrgID` - DEPRECATED: This parameter is deprecated as of KEDA v2.10 in favor of `customHeaders` and will be removed in version 2.12. Use `customHeaders: X-Scope-OrgID=##` instead to query multi tenant [Cortex](https://cortexmetrics.io/) or [Mimir](https://grafana.com/oss/mimir/). (Optional)
4140
- `customHeaders` - Custom headers to include while querying the prometheus endpoint. In case of authentication headers, use custom authentication or relevant `authModes` instead. (Optional)
4241
- `ignoreNullValues` - Value to reporting error when Prometheus target is lost (Values: `true`,`false`, Default: `true`, Optional)
42+
- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint. (Optional)
4343
- `unsafeSsl` - Used for skipping certificate check e.g: using self-signed certs (Values: `true`,`false`, Default: `false`, Optional)
4444

4545
### Authentication Parameters

0 commit comments

Comments
 (0)