[PYTHON] [blackbird-rds] Monitoring AWS RDS

blackbird RDS plugin

The source code is here

This plugin nicely gets the RDS Metric from CloudWatch. To be honest, I can't deny the feeling of wearing MySQL plugin, but you can get the contents like Summary.

You Can Get Following Metrics

Then, from what you can get with this plugin immediately.

CloudWatch Metric Statistics Detail
BinLog Disk Usage Average Disk space used by binlog(bytes)
CPU Utilization Average CPU usage(%)
Database Connections Average Number of connections to the current DB
Disk Queue Depth Average Accumulated in Queue(Unprocessed)I/Number of O processes
FreeStorageSpace Average Free disk space(bytes)
Feeable Memory Average Available memory capacity(bytes) //I use it quite a bit with InnodbBufferPool, so it doesn't matter if it's small.
NetworkReceiveThroughput Average Inbound network traffic on RDS server
NetworkTransmitThroughput Average Outgoing network traffic on RDS server
ReplicaLag Average Slave's replica delay, so-called seconds behind master(seconds)
SwapUsage Average Amount of swapping from memory(bytes)
ReadIOPS Average Read IOPS(If it is Provisioned, it will stop at exactly that number)
WriteIOPS Average Write IOPS(If it is Provisioned, it will stop at exactly that number)
ReadLatency Average Read Latency(The unit is ms)
WriteLatency Average Write Latency(The unit is ms)
ReadThroughput Average Throughput of Read, how many bytes were read per second
WriteThroughput Average Throughput of Write, how many bytes were written per second

I thought it was written, but it really feels like a summary of SHOW GLOBAL STATUS or SHOW ENGINE INNODB STATUS. It's a pity that I can't get QueryPerSecond or Innodb Cache Hit Rate (that's a MySQL plugin).

Zabbix Template

Items

Since there was something strict in monitoring with the above Metric alone, I tried my best on the calculation item and plugin side so that the following values can also be obtained.

Item Name Outline Detail
Total Memory Size Calculate Total Memory Size from instance type and Memory mapping
Used Memory Size Total Memory Size - Freeable MemoryCalculated by
Percent of Memory Available Free memory space%
Total Disk Size Calculated from the mapping between instance type and Disk capacity
Used Disk Size Total Disk Size - Free Storage SpaceCalculated by
Percent of Disk Available Free disk space%

// Honestly, Amazon, I wanted you to have an API that can get the mapping between the instance type and CPU, Memory, Disk ...

Triggers

So far, this is the only one, but honestly, considering the InnodbBufferPool, it doesn't make sense to make it an alert, isn't it just a delay of Slave? I want you to tell me!

Graphs

Disk Usage

スクリーンショット_2014-12-05_23_26_25.png

Memory Usage

スクリーンショット_2014-12-05_23_26_46.png

Database Connections

Omitted because it is an ordinary bar graph

NetworkTraffic

スクリーンショット_2014-12-05_23_26_57.png

CPU Utilization

Ry for ordinary bar charts

Disk I/O Latency

スクリーンショット_2014-12-05_23_27_13.png

Disk I/O Queue Depth

Ry for ordinary bar charts

Disk I/O Throughput

Because it is very similar to the graph of Disk I / O Queue Depth, ry

IOPS

Because it is very similar to the graph of Disk I / O Queue Depth, ry

Replica Lag (Seconds Behind Master)

Ry for ordinary bar charts

It looks like this as a template of Zabbix. If you line up this on the Screen, you can see at a glance which RDS is busy (by the way, I monitor it that way).

How to Install

Case of pip

pip install blackbird-rds

that's all.

Case of yum

Please refer to here for the RPM repository of blackbird.

yum install blackbird-rds --enablerepo=blackbird

Configuration Your blackbird

#Since the section name is used internally for the Thread name, anything is okay, but it is safer not to wear it.
[ANYTHING_OK]
#The acquisition interval and minimum value are 60 seconds, and even if set to 1 second, it will be 60 seconds.
interval = 60

#AWS region
region_name = ap-northeast-1

#AWS credential
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACESS_KEY

#This is the DB name given when creating the RDS instance.
db_instance_identifier = YOUR_RDS_INSTANCE_NAME

#Host name on zabbix server. Don't forget to make it first.
hostname = prod-dbidm01
module = rds

#This value is empty by default. However, if you want to save money by reducing the number of API calls in CloudWatch, write them separated by commas as follows. Then, the specified Metric will not be acquired.
ignore_metrics = ReplicaLag,BinLogDiskUsage

Recommended Posts

[blackbird-rds] Monitoring AWS RDS
[blackbird-dynamodb] Monitoring AWS DynamoDB
[blackbird-sqs] Monitoring AWS SQS
[blackbird-elb] Monitoring AWS ElasticLoadBalancing
[blackbird-elasticache] Monitoring AWS ElastiCache (redis)
[blackbird-aws-service-limits] Monitoring AWS Service Limits
[blackbird-kinesis-stream] Monitoring AWS Kinesis Stream
Manage your data with AWS RDS
AWS IoT device life and death monitoring
Overwrite data in RDS with AWS Glue