Fix stale API, database schema and architecture reference content for syscollector
Author: RebitsCreated Sep 30, 2026Updated Oct 1, 2026
Labelslevel/taskrequest/operationaltype/documentation
Description
The syscollector module's API reference, database-schema and architecture pages document a stale Agent Sync Protocol API, wrong column and primary-key names in two CREATE TABLE statements, an incorrect minimum recovery interval, and an incomplete Supported Indices table. Found in wazuh/wazuh-qa-automation#9233 (full documentation review).
Affected documentation
- https://github.com/wazuh/wazuh/blob/6a40898c1c4ca2765d93acd3d9c4841dbc291caa/docs/ref/modules/syscollector/architecture.md#L443-L445 (internal:wazuh@6a40898)
- https://github.com/wazuh/wazuh/blob/6a40898c1c4ca2765d93acd3d9c4841dbc291caa/docs/ref/modules/syscollector/api-reference.md#L61-L181 (internal:wazuh@6a40898)
- https://github.com/wazuh/wazuh/blob/6a40898c1c4ca2765d93acd3d9c4841dbc291caa/docs/ref/modules/syscollector/database-schema.md#L99-L115 (internal:wazuh@6a40898)
- https://github.com/wazuh/wazuh/blob/6a40898c1c4ca2765d93acd3d9c4841dbc291caa/docs/ref/modules/syscollector/architecture.md#L963-L973 (internal:wazuh@6a40898)
Evidence
src/config/src/wmodules-syscollector.c,XML_INTEGRITY_INTERVALbranch:if (integrity_interval < 0 || (unsigned long)integrity_interval > UINT32_MAX)is the only bound check. Code: https://github.com/wazuh/wazuh/blob/6a40898c1c4ca2765d93acd3d9c4841dbc291caa/src/config/src/wmodules-syscollector.c. Suggested fix: Correct "Minimum: 60 seconds" to describe the actual enforced floor (effectively none/1 second), or file a code change to add the floor and keep the doc.src/shared_modules/sync_protocol/include/ipersistent_queue.hpp:21-32(realOperationenum: CREATE/MODIFY/DELETE_/NO_OP) andiagent_sync_protocol.hpp:29-34,40,84-88(realpersistDifference/synchronizeModule/notifyDataCleansignatures) vs. api-reference.md lines 93-96 (4-argpersistDifference), 61-65 (Operation::UPDATE/DELETE), 151-155 and 393-403 (bool syncModule(...)/bool notifyDataClean(...)with timeout/retries/maxEps). Suggested fix: Rewrite the "Agent Sync Protocol C++ Interface" section of this page against the currentiagent_sync_protocol.hpp, matching what utils/sync-protocol/api-reference.md and this module's own architecture.md already show.src/wazuh_modules/syscollector/src/syscollectorTablesDef.hpp:65-82(CREATE TABLE dbsync_packages(... version_ TEXT ... PRIMARY KEY (name,version_,architecture,type,path))) and lines 274-300 (dbsync_browser_extensions:package_version_ TEXT,PRIMARY KEY (browser_name, user_id, browser_profile_path, package_name, package_version_)). This page's own events.md sibling page correctly usesversion_/package_version_in its column-mapping tables. Suggested fix: Fix bothCREATE TABLEblocks to useversion_/package_version_and correct the browser_extensions primary key tobrowser_profile_path.src/wazuh_modules/syscollector/src/syscollectorImp.cpp: theSYSCOLLECTOR_SYNC_INDEX_*map (lines 131-143) includes USERS/GROUPS/SERVICES/BROWSER_EXTENSIONS alongside the 9 listed, andvalidateSchemaAndLog()is invoked with whateverindex/table the current change belongs to (line 350 and 5067), with no filtering that would exclude those four. Suggested fix: Add the missing 4 rows (dbsync_users→wazuh-states-inventory-users,dbsync_groups→...-groups,dbsync_services→...-services,dbsync_browser_extensions→...-browser-extensions) to the Supported Indices table.
Steps to reproduce
Compare each cited page section above against the linked code or configuration evidence on the current 5.0.0 branch head.
Expected behavior
Documentation matches the shipped RC1 behavior and code referenced above.
Actual behavior
Each item above is contradicted by the cited code or configuration, as detailed under Evidence.
Suggested fix
See the per-item suggested fix listed under Evidence above.
Source: wazuh/wazuh