Skip to content

Instantly share code, notes, and snippets.

@exekias
Last active September 17, 2018 10:58
Show Gist options
  • Save exekias/64947fb39c5598880042641109f0e59a to your computer and use it in GitHub Desktop.
Save exekias/64947fb39c5598880042641109f0e59a to your computer and use it in GitHub Desktop.
Simple noise generator
version: "3"
services:
metricbeat:
user: root
image: docker.elastic.co/beats/metricbeat:6.4.0
network_mode: host
volumes:
- ./metricbeat.yml:/usr/share/metricbeat/metricbeat.yml
- /var/run/docker.sock:/var/run/docker.sock
- /:/hostfs
command:
- metricbeat
- -e
- -v
- -system.hostfs=/hostfs
- --strict.perms=false
filebeat:
user: root
image: docker.elastic.co/beats/filebeat:6.4.0
network_mode: host
volumes:
- ./filebeat.yml:/usr/share/filebeat/filebeat.yml
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/containers:/var/lib/docker/containers
command:
- filebeat
- -e
- -v
- --strict.perms=false
random-logger:
image: chentex/random-logger:latest
postgres:
image: postgres:latest
filebeat.inputs:
- type: docker
containers.ids:
- '*'
processors:
- add_cloud_metadata:
- add_host_metadata:
- add_docker_metadata:
output.elasticsearch:
username: elastic
password: changeme
hosts: elasticsearch:9200
metricbeat.modules:
- module: system
period: 10s
metricsets:
- cpu
- load
- memory
- network
- process
- process_summary
processes: ['.*']
process.include_top_n:
by_cpu: 5 # include top 5 processes by CPU
by_memory: 5 # include top 5 processes by memory
- module: system
period: 1m
metricsets:
- filesystem
- fsstat
processors:
- drop_event.when.regexp:
system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'
- module: docker
metricsets:
- container
- cpu
- diskio
- healthcheck
- info
- memory
- network
hosts: ["unix:///var/run/docker.sock"]
period: 10s
processors:
- add_cloud_metadata:
- add_host_metadata:
output.elasticsearch:
username: elastic
password: changeme
hosts: elasticsearch:9200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment