PL EN
WB-9F62F920TLP:CLEARWazuh 4

Wazuh agent OS inventory: Syscollector OS versions and end of support

Collect OS versions from Wazuh 4.14 agents via Syscollector, the API and the indexer, and compare them with Ubuntu, Debian and Windows end of support dates.

Every Wazuh agent reports the name and version of its operating system to the manager, so a list of systems that need replacing does not require a separate tool. I describe where this data comes from in Wazuh 4.14, how to pull it through the API and the indexer, and how to compare it with the end of support dates published by the system vendors.

Where Wazuh gets system data

The Syscollector module on the agent collects system data. The documentation describes the data path like this: the agent sends scan results as JSON to the server, the server stores them in a separate database for each endpoint, then processes them and forwards them to the indexer as global state data. Operating system information goes to the sys_osinfo table, and in the indexer to the wazuh-states-inventory-system-* indices.

The os option in the <wodle name="syscollector"> section enables the system scan. The interval option sets how often it runs.

OptionDefault valueAllowed values
osyesyes, no
interval1ha positive number with the suffix s, m, h or d
scan_on_startyesyes, no
disablednoyes, no

Example from the documentation, limited to the options of this topic:

<wodle name="syscollector">
  <disabled>no</disabled>
  <interval>1h</interval>
  <scan_on_start>yes</scan_on_start>
  <os>yes</os>
</wodle>

interval sets the limit on how fresh the inventory is. After a system update, the agent reports the new version only at the next scan, or after a service restart when scan_on_start is yes. The other Syscollector options and its relation to vulnerability analysis are covered in the post Vulnerability Detection in Wazuh.

You can also inspect the data of a single agent directly in its database on the server. The command sqlite3 /var/ossec/queue/db/<AGENT_ID>.db opens the database, and .tables shows, among others, the sys_osinfo table.

Mapping sys_osinfo fields to the indexer index

The inventory fields documentation contains a table that maps sys_osinfo columns to index fields. Below are the fields that describe the system, with examples from the documentation.

Syscollector fieldIndexer fieldExampleAvailability
os_namehost.os.nameUbuntuall
os_versionhost.os.version16.04.5 LTS (Xenial Xerus)all
os_codenamehost.os.codenameXenial Xerusall
os_majorhost.os.major16all
os_minorhost.os.minor04all
os_patchhost.os.patch5macOS
os_buildhost.os.build14393Windows
os_releasehost.os.distribution.releaseSP2Windows
os_display_versionhost.os.full20H2Windows
os_platformhost.os.platformubuntuall
sysnamehost.os.kernel.nameLinuxLinux
releasehost.os.kernel.release4.15.0-29-genericLinux
versionhost.os.kernel.versionkernel build number with the compile dateall
nonehost.os.typeone of: linux, macos, unix, windows, ios, androidall
architecturehost.architecturex86_64all
agent_idagent.id001all
agent_nameagent.nameagent nameall
agent_versionagent.versionv4.14.0all

Two things in this table matter when comparing with support dates. The release version is split into host.os.major and host.os.minor, so you can match a system to the vendor’s cycle without parsing the host.os.version string. The host.os.full field is not the full name of the system. On Windows it carries the os_display_version value, for example 20H2.

The index template from the Wazuh repository at version 4.14.10 declares all host.os.* fields as keyword with ignore_above set to 1024. You can therefore aggregate on them directly, without the .keyword suffix.

Queries to the server API

The server API on port 55000 has three endpoints with system data. Authentication works the same way as in the inventory documentation: a JWT token fetched from /security/user/authenticate.

# Obtain a JWT (prompts for the API password)
TOKEN=$(curl -u example-user -k -X GET "https://manager.example.com:55000/security/user/authenticate?raw=true")

# OS of one agent
curl -k -X GET "https://manager.example.com:55000/syscollector/001/os?pretty=true" -H "Authorization: Bearer $TOKEN"

GET /syscollector/{agent_id}/os returns the data of one agent: an os object with the fields codename, major, minor, name, platform and version, and next to it sysname, release, the kernel version, architecture, hostname and agent_id. It accepts the select parameter.

GET /agents/summary/os has the description “Return a summary of the OS of available agents”. The example response in the specification contains a list of platform names (ubuntu), without counts. It shows which system families are present, but it does not count agents per version.

GET /agents returns the list of agents with an os object (in the specification example: arch, codename, major, minor, name, platform, uname, version). The specification defines the filters os.name, os.platform and os.version, and the select parameter, where nested fields are given with a dot. The distinct parameter has the description “Look for distinct values”.

curl -k -X GET "https://manager.example.com:55000/agents?select=id,name,os.name,os.version&os.name=Ubuntu&pretty=true" -H "Authorization: Bearer $TOKEN"

The limit parameter has a default value of 500, and the specification recommends not exceeding it. With more agents you have to paginate with offset.

The data from /agents and from /syscollector/{agent_id}/os can differ in format. In the specification examples, /agents returns version: 20.04.2 LTS, while /syscollector/{agent_id}/os returns 20.04.2 LTS (Focal Fossa). The os.* field names in both responses are also not identical to the indexer fields. To compare versions with support dates, pick one source and stick to it.

Aggregation in the indexer

The indexer is the most convenient way to summarize the whole fleet. The terms aggregation creates a “bucket for each unique term of a field”, and a sub-aggregation inside a bucket groups by a second field. The query groups agents by host.os.name and, inside that, by host.os.version. The size value defaults to 10, so I set it explicitly.

GET /wazuh-states-inventory-system-*/_search
{
  "size": 0,
  "aggs": {
    "os_name": {
      "terms": { "field": "host.os.name", "size": 50 },
      "aggs": {
        "os_version": {
          "terms": { "field": "host.os.version", "size": 50 }
        }
      }
    }
  }
}

You can enter the query in Indexer management > Dev Tools or send it with curl -k -u to port 9200 of the indexer, as in the inventory documentation. The response contains buckets with the fields key and doc_count. The sum_other_doc_count field is the sum of documents left out of the response, so a value greater than zero means you need to increase size.

For Ubuntu, grouping by host.os.name, host.os.major and host.os.minor matches the support cycle more precisely, because host.os.version also contains the point release number and the codename. After you pick the version to replace, a bool query with term clauses lists the agents, in the style of the example from the inventory documentation:

GET /wazuh-states-inventory-system-*/_search
{
  "size": 100,
  "query": {
    "bool": {
      "must": [
        { "term": { "host.os.name": "Ubuntu" } },
        { "term": { "host.os.major": "20" } },
        { "term": { "host.os.minor": "04" } }
      ]
    }
  }
}

The OpenSearch documentation notes that terms does not natively support multiple fields at once, and points to multi_terms or a script. A nested sub-aggregation gives the same breakdown without either.

For a table you can paste into a spreadsheet, jq is enough:

# Flatten the nested buckets into name, version, count
curl -s -k -u example-user "https://indexer.example.com:9200/wazuh-states-inventory-system-*/_search" \
  -H "Content-Type: application/json" -d @os-aggregation.json \
  | jq -r '.aggregations.os_name.buckets[] | .key as $n | .os_version.buckets[] | [$n, .key, .doc_count] | @tsv'

The os-aggregation.json file contains the body of the query from the first block, without the first GET line. The hosts and users in the examples are synthetic.

In the dashboard you can see the same breakdown in Security operations > IT Hygiene > System, on the OS card. The documentation describes it as a summary of the operating system and hardware for all monitored endpoints. The Dashboard card shows system families and operating systems in aggregate.

End of support dates from official pages

The dates below come only from the text of vendor pages fetched on 2026-11-16. Dates change, so check the source page before using them in a report.

Ubuntu

The Ubuntu release cycle page separates standard security maintenance from expanded security maintenance (ESM, available with Ubuntu Pro). After the release date, the table on the page lists in order: Standard security maintenance, Expanded security maintenance, Break/bug support and Legacy add-on. Below are the first two columns.

VersionReleaseEnd of standard patchingExpanded patching
16.04 LTSApril 2016April 2021May 2026 with Ubuntu Pro
18.04 LTSApril 2018May 2023May 2028 with Ubuntu Pro
20.04 LTSApril 2020May 2025May 2030 with Ubuntu Pro
22.04 LTSApril 2022May 2027May 2032
24.04 LTSApril 2024May 2029May 2034
26.04 LTSApril 2026May 2031May 2036

Debian

The Debian releases page describes the cycle as five years: three years of full support and two years of LTS. Beyond that there is a paid ELTS extension run by third-party companies. The LTS wiki page states that LTS is not run by the Debian security and release teams.

VersionReleaseEnd of support (EOL)End of LTSEnd of ELTS
11 bullseye2021-08-142024-08-142026-08-312031-06-30
12 bookworm2023-06-102026-07-112028-06-302033-06-30
13 trixie2025-08-092028-08-092030-06-302035-06-30

Windows Server

I fetched the Windows Server 2016 lifecycle page from Microsoft Learn. The system falls under the Fixed Lifecycle Policy. The dates on the page are given in Pacific Time (PT).

StageDate
Start10/15/2016
End of mainstream support1/12/2022
End of extended support1/13/2027
ESU, year 1from 1/13/2027 to 1/11/2028
ESU, year 2from 1/12/2028 to 1/9/2029
ESU, year 3from 1/10/2029 to 1/8/2030

For other Windows Server versions, check the dates on their lifecycle pages in Microsoft Learn.

Comparison procedure

This is a recommendation. The inventory documentation does not describe a comparison with end of support dates.

  1. Run the aggregation from the previous section and save the result as a table of name, version, number of agents.
  2. Prepare your own reference table: system family, version, end of support date, source page URL, date read. For Ubuntu, record the end of standard patching and the end of ESM separately, because both dates depend on whether the organization has Ubuntu Pro.
  3. Match rows by host.os.name and the host.os.major, host.os.minor pair, or by host.os.version. For each system, check what the value in the index looks like exactly before you write the matching rule. The documentation gives examples only for Ubuntu.
  4. Split the result into three groups: support already ended, ends within the chosen horizon (for example 12 months) and no risk. Mark rows without a match as unknown, not as safe.
  5. For the first and second groups, list the agents with a bool query and pass them to the system owners for a migration plan.
  6. Repeat the procedure after every change to the reference table and periodically for the data itself, because the result depends on the Syscollector interval.

A system without vendor patches stays a risk even when the vulnerability report has no entry for it. Assigning CVEs to packages is covered in the post CVE correlation with the inventory, and the priorities of known vulnerabilities in the post Vulnerability priorities from Wazuh: EPSS and CISA KEV.

What the documentation does not specify

  • Whether the wazuh-states-inventory-system-* index contains exactly one document per agent. The queries assume it does and read doc_count as the number of agents.
  • The delay between a Syscollector scan and the document appearing in the indexer.
  • The exact form of host.os.name and host.os.version for Debian and Windows. The examples in the documentation concern Ubuntu.
  • Whether the q parameter in GET /agents accepts os.* fields. The specification describes only the separate filters os.name, os.platform and os.version.
  • Whether the Vulnerability Detector uses the sys_osinfo table. The inventory documentation ties that module to the packages table.
  • A single date for Debian 12: the releases page gives EOL 2026-07-11, and the LTS wiki gives the LTS start as 2026-06-11. The table gives the dates from the releases page.

Sources

↑↓ select Enter open Esc close