References → Engine Audit

Overview

In releases before 2024.7.x, the Engine audit files track essential information only, including the tenant, the logged-in user, and actions performed, such as viewing or analyzing insights, applying filters, or downloading a dashboard. These details are saved on CSV files in the following location: /home/incorta/IncortaAnalytics/Tenants/<tenantName>/data/audit.

In 2024.7.x, Incorta has introduced a new enhanced version of the audit files. These files capture detailed tracking information, including the request source, service, off-heap memory used for processing the request, and task state time. The new files are saved under the /home/incorta/IncortaAnalytics/Tenants/<tenantName>/engine_audit.2.0 folder.

After upgrading to 2024.7.x, Incorta records user activities in both files by default. However, you can specify one type of them to use. In the Cluster Management Console (CMC) > Clusters > your_cluster > Server Configurations > Analytics Workload Management, for the Analytics Auditing option, specify if you want to log activities in the Standard audit files, the Enhanced ones, or Both.

Note
  • To start logging user actions in the audit files, Incorta requires at least one of the actions it tracks, such as opening a dashboard or downloading an insight, to be executed manually or via a scheduled job.
  • You can create schemas on top of these files and build dashboards to analyze the recorded details.

In 2024.7.4, a newer version of the enhanced Engine audit, engine_audit.2.1, is available with new audit files and updates to existing ones. After upgrading to this release, audit data will be stored in the /home/incorta/IncortaAnalytics/Tenants/<tenantName>/engine_audit.2.1 folder. If you have schemas reading from the old engine_audit.2.0 folder, create multi-source tables that read from both folders to maintain a complete audit history.

Standard Audit files

User activities recorded in the Standard audit files include:

  • Insight actions, such as analyzing or viewing an insight
  • Variable evaluation
  • Applying filters
  • Downloading insights or dashboards

Columns available on these files include the following:

  • Date
  • Timestamp
  • Tenant
  • User
  • Command
  • Elapsed Time (Total duration in seconds)
  • Dashboard Layout GUID
  • Parameter1 (The insight ID)
  • Parameter2 (The dashboard name)
  • Parameter3 (The query mode or source: Engine or cache)
  • Parameter4 (Filters or prompts)
  • Parameter5 (The insight name)
  • Parameter6 (The Dashboard ID)
  • Parameter7 (The Query duration in seconds)
  • Parameter8 (The run ID)

Enhanced Audit files

Folder structure

The engine_audit.2.0 folder contains four sub-folders as follows:

  • action: Files in this folder include a row for each HTTP request or Scheduler job.
  • action_details: Files in this folder include the action state updates: one row per update.
  • tasks: Files in this folder include a list of tasks included in an action: one row per task. For example, downloading a dashboard tab may contain 10 queries (insights), representing 10 tasks.
  • tasks_details: Files in this folder include the task state updates: one row per update.

In addition to the previous sub-folders, the engine_audit.2.1 folder contains the task_properties folder. Files in this folder record specific properties for each task, such as the number of measures and dimensions in the query.

The task details files in the engine_audit.2.1 folder have two additional columns: rows_count and log_message.

The following section describes the columns in each file.

Action

ColumnDescription
action_idThe action ID
user_nameThe name of the user who triggered the action
tenant_idThe tenant ID
sourceThe action source:
  ●  PRIVATE_API_RENDER
  ●  PRIVATE_API_DOWNLOAD
  ●  PRIVATE_API_SEARCH
  ●  SQI_X
  ●  SCHEDULER_RENDER
  ●  SCHEDULER_DOWNLOAD
  ●  UNDEFINED (Includes Public API, SQLi, and variable evaluation requests)
formatThe requested action format:
  ●  JSON
  ●  CSV
  ●  XLSX
  ●  UNDEFINED
isSampledA boolean represented in 1 and 0 options
modeThe requested mode from the action:
  ●  VIEW
  ●  ANALYZE
dashboard_idThe ID of the dashboard the action is related to. For some actions, such as Analyzer queries, this value is null.
dashboard_nameThe dashboard name
start_timeThe action start time
end_timeThe action end time
tasks_countThe number of tasks included in this action
termination_stateThe action termination state:
  ●  DONE
  ●  FAILED
  ●  ANOTHER_REQUEST_OVERRIDE
service_nameThe name of the service that executed the action

Action details

ColumnDescription
parent_idThe parent action ID
stateThe action state:
  ●  INITIALIZED
  ●  RUNNING
  ●  PENDING_MATCHING_RUNNING_REQUEST
  ●  SERVED_FROM_MATCHING_REQUEST_RESULT
  ●  REJECTED
  ●  DONE
  ●  FAILED
  ●  ANOTHER_REQUEST_OVERRIDE
start_timeThe state start time
durationThe state duration in Milliseconds

Tasks

ColumnDescription
action_idThe parent action ID
task_idThe task ID
insight_idThe ID of the insight related to the action. For some actions, such as Analyzer queries and searches, this value is null.
insight_nameThe insight name
task_typeThe task type:
  ●  QUERY
  ●  SEARCH
thread_idThe ID of the thread assigned to execute this task
start_timeThe task start time
end_timeThe task end time
termination_stateThe task terminal state:
  ●  DONE
  ●  FAILED

Tasks details

ColumnDescription
action_idThe parent action ID
parent_idThe parent task ID
stateThe task state.
For information about the different task states, see Task state details.
state_suffixAn identifier for the state if it is repeated in the same task
start_timeThe state start time
durationThe state duration in milliseconds
off_heap_usage_bytesThe off-heap memory used while executing the task (Doesn’t include the memory used for loading the columns)
rows_countThe number of rows. This is valid only for the following task states: FILTER, MATERIALIZE_FORMULA, GROUP_AND_AGGREGATE, and ADD_EMPTY_GROUPS.
log_messageA summary of the filter, for example, ("SALES_B.sales.CUST_STATE_PROVINCE IN_LIST AL,CA,CO,CT,FL,GE,HI,IA,IL,IN,KS,KY,MA,MD... totalSize 107")

Task state details

The following table describes the different task states, the related task type, and the parent state of each task, if any.

Task TypeStateParent StateDescription
Query, SearchINITIALIZEDTask initialization and preparation
Query, SearchQUEUEDTask queued and waiting for available running threads
Query, SearchINTERRUPTINGInterruption attempt triggered, but the task not interrupted yet
Query, SearchRENDERINGRendering the query or search in the required format: JSON, CSV, XLSX, etc.
Query, SearchSERVED_FROM_CACHEMain query or runtime view retrieved from cache
Query, SearchINTERRUPTEDTask interrupted (timeout, termination, override, etc.)
Query, SearchSUBQUERY_EXECUTIONA general state for all events that occurred during the subQuery execution
Query, SearchFINISH_SUBQUERY_EXECUTIONA general state for all events that occurred while finalizing the subQuery execution
Query, SearchRUNTIME_VIEW_EXECUTIONA general state for all events that occurred during the runtime view execution
Query, SearchFINISH_RUNTIME_VIEW_EXECUTIONA general state for all events that occurred while finalizing the runtime view execution
Query, SearchACQUIRING_METADATA_LOCKSGetting read locks for related schemas.
This state may take time if a write lock (sync) is acquired on the required schema.
Query, SearchREQUESTING_NEEDED_COLUMNSReading columns from files and storing them in memory
Query, SearchCREATE_LAYOUTA preparation step used by some queries
Query, SearchPROCESSING_SESSION_VARIABLESChecking and evaluating session variables
QueryFILTER_SUBQUERYChecking and evaluating the IN Query filter queries
QueryCANT_ACQUIRE_LOCKS_HOLD_FOR_RETRYRetrying to run the scheduler after timing out due to a sync lock
Query, SearchCHECKING_CACHEChecking if a cached version of the query is available
Query, SearchTRYING_SQL_EXECUTIONChecking if the query will be executed via the Incorta SQL engine
Query, SearchCANT_EXECUTE_VIA_SQLTask not executed via the Incorta SQL engine
Query, SearchEXECUTED_VIA_SQLRuntime view executed via the Incorta SQL engine
Query, SearchRENDERED_VIA_SQLMain query rendered via the Incorta SQL engine
Query, SearchMATERIALIZE_COLSMaterializing the result set columns in memory after executing the result set query
QueryRENDEREDQuery rendering completed
Query, SearchREJECTEDQuery rejected because the Analytics task queue exceeded the configured thresholds for Analytics Task Queue Limit Calculation (%) and Analytics Concurrent Service Max Wait Time (seconds), as set in the CMC
Query, SearchDONETask completed successfully
Query, SearchFAILEDTask failed
Query, SearchPROCESSINGTask being processed
QueryCOMPILEPROCESSINGQuery compilation
QueryFILTERPROCESSINGApplying the query filter per projection
QueryMATERIALIZE_FORMULAPROCESSINGMaterializing new columns for runtime formulas used in the aggregate table's dimensions
QueryGROUP_AND_AGGREGATEPROCESSINGGrouping the selected data and performing the required aggregation
QueryADD_EMPTY_GROUPSPROCESSINGAdding the empty groups to the query. Valid only when the Show empty groups option is enabled for a dimension in a listing or aggregated table.
QueryADD_ROOT_GROUPPROCESSINGAdding the level 0 group to the query of a listing table
QueryFILTER_GROUPSPROCESSINGFetching the groups that match the aggregate filter to apply the rollup to, and rolling out the groups that do not match the aggregate filter criteria.
QueryROLLUPPROCESSINGCalculating totals for each group
QueryGROUP_FILTERPROCESSINGCalculating and applying the aggregated filter
QueryMATERIALIZE_MEASURESPROCESSINGMaterializing the measure values, whether listed or aggregated, to the result table after all calculations are done
QueryMATERIALIZE_DIMENSIONSPROCESSINGMaterializing the dimension values to the result table after all calculations are done
QuerySORT_GROUPSPROCESSINGSorting at the group (Dimension) level
QuerySORT_DETAILSPROCESSINGSorting at the details (Measures) level
QueryGRAND_TOTALPROCESSINGCalculating the grand total
QueryCREATE_RESULT_SETPROCESSINGGenerating the result set after query execution
QueryFILTER_CACHE_EVALUATIONPROCESSINGEvaluating a shared filter
QueryFILTER_CACHE_WAITPROCESSINGWaiting for a shared filter to be served
QueryFILTER_SERVED_FROM_CACHEPROCESSINGShared filter served from cache

Task properties

ColumnDescription
action_idThe action ID
task_idThe task ID
propertyThe property key.
For information about the different task properties, see Property details.
valueThe property value

Property details

The following table shows the available task properties.

PropertyDescription
AGGREGATED_FILTERS_COUNTThe number of regular aggregated filters
AGGREGATED_FORMULA_FILTERS_COUNTThe number of formula aggregated filters
INDIVIDUAL_FILTERS_COUNTThe number of regular individual filters
INDIVIDUAL_FORMULA_FILTERS_COUNTThe number of formula individual filters
HAS_DISTINCT_FILTERSpecifies if the query has a distinct filter
MEASURES_COUNTThe number of measures
MEASURES_FILTERS_COUNTThe number of regular filters applied to measures
MEASURES_FORMULA_FILTERS_COUNTThe number of formula filters applied to measures
ROW_DIM_COUNTThe number of row dimensions in a Pivot table
ROW_DIM_SORTING_COUNTThe number of regular sorting conditions applied to row dimensions
ROW_DIM_FORMULA_SORTING_COUNTThe number of formula sorting conditions applied to row dimensions
HAS_ROW_TOTALSpecifies if the query has a row total
COL_DIM_COUNTThe number of column dimensions in a Pivot table
COL_DIM_SORTING_COUNTThe number of regular sorting conditions applied to column dimensions
COL_DIM_FORMULA_SORTING_COUNTThe number of formula sorting conditions applied to column dimensions
HAS_COL_TOTALSpecifies if the query has a column total
SORTING_COUNTThe number of regular sorting conditions
FORMULA_SORTING_COUNTThe number of formula sorting conditions
HAS_SUB_QUERYSpecifies if the query has a sub-query (result set)