Top.Mail.Ru
Data Storage Structure in ClickHouse
CTRL+K

Data Storage Structure in ClickHouse

In this article
  • Data Storage Structure in ClickHouse
  • The "monitoring_activity" table
  • The monitoring_agent_inspector_log table

All described tables are created using the ReplacingMergeTree engine.

Warning

Do not modify the monitoring data tables main.monitoring_activity and main.monitoring_agent_inspector_log. Doing so may cause critical system failures and data loss.

The "monitoring_activity" table

This table stores information about user activity. The default path to access the table is main.monitoring_activity.

Columns are marked with and to indicate presence or absence depending on the monitoring type.

Column NameTypeDescriptionBasic MonitoringAdvanced Monitoring
agent_versionStringMonitoring agent version
computer_nameStringComputer name
cpu_loadingUInt32CPU usage value in percent (from 0 to 100)
domainStringDomain name
element_ctrlUInt8Control type of the element specified in element_name
element_hotkey_nameStringMenu item name
element_nameStringName of the element (e.g., button or checkbox) with type 10 or higher
employee_account_idUInt64Identifier of the EmployeeAccount entity in the built-in file-based database of the monitoring module
executable_pathStringFull path to the executable file
file_nameStringName of the open file; can be empty
file_pathStringFull path to the open file; can be empty
idUInt64Identifier of the domain entity in the built-in file-based database
input_typeUInt8Indicates the type of activity: 1 — hardware-based, 0 — software-based
location_nameArray(String)Window hierarchy
location_typeArray(UInt32)Window type
main_windowStringWindow title
memory_loadingUInt32Memory usage value in percent (from 0 to 100)
parameters_nameArray(String)Name of the element from which the value was obtained
parameters_typeArray(UInt32)Element type
parameters_valueArray(String)Field value may be displayed in plain text if it is a special field (e.g., Organization) or if hashing is disabled; otherwise, it is displayed as a hash in the format crc32:<32-bit_number>
parameters_is_currentArray(UInt8)Value 1 for the currently edited field and all its extracted parameters; value 0 for non-edited fields
programStringName of the running program
research_idUInt64Research ID for which the screenshot was taken
screenshot_idStringScreenshot identifier
tabStringMain window tab; can be empty
time_offsetInt8Time zone (offset in hours from UTC time)
timeDateTime64User-initiated event time, represented as a calendar date and time with millisecond and nanosecond precision
typeInt16Event type
url_pathStringURL path after the domain
versionStringVersion of the running program

Columns present in basic monitoring are not always filled simultaneously. For each event (except types 1 — start, 2 — stop, and 3 — crash), the following columns are populated:

  • id
  • time
  • employee_account_id
  • time_offset
  • program
  • version
  • executable_path
  • type
  • input_type
  • computer_name
  • agent_version

Depending on the program type, the following additional columns may be filled in basic monitoring:

  • Browsers: main_window, domain, and url_path
  • Document processing applications (e.g., Microsoft Office): file_path and file_name
  • Other desktop applications: main_window

If the monitoring agent captures a window identifier or an Excel sheet name in the parameters_name column, the following columns may also be filled in basic monitoring:

  • parameters_name
  • parameters_value
  • parameters_is_current
  • parameters_type

In addition to the default path main.monitoring_activity, automation scripts can use the variable activity_table, which stores the path to the monitoring_activity table. This allows the system to automatically generate the correct table path when infrastructure changes, minimizing the risk of errors. Scripts can reference the table by substituting the variable directly into a query or code.

The value of the activity_table variable is defined in the configuration file com.operavix.subsystem.monitoring.json using the parameters monitoring_database_name and storage_guid.

The monitoring_agent_inspector_log table

This table stores technical logs from monitoring agents, transmitted from workstations to the application server. These logs are used for initial diagnostics of monitoring agent issues. The default path to access the table is main.monitoring_agent_inspector_log.

FieldTypeDescription
time_offsetInt8Time offset (UTC)
timeDateTime64(3, UTC)UTC time in seconds
levelStringLogging level
pidInt32Process ID, 32-bit integer
tidInt32Thread ID, 32-bit integer
functionStringName of the function in the code where the message was logged
messageStringLog text (logging levels: "info", "warning", "error", "critical")
machine_guidStringMachine ID (OS-dependent), used to identify the specific workstation from which the activity originated
agent_versionStringAgent version
remote_addressStringIP address of the client, represented as a string
computer_nameStringComputer name taken from the manifest.json file in the activity archive
employee_account_idUInt64Identifier of the EmployeeAccount entity in the built-in file-based database of the monitoring module
type_logStringType of activity logs:
inspector – inspector logs;
service – SYSTEM service logs;
timetracking – timetracking logs
row_numberUInt64Sequential record number in the table

By default, data is retained for 14 days. This retention period can be changed via the partition_life_circle_time parameter in the com.operavix.subsystem.monitoring.json configuration file.

Was the article helpful?

Yes
No
Previous
Creating User Accounts in ClickHouse
We use cookies to improve our website for you.