Skip to content

Commit fc65e52

Browse files
priyamshetmbashtovaya
authored andcommitted
Apply suggestions from code review
Co-authored-by: Marina Bashtovaya <[email protected]>
1 parent a1888ca commit fc65e52

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

articles/operator-nexus/howto-baremetal-run-read.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ az networkcloud baremetalmachine run-read-command --name "<machine-name>"
6262
--limit-time-seconds <timeout> \
6363
--commands '[{"command":"<command1>"},{"command":"<command2>","arguments":["<arg1>","<arg2>"]}]' \
6464
--resource-group "<resourceGroupName>" \
65-
--subscription "<subscription>" \
66-
--debug
65+
--subscription "<subscription>"
6766
```
6867

6968
These commands do not require `arguments`:
@@ -78,20 +77,22 @@ These commands do not require `arguments`:
7877

7978
All other inputs are required.
8079

81-
Multiple commands can be provided in json format to `--commands` option. Each `command` specifies command and the arguments.
80+
Multiple commands can be provided in json format to `--commands` option.
8281

8382
For a command with multiple arguments, provide as a list to `arguments` parameter. See [Azure CLI Shorthand](https://github.com/Azure/azure-cli/blob/dev/doc/shorthand_syntax.md) for instructions on constructing the `--commands` structure.
8483

85-
These commands can be long running so the recommendation is to set `--limit-time-seconds` to at least 600 seconds (10 minutes). The `Debug` option or running multiple extracts might take longer that 10 minutes.
84+
These commands can be long running so the recommendation is to set `--limit-time-seconds` to at least 600 seconds (10 minutes). Running multiple extracts might take longer that 10 minutes.
85+
86+
This command runs synchronously. If you wish to skip waiting for the command to complete, specify the `--no-wait --debug` options. In that case, follow the instructions on [how to track asynchronous operation](https://learn.microsoft.com/en-us/azure/operator-nexus/howto-track-async-operations-cli).
8687

87-
This command runs synchronously. If you wish to skip waiting for the command to complete, specify the `--no-wait` option.
88+
When an optional argument `--output-directory` is provided, the output result will be downloaded and extracted to the local directory.
8889

8990
### This example executes the `hostname` command and a `ping` command.
9091

9192
```azurecli
9293
az networkcloud baremetalmachine run-read-command --name "bareMetalMachineName" \
9394
--limit-time-seconds 60 \
94-
--commands '[{"command":"hostname"],"arguments":["192.168.0.99","-c","3"]},{"command":"ping"}]' \
95+
--commands '[{"command":"hostname"],"arguments":["198.51.102.1","-c","3"]},{"command":"ping"}]' \
9596
--resource-group "resourceGroupName" \
9697
--subscription "<subscription>"
9798
```
@@ -101,23 +102,23 @@ In the response, an HTTP status code of 202 is returned as the operation is perf
101102
## Checking command status and viewing output
102103

103104

104-
Sample output looks something like this and provides a link to the zipped output file(tar.gz) from the command execution. The tar.gz file name can be used to identify the file in the Storage account of the Cluster Manager resource group. You can also use the link to directly access the output zip file. Download the output file from storage blob to a local directory by specifying the directory path in the optional argument `--output-directory`.
105+
Sample output looks something like below. It prints the top 5K characters of the result to the screen for convenience and provides a short-lived link to the storage blob containing the command execution result. You can use the link to download the zipped output file (tar.gz).
105106

106107
```azurecli
107108
====Action Command Output====
108109
+ hostname
109110
rack1compute01
110-
+ ping 192.168.0.99 -c 3
111-
PING 192.168.0.99 (192.168.0.99) 56(84) bytes of data.
111+
+ ping 198.51.102.1 -c 3
112+
PING 198.51.102.1 (198.51.102.1) 56(84) bytes of data.
112113
113-
--- 192.168.0.99 ping statistics ---
114+
--- 198.51.102.1 ping statistics ---
114115
3 packets transmitted, 0 received, 100% packet loss, time 2049ms
115116
116117
117118
118119
================================
119120
Script execution result can be found in storage account:
120-
https://cm49vr6vnc6kst.blob.core.windows.net/bmm-run-command-output/a8e0a5fe-3279-46a8-b995-51f2f98a18dd-action-bmmrunreadcmd.tar.gz?se=2023-04-14T06%3A37%3A00Z&sig=ZlN6t%2F534OpmEE545Xie7feHupKSU4v6XYfZTKG6WVo%3D&sp=r&spr=https&sr=b&st=2023-04-14T02%3A37%3A00Z&sv=2019-12-12
121+
https://<storage_account_name>.blob.core.windows.net/bmm-run-command-output/a8e0a5fe-3279-46a8-b995-51f2f98a18dd-action-bmmrunreadcmd.tar.gz?se=2023-04-14T06%3A37%3A00Z&sig=XXX&sp=r&spr=https&sr=b&st=2023-04-14T02%3A37%3A00Z&sv=2019-12-12
121122
```
122123

123124
See [How To BareMetal Review Output Run-Read](howto-baremetal-review-read-output.md) for instructions on locating the output file in the Storage Account. You can also use the link to directly access the output zip file.

articles/operator-nexus/howto-cluster-metrics-configuration-management.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,23 @@ az networkcloud cluster metricsconfiguration create \
4848
> * The default metrics collection interval for standard set of metrics is set to every 5 minutes. Changing the `collectionInterval` will also impact the collection frequency for default standard metrics.
4949
> * There can be only one set of metrics configuration defined per cluster. The resource is created with the name `default`.
5050
51+
Specifying `--no-wait --debug` options in az cli command will result in the execution of this command asynchronously. See [how to track asynchronous operations](howto-track-async-operations-cli.md) for more details.
5152

52-
Specifying `--debug` in az cli command 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).
53+
### Metrics Configuration elements
54+
55+
| Parameter name | Description |
56+
| --------------------------------------| -------------------------------------------------------------------------------------------------- |
57+
| CLUSTER | Resource Name of Cluster |
58+
| LOCATION | The Azure Region where the Cluster will be deployed |
59+
| CLUSTER_EXTENDED_LOCATION_ID | The Cluster extended Location from Azure portal |
60+
| COLLECTION_INTERVAL | The collection frequency for default standard metrics |
61+
| RESOURCE_GROUP | The Cluster resource group name |
62+
| TAG_KEY1 | Optional tag1 to pass to Cluster create |
63+
| TAG_VALUE1 | Optional tag1 value to pass to Cluster Create |
64+
| TAG_KEY2 | Optional tag2 to pass to Cluster create |
65+
| TAG_VALUE2 | Optional tag2 value to pass to Cluster create |
66+
| METRIC_TO_ENABLE_1 | Optional metric1 that have been chosen to be enabled in addition to the default metrics |
67+
| METRIC_TO_ENABLE_2 | Optional metric2 that have been chosen to be enabled in addition to the default metrics |
5368

5469
## Retrieving a metrics configuration
5570

@@ -79,7 +94,7 @@ az networkcloud cluster metricsconfiguration update \
7994
--resource-group "<RESOURCE_GROUP>"
8095
```
8196

