copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2020-07-23 |
flow logs, activate, deactivate, suspend, resume |
vpc |
{:shortdesc: .shortdesc} {:new_window: target="_blank"} {:codeblock: .codeblock} {:pre: .pre} {:screen: .screen} {:term: .term} {:tip: .tip} {:note: .note} {:important: .important} {:deprecated: .deprecated} {:external: target="blank" .external} {:generic: data-hd-programlang="generic"} {:download: .download} {:DomainName: data-hd-keyref="DomainName"}
{: #managing-flow-log-collectors_activate}
You can suspend and resume a flow log collector by using the UI, the CLI, or the API.
After you create a flow log collector, its default state is Active
.
{: note}
{: #fl-managing-ui}
To suspend an Active
flow log collector, click the overflow menu and select Suspend. Suspending the flow log stops the flow log from writing to the Cloud Object Storage (COS) bucket.
To resume a suspended flow log, select Resume from the overflow menu.
{: #fl-managing-cli}
To suspend or resume a flow log collector by using the CLI, you must pass a true or false value to the --active flag on the flow-log-update command.
ibmcloud is flow-log-update FLOW_LOG --active (true|false) [--json]
Where:
- FLOW_LOG is the ID of the flow log instance.
- --active is the intended
active
status after the update. Set to true to resume or false to suspend. - --json formats the output in JSON.
{: #fl-managing-api}
To suspend and resume flow log collectors by using the API, follow these steps:
-
Set up your API environment with the right variables.
-
Store your
FlowLogID01
in a variable to be used in the command. For example:export FlowLogID01="<your_flow_log_id>"
{:pre}
-
Choose from the following:
-
To suspend a flow logs collector:
curl -s -X PATCH \ "$vpc_api_endpoint/v1/flow_log_collectors/$FlowLogID01?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "active": false }' | jq
{:pre}
-
To resume a flow log collector's operation:
curl -s -X PATCH \ "$vpc_api_endpoint/v1/flow_log_collectors/$FlowLogID01?version=$api_version&generation=2" \ -H "Authorization: $iam_token" \ -d '{ "active": true }' | jq
{:pre}
-