From 17b25f9ba543564f95da18555c4c51a3d93935fa Mon Sep 17 00:00:00 2001 From: Henrique Piccolo Date: Fri, 8 Sep 2023 15:33:34 -0300 Subject: [PATCH 1/3] Add queryParameters in prometheus scaler documentation Signed-off-by: Henrique Piccolo --- content/docs/2.12/scalers/prometheus.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/2.12/scalers/prometheus.md b/content/docs/2.12/scalers/prometheus.md index 0ae112d71..7d480d4bc 100644 --- a/content/docs/2.12/scalers/prometheus.md +++ b/content/docs/2.12/scalers/prometheus.md @@ -17,6 +17,7 @@ triggers: # Required fields: serverAddress: http://:9090 query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response + queryParameters: key-1=value-1,key-2=value-2 threshold: '100.50' activationThreshold: '5.5' # Optional fields: @@ -32,6 +33,7 @@ triggers: - `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://:8481/select/0/prometheus` - `query` - Query to run. +- `queryParameters` - Query Parameters to include while querying the prometheus endpoint. - `threshold` - Value to start scaling for. (This value can be a float) - `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) - `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) From c5f10c5a41f2b05391137a1e3ce5e031451aa4e3 Mon Sep 17 00:00:00 2001 From: Henrique Piccolo Date: Mon, 9 Oct 2023 16:20:31 -0300 Subject: [PATCH 2/3] Add query parameter prometheus scaler Signed-off-by: Henrique Piccolo --- content/docs/2.12/scalers/prometheus.md | 2 -- content/docs/2.13/scalers/prometheus.md | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/2.12/scalers/prometheus.md b/content/docs/2.12/scalers/prometheus.md index 7d480d4bc..0ae112d71 100644 --- a/content/docs/2.12/scalers/prometheus.md +++ b/content/docs/2.12/scalers/prometheus.md @@ -17,7 +17,6 @@ triggers: # Required fields: serverAddress: http://:9090 query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response - queryParameters: key-1=value-1,key-2=value-2 threshold: '100.50' activationThreshold: '5.5' # Optional fields: @@ -33,7 +32,6 @@ triggers: - `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://:8481/select/0/prometheus` - `query` - Query to run. -- `queryParameters` - Query Parameters to include while querying the prometheus endpoint. - `threshold` - Value to start scaling for. (This value can be a float) - `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) - `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) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 0ae112d71..7d480d4bc 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -17,6 +17,7 @@ triggers: # Required fields: serverAddress: http://:9090 query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response + queryParameters: key-1=value-1,key-2=value-2 threshold: '100.50' activationThreshold: '5.5' # Optional fields: @@ -32,6 +33,7 @@ triggers: - `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://:8481/select/0/prometheus` - `query` - Query to run. +- `queryParameters` - Query Parameters to include while querying the prometheus endpoint. - `threshold` - Value to start scaling for. (This value can be a float) - `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) - `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) From 45328a8a1f787449951c643a75c0fc0b20bcdb6c Mon Sep 17 00:00:00 2001 From: Henrique Piccolo Date: Mon, 9 Oct 2023 16:22:46 -0300 Subject: [PATCH 3/3] Add query parameter prometheus scaler Signed-off-by: Henrique Piccolo --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 7d480d4bc..ca76deeda 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -33,7 +33,7 @@ triggers: - `serverAddress` - Address of Prometheus server. If using VictoriaMetrics cluster version, set full URL to Prometheus querying API, e.g. `http://:8481/select/0/prometheus` - `query` - Query to run. -- `queryParameters` - Query Parameters to include while querying the prometheus endpoint. +- `queryParameters` - A comma-separated list of query Parameters to include while querying the Prometheus endpoint. - `threshold` - Value to start scaling for. (This value can be a float) - `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) - `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)