#39758·wazuh

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

Evidence

  • src/config/src/wmodules-syscollector.c, XML_INTEGRITY_INTERVAL branch: 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 (real Operation enum: CREATE/MODIFY/DELETE_/NO_OP) and iagent_sync_protocol.hpp:29-34,40,84-88 (real persistDifference/synchronizeModule/notifyDataClean signatures) vs. api-reference.md lines 93-96 (4-arg persistDifference), 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 current iagent_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 uses version_/package_version_ in its column-mapping tables. Suggested fix: Fix both CREATE TABLE blocks to use version_/package_version_ and correct the browser_extensions primary key to browser_profile_path.
  • src/wazuh_modules/syscollector/src/syscollectorImp.cpp: the SYSCOLLECTOR_SYNC_INDEX_* map (lines 131-143) includes USERS/GROUPS/SERVICES/BROWSER_EXTENSIONS alongside the 9 listed, and validateSchemaAndLog() is invoked with whatever index/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.