Audit service keyed files

These are the audit database keyed files, they will be located inside the $SCULPTOR/audit/auditdb directory, where auditdb is the audit database name (many databases can coexist at the same time). If not specified “default” is choosen.

filetable

This file is used to specify which keyed files to audit, to make sure the file is properly setup the $SCULPTOR/sbin/auditmgt.q program is provided. The fileId provided is going to be the id of this fileName keyed file in the rest of audit files.

KEY FIELDS

1:fileId

i4

File ID

DATA FIELDS

2:fileName

a128

File Name

3:fileFlags1

i2

Flags

4:description

a64

File description

INDEX SUMMARY

1:byName

(fileName)

1

fileFlags: flags to specify on this audited file: enabled/disabled/audit_some/insert/updates/delete

filetablefield

Used to configure which keyed files fields are audited and also if any change on this fields should be ingnored as an audit “trigger”

KEY FIELDS

1:fileId

i4

File ID

2:fieldName

a32

Field Name

DATA FIELDS

3:fieldFlags2

i2

Field flags

4:description

a64

Field descriptor

2

fieldFlags: flags to specify on this field: enabled/disabled/insert/update/delete/ignore_changes

transactions

Audit transaction information. The audit works as a kind of “transaction” using the audit_transaction() function to relate all updates that have the same transaction id.

KEY FIELDS

1:transactionIdMs

i4

Transaction ID Most Significant

2:transactionIdLs

i4

Transaction ID Least Significant

DATA FIELDS

3:dateTransaction3

i4

Transaction date and time

4:transactionFlags4

i4

Transaction flags

5:ipAddress5

u1(16)

IP Address

6:clientName

a32

Client hostname

7:userName

a16

User name

8:program

a32

Client Program

9:customValue16

a8

Custom Value 1

10:customValue26

a8

Custom Value 2

11:customValue36

a8

Custom Value 3

12:customValue46

a8

Custom Value 4

3

dateTransaction: Date and time the transaction was created, stored as LT_DTIME.

4

transactionFlags:

KFAUDIT_TRANSACTION_FLAG_STANDALONE

Stand-alone program accessing the file

KFAUDIT_TRANSACTION_FLAG_CLIENT

Client access through kfserver

KFAUDIT_TRANSACTION_FLAG_SWITCH

Transaction record rewrite due a audit_switch_db

5

ipAddress: IP Address - prepared to IPv6

6(1,2,3,4)

customValue[1-4]: Custom Values that can be defined by the customer. The size can be changed

auditrecords

The main keyed file that will contain the record information and type of update.

KEY FIELDS

1:auditIdMs

i4

Audit ID Most Significant

2:auditIdLs

i4

Audit ID Least Significant

DATA FIELDS

3:fileId

i4

File ID

4:fileKey7

b195

x

Keyed file record Key

5:dateUpdate8

i4

Audit record date and time

6:typeUpdate9

a1

Audit record type (U, I or D)

7:reasonUpdate10

a1

Audit update reason (N or R)

8:transactionIdMs11

i4

Transaction ID Most Significant

9:transactionIdLs11

i4

Transaction ID Least Significant

INDEX SUMMARY

1:byRecord

(fileKey)

2:byDate

(dateUpdate)

3:byFile

(fileId)

4:byTransaction

(transactionId)

7

fileKey: Size defined in auditrecords.d - default 195 can be modified

8

dateUpdate: Seconds since 1/1/1970

9

typeUpdate: “U”pdate, “I”nsert or “D”elete

10

reasonUpdate: “N”ormal or “R”ollback; more may be added in future

11(1,2)

transactionId: The transaction owning the update.

auditfields

The field information change (will point to main keyed file record).

KEY FIELDS

1:auditIdMs

i4

Audit ID Most Significant

2:auditIdLs

i4

Audit ID Least Significant

3:fieldName

a32

Field Name

DATA FIELDS

4:adt12

u1

Arithmetic Data Type

5:sclt13

u1

Logical Type

6:len

i2

Length

7:oldValue

b255

x

Old field value

8:newValue

b255

x

New field value

12

adt: Arithmetic Data Type: ADT_TEXT, ADT_LONG, ADT_DOUBLE, ADT_BINARY

13

sclt: Sculptor Logical data Types: LT_*


RELATED TOPICS

Audit service introduction

Audit configuration

Audit transactions

Audit functions

Audit access