Add troubleshooting docs to cloudwatch input

This commit is contained in:
Daniel Nelson 2018-07-07 00:21:21 -07:00
parent 25ceb7f5a7
commit 6a2e2bfd7c
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 20 additions and 2 deletions

View File

@ -68,7 +68,9 @@ API endpoint. In the following order the plugin will attempt to authenticate.
[[inputs.cloudwatch.metrics]]
names = ["Latency", "RequestCount"]
## Dimension filters for Metric (optional)
## Dimension filters for Metric. These are optional however all dimensions
## defined for the metric names must be specified in order to retrieve
## the metric statistics.
[[inputs.cloudwatch.metrics.dimensions]]
name = "LoadBalancerName"
value = "p-example"
@ -142,6 +144,20 @@ Tag Dimension names are represented in [snake case](https://en.wikipedia.org/wik
- unit (CloudWatch Metric Unit)
- {dimension-name} (Cloudwatch Dimension value - one for each metric dimension)
### Troubleshooting:
You can use the aws cli to get a list of available metrics and dimensions:
```
aws cloudwatch list-metrics --namespace AWS/EC2 --region us-east-1
aws cloudwatch list-metrics --namespace AWS/EC2 --region us-east-1 --metric-name CPUCreditBalance
```
If the expected metrics are not returned, you can try getting them manually
for a short period of time:
```
aws cloudwatch get-metric-statistics --namespace AWS/EC2 --region us-east-1 --period 300 --start-time 2018-07-01T00:00:00Z --end-time 2018-07-01T00:15:00Z --statistics Average --metric-name CPUCreditBalance --dimensions Name=InstanceId,Value=i-deadbeef
```
### Example Output:
```

View File

@ -115,7 +115,9 @@ func (c *CloudWatch) SampleConfig() string {
#[[inputs.cloudwatch.metrics]]
# names = ["Latency", "RequestCount"]
#
# ## Dimension filters for Metric (optional)
# ## Dimension filters for Metric. These are optional however all dimensions
# ## defined for the metric names must be specified in order to retrieve
# ## the metric statistics.
# [[inputs.cloudwatch.metrics.dimensions]]
# name = "LoadBalancerName"
# value = "p-example"