SHARE
TWEET

Untitled

a guest Jun 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. docker run -h `hostname` elastic/metricbeat:5.4.1
  2.      
  3. metricbeat:
  4.   image: elastic/metricbeat:5.4.1
  5.   command: metricbeat -e -c /etc/metricbeat/metricbeat.yml -system.hostfs=/hostfs
  6.   hostname: '`hostname`'
  7.   volumes:
  8.     - /proc:/hostfs/proc:ro
  9.     - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
  10.     - /:/hostfs:ro
  11.     - /var/run/docker.sock:/var/run/docker.sock
  12.   networks:
  13.     - net
  14.   user: root
  15.   deploy:
  16.     mode: global
  17.      
  18. hostname: '`hostname`'
  19.   hostname: '${hostname}'
  20.      
  21. export NODE_HOSTNAME=$(eval cat /etc/nodehostname)
  22.  
  23. envsubst '$NODE_HOSTNAME' </etc/metricbeat/metricbeat.yml.tpl > /etc/metricbeat/metricbeat.yml
  24.      
  25. services:
  26.   myservice:
  27.     hostname: "{{.Node.Hostname}}-{{.Service.Name}}"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top