Docs: Cloudwatch filter should be JSON format (#30243)

Example `ec2_instance_attribute(default, InstanceId, { 'tag:Environment': ['production'] });` will cause `SyntaxError: Unexpected token ' in JSON at position 2`
This commit is contained in:
Tomo Wang 2021-01-14 04:54:01 +08:00 committed by GitHub
parent 1c1a800bc0
commit 36ee7c9b88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -292,13 +292,13 @@ Note that the actual filtering takes place on Amazon's servers, not in Grafana.
Filters syntax:
```javascript
{ filter_name1: [ filter_value1 ], filter_name2: [ filter_value2 ] }
{ "filter_name1": [ "filter_value1" ], "filter_name2": [ "filter_value2" ] }
```
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": ["production"] });
```
### Selecting attributes
@ -339,7 +339,7 @@ Tags can be selected by prepending the tag name with `Tags.`
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
ec2_instance_attribute(us-east-1, Tags.Name, { "tag:Team": ["sysops"] });
```
## Using json format template variables