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 Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Unified Observability Exporters: Metrics, Logs, and Tracing
  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • How to Optimize AWS Observability Tools
  • Good Data, Bad Metric: A Mutation Testing Pattern for Analytics Engineering

Trending

  • AI Agents in Java: Architecting Intelligent Health Data Systems
  • S3 Vectors: How to Build a RAG Without a Vector Database
  • Bringing Intelligence Closer to the Source: Why Real-Time Processing is the Heart of Edge AI
  • Why Your DLP Policies Fall Short the Moment AI Agents Enter the Picture
  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.

By 
Roman Vynar user avatar
Roman Vynar
·
Oct. 31, 16 · Tutorial
Likes (0)
Comment
Save
Tweet
Share
9.5K 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. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Unified Observability Exporters: Metrics, Logs, and Tracing
  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • How to Optimize AWS Observability Tools
  • Good Data, Bad Metric: A Mutation Testing Pattern for Analytics Engineering

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook