This module supports provisioning the following:
- IBM Cloud Metrics Routing
- Use IBM Cloud® Metrics Routing to configure the routing of platform metrics generated in your IBM Cloud account.
- IBM Cloud Metrics Routing is a platform service, to manage platform metrics at the account-level by configuring targets and routes that define where data points are routed.
- IBM Cloud Metrics Routing actively manages metrics generated by MR enabled services. Visit here to see the list of services that have adopted IBM Cloud Metrics Routing.
- IBM Cloud Metrics Routing can only route metrics that are generated in supported regions. In regions where IBM Cloud Metrics Routing is unavailable, metrics continue to be collected and managed using the Monitoring service.
# Locals
locals {
region = "us-south"
}
terraform {
required_version = ">= 1.0.0"
required_providers {
ibm = {
source = "ibm-cloud/ibm"
version = "X.Y.Z" # lock into a supported provider version
}
}
}
provider "ibm" {
ibmcloud_api_key = XXXXXXXXXXXX #pragma: allowlist secret
region = local.region
}
# Create Metric Router target and route
module "metric_router" {
source = "terraform-ibm-modules/observability-instances/ibm//modules/metrics_routing"
version = "X.Y.Z" # Replace "X.Y.Z" with a release version to lock into a specific release
# Create Metric Router target
metric_router_targets = [
{
# ID of the Cloud logs instance
destination_crn = "crn:v1:bluemix:public:sysdig-monitor:eu-de:a/xxXXxxXXxXxXXXXxxXxxxXXXXxXXXXX:xxxxxx-XXXX-XXXX-XXXX-xxxxxx::"
target_region = "us-south"
target_name = "my-mr-target"
}
]
metric_router_routes = [
{
name = "my-mr-route"
rules = [
{
action = "send"
targets = [{
id = module.metric_router.metric_router_targets["my-mr-target"].id
}]
inclusion_filters = [{
operand = "location"
operator = "is"
values = ["us-east"]
}]
}
]
}
]
}
You need the following permissions to run this module.
- Service
- Metric Routing (Required if creating Metric routes and targets)
Editor
platform accessManager
service access
- Metric Routing (Required if creating Metric routes and targets)
Name | Version |
---|---|
terraform | >= 1.0.0 |
ibm | >= 1.69.2, < 2.0.0 |
time | >= 0.9.1, < 1.0.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
metrics_router_routes | List of routes for IBM Metrics Router | list(object({ |
[] |
no |
metrics_router_settings | Global settings for Metrics Routing | object({ |
null |
no |
metrics_router_targets | List of Metrics Router targets to be created. | list(object({ |
[] |
no |
Name | Description |
---|---|
metrics_router_routes | The created metrics routing routes. |
metrics_router_settings | The global metrics routing settings. |
metrics_router_targets | The created metrics routing targets. |