Skip to content

Commit

Permalink
add ignoreNullValues for AWS CloudWatch Scaler (#1346)
Browse files Browse the repository at this point in the history
* add errorWhenMetricValueEmpty

Signed-off-by: Rob Pickerill <[email protected]>

* rename errorWhenMetricValuesEmpty -> errorWhenNullValues

Signed-off-by: Rob Pickerill <[email protected]>

* rename errorWhenMetricValuesEmpty -> ignoreNullValues

Signed-off-by: Rob Pickerill <[email protected]>

* move ignoreNullValues to 2.15

Signed-off-by: Rob Pickerill <[email protected]>

* remove references to aws kiam

Signed-off-by: robpickerill <[email protected]>

* move ignoreNullValues to 2.16

Signed-off-by: robpickerill <[email protected]>

---------

Signed-off-by: Rob Pickerill <[email protected]>
Signed-off-by: robpickerill <[email protected]>
  • Loading branch information
robpickerill authored Aug 20, 2024
1 parent 8dadad2 commit 311805c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/docs/2.16/scalers/aws-cloudwatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ triggers:
metricName: ApproximateNumberOfMessagesVisible
targetMetricValue: "2.1"
minMetricValue: "1.5"
# Optional: ignoreNullValues
ignoreNullValues: false
# Required: region
awsRegion: "eu-west-1"
# Optional: AWS endpoint url
Expand Down Expand Up @@ -69,6 +71,10 @@ triggers:
- `metricUnit` - Which unit to be used by the query. Used to define **Unit** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Unit)). (Default: `none`, Optional)
- `metricEndTimeOffset` - How long in seconds to offset the **EndTime** ([official documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html)). Due to the eventual consistency model which is used by Cloudwatch, the latest datapoint one can get from Cloudwatch might not be accurate. The `metricEndTimeOffset` config provides a way to skip the most recent datapoint if needed. (Default: `0`, Optional)
- `minMetricValue`- Returned value in case of empty response from cloudwatch. (Default: 0, This value can be a float)
- `ignoreNullValues`- Describes the behaviour when the metric query returns no metric values in the response. If set to `true`, the scaler will scale the workload based on the `minMetricValue` provided. If set to `false`, the scaler will return an error and not adjust the scale of the workload. When set to `false` this will take precedence over `minMetricValue`. (Default: `true`, Optional)

> Both `minMetricValue` and `ignoreNullValues` are used to handle the case when the metric query returns no metric values in the response from AWS CloudWatch. `minMetricValue` will scale the workload based on the value provided, while `ignoreNullValues`, if false, will return an error and not adjust the scale of the workload.

- `targetMetricValue`- Target value for the metric. (Default: 0, This value can be a float)
- `activationTargetMetricValue`- 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)

Expand Down

0 comments on commit 311805c

Please sign in to comment.