82-
The change may include either or both of the updatable fields, `collectionInterval` or `enabledMetrics`. The `collectionInterval` can be updated independently of `enabledMetrics`. Omit fields that aren't being changed.
97+
The `collection-interval` can be updated independently of `enabled-metrics` list. Omit fields that aren't being changed.
8398

8499
Specifying `--debug` in az cli 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).
85100

@@ -95,16 +110,3 @@ az networkcloud cluster metricsconfiguration delete \
95110

96111
Specifying `--debug` in az cli 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).
97112

98-
| Parameter name | Description |
99-
| --------------------------------------| -------------------------------------------------------------------------------------------------- |
100-
| CLUSTER | Resource Name of Cluster |
101-
| LOCATION | The Azure Region where the Cluster will be deployed |
102-
| CLUSTER_EXTENDED_LOCATION_ID | The Cluster extended Location from Azure portal |
103-
| COLLECTION_INTERVAL | The collection frequency for default standard metrics |
104-
| RESOURCE_GROUP | The Cluster resource group name |
105-
| TAG_KEY1 | Optional tag1 to pass to Cluster create |
106-
| TAG_VALUE1 | Optional tag1 value to pass to Cluster Create |
107-
| TAG_KEY2 | Optional tag2 to pass to Cluster create |
108-
| TAG_VALUE2 | Optional tag2 value to pass to Cluster create |
109-
| METRIC_TO_ENABLE_1 | Optional metric1 that have been chosen to be enabled in addition to the default metrics |
110-
| METRIC_TO_ENABLE_2 | Optional metric2 that have been chosen to be enabled in addition to the default metrics |

0 commit comments

Comments
 (0)