IBM Cloud Docs
Migrating IBM Cloud Activity Tracker instances into N IBM Cloud Logs instances for data locality

Migrating IBM Cloud Activity Tracker instances into N IBM Cloud Logs instances for data locality

You can use the Migration tool to migrate IBM Cloud Activity Tracker instances into N IBM Cloud Logs instances, replicating the current IBM Cloud Activity Tracker architecture. Then, after you have migrated all instances, you can use the Migration tool to configure IBM Cloud Activity Tracker Event Routing in the account.

The following image shows a high-level view of the account after IBM Cloud Activity Tracker instances from multiple regions in the account are migrated into multiple instances of IBM Cloud Logs:

High-level view of the account after IBM Cloud Activity Tracker instances from multiple regions in the account are migrated into multiple instances of IBM Cloud Logs
High-level view of the account after IBM Cloud Activity Tracker instances from multiple regions in the account are migrated into multiple instances of IBM Cloud Logs

Scenario

  • IBM Cloud Activity Tracker Event Routing is not configured in the account.
  • You have IBM Cloud Activity Tracker instances provisioned in multiple locations.
  • You must migrate your IBM Cloud Activity Tracker instances to IBM Cloud Logs instances.
  • You have a requirement to maintain data locality in the account.

Before you begin

  • Learn about migration. For more information, see Migrating IBM Cloud Logs.

  • Learn about the migration tool. For more information, see Migrating tool.

  • Check the locations where IBM Cloud Logs is available. You can only provision IBM Cloud Logs instances in supported locations. For more information, see Locations.

Migration steps

Complete the following steps to migrate IBM Cloud Activity Tracker instances in the account:

  1. Run the migration tool to collect information about what instances need to be migrated and their resources.

    ibmcloud logging migrate generate-terraform --scope account --service logdnaat
    

    When you run this command, you get information in the tmp directory about the resources that you currently have configured. You also get terraform scripts to recreate these resources in IBM Cloud Logs in the cl directory.

  2. Migrate each IBM Cloud Activity Tracker instance by running one of these commands:

    • To generate Terraform scripts that you can modify, run:

      ibmcloud logging migrate create-resources --scope instance --instance-crn CRNvalue --terraform
      

      After you generate the Terraform scripts, modify them as required and apply by using Terraform.

    • To migrate an instance by applying Terraform, run:

      ibmcloud logging migrate create-resources --scope instance --instance-crn CRNvalue --terraform -f
      
    • To migrate an instance without applying Terraform, run:

      ibmcloud logging migrate create-resources --scope instance --instance-crn CRNvalue --api
      

    Check the locations where IBM Cloud Logs is available. You can only migrate instances in supported locations. For more information, see Locations.

    When you migrate by using Terraform, you can modify the location where an instance is created before applying the terraform script so you can check the migrated assets and get it ready for when the region is supported.

  3. Manually configure notification channels such as email and PagerDuty.

    If you use the terraform option, variables are provided for you to enter information on the slack URL and the webhook header apikey.

    IBM Cloud Logs alerting is done by using the IBM Cloud Event Notifications service.

  4. After you migrate each of the IBM Cloud Activity Tracker instances in the account, manually configure a route in IBM Cloud Activity Tracker Event Routing that routes events to your current IBM Cloud Activity Tracker instances.

    Before you configure IBM Cloud Activity Tracker Event Routing to route activity Tracking events to your IBM Cloud Logs instance, you MUST configure targets for each IBM Cloud Activity Tracker and a route with rules to route events that are generated in each region to be routed to the IBM Cloud Activity Tracker instance that is available in the same region where the events are generated. Why? Until you have validated the new architecture, you must continue managing the account through the deprecated services. If you fail to configure this route, activity tracking events will stop being routed to your current IBM Cloud Activity Tracker instances.

    You must define rules in the route as follows:

    • For eu-de, the rule routes events generated in the eu-de region and global events to the IBM Cloud Logs instance created in the eu-de region.

    • For other supported regions, the rule routes events from that region only to the IBM Cloud Logs instance created in that region. For example, for us-south, the rule routes events generated in the us-south region to the IBM Cloud Logs instance created in the us-south region.

    The Migration tool cannot automatically create this route as it requires an ingestion key that you must get and configure. For more information on how to configure the targets and routes, see Getting started with IBM Cloud Activity Tracker Event Routing.

  5. After you migrate each of the IBM Cloud Activity Tracker instances in the account, configure IBM Cloud Activity Tracker Event Routing.

    Run the following command to generate Terraform scripts that you can customize:

    ibmcloud logging migrate create-resources --scope atracker --terraform
    

    Run the following command to generate and apply Terraform scripts:

    ibmcloud logging migrate create-resources --scope atracker --terraform -f
    

    Run the following command to configure IBM Cloud Activity Tracker Event Routing automatically after you create the route to send events to IBM Cloud Activity Tracker instances:

    ibmcloud logging migrate create-resources --scope atracker --api
    
    • The migration tool adds a cloud-logs target in IBM Cloud Activity Tracker Event Routing for each IBM Cloud Logs instance that is created as the result of migrating an IBM Cloud Activity Tracker instance.

      There is a limit of targets per account. You can define up to 16 targets in total in an account. Make sure that you have enough targets unconfigured so that the migration tool can create 1 target per IBM Cloud Activity Tracker migrated instance in the account. If you do not have enough targets, the migration process cannot be completed. Delete any unused targets and try again.

    • The migration tool adds a new route with rules to route events to the IBM Cloud Logs instance that is available in the region where the events are generated. The rules defined in the route are as follows:

      • For eu-de, the rule routes events generated in the eu-de region and global events to the IBM Cloud Logs instance created in the eu-de region.

      • For other supported regions, the rule routes events from that region only to the IBM Cloud Logs instance created in that region. For example, for us-south, the rule routes events generated in the us-south region to the IBM Cloud Logs instance created in the us-south region.

  6. Migrate IAM permissions. For more information, see Migrating IAM permissions.

  7. Validate that the new configuration is working for your requirements.

  8. After you validate that your migrated configuration is as required, delete IBM Cloud Activity Tracker instances.

    Before you delete your IBM Cloud Activity Tracker instances, check that the events that are generated by IBM Cloud services that you use are managed through IBM Cloud Activity Tracker Event Routing. For more information, see IBM Cloud services that generate events that are managed through IBM Cloud Activity Tracker Event Routing.