categraf cloudwatch 采集 AWS 服务指标问题

Viewed 53

采集 AWS 上数据库相关的 metrics,限制 namespace 为 AWS/RDS,在 debug 的时候希望仅采集 SwapUsage 指标。由于 RDS 下面有多个数据库实例,希望当前仅采集 postgresql 的数据,按如下方式进行配置后,发现仍然采集到的是所有数据。

[[instances]]
region="us-west-1"
endpoint="https://monitoring.us-west-1.amazonaws.com"
access_key="***"
secret_key="***"
period="5m"
delay="10m"
interval = "5m"
cache_ttl="1h"
timeout="5s"
ratelimit = 50
batch_size = 100

namespaces=["AWS/RDS"]
statistic_include = ["average"]

[[inputs.cloudwatch.metrics]]
  namespace = "AWS/RDS"
  names = ["SwapUsage"]
  statistic_include = ["average"]

  [[inputs.cloudwatch.metrics.dimensions]]
    name = "DBInstanceIdentifier"
    value = "postgresql"

采集到的数据(部分):[[inputs.cloudwatch.metrics.dimensions]] 没生效

cloudwatch_aws_rds_ebs_byte_balance%_average agent_hostname=jump-server db_instance_identifier=postgresql namespace=AWS/RDS region=us-west-1 100

cloudwatch_aws_rds_network_receive_throughput_average agent_hostname=jump-server engine_name=postgres namespace=AWS/RDS region=us-west-1 20989.753938460508
0 Answers