Skip to content

Instantly share code, notes, and snippets.

@pacohope
Last active September 29, 2021 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pacohope/63bc4540bcba507809f19edb1c866249 to your computer and use it in GitHub Desktop.
Save pacohope/63bc4540bcba507809f19edb1c866249 to your computer and use it in GitHub Desktop.
Telegraf config for FreeBSD on EC2 using CloudWatch on AWS
# Generic, basic /usr/local/etc/telegraf.conf file for FreeBSD
# Gathers some basic metrics and transmits them to cloudwatch
# Be sure to set the region below
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
logfile = "/var/log/telegraf.log"
hostname = ""
omit_hostname = false
[[outputs.cloudwatch]]
# SET THIS
region = "eu-west-1"
namespace = "Telegraf/FreeBSD"
# Read metrics about disk usage by mount point
[[inputs.disk]]
## By default stats will be gathered for all mount points.
## Set mount_points will restrict the stats to only the specified mount points.
mount_points = ["/"]
## Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "linprocfs", "fdescfs", "procfs" ]
# Read metrics about memory usage
[[inputs.mem]]
# Read metrics about swap memory usage
[[inputs.swap]]
fieldpass = [ "used_percent" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment