IBM Cloud Docs
Enforcing default targets

Enforcing default targets

You can configure up to two default targets for collecting metrics data that is not explicitly managed in the IBM Cloud Metrics Routing account's routing rules.

Managing default targets using the UI

You can manage your default targets using the IBM Cloud Metrics Routing UI. For more information, see Creating a target using the UI and Updating a target using the UI.

Prereqs

  1. Install the IBM Cloud CLI.

  2. Install the IBM Cloud Metrics Routing CLI.

  3. Ensure you have the correct IAM permissions to configure IBM Cloud Metrics Routing settings.

  4. Log in to IBM Cloud by running the following command: ibmcloud login

Identify targets

Get the list of targets that are defined in the account. Run the following command:

ibmcloud metrics-router target ls

Copy the ID value of the targets that you want to configure in the account.

Check your current account settings

To check your account's configuration and find out whether there are default targets that are configured, run the following command:

ibmcloud metrics-router setting get

The Default targets setting lists any targets in the account that are configured as default targets.

Configure default targets

Get the list of IDs for the targets that you want to configure as default targets. Then, run the following command to configure the default targets in the account:

When you run the command, make sure that you include the target IDs of all the default targets in the account. The command replaces the exiting configuration with the new one.

ibmcloud metrics-router setting update --default-targets TARGETS

Where TARGETS represent the list of comma-separated target IDs.