IBM Cloud Docs
Configuring IBM Cloud platform logs

Configuring IBM Cloud platform logs

Platform logs are logs that are exposed by enabled services and the platform in IBM Cloud. You must configure a logging instance in a region to monitor these logs.

As of 28 March 2024 the IBM Log Analysis and IBM Cloud Activity Tracker services are deprecated and will no longer be supported as of 30 March 2025. Customers will need to migrate to IBM Cloud Logs, which replaces these two services, prior to 30 March 2025.

  • Platform logs are regional.

    You can monitor logs from enabled services on the IBM Cloud in the region where the service is available.

  • You can configure 1 instance only of the IBM Log Analysis service per region to collect platform logs in that location.

    You can have multiple IBM Log Analysis instances in a location. However, only 1 instance in a location (region) can be configured to receive logs from enabled services in that IBM Cloud location.

  • To configure a logging instance, you must set on the platform logs configuration setting. Also, you must have the platform role editor or higher for the IBM Log Analysis service in your account.

  • If a logging instance in a region is already enabled to collect platform logs, logs from enabled services are collected automatically and available for analysis through this instance. For more information about enabled services, see Cloud services.

  • To monitor platform logs for a service instance, check that the IBM Log Analysis instance is provisioned in the same region where the service instance that you want to monitor is provisioned.

Configuring platform logs through the Observability dashboard

To configure a logging instance from the Observability dashboard in the IBM Cloud, complete the following steps:

  1. Log in to your IBM Cloud account.

    After you log in, the IBM Cloud UI opens.

  2. Go to the menu icon menu icon > Observability to access the Observability dashboard.

  3. Click Logging, then click Options > Edit Platform.

  4. Select a region.

  5. Choose which logging instance will receive logs from enabled services on that location. Learn more about the services that are enabled to send logs to IBM Log Analysis.

  6. Click Select.

The main Observability page opens.

Configuring platform logs from the command line

To enable platform logs in a region, the instance that you want to configure to receive platform logs must have set on the default_receiver property.

Check if you have an instance with the flag Platform Logs set in the region that you want to configure platform logs. Your user must have permissions to see all instances in the account.

If you have an instance with the flag Platform Logs, stop and contact the account administrator to confirm that you will not impact the account operations. There is only 1 instance per region that can collect platform logs. After you make this change, platform logs are collected through this instance in the region, and permissions to view platform logs are impacted. See Changing the instance that collects platform logs from the command line.

If you do not have an instance with the flag Platform Logs in the region, complete the following steps:

  1. [Pre-requisite] Install the IBM Cloud CLI.

  2. Log in to the region in the IBM Cloud where the logging instance is running. Run the following command: ibmcloud login

  3. Set the resource group where the logging instance is running. Run the following command: ibmcloud target

    By default, the default resource group is set.

  4. Get the instance name and plan ID. Run the following command: ibmcloud resource service-instances

    ibmcloud resource service-instance InstanceName --output JSON
    

    Copy the value of the field resource_plan_id. This value is needed to update the instance.

  5. Set on the default_receiver property. Run the following command:

    Check that the change will not affect other account members. There is only 1 instance per region that can collect platform logs. After you make this change, platform logs are collected through this instance in the region, and permissions to view platform logs are impacted.

    ibmcloud resource service-instance-update InstanceName --service-plan-id PlanID -p '{"default_receiver": true}'
    

    Where PlanID is the resource plan ID of your logging instance.

Changing the instance that collects platform logs from the command line

You must use a user that has permissions to see all instances in the account.

Before you change the instance that collects platform logs, check that the change will not affect other account members. There is only 1 instance per region that can collect platform logs. After you make this change, platform logs are collected through this instance in the region, and permissions to view platform logs are impacted.

Complete the following steps:

  1. [Pre-requisite] Install the IBM Cloud CLI.

  2. [Pre-requisite]Get the details of the instance with the flag Platform Logs set in the region that you want to reconfigure.

  3. Log in to the region in the IBM Cloud where the logging instance is running. Run the following command: ibmcloud login

  4. Set the resource group where the logging instance that has the platform logs flag is running. Run the following command: ibmcloud target

    By default, the default resource group is set.

  5. Get the instance name and plan ID. Run the following command: ibmcloud resource service-instances

    ibmcloud resource service-instance InstanceName --output JSON
    

    Copy the value of the field resource_plan_id. This value is needed to update the instance.

  6. Set on the default_receiver property. Run the following command:

    ibmcloud resource service-instance-update InstanceName --service-plan-id PlanID -p '{"default_receiver": true}'
    

    Where

    • PlanID is the resource plan ID of your logging instance.

    • InstanceName is the name of the instance that you want to turn on and start collecting platform logs.

  7. Set the resource group where the logging instance that you want to stop collecting platform logs is running. Run the following command: ibmcloud target

    By default, the default resource group is set.

  8. Get the instance name and plan ID. Run the following command: ibmcloud resource service-instances

    ibmcloud resource service-instances --output JSON
    

    Copy the value of the field resource_plan_id. This value is needed to update the instance.

  9. Set off the default_receiver property. Run the following command:

    ibmcloud resource service-instance-update InstanceName --service-plan-id PlanID -p '{"default_receiver": false}'
    

    Where

    • PlanID is the resource plan ID of your logging instance.

    • InstanceName is the name of the instance that you want to turn off from collecting platform logs.