Wazuh and osquery integration

Wazuh manages osquery through its osquery wodle, so agents run scheduled queries and send results back as alerts. This page covers the setup sequence, how results become alerts, and when osquery adds visibility the system inventory lacks.

On this page

Wazuh and osquery integration: what the wodle does and when to use it

Use the Wazuh osquery module when your team needs to ask endpoints questions that the system inventory does not answer, such as which processes hold listening sockets, which kernel modules are loaded or what the hardware configuration looks like across a fleet. The osquery wodle is the Wazuh mechanism for this: it manages osquery from the Wazuh agent, sets its configuration, collects the output and generates alerts from it. The minimal configuration is the <wodle name="osquery"/> element in the agent configuration, but that element only works if osquery is installed on the endpoint and the osqueryd daemon is running. Confirm both on a pilot group of Linux, Windows and macOS hosts before you roll the setting out, because a wodle that is enabled on a host without a working osquery install will not produce the visibility you planned for.

The module works in the documented way: the agent passes scheduled queries to osquery, reads the results and forwards them to the Wazuh server, where decoders and rules turn them into alerts. Wazuh's sample configuration loads packs such as osquery-monitoring, hardware-monitoring and ossec-rootkit, which is a sensible starting point, but each pack adds query load and event volume on every enrolled host. Before enabling a pack, decide which questions your analysts will act on, check the query interval against the load you can accept on production servers, and confirm the pack names and their contents against the current Wazuh osquery documentation for your release line. Packs you write yourself need the same review, and the osquery documentation on query scheduling is the place to confirm the behavior of each table you query.

Deduplication matters for alert volume. Wazuh documents that repeated reports with identical content produce only one alert, so a scheduled query that returns the same listening port every interval will not flood the dashboard, while a change in the result does create a new alert. Plan for the cases where this helps and where it hides change: a host whose result rarely varies will show one alert, and an analyst may read that as the state being stable when the query has simply stopped reporting changes. Test the full path on a known change, such as starting a test listener on a pilot host, and confirm that the alert reaches the indexer and dashboard. Osquery adds the most value for questions the inventory cannot answer, and it adds little when the inventory already covers the same ground.

Prerequisites for Wazuh osquery integration

The osquery wodle depends on three layers being ready before any configuration change: a working Wazuh deployment, osquery running on each endpoint, and a controlled way to change agent configuration. Checking these first prevents most of the silent failures teams see when osquery results never reach the dashboard.

A supported Wazuh 4.14 deployment

Confirm the Wazuh server, indexer and dashboard are running the 4.14 release line you intend to operate, and that agent versions match what the server expects. Mixed versions across the server and agents make troubleshooting harder. Record the exact release you deploy, since the Wazuh release notes list patch releases roughly every one to two months and you will want to know which build a result came from. Check the release notes before you start, because patch releases can change agent behavior.

Wazuh release notes

Agent platform coverage

The osquery module runs on the endpoints where the Wazuh agent and osquery are both available, so the first task is an inventory of target hosts by operating system and version. Wazuh agents cover Linux, Windows, macOS, Solaris, AIX and HP-UX, but osquery packaging and supported versions differ by platform. Confirm coverage for each operating system you run against the Wazuh osquery documentation rather than assuming parity across the list.

Wazuh osquery docs

osquery installed and osqueryd running

The wodle manages an existing osquery installation rather than installing it, so each target endpoint needs osquery present and the osqueryd daemon running. A daemon that is installed but stopped produces no scheduled results, and the failure does not always appear as an error on the Wazuh side. Decide who owns the osquery package lifecycle, including version pinning and updates, and whether that matches how your endpoint management tool already deploys software.

Network paths from agents to the server

Agents send the osquery output they collect to the Wazuh server, so the normal agent-to-manager communication path must be open and stable before you add scheduled queries. Confirm that segments with restrictive egress, proxies or NAT allow the agent connection to the server. Plan for bandwidth as well, because a query set that returns large result sets on many endpoints adds traffic on top of routine agent telemetry. Test with one endpoint before you widen the group.

Change control for agent configuration

The osquery wodle is set in the agent configuration, so changes are effectively changes to what runs on every endpoint in the group. Treat the agent configuration and any osquery packs as versioned artifacts with a named approver, a rollback plan and a test group. Record who may edit shared configuration and how changes are staged across groups. Without this, a single incorrect query can generate noise or load across the whole fleet.

Wazuh osquery docs

Confirm versions for your endpoints

Before you finalize the plan, check the osquery package versions and Wazuh agent versions against the Wazuh documentation for your own endpoints, not against a generic list. Record the exact combination in your change record so that a later upgrade can be traced to a known-good state. Ask your Wazuh and osquery support contacts to confirm any version you plan to use that is not explicitly documented for your operating system.

How to configure the osquery wodle step by step

This sequence takes osquery from one installed daemon on a test endpoint to a managed query set that is distributed to a group and produces alerts in the Wazuh dashboard. Each step ends with a check you can run before you widen the rollout. Follow it in a lab or pilot group first.

  1. Install osquery and confirm osqueryd runs

    Install osquery on one test endpoint using the package method your operating system team already trusts for managed software. Confirm that the osqueryd daemon is running and set to start at boot, because the Wazuh osquery module depends on this daemon to produce output. Run a simple interactive query on the host to confirm it returns rows. This step is done when the service reports active and the query works. If osqueryd is not running, the module has nothing to manage and no results will reach Wazuh, so resolve this before you change any Wazuh configuration.

  2. Confirm the test agent reports to the server

    Before you change anything in Wazuh, check that the test endpoint's agent is enrolled, connected and reporting to the Wazuh server. The agent should show as active in the dashboard with its software inventory populated. Recording this baseline lets you separate osquery problems from general agent problems later. This step is done when the agent shows as active and the host's inventory views contain data.

  3. Add the minimal osquery wodle block

    On the test agent, add the minimal block <wodle name="osquery"/> to the agent configuration file for its operating system, which is ossec.conf on Linux agents. The block tells the agent to manage osquery, set its configuration, collect its output and generate alerts. Restart the agent so it reads the change. This step is done when the agent log shows the osquery module starting without configuration errors. Review the Wazuh osquery integration guide for optional settings before you add anything beyond the minimal block.

  4. Verify osquery output reaches the dashboard

    Wait for the agent to complete its first collection cycle, then look for osquery results for the test host in the dashboard. Confirm that each result carries the agent name and the query name, so you can trace it to a specific endpoint and query. If nothing appears, check the agent log for errors from the osquery module and confirm that osqueryd is still running. This step is done when at least one osquery result is visible for the test host and you can trace it to a named query.

  5. Move the wodle block into group configuration

    After the test host behaves as expected, move the osquery block into the shared configuration for an agent group so every member receives the same settings. The Wazuh server manages agent configuration remotely and pushes it to group members. Remove the local block from the test agent so it does not conflict with the group setting. Confirm that osqueryd is installed on every host in the group, because the module cannot manage an install that is missing. This step is done when a second agent in the group receives the configuration and reports osquery output.

  6. Load a sample pack such as osquery-monitoring

    Add one sample query pack to the group configuration. Wazuh's sample configuration loads packs such as osquery-monitoring, hardware-monitoring and ossec-rootkit. Start with one pack and review its queries against your environment, because each query runs on every group member and its output adds to your event volume. Enable the other packs only after the first one behaves as expected. This step is done when the pack's queries return results for group members and appear in the dashboard under their query names.

  7. Test deduplication and alert behavior

    Run a controlled test on the lab host to prove the alert path works. Make a small, reversible change that a query in your pack will detect, such as installing a test package, and confirm that an alert is generated. Then leave the state unchanged and confirm that repeated reports with identical content do not create new alerts, since Wazuh's sample configuration produces one alert for identical repeated reports. This step is done when you can name the rule that fired, the host and the query, and an unchanged report produced no new alert. Reverse the test change afterward.

How osquery results become alerts and avoid duplicates

The key thing to understand is that the Wazuh osquery module does not alert on every query run. The module manages osquery on each agent, sets its configuration, and collects the output of the scheduled queries that the configuration loads. Packs such as osquery-monitoring, hardware-monitoring and ossec-rootkit, which the Wazuh sample configuration loads, are groups of scheduled queries, and each query returns a result set on its interval. Wazuh then decodes that output and generates alerts from it. Before you rely on any alert, confirm in the osquery documentation of Wazuh how the query results are mapped to rules in your version, and check the rule IDs that fire on your agents in the Wazuh dashboard.

The documented deduplication behavior is that repeated reports with identical content produce only one alert. This has a direct consequence for planning. A query whose result set stays the same will alert once and then stay quiet, but any change in the returned rows produces a new alert. A query that lists running processes, listening ports or logged-in users can therefore generate alerts on almost every cycle on busy hosts. Before you widen a pack, estimate how often each query's output changes on a typical host, and decide whether a changing result set is a signal you want or noise you need to tune out with rules or a narrower query.

Test pack content on a small, representative group of agents before a wider rollout. Use an agent group in Wazuh so the test set is controlled and easy to change, and include at least one host of each operating system you run. Watch the alert volume and the rule IDs for a full business cycle, not just a few minutes, because scheduled queries that look quiet at first can change with patching, logins or scheduled jobs. Ask your Wazuh administrators to confirm the query interval and the reporting behavior for your version, and agree in writing who reviews the first alert set and who approves moving a pack from the test group to production.

Choosing packs and scheduled queries by visibility goal

The osquery-monitoring pack is the sample pack most teams start with when they want a broad view of what is running on a host. It runs scheduled queries against process lists, open sockets, logged-in users, listening ports and similar state, and it answers questions such as which processes hold network connections or which accounts are active right now. Because the results are time-based snapshots, the value comes from change over time rather than from any single report.

  • Process and socket visibility: Queries over running processes and open network connections show what talks to the network and which binaries are responsible.
  • Account and session state: Logged-in user and account queries help you spot unexpected sessions on servers that should have few.
  • Diff-based review: Compare results across hosts and across runs to find outliers instead of reading every row.
  • Scope control: Disable individual queries in the pack that duplicate telemetry you already collect through Wazuh log analysis or the system inventory.
  • Baseline first: Record normal output for a representative host group before you treat any change as suspicious.

Before enabling this pack in production, confirm with a test group which queries return data on your operating systems, since column availability differs by platform.

How osquery data flows from endpoint to Wazuh alerts

The flow starts on the endpoint, where osqueryd runs queries and the Wazuh agent's osquery wodle manages its configuration and collects the output. Results cross the trust boundary to the Wazuh server, which applies decoders and rules to decide what becomes an alert. The Wazuh indexer stores those alerts and the Wazuh dashboard is where analysts review them. When checking the setup, confirm that osqueryd is running on each endpoint and that alerts appear in the dashboard as expected.

Data path from osqueryd on the endpoint to analyst review in the dashboard.

Mapping osquery output fields to Wazuh alert data

This table maps each part of an osquery result to where it appears in a Wazuh alert, so analysts know which fields to filter and correlate on. Read it as a starting point: confirm exact field names and decoder behavior in your installed version before writing searches or rules, and record any custom decoder or rule changes you make.

Alert elementWhere it comes fromHow analysts use it
Query or pack nameThe name of the scheduled query or pack that produced the result, as set in the osquery configuration on the agentGroup alerts by query to see which detection or inventory check fired; confirm the exact field name in your version
Endpoint identityThe Wazuh agent that forwarded the result, including agent name, ID and group membershipPivot to the host and its agent group; confirm whether hostname from osquery output is also carried into the alert
Result columnsThe columns returned by osquery for each row, such as process, user, port or file attributesFilter on specific columns to narrow results; check how decoders map each column to a data field
Action or change typeThe osquery action recorded for a differential result, such as added or removed rowsSeparate new findings from routine repeats; confirm how the action value is named in your version
Timestamp and host timeThe time the query ran on the endpoint compared with the time the Wazuh server received the eventBuild timelines from the endpoint time; account for delays when the agent was offline
Deduplication keyIdentical report content produces one alert, so the content of the result drives whether a repeat is suppressedExpect repeated unchanged results to be quiet; verify this behavior against a test query before relying on it
Custom decoder or rule changesAny local decoders or rules you add to match osquery fieldsDocument each change with its owner and reason so upgrades and reviews can reproduce it

Security settings for osquery on Wazuh agents

osquery turns endpoints into queryable sources, so what you schedule and who can change it defines your exposure. The cards below cover query design, change control over agent group configuration, protection of the wodle definition and the checks that catch gaps in rootkit and integrity coverage.

Design queries for least privilege

Schedule only the tables your detections need. Queries that read file contents, shell history, environment variables or credential-adjacent paths can copy sensitive data into Wazuh alerts and the indexer. Review each query in a pack before enabling it, and ask whether the result needs the full row or only a count, a hash or a path. Test on a non-production group first to see what lands in the alert data. Confirm which osqueryd privileges each platform requires, since a broader privilege level widens what a compromised agent can read.

Control who changes group configuration

Agent group configuration decides which packs and wodle settings reach each endpoint, so editing it is a change to your monitoring coverage. Restrict edit rights in the Wazuh dashboard and API to the people who own detection content, and require a review step for changes to osquery settings. Record who changed which group and when, and compare the effective configuration on a sample agent after each change to confirm the intended packs loaded.

Protect the osquery wodle definition

The minimal wodle entry, <wodle name="osquery"/>, sits inside the agent configuration that the server pushes. Anyone who can alter that file can disable collection, point results at a different path or add queries that run on every endpoint. Keep the configuration in version control, restrict write access on the manager, and monitor changes to the file itself. Verify after each change that osqueryd is still running and that results still arrive.

Review rootkit and integrity queries

Packs such as ossec-rootkit and the integrity-related queries add checks that the default inventory does not provide, but they only report what the queries can see. A query that misses a hidden process, a modified system binary or a kernel module will show no alert, and that silence looks the same as a clean host. Compare results with system inventory and file integrity monitoring on a known-compromised test host, and document which checks are known gaps on each operating system.

Confirm osqueryd permissions per platform

osqueryd runs with different privileges across Linux, Windows and macOS, and some tables need elevated access to return complete data. Before you grant broader access, confirm in the osquery documentation what each platform needs and what the Wazuh agent runs as. Keep the privilege level as low as the chosen packs allow, and recheck after each osquery or Wazuh upgrade, because defaults can change between releases.

Wazuh osquery docs

Common osquery integration failures and fixes

This table pairs each common osquery failure in a Wazuh deployment with its likely cause and the check to run first. Read it top to bottom when results are missing, noisy or unexpectedly absent from the dashboard. The main takeaway is that most problems sit in three places: the osqueryd service on the endpoint, the agent group configuration, and how repeated results are deduplicated.

