개요
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 (5)
문제 해결StatusBadNodeIDUnknown 오류로 인한 Telegraf opcua_listener 영구 연결 끊김 문제를 해결하는 방법은?
Telegraf v1.40.0 이상으로 업그레이드하세요. 이 버그는 gopcua의 재연결 상태 머신에 있습니다. 자동 재연결 중에 구독(subscription)을 다시 생성하지 못하면(예: 모니터링 중인 노드가 서버 주소 공간에 더 이상 존재하지 않아 StatusBadNodeIDUnknown 0x80340000 오류가 발생하는 경우), 클라이언트는 활성 구독 없이 publish 루프가 중단된 채 Connected 상태로 남게 되므로, Telegraf는 재시도하지 않고 재시작될 때까지 연결이 끊긴 상태로 유지됩니다. 이 수정 사항(gopcua/opcua#877)은 gopcua v0.9.1에 반영되었으며, 이 버전은 Telegraf v1.40.0+에 포함되어 있습니다. 업그레이드할 수 있을 때까지 유일한 임시 해결 방법은 연결 끊김이 발생할 때 Telegraf 서비스를 재시작하는 것입니다(예: no subscriptions to resume 디버그 로그에 대한 watchdog/모니터링 경고를 통해).
문제 해결1150개 이상의 노드를 모니터링할 때 Telegraf OPC UA 리스너 'EOF' 오류를 해결하는 방법
이는 알려진 버그(issue #14568)로, OPC UA listener 플러그인이 보안 연결이 구성된 많은 노드에 대해 너무 큰 요청을 보냅니다. 서버는 'BadTcpMessageTooLarge'로 이를 거부하여 'EOF' 오류를 발생시킵니다. 해결 방법: 노드를 약 500개씩 그룹으로 나누어 여러 [[inputs.opcua_listener]] 인스턴스 또는 group 블록에 분산하십시오. 영구적인 배치 수정이 개발 중입니다.
문제 해결Telegraf nightly Docker 이미지에 이전 버전이나 오래된 버전이 표시되는 문제를 어떻게 해결하나요?
이 문제는 nightly CI와 S3 게시가 성공적으로 완료된 후 오래된 퍼블릭 배포/오리진 아티팩트로 인해 발생한 것이며, Docker 빌드 실패가 아닙니다. InfluxData가 해당 배포 문제를 해결했습니다. 다음 명령으로 이미지를 업데이트하세요:
docker run --pull=always --rm quay.io/influxdb/telegraf-nightly:alpine --version
이전 이미지가 계속 사용되는 경우, 해당 이미지를 삭제하고 다시 가져오세요:
docker image rm quay.io/influxdb/telegraf-nightly:alpine
docker pull quay.io/influxdb/telegraf-nightly:alpine
인시던트 발생 동안, 영향을 받은 이미지는 예상된 nightly 커밋 511c852e 대신 Telegraf 1.39.0-f6fa1073을 보고했습니다. 임시 해결 방법으로, 가장 최근에 성공한 CircleCI nightly 작업의 아티팩트를 사용하거나 필요한 커밋으로부터 Telegraf를 직접 빌드하세요.
문제 해결Telegraf의 inputs.nftables 플러그인이 대규모 nftables 세트를 읽을 때 왜 매우 느린가요?
플러그인이 --terse 없이 nft를 실행하여 모든 nftables 세트의 모든 요소를 덤프하게 되었습니다. 크기가 크거나 경합이 심한 세트에서는 이 작업에 몇 분에서 몇 시간이 걸릴 수 있습니다. inputs.nftables --terse 수정 사항이 포함된 릴리스로 Telegraf를 업그레이드하세요. 그러면 include에 "sets"가 포함되지 않은 경우 플러그인이 --terse를 전달합니다. 예를 들면 다음과 같습니다:
[[inputs.nftables]]
include = ["tables", "chains"]
세트 메트릭이 필요하면 nft를 1.1.7 이상으로 업그레이드하세요. 해당 버전은 --terse로 세트 요소 개수를 반환할 수 있어 전체 요소 덤프를 피할 수 있습니다. nft --version으로 확인하세요. 이전 버전의 Telegraf 또는 nft 릴리스에서는 임시 해결 방법으로 세트 모니터링을 피하거나 검사 대상 세트의 크기를 줄여야 합니다.
문제 해결왜 Telegraf 시스템 업타임 메트릭이 Prometheus에서 게이지 유형으로 보고되나요?
Telegraf(출시되지 않은 1.39.0)의 버그로 인해 'uptime' 메트릭이 게이지로 잘못 등록되었습니다. 올바른 유형은 카운터이며, uptime은 증가만 하기 때문입니다. 이 문제는 릴리스 전에 수정될 예정입니다. 영향을 받는 개발 빌드의 경우, Prometheus에서 metric_relabel_configs 또는 relabeling 규칙을 사용하여 메트릭 유형을 카운터로 재정의하는 방법으로 해결할 수 있습니다. 수정이 완료되면 최신 안정 버전으로 업그레이드하세요.