monitoringartist / grafana-aws-cloudwatch-dashboards

:cloud: 40+ Grafana dashboards for AWS CloudWatch metrics: EC2, Lambda, S3, ELB, EMR, EBS, SNS, SES, SQS, RDS, EFS, ElastiCache, Billing, API Gateway, VPN, Step Functions, Route 53, CodeBuild, ...
https://grafana.com/orgs/monitoringartist/dashboards
GNU General Public License v3.0
2.05k stars 790 forks source link

fix aws-ec2.json variable query error #129

Closed stefanjay closed 11 months ago

stefanjay commented 1 year ago

Issue:

Added wildcard to $volumeid variable due to error when using cloudwatch datasource and AWS EC2 dashboard from the Grafana Dashboard Marketplace using id 617 rev 4.

issue with variable $volumeid:

Templating [volumeid]
Error updating options: JSON.parse: unexpected character at line 1 column 1 of the JSON data

JSON.parse: unexpected character at line 1 column 1 of the JSON data

The below query of the variable throws above error:

ebs_volume_ids($region, $instanceid)

Environment context:

AWS EKS using grafana deployment with helm chart kube-prom-stack. The IAM role is defined and automated with terraform which creates a serviceaccount. The cloudwatch datasource and the dashboards are defined in the helm chart.

Grafana v10.1.2

Cloudwatch roles:

"ec2:Describe*",
"cloudwatch:Describe*",
"cloudwatch:Get*",
"cloudwatch:List*"

Proposal:

jangaraj commented 11 months ago

Hi @stefanjay Thank you for PR. Unfortunately, I'm not going to merge it. All dashboards in this repo follows the same concept, where they have dashboard variables to filter down metrics.

you can filter in the graph by clicking the volume or fix the variable query That's right, but you can end up with graph where you will have hundreds volume ids (e.g. typical enterprise environment) and you won't have a chance to click on the right one easily. This approach doesn't scale.

I believe you have some issue when you see Templating [volumeid] - e.g. no instanceid is selected, .... Make sure that all dashboard variables have selected right value. They depends on each other. So if you don't have instance id, then you can have correct volumeid as well.