Configuring account settings

You can configure IBM Cloud Logs Routing account settings to define where and how platform logs are collected, routed, and managed in your account. You can do it through the UI, or by using the CLI, the REST API V3, or Terraform scripts.

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

Every time you modify the IBM Cloud Logs 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://api.private.<region>.logs-router.cloud.ibm.com

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

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

You can define any of the following information:

  • The location in your IBM Cloud account where the IBM Cloud Logs 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 Logs Routing is available. For more information, see Locations.

    You can choose a location where the metadata 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.

    You must configure the primary metadata region before creating targets and routes ensuring the configuration meets your compliance needs.

  • The type of endpoints that are allowed to manage the IBM Cloud Logs 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 logs.

    You can choose any of the supported locations where IBM Cloud Logs 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 logs from supported IBM Cloud Logs Routing locations where you have not configured how you want to collect logs.

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

  • The API version that is enabled in the account for IBM Cloud Logs Routing. Valid values are: 1 or 3.

IAM permissions

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

Managing settings using the UI

You can manage your settings definition using the IBM Cloud Logs Routing UI. For more information, see Configuring account settings.

CLI commands

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

Settings actions by using the IBM Cloud Logs Routing CLI
Action Command
Get settings information ibmcloud logs-router setting get
Update settings ibmcloud logs-router setting update

For more information, see IBM Cloud Logs Routing CLI.

API methods

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

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

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

  • You can manage targets from the private network using an API endpoint with the following format: https://api.private.REGION.logs-router.cloud.ibm.com
  • You can manage targets from the public network using an API endpoint with the following format: https://api.REGION.logs-router.cloud.ibm.com

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

HTTP response codes

When you use the IBM Cloud Logs 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:

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.
409 Conflict There is a conflict with the request data and the state of resources in system.
429 Too Many Requests Too many requests hit the API too quickly.
500 Internal Server Error Something went wrong. Your request could not be processed. Try again later. If the problem persists, note the transaction-id in the response header and contact IBM Cloud support.