亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

使用docker swarm搭建EFK(elasticsearch、filebeat、kibana)

發布時間:2020-07-02 22:28:26 來源:網絡 閱讀:654 作者:qq5a1d14f340108 欄目:系統運維

elasticsearch安裝

elasticsearch.yml 參考官方文檔https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

version: '3'

services: 
  elasticsearch:
    image: elasticsearch:7.4.2
    restart: always
    ulimits: 
      memlock:
        soft: -1
        hard: -1
    ports: 
      - 9200:9200
    networks: 
      - logging
    volumes: 
      - esdata1:/usr/share/elastcisearch/data
      - ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
    environment: 
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"

volumes: 
  esdata1:
    driver: local

networks: 
  logging:
    external: 
      name: logging

新版在安裝過程中遇到兩個問題

  • 1 the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
    需要新建elasticsearch.yml文件(https://github.com/elastic/elasticsearch/blob/master/distribution/src/config/elasticsearch.yml)
    修改node.name和cluster.initial_master_nodes一致

    # ======================== Elasticsearch Configuration =========================
    #
    # NOTE: Elasticsearch comes with reasonable defaults for most settings.
    #       Before you set out to tweak and tune the configuration, make sure you
    #       understand what are you trying to accomplish and the consequences.
    #
    # The primary way of configuring a node is via this file. This template lists
    # the most important settings you may want to configure for a production cluster.
    #
    # Please consult the documentation for further information on configuration options:
    # https://www.elastic.co/guide/en/elasticsearch/reference/index.html
    #
    # ---------------------------------- Cluster -----------------------------------
    #
    # Use a descriptive name for your cluster:
    #
    cluster.name: es-cluster
    #
    # ------------------------------------ Node ------------------------------------
    #
    # Use a descriptive name for the node:
    #
    node.name: "es-master"
    #
    # Add custom attributes to the node:
    #
    #node.attr.rack: r1
    #
    # ----------------------------------- Paths ------------------------------------
    #
    # Path to directory where to store the data (separate multiple locations by comma):
    #
    #${path.data}
    #
    # Path to log files:
    #
    #${path.logs}
    #
    # ----------------------------------- Memory -----------------------------------
    #
    # Lock the memory on startup:
    #
    #bootstrap.memory_lock: true
    #
    # Make sure that the heap size is set to about half the memory available
    # on the system and that the owner of the process is allowed to use this
    # limit.
    #
    # Elasticsearch performs poorly when the system is swapping the memory.
    #
    # ---------------------------------- Network -----------------------------------
    #
    # Set the bind address to a specific IP (IPv4 or IPv6):
    #
    network.host: 0.0.0.0
    #
    # Set a custom port for HTTP:
    #
    #http.port: 9200
    #
    # For more information, consult the network module documentation.
    #
    # --------------------------------- Discovery ----------------------------------
    #
    # Pass an initial list of hosts to perform discovery when this node is started:
    # The default list of hosts is ["127.0.0.1", "[::1]"]
    #
    discovery.seed_hosts: ["127.0.0.1", "[::1]"]
    #
    # Bootstrap the cluster using an initial set of master-eligible nodes:
    #
    cluster.initial_master_nodes: ["es-master"]
    #
    # For more information, consult the discovery and cluster formation module documentation.
    #
    # ---------------------------------- Gateway -----------------------------------
    #
    # Block initial recovery after a full cluster restart until N nodes are started:
    #
    #gateway.recover_after_nodes: 3
    #
    # For more information, consult the gateway module documentation.
    #
    # ---------------------------------- Various -----------------------------------
    #
    # Require explicit names when deleting indices:
    #
    #action.destructive_requires_name: true
    http.cors.enabled: true
    http.cors.allow-origin: /.*/ 
  • 2 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    在宿主機修改/etc/sysctl.conf,添加
    vm.max_map_count=262144

filebeat

filebeat 相對于flnent代碼ruqin小,無須修改已經開發的相關java項目,且內存占用小

docker-compose.yml

version: '3'

services: 
  filebeat:
    image: elastic/filebeat:7.4.2
    container_name: filebeat
    volumes: 
      - ./filebeat.yml:/usr/share/filebeat/filebeat.yml
    restart: always
    networks: 
      - logging
    deploy:
      replicas: 1

networks: 
  logging:
    external: 
      name: logging

filebeat.yml

filebeat.inputs:
- type: log
  paths:
    - /var/lib/docker/containers/*/*.log

output.elasticsearch:
  hosts: ["elasticsearch:9200"]

kibana

kibana沒有什么繁瑣的配置,指定ELASTICSEARCH_HOSTS即可

docker-compose.yml 配置如下

version: '3'

services: 
  kibana:
    image: kibana:7.4.2
    ports: 
      - 5601:5601
    networks: 
      - logging
    environment: 
      ELASTICSEARCH_HOSTS: http://elasticsearch:9200

networks: 
  logging: 
    external: 
      name: logging
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

年辖:市辖区| 若尔盖县| 类乌齐县| 包头市| 云霄县| 仁怀市| 乌拉特前旗| 泾阳县| 开鲁县| 敦化市| 轮台县| 两当县| 土默特左旗| 汉川市| 长汀县| 新丰县| 石狮市| 玉环县| 临汾市| 河曲县| 子洲县| 安乡县| 亳州市| 永年县| 留坝县| 东乌珠穆沁旗| 绥宁县| 颍上县| 都兰县| 囊谦县| 玉环县| 上思县| 抚宁县| 莱州市| 礼泉县| 肥乡县| 铅山县| 呼图壁县| 丰城市| 宁明县| 宝兴县|