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.

Using 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 icon Menu icon, then click > VPC Infrastructure VPC icon >Flow logs in the Network section. If available, a list of provisioned flow log collectors shows.

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

  • 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.
  • Name - The flow log name.
  • Target - The specified resource the collector logs traffic for.
  • Date Created - The date the flow log collector was provisioned.
  • Object Storage Bucket - The selected IBM Cloud Object Storage bucket where the system saves flow log files.

Notice that the page includes tabbed views, which show flow log collectors that were created with that target type.

  • VPC - Shows flow log collectors that are attached directly to a VPC.
  • Subnet - Shows flow log collectors that are attached directly to a subnet within the specified VPC.
  • Instance - Shows all flow log collectors that are attached directly to a virtual server instance within the specified VPC.
  • Interface - Shows all flow log collectors that are attached directly to a network interface of a virtual server instance within the specified VPC.

Using 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.

Using 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