DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Monitoring and Observability
  4. Monitoring OS Metrics for Amazon RDS with Grafana

Monitoring OS Metrics for Amazon RDS with Grafana

This article describes how to visualize and monitor OS metrics for Amazon RDS instances using Grafana.

Roman Vynar user avatar by
Roman Vynar
·
Oct. 31, 16 · Tutorial
Like (0)
Save
Tweet
Share
7.98K Views

Join the DZone community and get the full member experience.

Join For Free

This article describes how to visualize and monitor OS metrics for Amazon RDS instances using Grafana. We use CloudWatch as a data source, and Grafana to query CloudWatch API in real-time to get data. The setup instructions include just four quick steps (assuming you already use Grafana).

Setup

1. Create an IAM user on the AWS panel, and attach the managed policy “CloudWatchReadOnlyAccess”.

2. Put the credentials in the file “~grafana/.aws/credentials”:

[default]
aws_access_key_id = youraccesskeyid
aws_secret_access_key = yoursecretaccesskey

3. Add CloudWatch as the data source to Grafana, with the name “CloudWatch” (the pre-defined graphs rely on this name) and choose any region. Other fields can be left blank.

4. Import the dashboard JSON file from our collection of MySQL dashboards, or enter dashboard id “702” in the “Grafana.net Dashboard” field of the importing form in Grafana.

Finally, choose the AWS region, select the DB Instance,  and see the graphs. I have created my db.t2.micro instance on us-west-2 region, and named it “blackbox” to show these screenshots:

screen-shot-2016-10-17-at-18-10-54

Here are the disk performance graphs (I am using a magnetic drive, and we shouldn’t expect many iops):
screen-shot-2016-10-17-at-18-11-49

Available RAM, storage space and network traffic:
screen-shot-2016-10-17-at-18-12-00

The dashboard uses 60s resolution and shows an average over each datapoint. An exception is the “CPU Credit Usage” graph, which has a five min. average and interval length. All data is fetched in real-time and not stored anywhere.

This dashboard can be used with any Amazon RDS DB engine, including MySQL, Aurora, etc.

Cost

Amazon provides one million CloudWatch API requests each month at no additional charge. Past this, it costs $0.01 per 1,000 requests. The pre-defined dashboard performs 15 requests on each refresh and an extra two on initial loading.

More Monitoring for RDS

“Amazon RDS OS Metrics” dashboard will also be a part of the next release of Percona Monitoring and Management (PMM). If you are already using it, you can use the same instructions as in this blog post, but on step two you have to create a local credentials file (say /root/aws_credentials) and share it with pmm-server container by adding “-v /root/aws_credentials:/usr/share/grafana/.aws/credentials -e HOME=/usr/share/grafana” with the create command.

To enable MySQL metrics and query analytics for Amazon RDS using PMM platform, follow this guide.

Example of query analytics on the same instance:
screen-shot-2016-10-17-at-22-56-34

Grafana Metric (unit)

Published at DZone with permission of Roman Vynar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Rescue Your Magento 2 Project
  • OpenID Connect Flows
  • Spring Cloud: How To Deal With Microservice Configuration (Part 1)
  • Problems of Cloud Cost Management: A Socio-Technical Analysis

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: