Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
Created October 27, 2017 09:42
Show Gist options
  • Save mlabouardy/1935804dccd4f6e2bc7cf08fc93b8be8 to your computer and use it in GitHub Desktop.
Save mlabouardy/1935804dccd4f6e2bc7cf08fc93b8be8 to your computer and use it in GitHub Desktop.
Telegraf + InfluxDB output
# Read metrics about CPU usage
[[inputs.cpu]]
percpu = false
totalcpu = true
fieldpass = [ "usage*" ]
name_suffix = "_vm"
# Read metrics about disk usagee
[[inputs.disk]]
fielddrop = [ "inodes*" ]
mount_points=["/"]
name_suffix = "_vm"
# Read metrics about network usage
[[inputs.net]]
interfaces = [ "eth0" ]
fielddrop = [ "icmp*", "ip*", "tcp*", "udp*" ]
name_suffix = "_vm"
# Read metrics about memory usage
[[inputs.mem]]
name_suffix = "_vm"
# Read metrics about swap memory usage
[[inputs.swap]]
name_suffix = "_vm"
# Read metrics about system load & uptime
[[inputs.system]]
name_suffix = "_vm"
# Read metrics from docker socket api
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
container_names = []
name_suffix = "_docker"
[[outputs.influxdb]]
database = "vm_metrics"
urls = ["http://localhost:8086"]
namepass = ["*_vm"]
[[outputs.influxdb]]
database = "docker_metrics"
urls = ["http://localhost:8086"]
namepass = ["*_docker"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment