Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
rgmartinezdezayas
Contributor II
Contributor II

Download audit files using command line

Hello,

What is the repctl command to download the audit files as CSV instead of using the QEM UI?

 

Thanks in advance.

Regards.

Labels (3)
1 Solution

Accepted Solutions
Alan_Wang
Support
Support

Hi @rgmartinezdezayas 

QEM does not currently have an API to retrieve audit files. If you would like this feature, please submit a feature request in our ideation forum.

https://community.qlik.com/t5/Ideation/ct-p/qlik-product-insight

Repctl commands are not officially supported unless specified in the user guide. There are no repctl commands to generate user action history in Replicate either. The Audit Trail feature is exclusive to QEM. 

You can generate audit details for a certain task with this repctl command, but note that this repctl command is not supported with any investigations should you run into any issues with the unofficial API.

command gettaskaudit:
    request arguments:

    task_name:required string
    event_type:optional enum, valid values: 
            01 - AUDIT_TYPE_ALL
            02 - TASK_START
            03 - TASK_START_FRESH
            05 - TASK_STATUS_CONSISTENT
            06 - TASK_TERMINATED
            07 - TASK_STOP
            51 - TASK_FULL_LOAD_STARTED
            52 - TASK_FULL_LOAD_FINISHED
            53 - TASK_TABLE_LOAD_STARTED
            54 - TASK_TABLE_LOAD_FINISHED
            55 - TASK_TABLE_LOAD_ERROR
            101 - TASK_CDC_STARTED
            102 - TASK_CDC_OPENED_TRANS_FINISHED
            103 - TASK_TABLE_CDC_STARTED
            104 - TASK_CDC_UNLOCKED
            151 - TASK_CMD_START
            152 - TASK_CMD_PAUSE
            153 - TASK_CMD_RESUME
            1001 - NOTIFICATION
            1002 - ERROR_GENERAL
            1003 - WARNING_GENERAL
            1004 - TASK_TABLE_RESET_DATA_ERROR_COUNT

    event_group:optional enum, valid values: 
            01 - AUDIT_GROUP_ALL
            02 - TASK_STATUS
            03 - TASK_FULL_LOAD
            04 - TASK_CDC
            05 - TASK_COMMANDS
            06 - TASK_NOTIFICATIONS

    last_seq_num:optional int32
    since_timestamp:optional string
    component:optional string
    table:optional string
    max_events:optional int32
    last_fresh_start_time:optional int64

    response arguments:
    events:repeated structure {
        seq_num:required int32
        event_type:required enum, valid values: 
                01 - AUDIT_TYPE_ALL
                02 - TASK_START
                03 - TASK_START_FRESH
                05 - TASK_STATUS_CONSISTENT
                06 - TASK_TERMINATED
                07 - TASK_STOP
                51 - TASK_FULL_LOAD_STARTED
                52 - TASK_FULL_LOAD_FINISHED
                53 - TASK_TABLE_LOAD_STARTED
                54 - TASK_TABLE_LOAD_FINISHED
                55 - TASK_TABLE_LOAD_ERROR
                101 - TASK_CDC_STARTED
                102 - TASK_CDC_OPENED_TRANS_FINISHED
                103 - TASK_TABLE_CDC_STARTED
                104 - TASK_CDC_UNLOCKED
                151 - TASK_CMD_START
                152 - TASK_CMD_PAUSE
                153 - TASK_CMD_RESUME
                1001 - NOTIFICATION
                1002 - ERROR_GENERAL
                1003 - WARNING_GENERAL
                1004 - TASK_TABLE_RESET_DATA_ERROR_COUNT

        event_group:required enum, valid values: 
                01 - AUDIT_GROUP_ALL
                02 - TASK_STATUS
                03 - TASK_FULL_LOAD
                04 - TASK_CDC
                05 - TASK_COMMANDS
                06 - TASK_NOTIFICATIONS

        timestamp:required int64
        timestamp_str:required string
        component:optional string
        table:optional structure {
            id:optional int32
            owner:optional string
            name:optional string
            estimated_size:optional int64
            orig_db_id:optional int32
            flags:optional int32
            src_flags:optional int32
            ct_name:optional string
            partition_ids:repeated uint64
            first_manipulation_id:optional int32
            last_manipulation_id:optional int32
            version:optional int64
            table_type:optional int32
            description:optional string
            load_order:optional int64
        }
        counter:optional int32
        status_code:optional int32
        status_text:optional string
        status_desc:optional string
    }
    last_seq_num:optional int32
    last_fresh_start_time:optional int64

 

If the issue is solved please mark the answer with Accept as Solution.

View solution in original post

1 Reply
Alan_Wang
Support
Support

Hi @rgmartinezdezayas 

QEM does not currently have an API to retrieve audit files. If you would like this feature, please submit a feature request in our ideation forum.

https://community.qlik.com/t5/Ideation/ct-p/qlik-product-insight

Repctl commands are not officially supported unless specified in the user guide. There are no repctl commands to generate user action history in Replicate either. The Audit Trail feature is exclusive to QEM. 

You can generate audit details for a certain task with this repctl command, but note that this repctl command is not supported with any investigations should you run into any issues with the unofficial API.

command gettaskaudit:
    request arguments:

    task_name:required string
    event_type:optional enum, valid values: 
            01 - AUDIT_TYPE_ALL
            02 - TASK_START
            03 - TASK_START_FRESH
            05 - TASK_STATUS_CONSISTENT
            06 - TASK_TERMINATED
            07 - TASK_STOP
            51 - TASK_FULL_LOAD_STARTED
            52 - TASK_FULL_LOAD_FINISHED
            53 - TASK_TABLE_LOAD_STARTED
            54 - TASK_TABLE_LOAD_FINISHED
            55 - TASK_TABLE_LOAD_ERROR
            101 - TASK_CDC_STARTED
            102 - TASK_CDC_OPENED_TRANS_FINISHED
            103 - TASK_TABLE_CDC_STARTED
            104 - TASK_CDC_UNLOCKED
            151 - TASK_CMD_START
            152 - TASK_CMD_PAUSE
            153 - TASK_CMD_RESUME
            1001 - NOTIFICATION
            1002 - ERROR_GENERAL
            1003 - WARNING_GENERAL
            1004 - TASK_TABLE_RESET_DATA_ERROR_COUNT

    event_group:optional enum, valid values: 
            01 - AUDIT_GROUP_ALL
            02 - TASK_STATUS
            03 - TASK_FULL_LOAD
            04 - TASK_CDC
            05 - TASK_COMMANDS
            06 - TASK_NOTIFICATIONS

    last_seq_num:optional int32
    since_timestamp:optional string
    component:optional string
    table:optional string
    max_events:optional int32
    last_fresh_start_time:optional int64

    response arguments:
    events:repeated structure {
        seq_num:required int32
        event_type:required enum, valid values: 
                01 - AUDIT_TYPE_ALL
                02 - TASK_START
                03 - TASK_START_FRESH
                05 - TASK_STATUS_CONSISTENT
                06 - TASK_TERMINATED
                07 - TASK_STOP
                51 - TASK_FULL_LOAD_STARTED
                52 - TASK_FULL_LOAD_FINISHED
                53 - TASK_TABLE_LOAD_STARTED
                54 - TASK_TABLE_LOAD_FINISHED
                55 - TASK_TABLE_LOAD_ERROR
                101 - TASK_CDC_STARTED
                102 - TASK_CDC_OPENED_TRANS_FINISHED
                103 - TASK_TABLE_CDC_STARTED
                104 - TASK_CDC_UNLOCKED
                151 - TASK_CMD_START
                152 - TASK_CMD_PAUSE
                153 - TASK_CMD_RESUME
                1001 - NOTIFICATION
                1002 - ERROR_GENERAL
                1003 - WARNING_GENERAL
                1004 - TASK_TABLE_RESET_DATA_ERROR_COUNT

        event_group:required enum, valid values: 
                01 - AUDIT_GROUP_ALL
                02 - TASK_STATUS
                03 - TASK_FULL_LOAD
                04 - TASK_CDC
                05 - TASK_COMMANDS
                06 - TASK_NOTIFICATIONS

        timestamp:required int64
        timestamp_str:required string
        component:optional string
        table:optional structure {
            id:optional int32
            owner:optional string
            name:optional string
            estimated_size:optional int64
            orig_db_id:optional int32
            flags:optional int32
            src_flags:optional int32
            ct_name:optional string
            partition_ids:repeated uint64
            first_manipulation_id:optional int32
            last_manipulation_id:optional int32
            version:optional int64
            table_type:optional int32
            description:optional string
            load_order:optional int64
        }
        counter:optional int32
        status_code:optional int32
        status_text:optional string
        status_desc:optional string
    }
    last_seq_num:optional int32
    last_fresh_start_time:optional int64

 

If the issue is solved please mark the answer with Accept as Solution.