openvidu-pro: Add to metricbeat the ability to monitor docker containers

pull/609/head
cruizba 2021-02-04 15:19:50 +01:00
parent 5874870f38
commit d100cd8e95
3 changed files with 61 additions and 31 deletions

View File

@ -1,4 +1,18 @@
metricbeat.modules:
- module: docker
metricsets:
- "container"
- "cpu"
- "diskio"
- "event"
- "healthcheck"
- "info"
- "image"
- "memory"
- "network"
hosts: ["unix:///var/run/docker.sock"]
period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
enabled: true
- module: system
metricsets:
- cpu

View File

@ -1,35 +1,49 @@
metricbeat.modules:
- module: nginx
metricsets: ["stubstatus"]
enabled: true
period: 10s
hosts: ["http://127.0.0.1"]
server_status_path: "nginx_status"
- module: system
metricsets:
- cpu
- diskio
- memory
- network
- filesystem
- fsstat
- process_summary
- uptime
filesystem.ignore_types: [nfs, smbfs, autofs, devtmpfs, devpts, hugetlbfs, tmpfs, sysfs, securityfs, cgroup2, cgroup, pstore, debugfs, configfs, fusectl, proc, fuse.lxcfs, squashfs]
processes: ['.*']
processors:
- drop_event:
when:
or:
- regexp:
system.network.name: '^(veth|lo|docker|br-)($|)'
- regexp:
system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host)($|/)'
- regexp:
system.filesystem.mount_point: '^/hostfs/(sys|cgroup|proc|dev|etc|host)($|/)'
enabled: true
period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
cpu.metrics: [normalized_percentages]
- module: docker
metricsets:
- "container"
- "cpu"
- "diskio"
- "event"
- "healthcheck"
- "info"
- "image"
- "memory"
- "network"
hosts: ["unix:///var/run/docker.sock"]
period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
enabled: true
- module: nginx
metricsets: ["stubstatus"]
enabled: true
period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
hosts: ["http://127.0.0.1"]
server_status_path: "nginx_status"
- module: system
metricsets:
- cpu
- diskio
- memory
- network
- filesystem
- fsstat
- process_summary
- uptime
filesystem.ignore_types: [nfs, smbfs, autofs, devtmpfs, devpts, hugetlbfs, tmpfs, sysfs, securityfs, cgroup2, cgroup, pstore, debugfs, configfs, fusectl, proc, fuse.lxcfs, squashfs]
processes: ['.*']
processors:
- drop_event:
when:
or:
- regexp:
system.network.name: '^(veth|lo|docker|br-)($|)'
- regexp:
system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host)($|/)'
- regexp:
system.filesystem.mount_point: '^/hostfs/(sys|cgroup|proc|dev|etc|host)($|/)'
enabled: true
period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
cpu.metrics: [normalized_percentages]
output:
elasticsearch:
hosts: ["${OPENVIDU_PRO_ELASTICSEARCH_HOST}"]

View File

@ -143,12 +143,14 @@ services:
image: docker.elastic.co/beats/metricbeat-oss:7.8.0
network_mode: host
restart: always
user: root
env_file:
- .env
environment:
- OPENVIDU_PRO_ELASTICSEARCH_HOST=${OPENVIDU_PRO_ELASTICSEARCH_HOST:-http://127.0.0.1:9200}
- OPENVIDU_PRO_STATS_MONITORING_INTERVAL=${OPENVIDU_PRO_STATS_MONITORING_INTERVAL:-10}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./beats/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- /proc:/hostfs/proc:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro