You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Operator Nexus: How to configure cluster metrics"
3
3
description: Instructional for the inputs and methods for creating, updating, retrieving, and deleting cluster metrics configurations.
4
4
author: bryan-strassner
5
5
ms.author: bstrassner
6
-
ms.service: azure
6
+
ms.service: operator-nexus
7
7
ms.topic: how-to
8
8
ms.date: 02/09/2023
9
9
ms.custom: template-how-to
10
10
---
11
11
12
-
# Cluster Metrics Configuration
12
+
# Cluster metrics configuration
13
13
14
14
When the user deploys a Cluster, a standard set of metrics are enabled for collection. For the list of metrics, see
15
15
[List of Metrics Collected](List-of-metrics-collected.md).
16
16
17
17
Users can't control the behavior (enable or disable) for collection of these included standard metrics. Though, users can control the collection of some optional metrics that aren't part of the link in the list. To enable this experience, users will have to create and update a MetricsConfiguration resource for a cluster. By default, creation of this MetricsConfiguration resource doesn't change the collection of metrics. User will have to update the resource to enable or disable these optional metrics collection.
18
18
19
-
**Notes:**
20
-
1. For a cluster, at max, only one MetricsConfiguration resource could be created.
21
-
2. Users need to create a MetricsConfiguration resource to check a list of optional metrics that can be controlled.
22
-
3. Deletion of the MetricsConfiguration resource will result in the standard set of metrics being restored.
19
+
> [!NOTE]
20
+
> * For a cluster, at max, only one MetricsConfiguration resource could be created.
21
+
> * Users need to create a MetricsConfiguration resource to check a list of optional metrics that can be controlled.
22
+
> * Deletion of the MetricsConfiguration resource will result in the standard set of metrics being restored.
23
23
24
-
## How To Manage Cluster Metrics Configuration
24
+
## How to manage cluster metrics configuration
25
25
26
26
To support the lifecycle of cluster metrics configurations, the following `az rest` interactions allow for the creation and management of a cluster's metrics configurations.
27
27
28
-
### Creating a Metrics Configuration
28
+
### Creating a metrics configuration
29
29
30
30
Use of the `az rest` command requires that the request input is defined, and then a `PUT` request is made to the `Microsoft.NetworkCloud` resource provider.
az rest -m put -u "https://management.azure.com/subscriptions/${SUBSCRIPTION}/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.NetworkCloud/clusters/${CLUSTER}/metricsConfigurations/default?api-version=2022-12-12-preview" -b @create_metrics_configuration.json --debug
65
65
```
66
66
67
-
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to Track Asynchronous Operations](howto-Track-Async-Operations-CLI.md).
67
+
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to track asynchronous operations](howto-track-async-operations-cli.md).
68
68
69
-
## Retrieving a Metrics Configuration
69
+
## Retrieving a metrics configuration
70
70
71
71
After a metrics configuration is created, it can be retrieved using a `az rest` command:
72
72
@@ -80,7 +80,7 @@ az rest -m get -u "https://management.azure.com/subscriptions/${SUBSCRIPTION}/re
80
80
81
81
This command will return a JSON representation of the metrics configuration.
82
82
83
-
## Updating a Metrics Configuration
83
+
## Updating a metrics configuration
84
84
85
85
Much like the creation of a metrics configuration, an update can be performed to change the configuration. A file, containing the metrics to be updated, is consumed as an input.
az rest -m put -u "https://management.azure.com/subscriptions/${SUBSCRIPTION}/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.NetworkCloud/clusters/${CLUSTER}/metricsConfigurations/default?api-version=2022-12-12-preview" -b @update_metrics_configuration.json --debug
109
109
```
110
110
111
-
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to Track Asynchronous Operations](howto-Track-Async-Operations-CLI.md).
111
+
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to track asynchronous operations](howto-track-async-operations-cli.md).
112
112
113
-
## Deleting a Metrics Configuration
113
+
## Deleting a metrics configuration
114
114
115
115
Deletion of the metrics configuration will return the cluster to an unaltered configuration. To delete a metrics configuration, `az rest` API is used.
az rest -m delete -u "https://management.azure.com/subscriptions/${SUBSCRIPTION}/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.NetworkCloud/clusters/${CLUSTER}/metricsConfigurations/default?api-version=2022-12-12-preview" --debug
123
123
```
124
124
125
-
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to Track Asynchronous Operations](howto-Track-Async-Operations-CLI.md).
125
+
Specifying `--debug` in REST API will result in the tracking operation status in the returned command output. This operation status can be queried to monitor the progress of the operation. See: [How-to track asynchronous operations](howto-track-async-operations-cli.md).
0 commit comments