Skip to content

Commit 02b844c

Browse files
authored
Merge pull request #268662 from rashmichandrashekar/rashmi/remove-mutil-routing
remove doc section for sending same metrics to multiple workspaces
2 parents 6cf5c11 + 87c7ac9 commit 02b844c

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

articles/azure-monitor/containers/prometheus-metrics-multiple-workspaces.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ ms.reviewer: aul
88

99
# Send Prometheus metrics to multiple Azure Monitor workspaces
1010

11-
Routing metrics to more Azure Monitor workspaces can be done through the creation of additional data collection rules. All metrics can be sent to all workspaces or different metrics can be sent to different workspaces.
11+
Routing different metrics to more Azure Monitor workspaces can be done through the creation of additional data collection rules.
1212

13-
## Send same metrics to multiple Azure Monitor workspaces
14-
15-
You can create multiple Data Collection Rules that point to the same Data Collection Endpoint for metrics to be sent to additional Azure Monitor workspaces from the same Kubernetes cluster. In case you have a very high volume of metrics, a new Data Collection Endpoint can be created as well. Please refer to the service limits [document](../service-limits.md) regarding ingestion limits. Currently, this is only available through onboarding through Resource Manager templates. You can follow the [regular onboarding process](kubernetes-monitoring-enable.md#enable-prometheus-and-grafana) and then edit the same Resource Manager templates to add additional DCRs and DCEs (if applicable) for your additional Azure Monitor workspaces. You'll need to edit the template to add an additional parameters for every additional Azure Monitor workspace, add another DCR for every additional Azure Monitor workspace, add another DCE (if applicable), add the Monitor Reader Role for the new Azure Monitor workspace and add an additional Azure Monitor workspace integration for Grafana.
13+
You can create Data Collection Rules with corresponding Data Collection Endpoints for different metrics to be sent to additional Azure Monitor workspaces from the same Kubernetes cluster.
14+
Currently, this is only available through onboarding through Resource Manager templates. You can follow the [regular onboarding process](kubernetes-monitoring-enable.md#enable-prometheus-and-grafana) and then edit the same Resource Manager templates to add additional DCRs and DCEs for your additional Azure Monitor workspaces. You'll need to edit the template to add an additional parameters for every additional Azure Monitor workspace, add another DCR for every additional Azure Monitor workspace, add another DCE, add the Monitor Reader Role for the new Azure Monitor workspace and add an additional Azure Monitor workspace integration for Grafana.
1615

1716
- Add the following parameters:
1817
```json
@@ -42,7 +41,7 @@ You can create multiple Data Collection Rules that point to the same Data Collec
4241
}
4342
```
4443

45-
- For high metric volume, add an additional Data Collection Endpoint. You *must* replace `<dceName>`:
44+
- Add an additional Data Collection Endpoint. You *must* replace `<dceName>`:
4645
```json
4746
{
4847
"type": "Microsoft.Insights/dataCollectionEndpoints",
@@ -53,7 +52,7 @@ You can create multiple Data Collection Rules that point to the same Data Collec
5352
"properties": {}
5453
}
5554
```
56-
- Add an additional DCR with the same or a different Data Collection Endpoint. You *must* replace `<dcrName>`:
55+
- Add an additional DCR with the new Data Collection Endpoint. You *must* replace `<dcrName>`:
5756
```json
5857
{
5958
"type": "Microsoft.Insights/dataCollectionRules",
@@ -74,7 +73,8 @@ You can create multiple Data Collection Rules that point to the same Data Collec
7473
{
7574
"name": "PrometheusDataSource",
7675
"streams": ["Microsoft-PrometheusMetrics"],
77-
"labelIncludeFilter": {}
76+
"labelIncludeFilter":
77+
"microsoft_metrics_include_label": "MonitoringAccountLabel2"
7878
}
7979
]
8080
},
@@ -175,17 +175,15 @@ You can create multiple Data Collection Rules that point to the same Data Collec
175175
}
176176
}
177177

178-
```
179-
## Send different metrics to different Azure Monitor workspaces
180178

181-
If you want to send some metrics to one Azure Monitor workspace and other metrics to a different one, follow the above steps to add additional DCRs. The value of `microsoft_metrics_include_label` under the `labelIncludeFilter` in the DCR is the identifier for the workspace. To then configure which metrics are routed to which workspace, you can add an extra pre-defined label, `microsoft_metrics_account` to the metrics. The value should be the same as the corresponding `microsoft_metrics_include_label` in the DCR for that workspace. To add the label to the metrics, you can utilize `relabel_configs` in your scrape config. To send all metrics from one job to a certain workspace, add the following relabel config:
179+
Then configure which metrics are routed to which workspace, by adding an extra pre-defined label, `microsoft_metrics_account` to the metrics. The value should be the same as the corresponding `microsoft_metrics_include_label` in the DCR for that workspace. To add the label to the metrics, you can utilize `relabel_configs` in your scrape config. To send all metrics from one job to a certain workspace, add the following relabel config:
182180

183181
```yaml
184182
relabel_configs:
185183
- source_labels: [__address__]
186184
target_label: microsoft_metrics_account
187185
action: replace
188-
replacement: "MonitoringAccountLabel1"
186+
replacement: "MonitoringAccountLabel2"
189187
```
190188

191189
The source label is `__address__` because this label will always exist so this relabel config will always be applied. The target label will always be `microsoft_metrics_account` and its value should be replaced with the corresponding label value for the workspace.

0 commit comments

Comments
 (0)