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: 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 - module: system
metricsets: metricsets:
- cpu - cpu

View File

@ -1,8 +1,22 @@
metricbeat.modules: 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: nginx - module: nginx
metricsets: ["stubstatus"] metricsets: ["stubstatus"]
enabled: true enabled: true
period: 10s period: ${OPENVIDU_PRO_STATS_MONITORING_INTERVAL}s
hosts: ["http://127.0.0.1"] hosts: ["http://127.0.0.1"]
server_status_path: "nginx_status" server_status_path: "nginx_status"
- module: system - module: system

View File

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