概要
Telegrafはプラグインベースのサーバーサイドエージェントであり、データベース、システム、IoTセンサーからメトリクスとイベントを収集し送信します。300以上の入力、出力、集約プラグインをサポートし、外部依存関係のない静的バイナリとしてコンパイルされます。
README プレビュー
# Telegraf\n\n[](https://godoc.org/github.com/influxdata/telegraf)\n[](https://hub.docker.com/_/telegraf/)\n[](https://goreportcard.com/report/github.com/influxdata/telegraf)\n[](https://circleci.com/gh/influxdata/telegraf)\n\nTelegraf is an agent for collecting, processing, aggregating, and writing\nmetrics, logs, and other arbitrary data.\n\n* Offers a comprehensive suite of over 300 plugins, covering a wide range of\n functionalities including system monitoring, cloud services, and message\n passing\n* Enables the integration of user-defined code to collect, transform, and\n transmit data efficiently\n* Compiles into a standalone static binary without any external dependencies,\n ensuring a streamlined deployment process\n* Utilizes TOML for configuration, providing a user-friendly and unambiguous\n setup experience\n* Developed with contributions from a diverse community of over 1,200\n contributors\n\nUsers can choose plugins from a wide range of topics, including but not limited\nto:\n\n* Devices: [OPC UA][], [Modbus][]\n* Logs: [File][], [Tail][], [Directory Monitor][]\n* Messaging: [AMQP][], [Kafka][], [MQTT][]\n* Monitoring: [OpenTelemetry][], [Prometheus][]\n* Networking: [Cisco TelemetryMDT][], [gNMI][]\n* System monitoring: [CPU][], [Memory][], [Disk][], [Network][], [SMART][],\n [Docker][], [Nvidia SMI][], etc.\n* Universal: [Exec][], [HTTP][], [HTTP Listener][], [SNMP][], [SQL][]\n* Windows: [Event Log][], [Management Instrumentation][],\n [Performance Counters][]\n\n## 🔨 Installation\n\nFor binary builds, Docker images, RPM & DEB packages, and other builds of\nTelegraf, please see the [install guide](/docs/INSTALL_GUIDE.md).\n\nSee the [releases documentation](/docs/RELEASES.md) for details on versioning\nand when releases are made.\n\n## 💻 Usage\n\nUsers define a TOML configuration with the plugins and settings they wish to\nuse, then pass that configuration to Telegraf. The Telegraf agent then\ncollects data from inputs at each interval a
FAQ (4)
トラブル対応1150以上のノードを監視する際にTelegraf OPC UAリスナーで発生する'EOF'エラーを修正する方法
これは既知のバグ(issue #14568)で、OPC UAリスナープラグインが、セキュアな接続で多くのノードが設定されている場合に過度に大きなリクエストを送信します。サーバーは 'BadTcpMessageTooLarge' でこれを拒否し、'EOF' エラーが発生します。回避策:ノードを約500個ずつのグループに分割し、複数の [[inputs.opcua_listener]] インスタンスまたは group ブロックに配置してください。恒久的なバッチ処理の修正が開発中です。
トラブル対応Telegrafのシステム稼働時間メトリクスがPrometheusでゲージタイプとして報告されるのはなぜですか?
Telegraf(未リリースの1.39.0)のバグにより、'uptime'メトリクスが誤ってgaugeとして登録されました。正しいタイプはcounterです。なぜならuptimeは増加のみするからです。この問題はリリース前に修正される予定です。影響を受ける開発ビルドでは、回避策としてPrometheusのmetric_relabel_configsやrelabelingルールを使用してメトリクスタイプをcounterとして上書きしてください。修正後は最新の安定版にアップグレードしてください。
トラブル対応Telegrafのdocker_log入力が、statefileが設定されているにもかかわらず、再起動後に古いログを再送信するのはなぜですか?
statefileは正常なシャットダウンの場合にのみ書き込まれます。docker compose down または docker compose up -d を使用すると、状態が永続化される前にコンテナが強制終了される可能性があります。回避策: まず docker compose stop でTelegrafを正常に停止し、その後 docker compose down または docker compose up -d を実行してください。シャットダウンログに "Persisting plugin states" と表示されることを確認してください。また、停止タイムアウト(stop_grace_period: 30s)を増やして、Telegrafがフラッシュして永続化できるようにしても構いません。
トラブル対応なぜTelegraf disk pluginは読み取り専用でマウントされたファイルシステムに対してmode=rwを報告するのですか?
これはgopsutil (disk_linux.go) が /proc/mounts ではなく /etc/mtab に依存している既知のバグです。Telegraf ≥1.14.0で修正されました。最新のTelegrafにアップグレードするか、回避策を適用してください:ファイルシステムが /proc/mounts で明示的に 'ro' とタグ付けされ、ignore_fs によって除外されていないことを確認してください。