일요일, 6월 23, 2024
HomeLinuxTelegraf 설치

Telegraf 설치

RPM기반에서 Telegraf 설치에 대한 포스팅입니다.

1.Telegraf 설치

 

 wget --no-check-certificate https://repos.influxdata.com/rhel/7/x86_64/stable/telegraf-1.1.1.x86_64.rpm
 yum localinstall telegraf-1.1.1.x86_64.rpm

telegraf-install-001

telegraf-install-002

2.Telegraf Config
cd /etc/telegraf/
mv telegraf.conf telegraf.conf.org

telegraf-install-003

telegraf -sample-config -input-filter cpu:disk:kernel:mem:net:netstat:system:diskio:processes -output-filter influxdb > telegraf.conf

또는
 vi /etc/telegraf/telegraf.conf

[global_tags]
  role = "grafana-server"

[agent]
  interval = "1s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "5s"
  flush_jitter = "0s"
  precision = ""
  debug = false
  quiet = false
  logfile = ""
  hostname = "grafana-server"
  omit_hostname = false

[[outputs.influxdb]]
  urls = ["http://10.0.0.127:8086"]
  database = "telegraf"
  precision = "s"
  retention_policy = "default"
  write_consistency = "any"
  timeout = "5s"
  username = "telegraf"
  password = "telegraf"
  
[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs"]

[[inputs.kernel]]

[[inputs.mem]]

[[inputs.net]]

[[inputs.netstat]]

[[inputs.system]]

[[inputs.diskio]]

[[inputs.processes]]

3.Telegraf 서비스 시작
telegraf-install-006

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular