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.
| Option | Default value | Allowed values |
|---|---|---|
os | yes | yes, no |
interval | 1h | a positive number with the suffix s, m, h or d |
scan_on_start | yes | yes, no |
disabled | no | yes, 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 field | Indexer field | Example | Availability |
|---|---|---|---|
os_name | host.os.name | Ubuntu | all |
os_version | host.os.version | 16.04.5 LTS (Xenial Xerus) | all |
os_codename | host.os.codename | Xenial Xerus | all |
os_major | host.os.major | 16 | all |
os_minor | host.os.minor | 04 | all |
os_patch | host.os.patch | 5 | macOS |
os_build | host.os.build | 14393 | Windows |
os_release | host.os.distribution.release | SP2 | Windows |
os_display_version | host.os.full | 20H2 | Windows |
os_platform | host.os.platform | ubuntu | all |
sysname | host.os.kernel.name | Linux | Linux |
release | host.os.kernel.release | 4.15.0-29-generic | Linux |
version | host.os.kernel.version | kernel build number with the compile date | all |
| none | host.os.type | one of: linux, macos, unix, windows, ios, android | all |
architecture | host.architecture | x86_64 | all |
agent_id | agent.id | 001 | all |
agent_name | agent.name | agent name | all |
agent_version | agent.version | v4.14.0 | all |
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.
| Version | Release | End of standard patching | Expanded patching |
|---|---|---|---|
| 16.04 LTS | April 2016 | April 2021 | May 2026 with Ubuntu Pro |
| 18.04 LTS | April 2018 | May 2023 | May 2028 with Ubuntu Pro |
| 20.04 LTS | April 2020 | May 2025 | May 2030 with Ubuntu Pro |
| 22.04 LTS | April 2022 | May 2027 | May 2032 |
| 24.04 LTS | April 2024 | May 2029 | May 2034 |
| 26.04 LTS | April 2026 | May 2031 | May 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.
| Version | Release | End of support (EOL) | End of LTS | End of ELTS |
|---|---|---|---|---|
| 11 bullseye | 2021-08-14 | 2024-08-14 | 2026-08-31 | 2031-06-30 |
| 12 bookworm | 2023-06-10 | 2026-07-11 | 2028-06-30 | 2033-06-30 |
| 13 trixie | 2025-08-09 | 2028-08-09 | 2030-06-30 | 2035-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).
| Stage | Date |
|---|---|
| Start | 10/15/2016 |
| End of mainstream support | 1/12/2022 |
| End of extended support | 1/13/2027 |
| ESU, year 1 | from 1/13/2027 to 1/11/2028 |
| ESU, year 2 | from 1/12/2028 to 1/9/2029 |
| ESU, year 3 | from 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.
- Run the aggregation from the previous section and save the result as a table of name, version, number of agents.
- 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.
- Match rows by
host.os.nameand thehost.os.major,host.os.minorpair, or byhost.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. - 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.
- For the first and second groups, list the agents with a
boolquery and pass them to the system owners for a migration plan. - 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 readdoc_countas the number of agents. - The delay between a Syscollector scan and the document appearing in the indexer.
- The exact form of
host.os.nameandhost.os.versionfor Debian and Windows. The examples in the documentation concern Ubuntu. - Whether the
qparameter inGET /agentsacceptsos.*fields. The specification describes only the separate filtersos.name,os.platformandos.version. - Whether the Vulnerability Detector uses the
sys_osinfotable. 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
- https://documentation.wazuh.com/4.14/user-manual/capabilities/system-inventory/index.html
- https://documentation.wazuh.com/4.14/user-manual/capabilities/system-inventory/viewing-system-inventory-data.html
- https://documentation.wazuh.com/4.14/user-manual/capabilities/system-inventory/available-inventory-fields.html
- https://documentation.wazuh.com/4.14/user-manual/reference/ossec-conf/wodle-syscollector.html
- https://raw.githubusercontent.com/wazuh/wazuh/v4.14.10/api/api/spec/spec.yaml
- https://raw.githubusercontent.com/wazuh/wazuh/v4.14.10/src/wazuh_modules/inventory_harvester/indexer/template/wazuh-states-inventory-system.json
- https://docs.opensearch.org/latest/aggregations/bucket/terms/
- https://ubuntu.com/about/release-cycle
- https://www.debian.org/releases/
- https://wiki.debian.org/LTS
- https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2016