Amazon CloudWatch 输出插件
此插件将指标写入 Amazon CloudWatch 服务。
引入于: Telegraf v0.10.1 标签: cloud 操作系统支持: all
Amazon 认证
此插件使用凭证链进行身份验证以连接到 CloudWatch API 端点。插件将按以下顺序尝试进行身份验证。
- 通过 STS 的 Web 身份提供商凭证,如果指定了
role_arn和web_identity_token_file - 如果指定了
role_arn属性,则通过 STS 假定凭证 (源凭证从后续规则评估) - 来自
access_key、secret_key和token属性的显式凭证 - 来自
profile属性的共享配置文件 - 环境变量
- 共享凭证
- EC2 实例配置文件
如果您使用的是来自 Web 身份提供商的凭证,则可以使用 role_session_name 指定会话名称。如果留空,将使用当前时间戳。
IAM 用户只需要 cloudwatch:PutMetricData 权限。
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Configuration for AWS CloudWatch output.
[[outputs.cloudwatch]]
## Amazon REGION
region = "us-east-1"
## Amazon Credentials
## Credentials are loaded in the following order
## 1) Web identity provider credentials via STS if role_arn and
## web_identity_token_file are specified
## 2) Assumed credentials via STS if role_arn is specified
## 3) explicit credentials from 'access_key' and 'secret_key'
## 4) shared profile from 'profile'
## 5) environment variables
## 6) shared credentials file
## 7) EC2 Instance Profile
#access_key = ""
#secret_key = ""
#token = ""
#role_arn = ""
#web_identity_token_file = ""
#role_session_name = ""
#profile = ""
#shared_credential_file = ""
## Endpoint to make request against, the correct endpoint is automatically
## determined and this option should only be set if you wish to override the
## default.
## ex: endpoint_url = "https://:8000"
# endpoint_url = ""
## Set http_proxy
# use_system_proxy = false
# http_proxy_url = "https://:8888"
## Namespace for the CloudWatch MetricDatums
namespace = "InfluxData/Telegraf"
## If you have a large amount of metrics, you should consider to send
## statistic values instead of raw metrics which could not only improve
## performance but also save AWS API cost. If enable this flag, this plugin
## would parse the required CloudWatch statistic fields (count, min, max, and
## sum) and send them to CloudWatch. You could use basicstats aggregator to
## calculate those fields. If not all statistic fields are available, all
## fields would still be sent as raw metrics.
# write_statistics = false
## Enable high resolution metrics of 1 second (if not enabled, standard
## resolution are of 60 seconds precision)
# high_resolution_metrics = false为了使此输出插件正常工作,必须配置以下变量。
- region
- namespace
region
要连接的 Amazon 区域。示例包括但不限于
- us-west-1
- us-west-2
- us-east-1
- ap-southeast-1
- ap-southeast-2
namespace
用于 AWS CloudWatch 指标的命名空间。
write_statistics
如果您有大量指标,建议发送统计值而不是原始指标,这不仅可以提高性能,还可以节省 AWS API 成本。如果启用此标志,此插件将解析所需的 CloudWatch 统计字段(count、min、max 和 sum)并将它们发送到 CloudWatch。您可以使用 basicstats 聚合器来计算这些字段。如果并非所有统计字段都可用,所有字段仍将作为原始指标发送。
high_resolution_metrics
启用高分辨率指标(1 秒精度)而不是标准指标(60 秒精度)。
此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。