Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  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}}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement