Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 2.26 KB

route-rule-all-metrics.md

File metadata and controls

75 lines (47 loc) · 2.26 KB
copyright lastupdated keywords subcollection
years
2023
2023-06-06
metrics-router

{{site.data.keyword.attribute-definition-list}}

Routing all metrics

{: #route-rule-all-metrics}

Route all metrics that are generated in all of the {{site.data.keyword.metrics_router_full}} supported locations to multiple destination targets. {: shortdesc}

A rule consists of 1 or more targets, and 1 or more inclusion filters. For more information on how routes work, see Understanding how routes work in your account.

Inclusion filters determine which metrics are routed to the targets.

To route all metrics, you must exclude the inclusion_filters definition when you configure the route. {: note}

Prereqs

{: #route-rule-all-metrics-prereqs} {: cli}

  1. Install the {{site.data.keyword.cloud_notm}} CLI.

  2. Install the {{site.data.keyword.metrics_router_full_notm}} CLI.

  3. Ensure you have the correct IAM permissions to configure {{site.data.keyword.metrics_router_full_notm}} routes.

  4. Log in to {{site.data.keyword.cloud_notm}}. Run the following command: ibmcloud login.

Get the target details

{: #route-rule-all-metrics-step1} {: cli} {: step}

Complete the following steps:

  1. Run the following command to list all targets. Copy the target ID of the one where you want to route the metrics.

    ibmcloud metrics-router target ls
    

    {: pre}

  2. Run the following command to get the details of the targets where you want to route the metrics:

    ibmcloud metrics-router target get --target <TARGET_ID>
    

    {: pre}

Configure the route

{: #route-rule-all-metrics-step2} {: cli} {: step}

Run the following command to send all metrics from supported locations in your account to the targets identified in previous steps.

ibmcloud metrics-router route create --name route-all --rules '[{"action": "send", "targets":[{"id":"11111111-1111-1111-1111-111111111111"},{"id":"22222222-2222-2222-2222-222222222222"}]}]'

{: pre}