Wazuh agent local configuration (ossec.conf)
The ossec.conf file is the main local configuration file for the Wazuh agent. Its location depends on the operating system:
Linux:
/var/ossec/etc/ossec.confmacOS:
/Library/Ossec/etc/ossec.confWindows:
C:\Program Files (x86)\ossec-agent\ossec.conf
The file uses XML syntax. All configuration sections must be defined within the top-level <ossec_config> element. It is recommended to back up this file before making changes to it. A configuration error may prevent Wazuh services from starting up.
Note
This file configures the Wazuh agent only. The Wazuh manager uses /etc/wazuh-manager/wazuh-manager.conf. See Wazuh manager local configuration (wazuh-manager.conf).
The following example shows the placement of the <agent> section:
<ossec_config>
<agent>
<manager>
<endpoint><WAZUH_MANAGER_ADDRESS></endpoint>
</manager>
</agent>
</ossec_config>
You can define multiple <ossec_config> elements in the file. The Wazuh agent reads them in order. When the same option is defined more than once, most single-value options take the last definition, and repeatable options such as <localfile> or <directories> add up.
Use ossec.conf to configure an individual agent locally. To distribute supported configuration settings centrally, use the agent.conf file for the agent group. See centralized configuration.
Sections written as <wodle name="..."> configure wodles. A wodle (Wazuh module) is a data-collection module that the Wazuh agent runs inside wazuh-modulesd, such as aws-s3, azure-logs, command, docker-listener or syscollector.
Configuration sections |
Description |
|---|---|
Controls whether the agent executes Active Response commands and configures repeated- offender timeouts. |
|
Configures the agent's connection to the manager and enrollment settings. |
|
Sets how often the agent collects its metadata and checks its synchronization with the Wazuh manager. |
|
Configures remote agent upgrade behavior and WPK certificate validation. |
|
Requires Wazuh manager validation before uninstalling the agent package on supported Linux systems. |
|
Wazuh 4.x section. A Wazuh 5.0 agent reads only the |
|
Collects GitHub organization audit events. |
|
Configures collection from log files, event channels, journald, macOS ULS, and command output. |
|
Configures the agent internal log output format. |
|
Collects logs through the Microsoft Graph API. |
|
Collects Microsoft 365 audit logs through the Office 365 Management Activity API. |
|
Configures rootkit, trojan, system anomaly, and policy checks. |
|
Configures Security Configuration Assessment scans and policies. |
|
Defines custom output sockets for collected events. |
|
Configures file integrity monitoring and Windows registry monitoring. |
|
Collects logs from supported AWS buckets, services, and subscribers. |
|
Collects logs from Azure Log Analytics, Microsoft Graph, and Azure Storage. |
|
Executes scheduled commands and collects their output. |
|
Monitors Docker container events. |
|
Collects system inventory data. |
|
Collects logs from a Google Cloud Pub/Sub subscription. |
|
Collects access logs from Google Cloud Storage buckets. |