How Wazuh agent failover keeps endpoints reporting
Agent failover in Wazuh means an agent keeps reporting to a working server node when the node it normally uses becomes unavailable. Teams need it when they run more than one Wazuh server node and cannot accept a gap in endpoint telemetry while one node is patched, rebooted or failed. Without a planned failover path, an agent that loses its manager simply stops sending events until someone intervenes, and alerts for that period are lost from the view of the security team.
The Wazuh agent can be configured in two broad ways. In the first, the agent configuration lists several manager addresses, and the agent works through them in order when it cannot reach the current one. In the second, every agent points at a single address, which belongs to a load balancer in front of the cluster, and the load balancer decides which node receives each connection. The first approach puts the selection logic on the endpoint. The second moves it to infrastructure you operate, which means its health checks and session behavior become part of your failover design. Confirm in the Wazuh documentation which of these behaviors the 4.14 release line supports for your agent versions before you commit to one.
The exact agent configuration keys, their placement in the agent configuration file and the names and defaults of the reconnect timers must be confirmed against the Wazuh documentation for the release in use, which is the 4.14 line in this plan. Check the Wazuh release notes for changes in the patch release you deploy, because agent and server behavior can change between patches. Record the values you confirm in your change ticket so that the agent template, the load balancer configuration and the test plan all use the same settings.
Where agents, load balancers and server nodes connect during a failover
The diagram starts with endpoint agents in the endpoint network, which reach a load balancer layer (HAProxy or NGINX) across the trust boundary into the server network. The balancer runs health checks against the master and worker nodes. When a node is marked unhealthy, traffic moves to the remaining healthy nodes, and the reconnect decision happens on the agent side when its current connection drops. Check that the balancer's health check reflects the real service on each node, and that the agent list still names every manager address you intend to use. The indexer and dashboard sit behind the server nodes and are not part of the agent path.
Agent traffic reroutes around an unhealthy node through the balancer layer.
Wazuh agent failover options and when each fits
This table compares three ways to keep agents reporting when a Wazuh server node fails: direct manager lists, a load balancer with health checks, and a split design for enrollment and event traffic. Read each column against your own node count, change process and tolerance for agents reconnecting during an outage. The main takeaway is that the simplest option shifts the most maintenance to each agent and to your change process.
| Design | What the agent sees when a node fails | Main trade-off and when it fits |
|---|---|---|
| Agent lists several manager addresses directly | The agent works through its configured manager list and tries another address after losing the connection, subject to the reconnect behavior in the agent documentation | Simple, with no extra component to run. Agents must be edited when nodes change, so it suits small, stable clusters with disciplined configuration management |
| Load balancer address with health checks | The agent keeps one address, and the balancer stops routing to a node that fails its health check, so the agent reconnects through the balancer | Changes live in one place, but the balancer becomes a critical path. Your network or platform team must own its health checks and high availability |
| Split design for enrollment and event traffic | Enrollment goes to the master through one path, and event traffic goes to workers through another, so a failed worker affects only the reporting path | Matches how the cluster separates roles, but it has the most moving parts. It fits larger clusters where enrollment and reporting need different routing and monitoring |
| Who maintains the health check | The agent has no health check, so the failover decision rests on connection errors and timers | A load balancer administrator maintains the check; in the split design, both the balancer team and the Wazuh team must agree on what counts as healthy |
| Effort when nodes are added or removed | Each agent's configuration must list the new address or drop the old one, which is slow across a large fleet unless managed centrally | Only the balancer pool changes, but the health check and the agent address scheme must be confirmed in testing |
| Reconnect and notification timers | Reconnect and notification timers exist in the agent and server configuration; confirm their names and defaults in the Wazuh documentation | Timer values depend on your network and outage tolerance; set them from the documentation and your own failover tests, not from this page |
| Testing before production | Simulate a node stop and confirm agents reconnect and keep reporting within your acceptable window | Test each design with the same node-failure scenario so results can be compared; record timings from your own environment |
Setting up Wazuh agent failover across managers
This sequence takes a team that already runs a Wazuh cluster from a version check to a tested failover, so agents keep reporting when one server node stops. Each step ends with a check you can run before moving on.
Confirm the cluster and agent versions
The platform engineer confirms that every server node in the cluster runs the same Wazuh version, and that the agents you plan to fail over run a version the server supports. Mixed versions across nodes are a common source of trouble during failover, so check each node rather than assuming they match. Confirm the currently supported patch level against the Wazuh release notes before you change anything. You are done when a version listing from each node matches, and the agent version list shows no unsupported agents in the group you are changing.
Choose direct addresses or a load balancer
Decide whether agents will connect directly to a list of manager addresses or through a load balancer such as NGINX or HAProxy. Direct addresses avoid an extra component in the path but put the agent-side list on every endpoint, so changes require a configuration push. A load balancer centralizes the address list and health decisions but becomes a dependency you must also make redundant. Write the decision and its owner down, and confirm with your network team which ports and paths are open between agent networks and each node. You are done when the decision is recorded and the required ports are confirmed open from a test endpoint.
Configure the agent-side server list
On a non-production group of agents, update the agent configuration so the server block lists each manager address, with the protocol and port that match your deployment. Apply the change through the centrally managed agent group configuration, not by editing each endpoint by hand, so the list stays consistent. Restart or allow the agents to pick up the new configuration according to your agent management process. You are done when the agent configuration on a test endpoint shows all intended addresses and the agent reports its active connection to one of them in the API or dashboard.
Set up the load balancer health check
If you chose a load balancer, configure it to probe each server node on the port agents use, and set the failure threshold and recovery threshold so a node is removed after a set number of failed checks and returned only after it recovers. Choose thresholds that avoid flapping during brief restarts, and document the values, since they decide how quickly agents move. Confirm the probe matches the service agents actually use, not only a generic port check. You are done when the load balancer status page lists every node as healthy and a single failed probe does not change the pool.
Set reconnect behavior on agents
Review how agents retry when their connection drops, including the interval between attempts and how an agent moves to the next listed address. Confirm these values with the Wazuh documentation for your release, since the names and defaults are version specific, and align them with the health check thresholds so agents do not wait longer than the load balancer needs to remove a node. Record the final values in the same change record as the server list. You are done when the documented reconnect settings are applied to the test group and a reviewer has signed off that they match the health check timing.
Test failover by stopping one node
In a non-production environment, stop the Wazuh server service on one node while agents in the test group keep generating events. Watch the agent status in the API or the dashboard, and confirm that agents move to a remaining node and their status returns to active within the window your reconnect settings allow. Also check that alerts from those agents continue to arrive in the indexer during the outage. You are done when every test agent reports as active on a surviving node and no events are missing from the test period.
Confirm the active connection and restore the node
After the test, confirm on each test agent which manager address it is connected to, and restart the stopped node. Check whether agents return to the original node or stay on the surviving one, and record that behavior, since it determines how load is distributed after recovery. Compare the event counts for the test window against the source systems to confirm nothing was lost. You are done when the active connection for each test agent is documented, the restored node shows as healthy, and the test results are filed for review before any production change.
Wazuh agent failover patterns by environment
This pattern fits an all-in-one deployment or a single manager with a standby server. Failover here means that an agent holds a second manager address in its configuration and reconnects to it when the primary stops responding. The standby must accept the agent's enrollment keys and be able to receive its events, so the two servers need matching agent credentials and reachable addresses. Failover protects the agent's ability to keep reporting. It does not protect the data already stored on the failed server, and it does not restore the indexer or dashboard.
- Agent connection continuity: The agent reconnects to the listed address once the primary is unreachable, so reporting resumes without manual edits on each endpoint.
- Standby state: The spare receives no automatic copy of alerts or indexed data unless you set up that replication yourself, so events from the outage window may be missing from its dashboard.
- Credential parity: Enrollment keys and certificates on the spare must match what agents expect. Confirm this during testing, not during an outage.
- Manual promotion: Moving the workload to the spare is an operator action. Agents will not decide that the primary is gone for good.
- Address changes: If the spare has a different IP or name, every agent configuration must list it before the outage occurs.
Confirm with your network owner which ports and paths the agents may use to reach the spare, and with your change owner how and when agent configuration updates are pushed.
In this pattern, agents connect to a load balancer address, and the balancer distributes their traffic across worker nodes that are health checked. If a worker fails its check, the balancer stops sending new connections to it, and agents that lose their connection reconnect through the balancer to a healthy worker. The master node remains a single point of coordination for enrollment and cluster configuration, so the load balancer design must treat enrollment traffic and event traffic differently. Failover depends on how quickly health checks detect a failure and how quickly agents retry.
- Worker loss: Health checks remove a failed worker from rotation, and agents on that worker reconnect to the remaining workers.
- Master loss: Event processing and agent management depend on the master, so a master outage is not covered by worker failover alone.
- Balancer redundancy: A single load balancer is itself a point of failure unless you run a second instance with a shared address.
- Reconnect timing: The time an agent waits before retrying, and the interval your balancer uses for health checks, together set how long reporting pauses. Confirm both values against the Wazuh configuration reference for your release.
- Session placement: Confirm whether the balancer keeps agents on the same worker, since moving an agent between workers changes where its state is handled.
Before go-live, ask the network owner to confirm the health check target, the check interval and the balancer failover behavior, and ask the platform owner to confirm the reconnect settings on the agents.
In a segmented network, agents in an internal zone may reach only a proxy or relay address in a DMZ, and the proxy forwards traffic to the Wazuh server. Failover in this design has two layers: the agent can list more than one proxy address, and the proxy tier can run more than one instance with its own health checks. If either layer is missing, the agent cannot fail over at all, even when the Wazuh cluster is healthy. Every failover path must be allowed by the firewall policy before the outage happens.
- Proxy redundancy: A second proxy instance gives agents a path that does not depend on the first, but only if both are listed and both are permitted by firewall rules.
- Upstream visibility: The proxy health check reports whether the Wazuh server behind it is reachable, which helps you tell a proxy fault from a server fault.
- Source identity: Confirm whether the proxy preserves the agent's source address, because server-side logs and agent identification may depend on it.
- Policy lag: Adding a new path usually requires a firewall change, and that change may take longer to approve than the agent-side edit.
- Certificate and TLS handling: Confirm whether the proxy terminates or passes through the encrypted agent session, since that determines which certificates each tier must present.
Ask the security and network owners to approve every failover path in writing, and ask the change owner for the window in which DMZ rules and agent configurations can be updated together.
Security considerations for agent failover
Failover adds manager addresses, health checks and reconnect logic, and each one widens what an attacker or a bad change can reach. The cards below cover the controls that keep agents reporting to the right nodes while those paths multiply.
Enrollment credentials for every manager address
Each manager address an agent may contact must present a server identity the agent trusts, and enrollment must be authorized on every node that can receive the agent. Check that the enrollment password or registration method is set consistently across the master and workers, and that no node accepts agents enrolled without authorization. Confirm which node issues the agent key, then test that an agent enrolled through one address can authenticate through another.
Deployment optionsCertificate chain trusted by all nodes
Agents validate the manager certificate they connect to, so every node in the list must present a certificate issued by a chain the agent already trusts. A certificate issued for one node name that is served by another address causes validation failures that look like outages. Confirm the subject and subject alternative names cover each address in the list, and plan renewal so all nodes change together.
Health check endpoints that reveal little
A load balancer health check should return only a plain up or down status. If the probe reaches an endpoint that returns version, cluster membership or node names, an outside caller learns the internal layout. Restrict the health check to the load balancer's source addresses, and confirm that the response body contains no configuration or credentials.
Network paths to each node
Every manager address in an agent's list is a reachable path into the server, so each node's ports should accept traffic only from the networks that need them. Limit the enrollment port to the networks where agents register, limit the event port to agents and the load balancer, and keep cluster communication between nodes off the agent network. Verify the rules with a scan from both inside and outside the agent segment.
Failover and reconnect event logging
Agents that switch managers or reconnect repeatedly can signal a failed node, a misconfigured address or an attacker impersonating a manager. Keep manager-side logs and load balancer access logs for connection and reconnection events, and forward them to the same place as your other security telemetry. Review the logs for agents that repeatedly change managers or fail authentication from unexpected sources, and confirm retention meets your policy.
Change control for agent configuration
A change to the agent configuration that lists manager addresses or reconnect timers is pushed to every agent in the group, so one wrong address can disconnect the whole fleet. Stage changes in a test group first, keep the previous configuration for rollback, and require a second reviewer for edits to the server list. Confirm who can edit shared agent configuration in the manager and limit that right to named administrators.
What agent failover does not protect
Failover keeps agents connected to a manager. It does not copy the data and state that sit on each node. Alert history, rule state and any local edits made on one manager stay on that manager, so an agent that switches to another address reports into a node that may not hold the same history. Treat failover as a connectivity control, not a data protection control, and plan backups and retention for the indexer and each server node separately.
Events generated while an agent could not reach any manager are the least obvious risk. The agent keeps the events it collected during an outage only for as long as its local buffering and queue behavior allow, and those limits decide whether a long outage loses data. Confirm the buffering behavior, queue size and what happens on agent restart in the Wazuh documentation for your agent version, and test an outage on a non-production endpoint to see what actually reaches the indexer once connectivity returns.
A node that is healthy at the load balancer can still serve stale content. The health check confirms only that the manager accepts connections, not that it has the current rules, decoders, group configuration and agent settings. If cluster synchronization is not working, a worker can pass every probe while running older content. Verify synchronization separately by comparing the content on each node against the master and checking the cluster status before you trust failover to deliver consistent detection.
Limits to confirm in your environment
Failover across several manager addresses depends on agent version behavior, timers, load balancer checks, capacity, network paths and name resolution. Each item below is a question to settle against the vendor documentation or a lab test before the design goes into production.
Agent version behavior with listed managers
Confirm that the agent version you run supports the multiple-manager behavior described in the documentation for your exact release. Behavior for listing several managers has changed across the 4.x line, so a design checked on one agent build may not hold on another. Ask which release introduced the behavior you depend on, then test enrollment and reporting on the version you will actually deploy. The current release line is 4.14, so start the check there.
Wazuh release notesReconnect and notification timers
Find the timer settings that control how quickly an agent notices a lost manager, how often it retries, and when it switches to another address. Record the defaults for your agent version and whether they are set in the agent configuration or elsewhere. Failover is only as fast as these timers allow, so a design that assumes quick switching may leave agents silent for longer than your monitoring tolerates. Measure the gap in a lab by stopping a manager under load.
Load balancer health check during restarts
Determine how your load balancer's health check treats a manager that restarts briefly for an upgrade or a configuration reload. If the check interval and failure threshold are too tight, the balancer may remove a healthy node and move agents again for no real reason. If they are too loose, agents keep sending to a dead node. Test a short planned restart and a hard stop separately, and confirm the balancer returns the node to service without manual action.
Agent capacity on a surviving node
Ask how many agents one node can accept when a peer fails and its agents reconnect at once. Reconnection storms can overload enrollment, event intake and indexing at the same time. Load test a surviving node with your largest group of agents reconnecting together, watch CPU, memory and queue depth, and decide whether the remaining capacity is enough. Confirm the answer with the vendor sizing guidance for your deployment type.
Firewall rules for every address
Check that every manager address in the agent list is reachable from every agent network segment on the ports the agents use for enrollment and event reporting. A failover address that works from the office but not from a remote subnet fails only when it is needed. Verify rules on each node, on the load balancer and on any intermediate firewall, and test from a representative agent in each segment. Treat a missing rule as a failover defect, not a network detail.
DNS propagation for the design
Determine whether DNS changes reach agents quickly enough for your recovery design, if the design relies on a hostname rather than fixed addresses. Caching resolvers, operating system caches and long record time-to-live values can delay a switch long after the record changes. Ask your network team for the real propagation behavior across your resolvers, and test a record change while agents are running. If the delay is too long, list addresses directly or move the switch into the load balancer.
Questions teams ask about Wazuh agent failover
How much effort does Wazuh agent failover setup take?
Effort depends less on the agent settings themselves than on the infrastructure around them. Listing several manager addresses in the agent configuration is a small change on each endpoint, but the work grows with the number of endpoint platforms, the load balancer or DNS design in front of the managers, and the validation needed to prove that agents move to a healthy node when one fails. Ask the partner to break the effort into agent configuration, load balancer work, rollout waves per platform and testing, so each part can be checked against your environment.
What drives the cost of a partner-led failover configuration?
The main cost drivers are the number of endpoint platforms (Linux, Windows, macOS and others each need their own rollout steps), who owns the load balancer, how much change control your organization requires, and how wide the testing scope is. Costs are one-time for design, build and testing, and may recur if you retain the partner for upgrades or ongoing checks. A written quote should name each platform in scope, the load balancer tool and who operates it, the change windows and approvals assumed, and the test cases that count as complete.
Can our team set up Wazuh agent failover without outside help?
Yes, if your team has experience with Wazuh agent configuration, your load balancer and your endpoint management tooling. The skills most often missing are not the agent settings but the health check design, reconnect timing and proof that agents recover during a real node outage. Before deciding, check whether you can test a manager failure in a non-production group, whether you can roll out configuration changes in waves, and whether someone owns the load balancer after go-live.
What does the work need from our network and endpoint teams?
The network team typically provides the addresses and ports the agents use to reach each manager, firewall rules that allow agent traffic to every node, and the load balancer or DNS entries that front the managers. The endpoint team provides the software deployment path, change windows and a way to push configuration to agents by group. Both teams should confirm that health checks and reconnect behavior do not conflict with existing firewall or monitoring policies before rollout starts.
How far ahead should we plan failover testing?
Plan testing before the rollout begins, not after. The test plan should cover a single manager stopped during normal reporting, a worker removed while agents are connected, an enrollment attempt while one node is down, and the load balancer health check behavior when a node returns. Ask the partner to name the test environment, the agent sample per platform and the evidence each test produces, such as agent connection logs and alert continuity in the dashboard. The duration depends on how many platforms and nodes you test.
Does agent failover replace running a Wazuh cluster?
No. Failover lets agents move to another manager address when one becomes unreachable, but it does not add the scaling, configuration synchronization or cluster management that a Wazuh server cluster provides. The Wazuh server can run as a cluster for horizontal scaling and manages agent configuration remotely, so the two designs are usually planned together. Failover depends on the nodes being reachable and correctly configured, so the cluster design still determines what agents actually reach when a node fails.
What should we request in a written quote for failover work?
Ask for a written scope that lists the endpoint platforms, the number of manager addresses, the load balancer product and owner, the health check and reconnect settings to be defined, the testing scenarios and the acceptance criteria. Also ask which items are one-time, which recur, what changes are excluded, and how additional platforms or nodes would be priced. DeployOpen works from a written scope and does not publish a price list, so the quote follows from the scope you agree.
How DeployOpen works on this
DeployOpen plans and implements self-hosted open-source platforms inside your own infrastructure, and that includes the agent side of Wazuh failover: manager address lists, load balancer health checks and reconnect behavior. Work starts with a written scope so the manager endpoints, test cases and handover material are agreed before any configuration changes.
How we scope
- Inventory the Wazuh server nodes, load balancer endpoints and agent operating systems that must fail over
- Agree in writing which agent groups, reconnect settings and failure tests are in the engagement
- Confirm the Wazuh release line in use so agent and manager versions are checked against each other
- Engagements are fixed-scope, with deliverables and timelines agreed before work starts
How we build
- Draft the manager address list and reconnect settings for each agent group in a staged test group first
- Configure load balancer health checks so a failed manager is removed from agent traffic
- Test a single manager outage on each platform and record how agents reconnect and report
- Keep configuration changes in version control so each agent group can be reviewed and rolled back
How we hand over
- Deliver the agent configuration, load balancer settings and health check definitions with the reasons for each value
- Provide a failover test runbook that your operations team can repeat after future changes
- Document known limits, such as agents that cache state or depend on DNS, and what to monitor for them
- Walk your administrators through the runbook and confirm the handover checklist with them
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover
- Retest failover after each Wazuh patch or cluster change, so agent behavior is confirmed on the new version
- Review reconnect and enrollment logs with your team when an outage shows agents did not move as expected
- Confirm retainer terms, response expectations and scope in writing before the support period starts

