IBM Cloud Docs
Listing flow log collectors

Listing flow log collectors

You can list your flow log collectors by using the UI, the CLI, or the API.

Listing flow log collectors in the UI

To list your flow log collectors by using the IBM Cloud console:

  1. From your browser, open the IBM Cloud console and log in to your account.
  2. Select the Navigation Menu menu icon, then click > Infrastructure > Network > Flow logs. If available, a list of provisioned flow log collectors shows.

Flow log collector attributes shown in the table are as follows:

  • Name - The flow log name.
  • Status - The status of the flow log collector (Example: Stable, Failed, Pending).
  • Active - On/Off flag for the flow log. If Active, the flow log collector is set to write log files. If Suspended, the collector is deactivated and not writing log files.
  • Target - The specified resource the collector logs traffic for.
  • Target type - The type of target (for example, VPC, Subject, Instance).*
  • Object Storage Bucket - The selected IBM Cloud Object Storage bucket where the system saves flow log files.
  • Resource group - Resource group associated with this flow log.
  • Created date (Local) - Date created, specified in your local browser time zone.

Listing flow log collectors from the CLI

To list all your flow logs, run the following command:

ibmcloud is flow-logs \
  [--resource-group-id RESOURCE_GROUP_ID | --resource-group-name RESOURCE_GROUP_NAME]
  [--json]

Where:

  • --resource-group-id is the ID of the resource group. This option is mutually exclusive with --resource-group-name.
  • --resource-group-name is the name of the resource group. This option is mutually exclusive with --resource-group-id.
  • --json formats the output in JSON.

Listing flow log collectors with the API

To list flow log collectors by using the API, follow these steps:

  1. Set up your API environment with the right variables.
  2. When all variables are initiated, list your flow log collectors:
curl -sS -X GET \
  -H "Authorization: $iam_token" \
  "$vpc_api_endpoint/v1/flow_log_collectors?version=$api_version&generation=2" | jq