How to use the AWS CloudWatch Datasource in Grafana

What can we expect in this post

  • Create IAM User so Grafana is allowed to read CloudWatch Metric data
  • Create Dashboards of AWS Resources such as EC2, RDS, Lambda
  • Create template variables so that you can filter on EC2 InstanceId, RDS Cluster Name, etc

Create IAM User

Provision a Grafana Instance

version: '3'

services:
grafana:
image: grafana/grafana
container_name: grafana
networks:
- grafana
environment:
- GF_PATHS_DATA=/var/lib/grafana
ports:
- 3000:3000
volumes:
- ./data:/var/lib/grafana
networks:
grafana: {}
$ docker-compose -f docker-compose.yml up 
..
grafana | t=2020-03-29T15:30:17+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=

CloudWatch Datasource Dashboard Basics

  • Region: eu-west-1
  • Namespace: AWS/RDS
  • Metric Name: CPUUtilization
  • Stats: Average (average value per 60s)
  • Dimensions: DBInstanceIdentifier = Select the RDS Instance that you want to monitor

Dashboard Variables

Updating our Dashboard with Dynamic Values

Import AWS Dashboards from Grafana

Thank You

--

--

DevOps Engineer and Open Source Enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ruan Bekker

Ruan Bekker

DevOps Engineer and Open Source Enthusiast