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.
The following example shows the placement of the <client> section:
<ossec_config>
<client>
<!-- Client configuration options -->
</client>
</ossec_config>
You can define multiple <ossec_config> elements in the file. When the same option is defined more than once, a later definition may override an earlier one.
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.
Configuration sections |
Description |
|---|---|
Controls whether the agent executes Active Response commands and configures repeated- offender timeouts. |
|
Configures remote agent upgrade behavior and WPK certificate validation. |
|
Requires Wazuh manager validation before uninstalling the agent package on supported Linux systems. |
|
Configures the agent connection, reconnection, enrollment, and communication settings. |
|
Controls agent-side event buffering and transmission rate limits. |
|
Collects GitHub organization audit events. |
|
Adds custom agent metadata to generated 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. |