From 36ee7c9b88ae78e6ee1b05cb8a7bb4518e7ee4f0 Mon Sep 17 00:00:00 2001 From: Tomo Wang Date: Thu, 14 Jan 2021 04:54:01 +0800 Subject: [PATCH] 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` --- docs/sources/datasources/cloudwatch.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/datasources/cloudwatch.md b/docs/sources/datasources/cloudwatch.md index d4109f50b90..54195c139c8 100644 --- a/docs/sources/datasources/cloudwatch.md +++ b/docs/sources/datasources/cloudwatch.md @@ -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