Coder Social home page Coder Social logo

settings are not saved about wazuh-docker HOT 2 CLOSED

wazuh avatar wazuh commented on June 14, 2024
settings are not saved

from wazuh-docker.

Comments (2)

LuisGi93 avatar LuisGi93 commented on June 14, 2024

Hi @xdaass.

I have reproduced your issue. Registering agents and setting the user/password for accessing Kibana make changes in paths declared as volumes in the Dockerfiles, therefore those changes won't get saved in a custom image. Registering an agent will alter /var/ossec/data and setting a password for accessing Kibana will alter /etc/nginx/conf.d.

For preserving the agents that are registered while the wazuh container is up a directory in the host can be specified in the docker-compose.yml file. For example:

services:
  wazuh:
    image: wazuh/wazuh:3.7.2_6.5.4
    hostname: wazuh-manager
    restart: always
    ports:
      - "1514:1514/udp"
      - "1515:1515"
      - "514:514/udp"
      - "55000:55000"
#      - "1516:1516"
    networks:
        - docker_elk
          volumes:
                  - /home/user/ossec-data:/var/ossec/data:Z

Will save the changes to /var/ossec/data in the Wazuh docker container at the /home/user/ossec-data directory on the host.

A similar approach can be followed for setting the user/password for accessing Kibana.

... 

    links:
      - elasticsearch:elasticsearch
      - wazuh:wazuh
  nginx:
    image: wazuh/wazuh-nginx:3.7.2_6.5.4
    hostname: nginx
    restart: always
    environment:
      - NGINX_PORT=443
      - NGINX_NAME=newuser
      - NGINX_PWD=newpassword
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /home/user/nginx-confd:/etc/nginx/conf.d:Z

....

It is also possible to specify the user and password using environment variables as the code block above.
Hope the issue has been clarified a bit.
Regards.

from wazuh-docker.

manuasir avatar manuasir commented on June 14, 2024

Hello @xdaass,

Did this work for you? I will proceed to close this issue, do not hesitate to open a new one if you need it.

Cheers

from wazuh-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.