AWS rds 指标集编辑

aws 模块的 rds 指标集允许您监控 AWS RDS 服务。 rds 指标集从 Amazon RDSAmazon Aurora DB 中获取一组指标。 使用 Amazon RDS,用户可以监控网络吞吐量、读、写和/或元数据操作的 I/O、客户端连接以及数据库实例的突发信用余额。 Amazon RDS 每分钟将指标和维度发送到 Amazon CloudWatch。 Amazon Aurora 提供各种 Amazon CloudWatch 指标,用户可以使用这些指标来监控 Aurora DB 集群的运行状况和性能。 默认情况下,此指标集从 AWS RDS 收集所有标签。

AWS 权限编辑

IAM 用户需要一些特定的 AWS 权限才能收集 AWS RDS 指标。

cloudwatch:GetMetricData
ec2:DescribeRegions
rds:DescribeDBInstances
rds:ListTagsForResource
sts:GetCallerIdentity
iam:ListAccountAliases

仪表盘编辑

aws rds 指标集附带一个预定义的仪表盘。

metricbeat aws rds overview

配置示例编辑

- module: aws
  period: 60s
  metricsets:
    - rds
  access_key_id: '<access_key_id>'
  secret_access_key: '<secret_access_key>'
  session_token: '<session_token>'

这是一个默认指标集。如果主机模块未配置,则默认情况下启用此指标集。

字段

有关指标集中每个字段的说明,请参见 导出字段 部分。

以下是由此指标集生成的示例文档

{
    "@timestamp": "2017-10-12T08:05:34.853Z",
    "aws": {
        "cloudwatch": {
            "namespace": "AWS/RDS"
        },
        "dimensions": {
            "DatabaseClass": "db.r5.large"
        },
        "rds": {
            "aurora_bin_log_replica_lag": 0,
            "aurora_replica": {
                "lag": {
                    "ms": 19.9485
                },
                "lag_max": {
                    "ms": 21.318500518798828
                },
                "lag_min": {
                    "ms": 21.318500518798828
                }
            },
            "aurora_volume_left_total": {
                "bytes": 70007366615040
            },
            "cache_hit_ratio": {
                "buffer": 100,
                "result_set": 0
            },
            "cpu": {
                "total": {
                    "pct": 0.06552109062928828
                }
            },
            "database_connections": 0,
            "deadlocks": 0,
            "engine_uptime": {
                "sec": 33121208
            },
            "free_local_storage": {
                "bytes": 27275925504
            },
            "freeable_memory": {
                "bytes": 4604928000
            },
            "latency": {
                "commit": 3.2349916666666667,
                "ddl": 0,
                "delete": 0,
                "dml": 0.09888333333333334,
                "insert": 0.09888333333333334,
                "read": 0,
                "select": 0.2432811228126595,
                "update": 0,
                "write": 0.0005787267919438727
            },
            "login_failures": 0,
            "queries": 7.862475898034027,
            "throughput": {
                "commit": 0.24950762724254,
                "ddl": 0,
                "delete": 0,
                "dml": 0.24950762724254,
                "insert": 0.24950762724254,
                "network": 1.3985171580449323,
                "network_receive": 0.6992585790224661,
                "network_transmit": 0.6992585790224661,
                "select": 2.9299395125804084,
                "update": 0
            },
            "transactions": {
                "active": 0,
                "blocked": 0
            }
        }
    },
    "cloud": {
        "account": {
            "id": "428152502467",
            "name": "elastic-beats"
        },
        "provider": "aws",
        "region": "eu-west-1"
    },
    "event": {
        "dataset": "aws.rds",
        "duration": 115000,
        "module": "aws"
    },
    "metricset": {
        "name": "rds",
        "period": 10000
    },
    "service": {
        "type": "aws"
    }
}