Skip to content

Commit d689710

Browse files
committed
Add Wazuh agent deployment on Docker
1 parent 105656b commit d689710

File tree

4 files changed

+66
-4
lines changed

4 files changed

+66
-4
lines changed

source/deployment-options/docker/build-docker-images-locally.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.. Copyright (C) 2015, Wazuh, Inc.
22
33
.. meta::
4-
:description: You can modify and build Docker images for the Wazuh central components. Learn more in this section of the documentation.
4+
:description: You can modify and build Docker images for the Wazuh central components and the Wazuh agent. Learn more in this section of the documentation.
55

66
Build Docker images locally
77
===========================
88

9-
You can modify and build Docker images for the Wazuh central components (manager, indexer, and dashboard).
9+
You can modify and build Docker images for the Wazuh central components (manager, indexer, and dashboard) and the Wazuh agent.
1010

1111
#. Clone the `Wazuh Docker repository <https://github.com/wazuh/wazuh-docker>`_ to your system:
1212

source/deployment-options/docker/container-usage.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Access to services and containers
1414
This section explains how to interact with your Wazuh deployment by accessing service logs and shell instances of running containers.
1515

1616
#. Access the Wazuh dashboard using the Docker host IP address.
17-
#. Enroll agents through the standard :doc:`Wazuh agent enrollment </user-manual/agent/agent-enrollment/index>` process. Use the Docker host address as the Wazuh manager address.
17+
#. Enroll agents through the :ref:`Wazuh agent Docker deployment <agent_deployment_docker>` or the standard :doc:`Wazuh agent enrollment </user-manual/agent/agent-enrollment/index>` process. Use the Docker host address as the Wazuh manager address.
1818
#. List the containers in the directory where the Wazuh ``docker-compose.yml`` file is located:
1919

2020
.. code-block:: console
@@ -183,6 +183,10 @@ To customize the Wazuh configuration file ``/var/ossec/etc/ossec.conf``, modify
183183
- **Manager**: ``wazuh-docker/multi-node/config/wazuh_cluster/wazuh_manager.conf``
184184
- **Worker**: ``wazuh-docker/multi-node/config/wazuh_cluster/wazuh_worker.conf``
185185

186+
.. group-tab:: Wazuh agent container
187+
188+
``wazuh-docker/wazuh-agent/config/wazuh-agent-conf``
189+
186190
Save the changes in the configuration files.
187191

188192
#. Restart the stack:

source/deployment-options/docker/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Wazuh provides official Docker images that you can install to streamline deploym
1414
- ``wazuh-manager``
1515
- ``wazuh-indexer``
1616
- ``wazuh-dashboard``
17+
- ``wazuh-agent``
1718

1819
You can find all available Wazuh Docker images on `Docker Hub <https://hub.docker.com/u/wazuh>`__.
1920

source/deployment-options/docker/wazuh-container.rst

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ Wazuh consists of a multi-platform Wazuh agent and three central components: the
1010

1111
**Deployment options**
1212

13-
Wazuh supports the deployment of the central components on Docker.
13+
Wazuh supports the deployment of the central components and agent on Docker.
1414

1515
- You can deploy `Wazuh central components`_ as a single-node or multi-node stack.
1616

1717
- **Single-node stack**: Runs one Wazuh manager, indexer, and dashboard node on the Docker host. Supports persistent storage and configurable certificates for secure communications.
1818
- **Multi-node stack**: Runs two Wazuh manager nodes (one master, one worker), three indexer nodes, one dashboard, and one nginx node. Includes persistence, secure communication configuration, and high availability.
1919

20+
- You can deploy a `Wazuh agent`_ container on a Docker host.
21+
2022
Wazuh central components
2123
------------------------
2224

@@ -459,3 +461,58 @@ The ``wazuh-wui`` user is the default user for connecting to the Wazuh server AP
459461
# docker-compose up -d
460462
461463
Refer to :ref:`log in to the Wazuh server API via the command line <api_log_in>` to learn more.
464+
465+
Wazuh agent
466+
-----------
467+
468+
Running the Wazuh agent in a Docker container provides a lightweight option for integrations and for collecting logs via syslog, without installing the agent directly on a host. However, when deployed this way, the containerized agent cannot directly access or monitor the host system.
469+
470+
.. _agent_deployment_docker:
471+
472+
Deployment
473+
^^^^^^^^^^
474+
475+
Follow these steps to deploy the Wazuh agent using Docker.
476+
477+
#. Clone the `Wazuh Docker repository <https://github.com/wazuh/wazuh-docker>`_ to your system:
478+
479+
.. code-block:: console
480+
481+
# git clone https://github.com/wazuh/wazuh-docker.git -b v|WAZUH_CURRENT_DOCKER|
482+
483+
#. Navigate to the ``wazuh-docker/wazuh-agent/`` directory within your repository:
484+
485+
.. code-block:: console
486+
487+
# cd wazuh-docker/wazuh-agent
488+
489+
#. Edit the ``docker-compose.yml`` file. Replace ``<YOUR_WAZUH_MANAGER_IP>`` with the IP address of your Wazuh manager. Locate the environment section for the agent service and update it:
490+
491+
.. code-block:: yaml
492+
:emphasize-lines: 7
493+
494+
# Wazuh App Copyright (C) 2017, Wazuh Inc. (License GPLv2)
495+
services:
496+
wazuh.agent:
497+
image: wazuh/wazuh-agent:|WAZUH_CURRENT_DOCKER|
498+
restart: always
499+
environment:
500+
- WAZUH_MANAGER_SERVER=<WAZUH_MANAGER_IP>
501+
volumes:
502+
- ./config/wazuh-agent-conf:/wazuh-config-mount/etc/ossec.conf
503+
504+
#. Start the Wazuh agent deployment using ``docker-compose``:
505+
506+
- **Background**:
507+
508+
.. code-block:: console
509+
510+
# docker-compose up -d
511+
512+
- **Foreground**:
513+
514+
.. code-block:: console
515+
516+
# docker-compose up
517+
518+
#. Verify from your Wazuh dashboard that the Wazuh agent deployment was successful and visible. Navigate to the **Agent management** > **Summary**, and you should see the Wazuh agent container active on your dashboard.

0 commit comments

Comments
 (0)