IBM Cloud Docs
Configuring account settings

Configuring account settings

You can configure your account settings for IBM Cloud® Metrics Routing by using the IBM Cloud Metrics Routing CLI, the IBM Cloud Metrics Routing REST API, and Terraform scripts. Set these settings to define where and how metrics are collected, routed, and managed in your account.

When you configure or modify the IBM Cloud Metrics Routing account settings, consider the following information:

  • Every time you modify the IBM Cloud Metrics Routing account settings, the data that is passed in the new request replaces any existing configuration data. You must ensure that any existing data is not deleted when you run an update of the account settings by including it in the new request.

  • Before you disable public endpoints by setting --private-api-endpoint-only TRUE, make sure your account has access to the private endpoint. You can do this by running the command ibmcloud account show. If VRF Enabled is true and Service Endpoint Enabled is true then you have access to the private endpoint. If you do not have access to the private endpoint, you will be unable to re-enable the public endpoint since private endpoint access is required to re-enable the public endpoint.

  • You can use private and public endpoints to manage settings. For more information about the list of ENDPOINTS that are available, see Endpoints.

    Through the private network, you must use an API endpoint with the following format: https://private.<region>.metrics_router.cloud.ibm.com

    Through the public network, you must use an API endpoint with the following format: https://<region>.metrics_router.cloud.ibm.com

What data can you configure through the IBM Cloud® Metrics Routing account settings?

You can define any of the following information:

  • The location in your IBM Cloud account where the IBM Cloud Metrics Routing account configuration metadata is stored.

    By metadata, we refer to the target/route/settings data that is available across the account in any region.

    You can choose any of the supported locations where IBM Cloud Metrics Routing is available. For more information, see Locations.

    You can choose a location where the data is stored. You can also configure a backup location where the metadata is stored for recovery purposes.

    Take into account any corporate or industry compliance requirements such as Financial Services Validated locations, or EU-managed regions.

    If you do not configure the primary metadata region, the location of the first target that you configure in the account determines the primary metadata location.

  • The type of endpoints that are allowed to manage the IBM Cloud Metrics Routing account configuration in the account.

    By default, public and private endpoints are enabled.

    You can configure your account to restrict management through private endpoints only.

  • The locations where an account administrator can define targets to collect metrics.

    You can choose any of the supported locations where IBM Cloud Metrics Routing is available. For more information, see Locations.

    Take into account any corporate or industry compliance requirements such as Financial Services Validated locations, or EU-managed regions.

  • Default target locations, that is, 1 or more targets in the account, that will collect metrics from supported IBM Cloud Metrics Routing locations where you have not configured how you want to collect metrics.

    If you define more than 1 target, all default targets get a copy of metrics that do not have a routing rule to indicate where to collect them in the account. You can define up to 2 default targets per account.

IAM permissions

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

CLI commands

The following table lists the actions that you can run to manage settings:

Table 1. Settings actions by using the IBM Cloud Metrics Routing CLI
Action Command
Get settings information ibmcloud metrics-router setting get
Update settings ibmcloud metrics-router setting update

For more information, see IBM Cloud Metrics Routing CLI.

API methods

The following table lists the actions that you can run to manage settings:

Table 2. Settings actions by using the IBM Cloud Metrics Routing REST API
Action REST API Method API_URL
Get settings information GET <ENDPOINT>/api/v3/settings
Update settings PATCH <ENDPOINT>/api/v3/settings

For more information about the REST API, see the settings API.

HTTP response codes

When you use the IBM Cloud Metrics Routing REST API, you can get standard HTTP response codes to indicate whether a method completed successfully.

  • A 200 response always indicates success.
  • A 4xx response indicates a failure.
  • A 5xx response usually indicates an internal system error.

See the following table for some HTTP response codes:

Table 3. List of HTTP response codes
Status code Status Description
200 OK The request was successful.
201 OK The request was successful. A resource is created.
400 Bad Request The request was unsuccessful. You might be missing a parameter that is required.
401 Unauthorized The IAM token that is used in the API request is invalid or expired.
403 Forbidden The operation is forbidden due to insufficient permissions.
404 Not Found The requested resource doesn't exist or is already deleted.
429 Too Many Requests Too many requests hit the API too quickly.
500 Internal Server Error Something went wrong in IBM Cloud Metrics Routing processing.