ci-server-engineer/examples/CI-Eng-Sample/19_audit_df.qli
2026-10-01 17:15:27 +10:00

42 lines
1.5 KiB
Text

@LANGUAGE
ENGLISH
@VERSION
1.03.00
! CI-Eng-Sample audit trail examples, CI Server R1.03.00. Load after 18_report_df.
! CIENG_ITEMS : AUDIT Service selection group = events on CI-Eng-Sample objects. Expressions
! have no LIKE: a name prefix is matched with >= "CI-Eng-Sample." and
! < "CI-Eng-Sample/" ('/' sorts right after '.'). COMPILE 1 compiles on load;
! the result is in LISTING and VALID_EXPRESSION.
! CIENG_AUDIT : ad-hoc report of the audit events on CI-Eng-Sample of the last hour.
@FIELDS
NAME,DESCRIPTION,EXPRESSION,COMPILE
@AUDIT_SELGRP_DF
"CIENG_ITEMS","Audit events on CI-Eng-Sample",@"
sbid >= "CI-Eng-Sample." and sbid < "CI-Eng-Sample/"
"@,1
@FIELDS
NAME,DESCRIPTION,PRIORITY,ADHOC_ENABLED,LIFE_TIME,ADHOC_DEST,QUERY
@REPORT_DF
"CIENG_AUDIT","CI-Eng-Sample audit trail, last hour",0,1,"1 Weeks","CIENG_FILE",@"
/* Who changed what on CI-Eng-Sample in the last hour */
set @width 160;
column t as 'DD-MM-YYYY hh:mm:ss' heading 'Time';
column grp as 'A12' heading 'Subject';
column attr as 'A16' heading 'Attribute';
column act as 'A8' heading 'Action';
column src as 'A12' heading 'Source';
column id as 'A32' heading 'Name';
column usr as 'A18' heading 'User';
column ov as 'A12' heading 'Old';
column nv as 'A12' heading 'New';
select action_time t, subject_group grp, subject_attribute attr, subject_action act,
subject_source src, subject_ident id, user_name usr, old_value ov, new_value nv
from audit_trail
where action_time > @date - 3600 and subject_ident like 'CI-Eng-Sample.%'
order by action_time;
"@