Managing multiple Wazuh clusters with Cross-Cluster Search
Cross-Cluster Search (CCS) in Wazuh enables querying and viewing alerts from remote Wazuh clusters at a centralized location, while keeping log data at the source cluster. This setup is trusted by remote clusters and allows security alerts to be monitored via a single Wazuh dashboard, even in a remote Security Operations Center (SOC).
Use Case:
A cybersecurity operations company provides managed SOC services to two customers (Organizations A and B). Each customer requires separate log management with tightly controlled access and data retention within their own environment.
Solution Overview:
CCS Environment: This environment is used only for querying data from remote Wazuh clusters. It contains the Wazuh indexer and dashboard but no agents or Wazuh server. It is trusted by clusters A and B.
Cluster A: Contains a Wazuh server and indexer for Organization A, with no dashboard (visualization occurs in the CCS environment). It trusts the CCS environment for data access.
Cluster B: Contains a Wazuh server and indexer for Organization B, also with no dashboard, but trusts the CCS environment for data access.

The table below shows a further breakdown of the infrastructure.
Cluster
Component
Node name
IP address
CCS
Wazuh dashboard
ccs-wazuh-dashboard
192.168.146.154
Wazuh indexer
ccs-wazuh-indexer-1
Cluster A
Wazuh server
ca-wazuh-server-1
192.168.146.155
Wazuh indexer
ca-wazuh-indexer-1
Cluster B
Wazuh server
cb-wazuh-server-1
192.168.146.156
Wazuh indexer
cb-wazuh-indexer-1
Ensure network connectivity between the remote clusters and the CCS environment, irrespective of the network address.
CSS Environment Configuration :
A Cross-Cluster Search (CCS) environment is authorized to perform search operations on remote Wazuh clusters. It is typically made up of the Wazuh indexer and the Wazuh dashboard. The Wazuh indexer node establishes trust with indexer nodes in remote clusters, enabling it to search for log data on these indexers. The data on the Wazuh indexer nodes in the remote clusters are displayed on the Wazuh dashboard in the CCS environment.
Generating certificates
Download the wazuh-certs-tool.sh script and the config.yml configuration file. The wazuh-certs-tool.sh script is used to generate certificates for the cluster. The config.yml file defines the IP addresses and node names of the Wazuh central components to be deployed.
Edit the config.yml file and replace the name and IP variables with the corresponding node names and IP addresses:
Note: Comment out or remove the Wazuh server configuration since it is not in use.
Run the wazuh-certs-tool.sh script with option -A to create the root-ca, admin, and node certificates:
Copy the root CA certificate to the working directory of a node in cluster A and cluster B using the scp utility. The root CA is used later in the remote clusters to generate certificates.
Here we will pass the root certificates file into the nodes to ensure the connections are encrypted between master & worker nodes
Compress all the certificate files and remove the uncompressed version to allow for easier transfer to other component nodes within the CCS environment if need be:
Installing & configuring Wazuh indexer
Perform the following configuration steps on the Wazuh indexer node for the CCS environment. In my case the machine I used is ubuntu , you can install the indexer from the manual for any other distributions of linux
Installing Wazuh Indexer
Edit the /etc/wazuh-indexer/opensearch.yml configuration file:
The lines <โ CHANGE THIS โ > has to be modified & need to enter the correct details we entered in the config.yaml file when deploying the certificates on the start
Replace the values of:
network.hostwith the IP address of the Wazuh indexer node.node.namewith the name of the Wazuh indexer node set in theconfig.ymlfile.cluster.initial_master_nodeswith the name of the Wazuh indexer node in the CCS environment.cluster.namewith the name of the cluster. For example,ccs-cluster.plugins.security.nodes_dnwith the distinguished name (DN) of the certificate of the CCS Wazuh indexer nodes. The common name (CN) is to be replaced with the node name of the CCS Wazuh indexer node provided in theconfig.ymlfile.
Run the following commands, replacing <INDEXER_NODE_NAME> with the value of node.name configured in the /etc/wazuh-indexer/opensearch.yml file:
Enable and start the Wazuh indexer service:
Run the Wazuh indexer indexer-security-init.sh script on the Wazuh indexer node to load the new certificate information and initialize the Wazuh indexer:
The output should look like :
DONE WITH SUCCESS & Cluster State Green defines the indexer is correctly configured
Check that the Wazuh indexer is initialized and properly set up by running the following command:
The output should look like :
Installing & Configuring Wazuh Dashboard
Edit the /etc/wazuh-dashboard/opensearch_dashboards.yml file to add the URL value of the Wazuh indexer in the opensearch.hosts section.
Replace <DASHBOARD_NODE_NAME> with your Wazuh dashboard node name, the same one set in config.yml when creating the certificates, and move the certificates to their corresponding directories:
Enable and start the Wazuh dashboard service:
Edit the /usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml file and replace the hosts section with a similar configuration as below:
Restart the Wazuh dashboard service to apply the changes:
Note: Accessing the Wazuh dashboard at this configuration stage will produce API errors since the Wazuh servers have not been installed yet. Complete all the steps before accessing the dashboard in the Set up Cross-Cluster Search section.
In the next section we will configure the Clusters & API connections
Last updated