Error in log-analytics storage purge-storage-data
Closed this issue · 4 comments
kk-hiraskar commented
I am purging logs using OCI CLI
oci log-analytics storage purge-storage-data --compartment-id "$MONITORING_COMPARTMENT_OCID" \
--namespace-name "$TENANCY_NAME" --purge-query-string "\"log group\"=\"${STACK_NAME}\"" \
--time-data-ended "$(date +%Y-%m-%d -d '+1 day')" --wait-for-state SUCCEEDED --wait-for-state FAILED \
--wait-interval-seconds 10
This is purging logs, I can confirm it from web console, but however this command return error as,
Action completed. Waiting until the work request has entered state: ('SUCCEEDED', 'FAILED')
Encountered error while waiting for work request to enter the specified state. Outputting last known resource state
{
"opc-work-request-id": "ocid1.loganalyticsstorageworkrequest.oc1.phx.amaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwzndq"
}
TypeError: get_storage_work_request() missing 1 required positional argument: 'namespace_name'
due to this error, seems command is not waiting until mentioned logs are purged.
And early exiting with error.
However purge is happening.
kk-hiraskar commented
I have verified namespace is provided correctly --namespace-name "$TENANCY_NAME"
& this variable will not be blank, it is holding tenancy name, which is also same as object storage namespace.
kk-hiraskar commented
adizohar commented
Hi KK,
This repo is for Python SDK not OCI CLI
Please close the ticket and open the issue at the OCI CLI area - https://github.com/oracle/oci-cli/issues
Thank you
kk-hiraskar commented