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

Feature: A way to import all AWS dashboards under a grafana folder #76

Closed shubhamc183 closed 4 years ago

shubhamc183 commented 4 years ago

Right now, automation exists in importing all the dashboards of this repo at once in Grafana. But what if someone wants to import all the dashboard under their Grafana but in a folder(say "AWS CloudWatch").

We add that functionality

folderId=$(curl -s -k -u "$grafana_cred" $grafana_host/api/folders | jq '.[] | select(.title=="AWS CloudWatch").id')

and pass this "folderId" in the payload of the dashboard import POST request only if the "folderID" is not empty.

If this make sense then I can send a PR.

Please, let me know.

jangaraj commented 4 years ago

Yes, it makes sense. Could you create PR, please? That script from the README Import all Monitoring Artist AWS dashboards in one go (example script, bash/curl/jq required) needs to be updated (for example input variables are not required anymore). Keep in mind that some users may not have folder AWS CloudWatch, so use root folder in that case. I would use variable also for that folder name. Thank you Shubham.

shubhamc183 commented 4 years ago

Ok, I'll send a PR in which the input variable will be removed and the folder name check will be done.