version: '3' services: glouton: image: bleemeo/bleemeo-agent restart: unless-stopped environment: # Use environment variable from shell running docker-compose to easily override them. - GLOUTON_BLEEMEO_ACCOUNT_ID - GLOUTON_BLEEMEO_REGISTRATION_KEY - GLOUTON_BLEEMEO_API_BASE - GLOUTON_BLEEMEO_MQTT_HOST - GLOUTON_BLEEMEO_MQTT_PORT - GLOUTON_BLEEMEO_MQTT_SSL - GLOUTON_BLEEMEO_MQTT_SSL_INSECURE - GLOUTON_BLEEMEO_API_SSL_INSECURE - GLOUTON_WEB_LISTENER_PORT - GLOUTON_JMXTRANS_GRAPHITE_PORT - GLOUTON_LOGGING_LEVEL - GLOUTON_LOGGING_PACKAGE_LEVELS - GLOUTON_CONFIG_FILES # This file may contain a password but is written in a Docker volume only accessible by jmxtrans and Glouton. - GLOUTON_JMXTRANS_FILE_PERMISSION=644 volumes: - /var/run/docker.sock:/var/run/docker.sock - /:/hostroot:ro - glouton-data:/var/lib/glouton - jmxtrans-config:/var/lib/jmxtrans network_mode: "host" pid: "host" cap_add: - SYS_PTRACE # This permission is needed to monitor processes IO and memory used per process. - SYS_ADMIN # This permission is needed to retrieve the network interface names of containers. jmxtrans: image: jmxtrans/jmxtrans restart: unless-stopped volumes: - jmxtrans-config:/var/lib/jmxtrans environment: - LD_LIBRARY_PATH=/lib64 network_mode: "host" fluent-bit: image: kubesphere/fluent-bit:v2.0.6 restart: unless-stopped command: - --watch-path - /var/lib/glouton/fluent-bit/config volumes: - /:/hostroot:ro - ./etc/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf:ro - glouton-data:/var/lib/glouton labels: - prometheus.io/scrape=true - prometheus.io/port=2020 - prometheus.io/path=/api/v1/metrics/prometheus volumes: glouton-data: {} jmxtrans-config: {}