Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titledocker-compose.yaml
collapsetrue
version: '3.3'
services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2		# <--- get the latest version
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-docker-cluster
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - elastic
  k01:
    container_name: k01
    image: docker.elastic.co/kibana/kibana:7.15.2	# <--- get the latest version
    environment:
      SERVER_NAME: kibana
      ELASTICSEARCH_HOSTS: http://es01:9200
    ports:
      - 5601:5601
    networks:
      - elastic
volumes:
  data01:
    driver: local
networks:
  elastic:
    driver: bridge

Open all the ports, indicated in the file, on OpenStack and then : the port relating to ElasticSearch allows the exchange of data between the cluster to be monitored and the service, the one relating to Kibana allows access to the dashboard. Then launch, inside the folder just created, the command (if the file name is different from docker-compose.yaml, then specify it after the -f option)

...

We have therefore created a DaemonSet according to the configuration present in the .yaml file. A DaemonSet generates a Pod for each VM that makes up the cluster (3 in our case). Each Pod has the task of investigating and collecting the logs of the node in which it is located and to send them to the destination set by us. Below is an example screen of the service in operation (Analytics/Discover).  Of Of course, the mountain of data collected can be reduced through queries, by selecting fields or time frames.

...