728x90
Telegraf 에이전트 설치(Telegraf data collector)
Telegraf 리포지토리 추가
wget -q https://repos.influxdata.com/influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | sudo tee /etc/apt/sources.list.d/influxdata.list
Telegraf 패키지 설치
sudo apt-get update
sudo apt-get install -y telegraf
Telegraf 버전 확인
telegraf --version
$ telegraf --version
Telegraf 1.28.5 (git: HEAD@77e1a498)
Telegraf 에이전트 시작
sudo systemctl enable --now telegraf
728x90
Telegraf 구성 파일
sudo telegraf config > /etc/telegraf/telegraf.conf
CPU 및 메모리 입력 및 InfluxDB 출력 설정 추가
sudo vim /etc/telegraf/telegraf.conf
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.mem]]
[[outputs.influxdb_v2]]
urls = ["http://localhost:8086"]
token = "your_influxdb_token"
organization = "your_influxdb_organization"
bucket = "your_influxdb_bucket"
Telegraf 에이전트 재시작
sudo systemctl restart telegraf
Telegraf 에이전트 상태 확인
sudo systemctl status telegraf
sudo systemctl status telegraf --no-pager -l
728x90
'리눅스' 카테고리의 다른 글
| [WIP] PHP 슈퍼 글로벌 변수 (0) | 2026.04.14 |
|---|---|
| [WIP] PHP에서 웹 서버의 환경 변수를 가져와서 사용하는 방법 (0) | 2026.04.14 |
| [WIP] SSL 인증서를 PFX에서 JKS로 변환하는 방법 (0) | 2026.04.14 |
| [WIP] HashiCorp Vault를 Docker 컨테이너로 구성하는 방법 (0) | 2026.04.13 |
| [WIP] 카프카 producer와 consumer 테스트 (0) | 2026.04.13 |