Back to Engineering Blog
Engineering Field Notes 3 min read

Treat a Single Unexplained Success With Suspicion

We reached for 'docker exec' on a SIEM manager that runs natively, and one call appeared to succeed before every identical call failed. We never explained it, and the right response was to distrust the success.

Jason NevillBy , Houston, TX
#Wazuh#Debugging#Verification#Operations

Key Architectural Takeaways

  • Know how each host runs a service: this SIEM manager runs natively under systemd, not in Docker.
  • When one call succeeds and every repeat fails, trust the repeat and keep the anomaly written down.
  • Confirm reality several independent ways before acting on an outlier.

The context

Most of the lab's service containers run as Docker Compose stacks: the workflow automation, the vulnerability scanner, the indexer and dashboard, the password vault. The reflex when managing one is docker exec. The SIEM manager is the exception. It runs natively: a wazuh-manager.service systemd unit, with the agent tools called directly, such as /var/ossec/bin/manage_agents and agent_control.

What happened

We were working on deregistering a decommissioned host's agent. We ran a docker exec ... agent_control -l against the manager. One call appeared to succeed and returned real-looking agent data. Every subsequent identical call failed with docker: command not found.

Everything else we checked agreed with the failures: verbose SSH, the host key, systemctl is-active docker, which, and a filesystem find all showed that Docker does not exist on that host at all.

The decision

We never root-caused the single success, and we are not going to invent an explanation. What we did instead:

  1. Believed the many consistent checks over the one outlier.
  2. Wrote the anomaly down, so the next session does not rediscover it.
  3. Recorded the correct way to manage agents on that host: SSH in and run manage_agents -r <id> directly, with no wrapper.

Why this matters

An unexplained success is more dangerous than an unexplained failure, because it invites you to proceed. If we had trusted that one output, we might have acted on data from a call we could not account for. A failure stops you and makes you look; a lone success skips the looking.

Takeaway

Keep a short list of how each host actually runs its services, and when a result contradicts everything else you can check, re-verify before you act on it.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.