Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ignoreNullValues for AWS CloudWatch Scaler #1346

Merged
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)
JorTurFer marked this conversation as resolved.
Show resolved Hide resolved

> 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