Export audit logs
Audit logs can be exported only from the online database using the shell audit.sh
(<ceman folder>/bin
).
The command connects to the Ceman node where this command itself is located.
After launching the audit.sh
shell, you will have to specify:
- Username and password of the user that executes the export.
- Filename that you want to be assigned to the output .csv file.
- Starting and ending date of the export, in the format yyyy-mm-dd.
For example this command:
./audit.sh -u=ghibli-superuser -P -o=list.csv export --from-date=2024-09-12 --to-date=2024-09-14
will create a list.csv file exporting the audit logs from Sept. 12 to Sept. 14, 2024.
If the -e (endpoint) parameter is omitted, the export is performed using localhost (the machine from which the script is run) as the endpoint.
See below an example of the command line with all the details.
root@ceman:/ceman/bin# ./audit.sh help
Usage: audit [-hLV] [-C=<connectTimeoutSeconds>] [-e=<secureEndpoint>]
-o=<outputFile> [-R=<readTimeoutSeconds>] -u=<username>
(-p=<passwordFile> | -P) [COMMAND]
Audit Exporter CLI
-C, --connect-timeout-seconds=<connectTimeoutSeconds>
Connect timeout seconds (default if not specified:
'300')
-h, --help Show this help message and exit.
-L, --enable-console-log Enable console log
-o, --output-file=<outputFile>
Output CSV file
-p, --password-file=<passwordFile>
Single-line file containing the password in clear
text
-P, --password Interactive password, prompted on console if not
specified
-R, --read-timeout-seconds=<readTimeoutSeconds>
Read timeout seconds (default if not specified:
'300')
-u, --username=<username> Username
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
export Export Audit`
`root@ceman:/ceman/bin# ./audit.sh help export
Usage: audit export [--from-date=<fromDate>] [--to-date=<toDate>]
Export Audit
--from-date=<fromDate>
From Date filter (YYYY-MM-DD)
--to-date=<toDate> To Date filter (YYYY-MM-DD)\`
Updated 2 months ago