In this episode we care for Wazuh itself: reading the indexer cluster status, combing through manager logs, monitoring agent health, and using the API metrics. We also learn to back up manager configuration, take indexer snapshots, and build a disaster recovery strategy for a manager cluster.

In episode 19 we tuned performance and calculated capacity. But the Wazuh we use to monitor the environment is useless if it itself has problems we don't notice. In episode 20 we turn the lens around: monitor Wazuh itself, then set up proper backup and recovery.
Many new admins start with big installations and advanced features, but forget that the security tool should be the most closely watched target. If the indexer turns red in the middle of an incident, the whole team loses visibility exactly when they need it most. The habit of checking Wazuh health daily is part of operations, not just an extra.
We'll cover four monitoring areas: indexer status, manager logs, agent health, and API metrics. Then we move to configuration backup, indexer snapshots, and a disaster recovery strategy for cluster architectures. All of this forms a safety net before a real incident arrives.
OpenSearch reports cluster health in three colors. Green means all primary and replica shards are available. Yellow means not all replica shards are available yet, but primary data can still be read. Red means a primary shard is missing, and some data can't be accessed.
The fastest way to read this status is calling the health API:
curl -sk https://localhost:9200/_cluster/health?v
curl -sk https://localhost:9200/_cat/shards?vRed status must be handled immediately: check whether a node is dead, whether the disk is full, and whether the last snapshot is available. Yellow status can run temporarily, but shouldn't be left dragging on because it's a sign something is abnormal with replication.
Info
Make cluster status checking a daily routine, or better yet automate it with alerts. The OpenSearch dashboard can display health status so the whole team sees changes early.
wazuh-manager writes its activity trail to several log files. The main file is ossec.log, which records everything the manager does, including errors while loading rules or configuration.
These simple commands help find problems:
tail -n 50 /var/ossec/logs/ossec.log
grep -i error /var/ossec/logs/ossec.log | tail -n 20Beyond that file, there's api.log for API activity, cluster.log for inter-node cluster communication, and integrations.log for integration results like TheHive and Shuffle. The habit of reading ossec.log before changing configuration will save a lot of time when something isn't working as expected.
A healthy agent is the foundation of all Wazuh data. In the dashboard, the agents tab shows each endpoint's status: Active, Disconnected, or Never connected. Agents that disconnect often need checking, because losing an agent means losing a detection window.
On the agent side, the log file at /var/ossec/logs/ossec.log records local problems like a full buffer or failure to send events. Meanwhile on the manager side, we can check when the manager last received an event from an agent. Agent status that keeps flipping between Active and Disconnected is usually related to network, resources, or communication timeouts.
Wazuh provides an API that can be used to fetch metrics without opening the dashboard. For example, the agent list by status, or event statistics per daemon.
An API call with basic authentication looks like this:
curl -sk -u admin:PAKAI_PASSWORD_API https://localhost:55000/agents?status=activeFrom this API, you can build your own monitoring scripts: check the number of disconnected agents, observe daemon statistics, and send notifications when anomalies occur. The same API is also used by the dashboard, so understanding its responses is useful for automation.
Info
Keep API credentials in a file with restricted permissions, don't write them plainly in shared scripts. Use a dedicated API user with a limited role for monitoring needs.
Wazuh configuration is far easier to back up than its data, and it almost never changes as fast as alert data. The most important thing to save is the /var/ossec/etc directory containing ossec.conf, agent keys, and internal settings.
A simple tar command is enough for a baseline:
tar -czf /backup/wazuh-config.tar.gz /var/ossec/etc /var/ossec/var/dbCopy that archive to a place separate from the Wazuh server. Remember, a backup stored on the same server doesn't help when that server is lost. Also test its recovery, not just make sure the file is stored.
Alert data in the indexer is backed up through the snapshot mechanism. Snapshots can be sent to a repository in the form of a filesystem or object storage. Make sure the repository path is accessible to the indexer nodes, then register that repository.
curl -sk -X PUT https://localhost:9200/_snapshot/wazuh-backup -H "Content-Type: application/json" -d '{"type": "fs", "settings": {"location": "/backup/snapshots"}}'Snapshots are point-in-time: they capture the data condition at the moment they run. Schedule snapshots regularly, for example every day outside peak hours, and keep several generations. That way, when data corruption or accidental deletion occurs, we can return to the last healthy point.
Disaster recovery isn't just about having a data copy, but a tested process to get back on our feet. For a cluster architecture, start with the most crucial thing: agent keys and identities in client.keys. Without this copy, all agents must be re-enrolled one by one after recovery.
Document the topology, versions, and step-by-step recovery procedures. Set reasonable recovery targets: how long the system may be down, and how much data may be lost. From this you know how often backups must run and how fast the restore procedure must work.
Finally, run recovery drills regularly. These drills find holes that aren't visible when reading documentation, such as wrong file permissions or an unmounted repository path. A team that has restored Wazuh from scratch will be far calmer when a real incident occurs.
In episode 20 you practiced caring for Wazuh:
Key takeaways:
In episode 21 we look to the future: modern features in the latest stable version and the Wazuh 5.0 roadmap. See you there!