Deleting a flow log collector
You can delete a flow log collector by using the UI, the CLI, or the API.
Notes:
- Any logs that were collected, but weren't sent to IBM Cloud® Object Storage yet, are dropped immediately on deletion. If dropping immediately is a problem, you can suspend the collector instead.
- Flow logs that were shipped to your IBM Cloud® Object Storage buckets are not deleted.
Deleting a flow log collector in the console
To delete a flow log collector, click the Actions menu next to the collector that you want to delete, then click Delete. Click Delete again to confirm the deletion.
Deleting a flow log collector from the CLI
Before you begin, set up your CLI environment.
To delete a flow log collector by using the CLI, run the following command:
ibmcloud is flow-log-delete FLOW_LOG [-f, --force]
Where:
FLOW_LOG- ID of the flow log instance.
--force, -f - Forces the operation without confirmation.
Deleting a flow log collector with the API
To delete a flow log collector by using the API, follow these steps:
-
Set up your API environment with the right variables.
-
Store your
FlowLogID01in a variable to be used in the API command:export FlowLogID01="<your_flow_log_id>" -
To delete a flow log collector:
curl -sS -X DELETE \ -H "Authorization: Bearer $iam_token" \ "$vpc_api_endpoint/v1/flow_log_collectors/$FlowLogID01?version=$api_version&generation=2" | jqThe example uses
jqas a parser, a third-party tool licensed under the MIT license. Some operating systems do not includejqby default. Installjqbefore use or substitute another JSON parser.