From 442d5d19e24442c530580d7f20e82ea740f749ce Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:40:51 +0100 Subject: [PATCH 1/9] add docs Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.14/scalers/dynatrace.md | 95 ++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 content/docs/2.14/scalers/dynatrace.md diff --git a/content/docs/2.14/scalers/dynatrace.md b/content/docs/2.14/scalers/dynatrace.md new file mode 100644 index 000000000..4b02a6b6a --- /dev/null +++ b/content/docs/2.14/scalers/dynatrace.md @@ -0,0 +1,95 @@ ++++ +title = "Dynatrace" +availability = "2.14+" +maintainer = "Community" +description = "Scale applications based on Dynatrace metric data points" +go_file = "dynatrace_scaler" ++++ + +### Trigger Specification + +This specification describes the `dynatrace` trigger that scales based on Dynatrace metric data points. + +```yaml +triggers: + - type: dynatrace + metadata: + host: https://dummy-instance.live.dynatrace.com/ + token: "NRAK-xxxxxxxxxxxxxxxxxxxxxxxxxxx" + metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' + # Optional + from: now-2d + threshold: "10" + # Optional + activationThreshold: "5" +``` + +**Parameter list:** + +- `host` - The Dynatrace instance to query against +- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope +- `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)). + + Some relevant aspects: + - The selector should focus on a **single metric and dimension**: if multiple are found, a warning is issued and only the first one is considered + - The metric data points should be aggregated to produce a single output value (e.g., using the [fold transformation](https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-selector#fold)): if multiple values are found, only the first one is considered + - If you need to use the entity selector, do it through the `:filter` transformation in the metric selector +- `from` - How far back the metric selector should consider when fetching data points. [syntax supported](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/get-data-points#parameters). (Optional, default `now-2h`, i.e., the last 2 hours) +- `threshold` - A threshold that is used as the `targetValue` or `targetAverageValue` (depending on the trigger metric type) in the HPA configuration. (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). (Optional, default `0`, can be a float) + +### Authentication Parameters + +You can use `TriggerAuthentication` CRD to configure authentication the `host` and `token` parameters. + +**Authentication:** + +- `host` - The Dynatrace instance to query against + +- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope + +### Example + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: dynatrace-secret + namespace: my-project +type: Opaque +data: + host: aHR0cHM6Ly9kdW1teS1pbnN0YW5jZS5saXZlLmR5bmF0cmFjZS5jb20vCg== # base64 encoding of https://dummy-instance.live.dynatrace.com/ + token: ZHQwczAxLlNUMkVZNzJLUUlOTUg1NzRXTU5WSTdZTi5HM0RGUEJFSllNT0RJREFFWDQ1NE03WVdCVVZFRk9XS1BSVk1XRkFTUzY0TkZINTJQWDZCTkRWRkZNNTcyUlpNCg== # base64 encoding of the dynatrace example api key dt0s01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-trigger-auth-dynatrace + namespace: my-project +spec: + secretTargetRef: + - parameter: token + name: dynatrace-secret + key: token + - parameter: host + name: dynatrace-secret + key: host +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: dynatrace-scaledobject + namespace: keda +spec: + maxReplicaCount: 12 + scaleTargetRef: + name: dummy + triggers: + - type: dynatrace + metadata: + metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' + from: 'now-30m' + threshold: '1000' + authenticationRef: + name: keda-trigger-auth-dynatrace +``` From 4955d92bc160b62d214680466153611862187833 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:49:37 +0100 Subject: [PATCH 2/9] add to 2.13 Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.13/scalers/dynatrace.md | 95 ++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 content/docs/2.13/scalers/dynatrace.md diff --git a/content/docs/2.13/scalers/dynatrace.md b/content/docs/2.13/scalers/dynatrace.md new file mode 100644 index 000000000..4b02a6b6a --- /dev/null +++ b/content/docs/2.13/scalers/dynatrace.md @@ -0,0 +1,95 @@ ++++ +title = "Dynatrace" +availability = "2.14+" +maintainer = "Community" +description = "Scale applications based on Dynatrace metric data points" +go_file = "dynatrace_scaler" ++++ + +### Trigger Specification + +This specification describes the `dynatrace` trigger that scales based on Dynatrace metric data points. + +```yaml +triggers: + - type: dynatrace + metadata: + host: https://dummy-instance.live.dynatrace.com/ + token: "NRAK-xxxxxxxxxxxxxxxxxxxxxxxxxxx" + metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' + # Optional + from: now-2d + threshold: "10" + # Optional + activationThreshold: "5" +``` + +**Parameter list:** + +- `host` - The Dynatrace instance to query against +- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope +- `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)). + + Some relevant aspects: + - The selector should focus on a **single metric and dimension**: if multiple are found, a warning is issued and only the first one is considered + - The metric data points should be aggregated to produce a single output value (e.g., using the [fold transformation](https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-selector#fold)): if multiple values are found, only the first one is considered + - If you need to use the entity selector, do it through the `:filter` transformation in the metric selector +- `from` - How far back the metric selector should consider when fetching data points. [syntax supported](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/get-data-points#parameters). (Optional, default `now-2h`, i.e., the last 2 hours) +- `threshold` - A threshold that is used as the `targetValue` or `targetAverageValue` (depending on the trigger metric type) in the HPA configuration. (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). (Optional, default `0`, can be a float) + +### Authentication Parameters + +You can use `TriggerAuthentication` CRD to configure authentication the `host` and `token` parameters. + +**Authentication:** + +- `host` - The Dynatrace instance to query against + +- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope + +### Example + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: dynatrace-secret + namespace: my-project +type: Opaque +data: + host: aHR0cHM6Ly9kdW1teS1pbnN0YW5jZS5saXZlLmR5bmF0cmFjZS5jb20vCg== # base64 encoding of https://dummy-instance.live.dynatrace.com/ + token: ZHQwczAxLlNUMkVZNzJLUUlOTUg1NzRXTU5WSTdZTi5HM0RGUEJFSllNT0RJREFFWDQ1NE03WVdCVVZFRk9XS1BSVk1XRkFTUzY0TkZINTJQWDZCTkRWRkZNNTcyUlpNCg== # base64 encoding of the dynatrace example api key dt0s01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-trigger-auth-dynatrace + namespace: my-project +spec: + secretTargetRef: + - parameter: token + name: dynatrace-secret + key: token + - parameter: host + name: dynatrace-secret + key: host +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: dynatrace-scaledobject + namespace: keda +spec: + maxReplicaCount: 12 + scaleTargetRef: + name: dummy + triggers: + - type: dynatrace + metadata: + metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' + from: 'now-30m' + threshold: '1000' + authenticationRef: + name: keda-trigger-auth-dynatrace +``` From 3189cb4159daf3011abed374a5f27b825eac09e9 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:52:50 +0100 Subject: [PATCH 3/9] remove 2.13 Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.13/scalers/dynatrace.md | 95 -------------------------- 1 file changed, 95 deletions(-) delete mode 100644 content/docs/2.13/scalers/dynatrace.md diff --git a/content/docs/2.13/scalers/dynatrace.md b/content/docs/2.13/scalers/dynatrace.md deleted file mode 100644 index 4b02a6b6a..000000000 --- a/content/docs/2.13/scalers/dynatrace.md +++ /dev/null @@ -1,95 +0,0 @@ -+++ -title = "Dynatrace" -availability = "2.14+" -maintainer = "Community" -description = "Scale applications based on Dynatrace metric data points" -go_file = "dynatrace_scaler" -+++ - -### Trigger Specification - -This specification describes the `dynatrace` trigger that scales based on Dynatrace metric data points. - -```yaml -triggers: - - type: dynatrace - metadata: - host: https://dummy-instance.live.dynatrace.com/ - token: "NRAK-xxxxxxxxxxxxxxxxxxxxxxxxxxx" - metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' - # Optional - from: now-2d - threshold: "10" - # Optional - activationThreshold: "5" -``` - -**Parameter list:** - -- `host` - The Dynatrace instance to query against -- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope -- `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)). - - Some relevant aspects: - - The selector should focus on a **single metric and dimension**: if multiple are found, a warning is issued and only the first one is considered - - The metric data points should be aggregated to produce a single output value (e.g., using the [fold transformation](https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-selector#fold)): if multiple values are found, only the first one is considered - - If you need to use the entity selector, do it through the `:filter` transformation in the metric selector -- `from` - How far back the metric selector should consider when fetching data points. [syntax supported](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/get-data-points#parameters). (Optional, default `now-2h`, i.e., the last 2 hours) -- `threshold` - A threshold that is used as the `targetValue` or `targetAverageValue` (depending on the trigger metric type) in the HPA configuration. (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). (Optional, default `0`, can be a float) - -### Authentication Parameters - -You can use `TriggerAuthentication` CRD to configure authentication the `host` and `token` parameters. - -**Authentication:** - -- `host` - The Dynatrace instance to query against - -- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope - -### Example - -```yaml -apiVersion: v1 -kind: Secret -metadata: - name: dynatrace-secret - namespace: my-project -type: Opaque -data: - host: aHR0cHM6Ly9kdW1teS1pbnN0YW5jZS5saXZlLmR5bmF0cmFjZS5jb20vCg== # base64 encoding of https://dummy-instance.live.dynatrace.com/ - token: ZHQwczAxLlNUMkVZNzJLUUlOTUg1NzRXTU5WSTdZTi5HM0RGUEJFSllNT0RJREFFWDQ1NE03WVdCVVZFRk9XS1BSVk1XRkFTUzY0TkZINTJQWDZCTkRWRkZNNTcyUlpNCg== # base64 encoding of the dynatrace example api key dt0s01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM ---- -apiVersion: keda.sh/v1alpha1 -kind: TriggerAuthentication -metadata: - name: keda-trigger-auth-dynatrace - namespace: my-project -spec: - secretTargetRef: - - parameter: token - name: dynatrace-secret - key: token - - parameter: host - name: dynatrace-secret - key: host ---- -apiVersion: keda.sh/v1alpha1 -kind: ScaledObject -metadata: - name: dynatrace-scaledobject - namespace: keda -spec: - maxReplicaCount: 12 - scaleTargetRef: - name: dummy - triggers: - - type: dynatrace - metadata: - metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' - from: 'now-30m' - threshold: '1000' - authenticationRef: - name: keda-trigger-auth-dynatrace -``` From 09303386f469082cb76584a20a5ff0056d42e238 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:38:08 +0100 Subject: [PATCH 4/9] Update content/docs/2.14/scalers/dynatrace.md Co-authored-by: Tom Kerkhove Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.14/scalers/dynatrace.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/2.14/scalers/dynatrace.md b/content/docs/2.14/scalers/dynatrace.md index 4b02a6b6a..44a57865e 100644 --- a/content/docs/2.14/scalers/dynatrace.md +++ b/content/docs/2.14/scalers/dynatrace.md @@ -45,7 +45,6 @@ You can use `TriggerAuthentication` CRD to configure authentication the `host` a **Authentication:** - `host` - The Dynatrace instance to query against - - `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope ### Example From 24f6dbe62a103680a7eee0cb349db81702ab0358 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:15:35 +0100 Subject: [PATCH 5/9] remove token from trigger metadata Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.14/scalers/dynatrace.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/docs/2.14/scalers/dynatrace.md b/content/docs/2.14/scalers/dynatrace.md index 44a57865e..0e64f8068 100644 --- a/content/docs/2.14/scalers/dynatrace.md +++ b/content/docs/2.14/scalers/dynatrace.md @@ -15,7 +15,6 @@ triggers: - type: dynatrace metadata: host: https://dummy-instance.live.dynatrace.com/ - token: "NRAK-xxxxxxxxxxxxxxxxxxxxxxxxxxx" metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold' # Optional from: now-2d @@ -27,7 +26,7 @@ triggers: **Parameter list:** - `host` - The Dynatrace instance to query against -- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope +- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope. Must be provided via Trigger Authentication (see [Authentication Parameters](#authentication-parameters)) - `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)). Some relevant aspects: From 8c52a02bd0d02c0f009fb181baaae29b56524523 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:50:51 +0100 Subject: [PATCH 6/9] move to 2.15 Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/{2.14 => 2.15}/scalers/dynatrace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename content/docs/{2.14 => 2.15}/scalers/dynatrace.md (99%) diff --git a/content/docs/2.14/scalers/dynatrace.md b/content/docs/2.15/scalers/dynatrace.md similarity index 99% rename from content/docs/2.14/scalers/dynatrace.md rename to content/docs/2.15/scalers/dynatrace.md index 0e64f8068..ad46b1bc5 100644 --- a/content/docs/2.14/scalers/dynatrace.md +++ b/content/docs/2.15/scalers/dynatrace.md @@ -1,6 +1,6 @@ +++ title = "Dynatrace" -availability = "2.14+" +availability = "2.15+" maintainer = "Community" description = "Scale applications based on Dynatrace metric data points" go_file = "dynatrace_scaler" From 4f6fe5ac519ff55561cdbdb8a05b661a01b48079 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:30:48 +0100 Subject: [PATCH 7/9] Update content/docs/2.15/scalers/dynatrace.md Co-authored-by: Jorge Turrado Ferrero Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.15/scalers/dynatrace.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/docs/2.15/scalers/dynatrace.md b/content/docs/2.15/scalers/dynatrace.md index ad46b1bc5..19d8aaf57 100644 --- a/content/docs/2.15/scalers/dynatrace.md +++ b/content/docs/2.15/scalers/dynatrace.md @@ -2,6 +2,7 @@ title = "Dynatrace" availability = "2.15+" maintainer = "Community" +category = "Metrics" description = "Scale applications based on Dynatrace metric data points" go_file = "dynatrace_scaler" +++ From 014d7d2641cbfd44df4509e7d7989c4d56bc324a Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:33:15 +0100 Subject: [PATCH 8/9] ignore non-existent 2.14 dynatrace link Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- .htmltest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.htmltest.yml b/.htmltest.yml index 3628b12af..3487b1cef 100644 --- a/.htmltest.yml +++ b/.htmltest.yml @@ -5,3 +5,4 @@ IgnoreAltMissing: true IgnoreEmptyHref: true IgnoreInternalURLs: - /docs/2.14/scalers/splunk/ + - /docs/2.14/scalers/dynatrace/ From 3616ccf2a506b1784635a52033a9d8c357d1f3f7 Mon Sep 17 00:00:00 2001 From: cyrilico <19289022+cyrilico@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:55:02 +0100 Subject: [PATCH 9/9] remove token from metadata section docs Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --- content/docs/2.15/scalers/dynatrace.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/2.15/scalers/dynatrace.md b/content/docs/2.15/scalers/dynatrace.md index 19d8aaf57..848ee3253 100644 --- a/content/docs/2.15/scalers/dynatrace.md +++ b/content/docs/2.15/scalers/dynatrace.md @@ -27,7 +27,6 @@ triggers: **Parameter list:** - `host` - The Dynatrace instance to query against -- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope. Must be provided via Trigger Authentication (see [Authentication Parameters](#authentication-parameters)) - `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)). Some relevant aspects: