Google Cloud Storage 输入插件
此插件将以支持的 数据格式之一,从指定的 Google Cloud Storage 存储桶收集指标。
引入于: Telegraf v1.25.0 标签: cloud, datastore 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Gather metrics by iterating the files located on a Cloud Storage Bucket.
[[inputs.google_cloud_storage]]
## Required. Name of Cloud Storage bucket to ingest metrics from.
bucket = "my-bucket"
## Optional. Prefix of Cloud Storage bucket keys to list metrics from.
# key_prefix = "my-bucket"
## Key that will store the offsets in order to pick up where the ingestion was left.
offset_key = "offset_key"
## Key that will store the offsets in order to pick up where the ingestion was left.
objects_per_iteration = 10
## Required. Data format to consume.
## Each data format has its own unique set of configuration options.
## Read more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
## Optional. Filepath for GCP credentials JSON file to authorize calls to
## Google Cloud Storage APIs. If not set explicitly, Telegraf will attempt to use
## Application Default Credentials, which is preferred.
# credentials_file = "path/to/my/creds.json"Metrics
测量值将驻留在 Google Cloud Storage 中,格式如下所示,例如:
{
"metrics": [
{
"fields": {
"cosine": 10,
"sine": -1.0975806427415925e-12
},
"name": "cpu",
"tags": {
"datacenter": "us-east-1",
"host": "localhost"
},
"timestamp": 1604148850990
}
]
}当 数据格式 设置为 json 时。
示例输出
google_cloud_storage,datacenter=us-east-1,host=localhost cosine=10,sine=-1.0975806427415925e-12 1604148850990000000此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。