1Z0-1067-25 practice question 12 of 15

You are asked to investigate a potential security risk on your company Oracle Cloud Infrastructure (OCI) tenancy. You decide to start by looking through the audit logs for suspicious activity. How can you retrieve the audit logs using the OCI Command Line Interface (CLI)? (Choose the best)

Full set: 93 questions
Answer options
A:

A. oci audit event list --start-time $start-time -compartment-id $compartment-id

B:

B. oci audit event list --end-time $end-time -compartment-id $compartment-id

C:

C. oci audit event list --start-time $start-time -end-time $end-time -compartment-id $com-partment- id

Correct answer
D:

D. oci audit event list --start-time $start-time -end-time $end time -tenancy-id $tenancy id

Correct Answer:
C. C. oci audit event list --start-time $start-time -end-time $end-time -compartment-id $com-partment- id
Explanation

To retrieve audit logs using the OCI CLI, the oci audit event list command is used. This command requires a compartment ID (--compartment-id) to specify the scope of the search. To effectively investigate suspicious activity within a specific timeframe, it is best practice to provide both a start time (--start-time) and an end time (--end-time). This creates a bounded query that returns a manageable and relevant set of log events for analysis, making it the most complete and correct command among the options.

Why Incorrect

A. This command is incomplete. It provides a start time but no end time, potentially returning an excessive number of logs from the start time to the present.
B. This command is incomplete. It provides an end time but no start time, which is not a typical or effective way to query a specific period of activity.
D. This command uses an incorrect parameter. The required parameter to specify the scope is --compartment-id, not --tenancy-id. The tenancy's root compartment OCID should be used.

References

1. Oracle Cloud Infrastructure Documentation. (2024). CLI Reference for Audit. Retrieved from https://docs.oracle.com/en-us/iaas/tools/oci-cli/2.12.1/ociclidocs/cmdref/audit/event/list.html. The documentation specifies --compartment-id, --start-time, and --end-time as required and optional parameters for the list command.

Scroll to Top