Created
December 19, 2019 04:46
-
-
Save syossan27/51b0dabde09d58fb792f4b5fdcd8769b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Telegraf Configuration | |
[agent] | |
## メトリクスの集計間隔 | |
## agentは他に設定があるけども特にこだわりなければこれを弄るだけでよいかな | |
interval = "10s" | |
############################################################################### | |
# OUTPUT PLUGINS # | |
############################################################################### | |
[[outputs.cloudwatch]] | |
## Amazon リージョン | |
region = "us-east-1" | |
## Amazon Credentials | |
## Credentialsをconfig file上で設定するならこれ | |
## 今回はElastic Beanstalkの環境変数で設定するのでコメントアウト | |
#access_key = "" | |
#secret_key = "" | |
#token = "" | |
#role_arn = "" | |
#profile = "" | |
#shared_credential_file = "" | |
## エンドポイント設定だが、自動的にエンドポイントは設定されるので今回はコメントアウト | |
## 利用する場面がイマイチ分からない | |
# endpoint_url = "" | |
## カスタムメトリクスの名前空間 | |
namespace = "InfluxData/Telegraf" | |
## メトリクスが大量にあった場合に、統計値を送信したいならこの設定をtrueにする | |
## 統計値はbasicstats aggregatorを使って加工してね | |
# write_statistics = false | |
## 高解像度メトリクス設定 | |
## 高解像度メトリクスについてはこの辺りを参照 | |
## https://aws.amazon.com/jp/blogs/news/new-high-resolution-custom-metrics-and-alarms-for-amazon-cloudwatch/ | |
# high_resolution_metrics = false | |
############################################################################### | |
# INPUT PLUGINS # | |
############################################################################### | |
[[inputs.docker]] | |
## Dockerのエンドポイント | |
endpoint = "unix:///var/run/docker.sock" | |
## ここに設定されたコンテナしかメトリクス集計されないようになる | |
## container_namesのように名前を引っ掛ける系の設定には["*hoge*"]で前方・後方一致が使える | |
container_names = [] | |
## 設定したコンテナ名を含む/含まないコンテナからメトリクスを集計 | |
container_name_include = [] | |
container_name_exclude = [] | |
## 集計時のタイムアウト | |
timeout = "5s" | |
## コンテナのブロックI/Oやネットワークも集計するかどうか | |
perdevice = true | |
## ↑ の統計値を集計するかどうか | |
total = false | |
## 何に使うものか分からなかった・・・誰か教えて | |
##tag_env = ["JAVA_HOME", "HEAP_SIZE"] | |
## 設定したタグを含む/含まないコンテナからメトリクスを集計 | |
docker_label_include = [] | |
docker_label_exclude = [] | |
## TLSを有効にしている場合の設定 | |
# tls_ca = "/etc/telegraf/ca.pem" | |
# tls_cert = "/etc/telegraf/cert.pem" | |
# tls_key = "/etc/telegraf/key.pem" | |
## Use TLS but skip chain & host verification | |
# insecure_skip_verify = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment