Skip to main content

Audit Service

The audit service allows you to find and view audit records for actions performed in the OpenDataDSL environment.

Finding Audit Records

You use the find command to find audit records in ODSL.

Find examples

Getting all private audit records

records = find ${audit}
print records.size

Getting all public audit records

records = find ${audit:public}
print records.size

Getting all records for a specific service

records = find ${audit} where service="action"
print records.size

Getting all records within a time range

records = find ${audit} where timestamp > ${date:"today"} and timestamp < ${date:"tomorrow"}
print records.size

Getting all records since a specific timestamp

records = find ${audit} where timestamp > "2020-11-03T12:23:40"
print records.size

Summarising Audit Records

You use the aggregate command to summarise audit records in ODSL.

Aggregation examples

Summarising by service

summary = aggregate ${audit}
group _id="$service", qty=count()
sort qty desc
end

print summary