elk.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. version: "3.3"
  2. services:
  3. elasticsearch:
  4. image: docker.elastic.co/elasticsearch/elasticsearch:6.1.0
  5. environment:
  6. - xpack.security.enabled=false
  7. volumes:
  8. - es:/usr/share/elasticsearch/data
  9. networks:
  10. - default
  11. deploy:
  12. labels:
  13. - com.df.distribute=true
  14. - com.df.notify=true
  15. - com.df.port=80
  16. - com.df.alertName=mem_limit
  17. - com.df.alertIf=@service_mem_limit:0.8
  18. - com.df.alertFor=30s
  19. resources:
  20. reservations:
  21. memory: 3000M
  22. limits:
  23. memory: 3500M
  24. # placement:
  25. # constraints: [node.role == worker]
  26. logstash:
  27. image: docker.elastic.co/logstash/logstash:6.1.0
  28. networks:
  29. - default
  30. deploy:
  31. labels:
  32. - com.df.distribute=true
  33. - com.df.notify=true
  34. - com.df.port=80
  35. - com.df.alertName=mem_limit
  36. - com.df.alertIf=@service_mem_limit:0.8
  37. - com.df.alertFor=30s
  38. resources:
  39. reservations:
  40. memory: 600M
  41. limits:
  42. memory: 1000M
  43. configs:
  44. - logstash.conf
  45. environment:
  46. - LOGSPOUT=ignore
  47. command: logstash -f /logstash.conf
  48. kibana:
  49. image: docker.elastic.co/kibana/kibana:6.1.0
  50. networks:
  51. - default
  52. - proxy
  53. environment:
  54. - xpack.security.enabled=false
  55. - ELASTICSEARCH_URL=http://elasticsearch:9200
  56. deploy:
  57. labels:
  58. - com.df.notify=true
  59. - com.df.distribute=true
  60. # - com.df.usersPassEncrypted=false
  61. # - com.df.usersSecret=admin
  62. - com.df.servicePath=/
  63. - com.df.serviceDomain=kibana.sdsys.ru
  64. - com.df.port=5601
  65. - com.df.alertName=mem_limit
  66. - com.df.alertIf=@service_mem_limit:0.8
  67. - com.df.alertFor=30s
  68. resources:
  69. reservations:
  70. memory: 600M
  71. limits:
  72. memory: 1000M
  73. logspout:
  74. image: gliderlabs/logspout:v3.2.3
  75. networks:
  76. - default
  77. environment:
  78. - SYSLOG_FORMAT=rfc3164
  79. volumes:
  80. - /var/run/docker.sock:/var/run/docker.sock
  81. command: syslog://logstash:51415
  82. deploy:
  83. mode: global
  84. labels:
  85. - com.df.notify=true
  86. - com.df.distribute=true
  87. - com.df.alertName=mem_limit
  88. - com.df.alertIf=@service_mem_limit:0.8
  89. - com.df.alertFor=30s
  90. resources:
  91. reservations:
  92. memory: 20M
  93. limits:
  94. memory: 30M
  95. networks:
  96. proxy:
  97. external: true
  98. default:
  99. external: false
  100. volumes:
  101. es:
  102. driver: rexray
  103. external: false
  104. configs:
  105. logstash.conf:
  106. file: ./logstash.conf