copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2023-06-06 |
metrics-router |
{{site.data.keyword.attribute-definition-list}}
{: #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}
{: #route-rule-all-metrics-prereqs} {: cli}
-
Install the {{site.data.keyword.metrics_router_full_notm}} CLI.
-
Ensure you have the correct IAM permissions to configure {{site.data.keyword.metrics_router_full_notm}} routes.
-
Log in to {{site.data.keyword.cloud_notm}}. Run the following command: ibmcloud login.
{: #route-rule-all-metrics-step1} {: cli} {: step}
Complete the following steps:
-
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}
-
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}
{: #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}