What is the correct logging CLI syntax for the log search with a query for REST call responses having status code 400, within the web Log Group and the application Log?
The correct OCI CLI syntax for searching logs must include the compartment, log group, log, and query:
B: oci logging-search search-logs --search-query 'search 'ocid1.compartment.oc1..aaaaaaaawqegmjifhni77bqm625cxioavoq775jckfn2syxqtmglabcccdxyz/web/application' | where data.statusCode = 400' --time-start 2022-02-06T00:00:00Z --time-end 2022-02-07T00:00:00Z
Specifies the compartment OCID, web Log Group, and application Log in the scope path.
Filters for data.statusCode = 400 using proper syntax (= instead of space).
Includes valid UTC time range.
Why not A, C, or D?
A: Missing log group/log; incorrect filter syntax (400 without =).
C: No filter for status code 400.
D: Incorrect command (oci log instead of oci logging-search); redundant parameters.
B aligns with OCI Logging's search syntax.
Tayna
14 hours agoMilly
3 days agoLonny
7 days agoNorah
9 days ago