https://github.com/isaccanedo/grafana-aws-cloudwatch-dashboards
☁️ 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://github.com/isaccanedo/grafana-aws-cloudwatch-dashboards
Last synced: about 2 months ago
JSON representation
☁️ 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...
- Host: GitHub
- URL: https://github.com/isaccanedo/grafana-aws-cloudwatch-dashboards
- Owner: isaccanedo
- License: gpl-3.0
- Created: 2023-01-31T21:20:21.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T14:02:25.000Z (over 1 year ago)
- Last Synced: 2025-01-12T06:43:18.545Z (4 months ago)
- Language: Jsonnet
- Size: 11.9 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[
](http://www.monitoringartist.com 'DevOps / Docker / Kubernetes / AWS ECS / Zabbix / Zenoss / Terraform / Monitoring')
# Painéis Grafana para AWS CloudWatch
Conjunto de painéis do AWS Grafana publicados em
[grafana.com](https://grafana.com/dashboards?dataSource=cloudwatch) -
Mais de 10 milhões de downloads.Doc:
- [Configuração da fonte de dados Cloudwatch](https://grafana.com/docs/grafana/latest/datasources/cloudwatch/)
- [Grafana doc](https://grafana.com/docs/)Sinta-se à vontade para criar pull request para recursos/printscreens/...
Defina as variáveis do seu painel (`Região, ...`) após a importação do painel.
As variáveis vazias do painel são o motivo do erro inicial *"Não foi possível chamar a API da AWS" ou "Erro de solicitação de métrica"*.Importe todos os painéis AWS do Monitoring Artist de uma só vez (script de exemplo,
`bash/curl/jq` required):```bash
#!/bin/bash
jq --version >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
### Edite as variáveis grafana_* para corresponder à sua configuração do Grafana:
grafana_host="http://localhost:3000"
grafana_cred="admin:admin"
# Mantenha grafana_folder vazio para adicionar os dashboards na pasta "Geral"
grafana_folder="AWS CloudWatch"
ds=(1516 677 139 674 590 659 758 623 617 551 653 969 650 644 607 593 707 575 1519 581 584 2969 8050 11099 11154 11155 12979 13018 13040 13104 13892 14189 14391 14392 14954 14955 15016 16899 17741 17978);
folderId=$(curl -s -k -u "$grafana_cred" $grafana_host/api/folders | jq -r --arg grafana_folder "$grafana_folder" '.[] | select(.title==$grafana_folder).id')
if [ -z "$folderId" ] ; then echo "Didn't get folderId" ; else echo "Got folderId $folderId" ; fi
for d in "${ds[@]}"; do
echo -n "Processing $d: "
j=$(curl -s -k -u "$grafana_cred" $grafana_host/api/gnet/dashboards/$d | jq .json)
payload="{\"dashboard\":$j,\"overwrite\":true"
if [ ! -z "$folderId" ] ; then payload="${payload}, \"folderId\": $folderId }"; else payload="${payload} }" ; fi
curl -s -k -u "$grafana_cred" -XPOST -H "Accept: application/json" \
-H "Content-Type: application/json" \
-d "$payload" \
$grafana_host/api/dashboards/import; echo ""
done
```Use o [AWS Policy Generator](http://awspolicygen.s3.amazonaws.com/policygen.html),
que se adapta às suas necessidades. Exemplo de função IAM mínima para Grafana (CloudWatch + métricas EC2):```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadingMetricsFromCloudWatch",
"Effect": "Allow",
"Action": [
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:DescribeAlarmHistory",
"cloudwatch:DescribeAlarms",
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricStatistics",
"cloudwatch:GetMetricData"
],
"Resource": "*"
},
{
"Sid": "AllowReadingTagsInstancesRegionsFromEC2",
"Effect": "Allow",
"Action": [
"ec2:DescribeTags",
"ec2:DescribeInstances",
"ec2:DescribeRegions"
],
"Resource": "*"
},
{
"Sid": "AllowReadingResourcesForTags",
"Effect" : "Allow",
"Action" : "tag:GetResources",
"Resource" : "*"
}
]
}
```
Consulte https://github.com/monitoringartist/grafana-cross-account-cloudwatch-access para acesso entre contas da AWS.Você também pode instalar este projeto como uma biblioteca Jsonnet com [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler):
```shell
$ jb install github.com/monitoringartist/grafana-aws-cloudwatch-dashboards
$ cat > aws-cloudwatch-dashboards.jsonnet <