SymptomLikely causeCheck to run
No osquery results from any agentosquery is not installed, or osqueryd is not running on the endpointConfirm osqueryd is installed and running as a service on the endpoint, and that the osquery wodle is active in the agent's effective configuration
osquery wodle missing on some agentsThe wodle block was added to a group that the affected agents do not belong to, or to a file the agent does not loadCheck group membership for each agent, then confirm the <wodle name="osquery"/> block appears in the merged configuration the agent receives
Scheduled queries run but no output reaches the serverAgent cannot reach the Wazuh server, or the agent was not restarted after configuration changedCheck agent connection status in the dashboard, review agent logs for send errors, and restart the agent after changes to confirm the new configuration loaded
Alert flood from a query whose results change oftenA query returns volatile fields such as timestamps, process IDs or counters, so every run looks newReview the query's columns, remove volatile fields or narrow the query, and confirm alert volume drops in a short test window
Expected alert never appearsDeduplication suppressed a report whose content matched an earlier one, or the rule level is below the alerting thresholdCompare the raw output of consecutive runs, confirm whether the content changed, and check the rule that should fire at the expected level
Results show on one endpoint but not in the dashboard viewAgent is enrolled but the dashboard filter or time range excludes it, or the query name differs from the rule expectedSearch archived events for the agent ID and query name, then verify the time range and filters used in the dashboard
Query fails with errors in the outputThe query uses a table unavailable on that operating system or osquery versionRun the same query locally with osqueryi on a similar endpoint and confirm the table exists for that platform and version

When osquery adds visibility the system inventory lacks

Decide question by question whether the Wazuh system inventory already answers it before you turn on osquery. Wazuh's inventory and vulnerability detection correlate the software inventory that agents collect from endpoints with vulnerability data from the Wazuh Cyber Threat Intelligence (CTI) platform or an offline repository. For questions such as which packages are installed and which of them have known vulnerabilities, that correlation is usually the right source, and adding osquery for the same answer only duplicates data and alerts.

osquery earns its place when the question is about live state or a condition the inventory does not record. Typical examples are which processes are listening on which ports right now, which users are logged in, what a kernel module list looks like, or whether a configuration file has changed in a way your rules must catch. Write each of these as a named query, decide whether it is a one-off investigation query or a scheduled query, and confirm that the result set is small enough to alert on without flooding the dashboard. Scheduled queries and the packs in Wazuh's sample configuration, such as osquery-monitoring, hardware-monitoring and ossec-rootkit, are a starting point to review, not a list to enable wholesale.

If endpoints sit in networks without internet access, check the vulnerability data path before you plan any osquery work. Wazuh vulnerability detection can use an offline vulnerability repository instead of the CTI platform, and the Wazuh offline installation guide covers systems without internet connectivity. Confirm with your own environment team how the repository will be updated, who approves the transfer and how often it is refreshed, because a stale repository weakens the inventory answer regardless of what osquery adds.

Questions buyers ask about Wazuh osquery integration

What does a Wazuh osquery integration cost, and what drives it up?

The cost is mostly the people time to plan, configure, test and tune osquery across your endpoints, and it is usually a one-time build followed by recurring tuning. The main drivers are endpoint count, the mix of operating systems, how many custom queries you need beyond the bundled packs, and how much alert tuning your team expects. Each added platform means more query validation, and each custom query means more testing against real output. Software licensing is not the driver here, since the self-hosted Wazuh software has no license fee. For a quote, ask for the scope split into discovery, configuration, query design, testing, handover and retainer support, with the endpoint groups and platforms named explicitly.

How long does a pilot take to reach stable osquery alerting?

No duration is fixed by the Wazuh documentation, so the honest answer depends on the pilot's scope. A pilot usually needs time to confirm that osqueryd is running on test endpoints, that the wodle loads the packs you chose, that results arrive at the server, and that repeated reports are deduplicated as expected. Stable alerting also needs a period of tuning, because noisy queries and expected changes on endpoints generate alerts that must be filtered. Ask your partner or internal lead to write the pilot exit criteria before starting, such as a set of expected alerts reproduced on a test group, and agree the timeline in writing.

What must our team provide before osquery work starts?

Your team needs to supply access to a representative set of endpoints, change approval for installing osquery and changing agent configuration, and a test group that can tolerate query load and early alert noise. You also need named owners for the Wazuh server, the agent groups and the alert review process. Before work begins, confirm which endpoints may run osqueryd, which packs are acceptable under your policies, where the configuration will be stored, and who approves changes to shared agent groups. Missing approvals are a common cause of delays, so schedule them alongside the technical plan.

