Cloudwatch: Improve alerting related docs (#47178)

This commit is contained in:
Andres Martinez Gotor 2022-04-01 06:49:09 -07:00 committed by GitHub
parent 8a2c368031
commit 7b30fae36f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,7 +323,16 @@ If you're not currently logged in to the CloudWatch console, the link will forwa
## Alerting
Since CloudWatch Logs queries can return numeric data, for example through the use of the `stats` command, alerts are supported.
Alerting require queries that return numeric data, which CloudWatch Logs support. For example through the use of the `stats` command, alerts are supported. For example, this is a valid query for alerting on messages that include the text "Exception":
```
filter @message like /Exception/
| stats count(*) as exceptionCount by bin(1h)
| sort exceptionCount desc
```
**NOTE**: When trying to alert on a query, if an error like `input data must be a wide series but got ...` is received, make sure that your query returns valid numeric data that can be printed in a Time series panel.
For more information on Grafana alerts, refer to [Alerting]({{< relref "../../alerting/_index.md" >}}) documentation.
## Configure CloudWatch with grafana.ini