Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple starter config for Telegraf to collect CPU data and send to Terrastruct
[global_tags]
# dc = "us-east-1" # will tag all metrics with dc=us-east-1
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.http]]
url = "https://ingest.terrastruct.com"
timeout = "5s"
method = "POST"
insecure_skip_verify = false
data_format = "json"
content_encoding = "identity"
[outputs.http.headers]
Content-Type = "application/json"
Authorization = "Bearer <api-key>"
idle_conn_timeout = "0"
[[inputs.cpu]]
percpu = false
totalcpu = true
collect_cpu_time = false
report_active = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment