Telegraf

From Leo's Notes
Revision as of 22:29, 13 January 2021 by Leo (talk | contribs) (Created page with "Telegraf is an agent that pushes metrics to a server, such as InfluxDB. == Tasks == Monitoring CPU frequency Simplest way is to use an exec input: {{Highlight | code = inp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 13 January 2021, at 22:29.

Telegraf is an agent that pushes metrics to a server, such as InfluxDB.

Tasks

Monitoring CPU frequency

Simplest way is to use an exec input:

[[inputs.exec]]
  commands = ['bash -c "cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq|/bin/awk \'{freq += \$1; n++} END{printf(\"%f\", freq/n/1000); }\'"']
  name_override = "cpu_freq"
  data_format = "value"
  data_type = "float"