我正在构建监控管道,任何人都试图将DynamoDB监控指标放入InfluxDB,而无需在EC2 / Lambda中运行自定义代码。有没有可以解决这个问题的插件?
如果您有一些好主意或可以推荐插件,请与我分享。
答案 0 :(得分:0)
是的,您可以使用将DynamoDB Matrics从AWS拉到InfluxDB Telegraf图书馆。
Telegraf是一个用Go编写的代理,用于收集,处理, 聚合和编写指标。
注意:您不需要在EC2 / Lambda中运行自定义代码。
按照Issue Raised for : influxdata/telegraf
以下是最终在InfluxDB中的指标:
cloudwatch_aws_efs cloudwatch_aws_elastic_beanstalk cloudwatch_aws_elb cloudwatch_aws_lambda cloudwatch_aws_rds
配置:
[[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/ApplicationELB' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/AutoScaling' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/DynamoDB' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/EC2' [[inputs.cloudwatch.metrics]] names = [ 'CPUCreditBalance', 'CPUCreditUsage', 'StatusCheckFailed', 'StatusCheckFailed_Instance',
'StatusCheckFailed_System'] [inputs.cloudwatch.tags] aws_account ='MYACCOUNT'
[[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/ElasticBeanstalk' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/EFS' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/ELB' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/ElasticMapReduce' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/Kinesis' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/Lambda' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/Redshift' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/RDS' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/SNS' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '3m' interval = '3m' namespace = 'AWS/SQS' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT' [[inputs.cloudwatch]] role_arn = 'arn:aws:iam::MYACCOUNT:role/MYROLE' region = 'us-east-1' period = '1m' delay = '60m' interval = '60m' namespace = 'AWS/S3' [inputs.cloudwatch.tags] aws_account = 'MYACCOUNT'
另外,按照https://github.com/influxdata/telegraf/issues/1907#issuecomment-258270588
AWS账户默认情况下不启用AutoScaling指标。
您是否为某些ASG启用了它们?
如果您尚未为任何ASG启用它们,则cloudwatch会返回可用于AWS / AutoScaling命名空间的空指标列表。