Grafana version v7.1.5 (9893b8c53d)
Started in docker container
Browser Google Chrome
Datasource AWS CloudWatch
The task is to pull data by Grafana from AWS Cloudwatch. The datasource configured well and part of the data is shown well in Grafana.
The issue is that many AWS Lambda durations have to be displayed at the same graph, but Grafana doesn’t do this. When lambda names configured as Grafana multivalue variable with regex Grafana pulls lambda names in preview that is good. But when Grafana dashboard configured tho show all the lambdas (about 35) at 1 graph the error 400 received from AWS with description that dimension have to be less than 1024 (lambdas have too long names and unfortuantely it’s not possible can’t change it). Error also show the query sent by Grafana with dimesion like FuncitonName=‘lambdaNameHere1’ OR ‘lambdaNameHere2’ OR ‘lambdaNameHere3’ … OR ‘lambdaNameHere35’
When ‘Match Exact’ turned off the following query at preview is shown:
REMOVE_EMPTY(SEARCH(‘Namespace=“AWS/Lambda” MetricName=“Duration” “FunctionName”=“lambdaNameHere”’, ‘p95’, 3600))
The lambdas’ names begin from lambdaNameHere and have different suffics (lambdaNameHere1, lambdaNameHere2, lambdaNameHere3, etc). Grafana doesn’t show any graphics, because lambdaNameHere is quoted in the query (quotes added to the query by Grafana) and when this query used in AWS Cloudwatch it also doesn’t show anything, but when the query changed to:
REMOVE_EMPTY(SEARCH(‘Namespace=“AWS/Lambda” MetricName=“Duration” “FunctionName”=lambdaNameHere’, ‘p95’, 3600))
Removed “” around lambdaNameHere, the Cloudwatch service shows all 35 graphics as expected. Is there any way to change grafana behavior and remove this quotes from the query Grafana generates. Or should Grafana bug report be created at github?
Here https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html described that when AWS cloudwatch dimension is quoted then the only fully matched name will be shown, but when the dimension is not quoted then the dimension value will be as a pattern and everything that matches the pattern will be shown.