Configuration
Wazuh indexer API configuration file
The Wazuh indexer API configuration is located in the /etc/wazuh-indexer/opensearch.yml
file on the Wazuh indexer.
For more information on each of the available settings, check the configuration options. Here are the default settings in the /etc/wazuh-indexer/opensearch.yml
configuration file:
network.host: "127.0.0.1"
node.name: "node-1"
cluster.initial_master_nodes:
- "node-1"
cluster.name: "wazuh-cluster"
node.max_local_storage_nodes: "3"
path.data: /var/lib/wazuh-indexer
path.logs: /var/log/wazuh-indexer
plugins.security.ssl.http.pemcert_filepath: /etc/wazuh-indexer/certs/wazuh-indexer.pem
plugins.security.ssl.http.pemkey_filepath: /etc/wazuh-indexer/certs/wazuh-indexer-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.transport.pemcert_filepath: /etc/wazuh-indexer/certs/wazuh-indexer.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/wazuh-indexer/certs/wazuh-indexer-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.transport.resolve_hostname: false
plugins.security.ssl.http.enabled_ciphers:
- "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
- "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
- "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
- "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
plugins.security.ssl.http.enabled_protocols:
- "TLSv1.2"
plugins.security.authcz.admin_dn:
- "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.nodes_dn:
- "CN=indexer,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.restapi.roles_enabled:
- "all_access"
- "security_rest_api_access"
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opendistro-notifications-*", ".opendistro-notebooks", ".opensearch-observability", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]
### Option to allow Filebeat-oss 7.10.2 to work ###
compatibility.override_main_response_version: true
Warning
When running a Wazuh indexer cluster, the master node does not automatically send its local Wazuh indexer API configuration file to the worker nodes. Each node maintains its own Wazuh indexer API configuration. Therefore, if any changes are made to the configuration file on the master node, you must manually update the configuration on each worker node to ensure consistency. Ensure that the IP address and port are not overwritten in each worker's local configuration.
After any change is made to the configuration file, you must restart the Wazuh indexer API using the Wazuh indexer service:
# systemctl start/status/stop/restart wazuh-indexer
# service wazuh-indexer start/status/stop/restart
Wazuh indexer API configuration options
network
Sub-fields |
Allowed values |
Default value |
Description |
---|---|---|---|
|
A list of valid IP address(es) or hostname(s) |
|
IP addresses or hostnames of the Wazuh indexer where the Wazuh indexer API is running. |
|
IP address |
|
This setting binds a node to an address(es) for incoming connections. The default value is the value specified in the
|
|
IP address |
|
This is the address(es) that a node publishes to other nodes in a cluster to enable them to connect. |
Note
The address must be the same as the node address set in the config.yml
file
used during Wazuh component installation or during certificate generation.
http
Sub-fields |
Allowed values |
Default value |
Description |
---|---|---|---|
|
Any value between 1 and 65535 |
|
The port is where the Wazuh indexer API will listen. If a range of ports is specified, the node will bind to the first available port in the range. |
|
Any valid alphanumeric string |
|
The name of the Wazuh indexer node is defined in the |
|
Any valid numerical value. Different units like bytes, kilobytes (KB), megabytes (MB), and gigabytes (GB) are supported. |
|
Sets the maximum payload size for Wazuh indexer API requests. |
|
Any time value followed by a valid unit (i.e. ms, s, m) |
|
Specifies the maximum time the HTTP client will wait to connect with a remote server. Setting the value to 0 disables the timeout. |
|
Any data size value followed by a valid unit (i.e. b, kb, mb) |
|
Controls the maximum size of a chunk in HTTP responses when chunked transfer encoding is used. |
|
|
|
This setting enables support for compression using |
|
Any integer between 1 - 9 |
|
Specifies the compression level used for HTTP responses when HTTP compression is enabled. The lower the value, the lower the CPU usage and faster response times. |
|
Any data size value followed by a valid unit (i.e. b, kb, mb) |
|
Specifies the maximum allowed length of the initial line of an HTTP request. The "initial line" refers to the line containing the HTTP method, URL, and protocol version. |
|
Any supported HTTP implementation. |
|
Specifies the type of HTTP implementation or HTTP server module to use for handling HTTP requests. |
|
Any positive integer |
|
Controls the maximum number of HTTP pipelined events that the server can handle for a single connection. |
|
Any supported HTTP implementation. |
|
This is the default HTTP server implementation used if no custom |
|
|
|
Specifies whether requests sent to the Wazuh indexer must include a Content-Type header (e.g., |
|
IP address |
|
Sets the address for HTTP communication on a Wazuh indexer node. |
|
Any value between 1 and 65535 |
|
Specifies the port on which the node advertises its HTTP service to external clients. Setting the value to |
|
Any time value followed by a valid unit (i.e. ms, s, m) |
|
Configures the maximum time the HTTP server will wait for a complete client request to be received. The connection will be closed if the request is not received within the timeframe. |
|
Any data size value followed by a valid unit (i.e. b, kb, mb) |
|
Specifies the maximum size of HTTP request bodies that the Wazuh indexer will accept. This includes the payload of incoming HTTP requests, such as documents, bulk operations, or queries. |
|
IP address |
|
Specifies an address(es) a Wazuh indexer node binds to listen for incoming HTTP connections. |
|
|
|
Controls whether the Wazuh indexer should send a |
|
Any positive integer |
|
Specifies the maximum number of warning headers that can be included in an HTTP response. Setting the value to |
|
A glob pattern (wildcard-based) that matches the request's URI. e.g.: /_search, /_bulk, or * (all requests). |
|
Specifies which HTTP requests should be included in tracing logs. Tracing logs are detailed logs of incoming and outgoing HTTP requests, primarily used for debugging or monitoring. |
|
A glob pattern (wildcard-based) that matches the URI of requests. Example: /favicon.ico, /_cat/*. |
|
Specifies which HTTP requests should be excluded from tracing logs, even if they match the pattern in |
|
Any data size value followed by a valid unit (i.e. b, kb, mb) |
|
Specifies the maximum cumulative size of all warning headers in an HTTP response. These headers are used to communicate deprecation warnings, potential issues, or other alerts related to the request. |
|
|
|
Controls whether detailed error messages are included in HTTP responses when requests fail. |
|
Any data size value followed by a valid unit (i.e. b, kb, mb) |
|
Specifies the maximum size of an HTTP request header that the Wazuh indexer server will accept. |
|
IP address |
|
Specifies the address(es) that a Wazuh indexer node publishes to other nodes for HTTP communication. |
http.cors
Sub-fields |
Allowed values |
Default value |
Description |
---|---|---|---|
|
|
|
This setting enables or disables Cross-Origin Resource Sharing (CORS) for HTTP requests. |
|
Any time value representing duration in seconds. |
|
Defines how long the results of a preflight request (for CORS) can be cached. |
|
Any string representing a domain. |
|
Specifies which domains are allowed to access the Wazuh indexer. Wildcards are supported. |
|
Any HTTP header |
|
Specifies which HTTP headers can be included in the request. |
|
|
|
Controls whether cookies and authentication information (such as HTTP credentials) are included in cross-origin requests made to the Wazuh indexer server. |
|
Any HTTP method |
|
Defines which HTTP methods (e.g., GET, POST, PUT) are allowed for cross-origin requests. |
logger
Sub-fields |
Allowed values |
Default value |
Description |
---|---|---|---|
|
|
|
Defines the logging verbosity of the system, controlling what kind of log messages are captured and recorded. |
path
Sub-fields |
Allowed values |
Default value |
Description |
---|---|---|---|
|
Any valid path |
|
Specifies a path to the directory where the Wazuh indexer data is stored. |
|
Any valid path |
|
Specifies the path to store Wazuh indexer log files. |
|
Any valid path |
|
Specifies the directory path where the Wazuh indexer stores shared data files. |
|
Any valid path |
|
Specifies the root directory where the Wazuh indexer core files and directories are stored. |
|
Any valid path |
|
Specifies the directory or directories where the Wazuh indexer will store repository data for snapshots and restores. |
search
Sub-fields | Allowed values |
Default value |
Description |
||
---|---|---|---|---|
|
|
This refers to the maximum aggregation buckets allowed in a single search response. |
||
|
|
|
Controls if partial search results are returned or not when a search request times out or a
shard encounters an issue. If the search request includes an |
|
|
Any time value followed by a valid unit (i.e. ms, s, m) |
|
This sets the time to automatically cancel a search request if it exceeds the specified
duration. When set to |
|
|
Any time value followed by a valid unit (i.e. ms, s, m) |
|
Defines the default maximum time a query will wait for results before timing out. It helps
enforce time limits for searches while allowing partial results if
|