IBM Cloud Docs
Managing metrics in a new location after Activity Tracker is available

Managing metrics in a new location after Activity Tracker is available

To manage metrics from IBM Cloud services that generate platform metrics in a new region where the IBM Cloud Metrics Routing service is not available until a later date, complete these instructions.

For example, the Madrid region opened for business in June 2023. IBM Cloud services that are available and generate platform metrics send currently those metrics to the Frankfurt region. You can manage and monitor interaction with these services in Frankfurt. Platform metrics include the field ibm-location that specifies the region, location, or datacenter where the resource is available. For example, for Madrid, you can see the location of platform metrics set to eu-es.

You cannot control when an IBM Cloud service makes the switch of sending platform metrics from one region to another one. However, you can add a new rule for Madrid to prepare for that switch.

Data is not sent to both locations, complete the steps before that switch is done by a service to mitigate any loss of data.

Flow of metrics in a single region
Figure 1. Flow of metrics in a single region

Step 1. Configure targets in Madrid

A target defines where platform metrics are collected. For more information about targets, see Understanding how targets work in your account.

Configure a Monitoring target in Madrid.

Step 2. Configure or modify a route to include a rule for Madrid

A route defines the rules that indicate where platform metrics that are generated in an account are routed. Routes are global under an account and are evaluated in all regions where Activity Tracker Event Routing is deployed. For more information, see Understanding how routes work in your account and Routing metrics from 1 location.

For example, in this step, you will reconfigure a route to redirect metrics that are generated in Madrid.

Run the following command to create the route:

ibmcloud atracker route update --route <ROUTE_NAME> --rules

Where

--route <ROUTE_NAME>

The name of the route.

--rules <ROUTING_RULES>

A JSON formatted rule definition enclosed in single quotes. You must keep existing rules and add new rules for Madrid. For example:

--rules '[{"action": "send", "targets":[{"id":"2222222-1111-1111-1111-1111111111111"}], "inclusion_filters":[{"operand": "location","operator": "is","values": "eu-de"}]},{"action": "send", "targets":[{"id":"11111111-1111-1111-1111-1111111111111"}], "inclusion_filters":[{"operand": "location","operator": "is","values": "eu-es"}]}]'

After you configure a route, it might take up to 1 hour for the configuration to be enabled.

For example, to create a route to send metrics generated in eu-es to the target that you created in the previous step, run the following command.

ibmcloud metrics-router route create --name "my-route" --rules '[{"action": "send", "targets":[{"id":"TARGETID"}], "inclusion_filters":[{"operand": "location","operator": "is","values": "eu-es"}]}]''

Where TARGETID is the ID of the target that you created in the previous step.