Can our internal security team deploy osquery with Wazuh on its own?

Yes, a team with Linux or Windows administration skills and some Wazuh experience can install osqueryd, enable the osquery wodle with the minimal configuration, and load the documented sample packs. The harder work is query design, alert tuning and operating the results over time, which requires familiarity with osquery tables and with Wazuh rules and decoders. Ask whether your team has someone who can read osquery output, test changes on a group before rollout and maintain agent configuration as platforms change. If that capacity is limited, a fixed-scope build with handover documentation is an option to compare against internal effort.

Does osquery replace the Wazuh system inventory?

No. The Wazuh system inventory already collects core data from agents, and osquery adds visibility that the inventory does not provide, such as custom queries against specific tables, scheduled checks for particular configurations, and reports from packs you define. Use the inventory as the baseline and osquery where you need a question answered that the inventory does not cover. Confirm the exact fields in the system inventory and the osquery tables on your target operating systems in the Wazuh documentation before deciding which data source covers each requirement.

Why do osquery reports sometimes produce fewer alerts than expected?

Wazuh's sample configuration notes that repeated reports with identical content produce only one alert, so an unchanged result will not generate a new alert each time it runs. This is useful for reducing noise, but it means you must design queries so that meaningful changes alter the output. If an expected alert is missing, check that osqueryd is running, that the query ran on the schedule you set, that the result differs from the previous run, and that a rule matches the output. Test each custom query on a group before relying on it.

What does the osquery module not cover?

The osquery module manages osquery on agents, sets its configuration, collects output and generates alerts. It does not design your detection logic for you, decide which queries are worth running, or replace investigation work. It also depends on osquery being installed and running on each endpoint, so platforms without a supported build or with restricted installs need a separate plan. Confirm with the Wazuh osquery documentation which operating systems and osquery versions are supported in your environment, and plan any endpoints outside that scope with a different monitoring approach.

Does DeployOpen handle the osquery integration for us?

DeployOpen plans, implements, customizes, documents and supports self-hosted open-source platforms in infrastructure you control, so osquery configuration and tuning on a Wazuh deployment fits that kind of work. Engagements are normally fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and ongoing tuning can be covered by a retainer. DeployOpen does not publish a price list, so ask for a quote based on your written scope, endpoint platforms and the number of custom queries.

How DeployOpen works on this

DeployOpen plans and builds the osquery module on Wazuh agents inside your own infrastructure, starting from a written scope that names the hosts, query packs and alert paths involved. Each step ends with documentation your Wazuh operators can maintain after handover.

How we scope

  • Inventory which endpoints run osqueryd and which operating systems the query set must cover
  • Agree which visibility gaps osquery should fill beyond the existing Wazuh system inventory
  • Define which packs load, which results raise alerts and which are collected for hunting only
  • Record the written scope, deliverables and timeline before any configuration change starts

How we build

  • Install and verify osqueryd on a pilot group, then add the minimal wodle configuration
  • Write and tune scheduled queries and packs, checking output volume and identical-result deduplication
  • Map each result type to a rule or alert path and test it with representative endpoint data
  • Apply configuration through agent groups so changes are versioned and reversible

How we hand over

  • Deliver a runbook covering query inventory, pack ownership, schedule changes and rollback steps
  • Document how osquery alerts are deduplicated, filtered and routed to your team
  • Walk your operators through verification checks they can repeat after future Wazuh upgrades
  • Provide a test record showing expected results on each endpoint group before sign-off

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover
  • Review osquery pack changes when Wazuh release updates or new agent versions are applied
  • Confirm your osquery version compatibility with current Wazuh 4.14 patch releases before rollout
  • Retest alert quality after query changes so noise does not grow unnoticed over time

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.