implementing-endpoint-detection-with-wazuh

Deploy and configure Wazuh SIEM/XDR for endpoint detection, custom rules, and alert querying.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-endpoint-detection-with-wazuh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: implementing-endpoint-detection-with-wazuh
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/security-operations/implementing-endpoint-detection-with-wazuh
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-endpoint-detection-with-wazuh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests.

What problem does it solve?

Setting up endpoint detection with Wazuh involves many failure points: agents that register but never connect, custom decoders and rules that silently never fire, and active responses that fail without errors. This Skill provides a structured workflow for deploying Wazuh SIEM/XDR, managing agents, writing custom detection logic, and verifying alerts end to end.

Core Features & Use Cases

  • Agent Management via REST API: Authenticate with JWT, list agents, and monitor connection status, versions, and keep-alives through the /agents endpoint.
  • Custom Decoder and Rule Creation: Write organization-specific decoder and rule XML in local_rules.xml with correct ID ranges (100000-120000) and severity levels.
  • Alert Querying and Rule Validation: Search alerts by rule ID, severity, agent, or time range, and validate detection logic with the /logtest endpoint before deployment.
  • Use Case: A security team deploys Wazuh across their fleet, writes a custom rule to detect suspicious SSH login patterns, validates it with logtest against sample log lines, and confirms the alert appears in the wazuh-alerts-* index.

Quick Start

Use the Wazuh endpoint detection skill to authenticate to my Wazuh manager API, list all disconnected agents, and test my custom rule in local_rules.xml against a sample log line.

Frequently Asked Questions about implementing-endpoint-detection-with-wazuh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom Wazuh rules and decoders?▼

Write decoder and rule XML in /var/ossec/etc/rules/local_rules.xml, using rule IDs between 100000 and 120000 with a level greater than 0. Validate the logic with wazuh-logtest or the /logtest API endpoint before deploying to production.

How do I query Wazuh alerts via the REST API?▼

Authenticate with a POST to /security/user/authenticate to obtain a JWT token, then query the /alerts endpoint filtering by rule ID, severity, agent, or time range. You can also search the wazuh-alerts-* index directly.

Why is my Wazuh agent showing as disconnected or never connected?▼

This usually means port 1514/udp (or 1515/tcp for enrollment) is blocked, or the agent key is stale. Re-key the agent with manage_agents and confirm an 'Agent ... is now active' message appears in /var/ossec/logs/ossec.log.

Why is my custom Wazuh rule not firing?▼

Rules need a matching decoder that successfully extracts fields first. Run the sample log through wazuh-logtest; if Phase 2 completes decoding with no extracted fields, your decoder regex or prematch missed, so the rule never evaluates.

What are the prerequisites for using the Wazuh API?▼

You need Wazuh Manager 4.x deployed with the API enabled, Python 3.9+ with the requests library, and API credentials (username and password) for JWT authentication. Understanding of Wazuh decoder and rule XML syntax is also required.