Skip to content

Instantly share code, notes, and snippets.

@turbo
Created September 10, 2018 12:58
Show Gist options
  • Save turbo/87ac56158717984678c8858400279de9 to your computer and use it in GitHub Desktop.
Save turbo/87ac56158717984678c8858400279de9 to your computer and use it in GitHub Desktop.
# 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"
# Receive rsyslog proxy messages
[[inputs.syslog]]
server = "tcp://0.0.0.0:6514"
[[outputs.influxdb]]
database = "vm_metrics"
urls = ["http://influxdb:8086"]
namepass = ["*_vm"]
[[outputs.influxdb]]
database = "docker_metrics"
urls = ["http://influxdb:8086"]
namepass = ["*_docker"]
[[outputs.influxdb]]
database = "sys"
urls = ["http://influxdb:8086"]
namepass = ["syslog"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment