Skip to content

Commit 0491c5e

Browse files
committed
Update per standards.
1 parent 1e3a85e commit 0491c5e

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

articles/azure-arc/data/upload-logs.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ echo $WORKSPACE_SHARED_KEY
149149

150150
With the environment variables set, you can upload logs to the log workspace.
151151

152-
## Configure automatic upload of logs to Azure Log Analytics Workspace in direct mode using ```az``` CLI
152+
## Configure automatic upload of logs to Azure Log Analytics Workspace in direct mode using `az` CLI
153153

154-
In the **direct** connected mode, Logs upload can only be setup in **automatic** mode. This automatic upload of metrics can be setup either during deployment or post deployment of Azure Arc data controller.
154+
In the **direct** connected mode, Logs upload can only be set up in **automatic** mode. This automatic upload of metrics can be set up either during deployment or post deployment of Azure Arc data controller.
155155

156-
### **Enable** automatic upload of logs to Azure Log Analytics Workspace
156+
### Enable automatic upload of logs to Azure Log Analytics Workspace
157157

158158
If the automatic upload of logs was disabled during Azure Arc data controller deployment, run the below command to enable automatic upload of logs.
159159

@@ -163,7 +163,7 @@ az arcdata dc update --name <name of datacontroller> --resource-group <resource
163163
az arcdata dc update --name arcdc --resource-group <myresourcegroup> --auto-upload-logs true
164164
```
165165

166-
### **Disable** automatic upload of logs to Azure Log Analytics Workspace
166+
### Enable automatic upload of logs to Azure Log Analytics Workspace
167167

168168
If the automatic upload of logs was enabled during Azure Arc data controller deployment, run the below command to disable automatic upload of logs.
169169
```
@@ -172,14 +172,14 @@ az arcdata dc update --name <name of datacontroller> --resource-group <resource
172172
az arcdata dc update --name arcdc --resource-group <myresourcegroup> --auto-upload-logs false
173173
```
174174

175-
## Configure automatic upload of logs to Azure Log Analytics Workspace in **direct** mode using ```kubectl``` CLI
175+
## Configure automatic upload of logs to Azure Log Analytics Workspace in **direct** mode using `kubectl` CLI
176176

177-
### **Enable** automatic upload of logs to Azure Log Analytics Workspace
177+
### Enable automatic upload of logs to Azure Log Analytics Workspace
178178

179179
To configure automatic upload of logs using ```kubectl```:
180180

181-
- ensure the Log Analytics Workspace is created as descibed in the earlier section
182-
- create a kubernetes secret for the Log Analytics workspace using the ```WorkspaceID``` and ```SharedAccessKey``` as follows:
181+
- ensure the Log Analytics Workspace is created as described in the earlier section
182+
- create a Kubernetes secret for the Log Analytics workspace using the ```WorkspaceID``` and `SharedAccessKey` as follows:
183183

184184
```
185185
apiVersion: v1
@@ -193,29 +193,31 @@ metadata:
193193
type: Opaque
194194
```
195195

196-
- Run the ```kubectl apply -f <myLogAnalyticssecret.yaml> --namespace <mynamespace> ``` to create the secret
197-
- Run the following ```kubectl edit``` command, to open the settings in a yaml file in the default editor
196+
- To create the secret, run:
198197

199-
```
200-
kubectl edit datacontroller <DC name> --name <namespace>
201-
```
198+
```console
199+
kubectl apply -f <myLogAnalyticssecret.yaml> --namespace <mynamespace>
200+
```
201+
202+
- To open the settings as a yaml file in the default editor, run:
203+
204+
```console
205+
kubectl edit datacontroller <DC name> --name <namespace>
206+
```
202207

203208
- update the autoUploadLogs property to ```"true"```, and save the file
204209

205210

206211

207-
### **Disable** automatic upload of logs to Azure Log Analytics Workspace
212+
### Enable automatic upload of logs to Azure Log Analytics Workspace
208213

209-
To disable automatic upload of logs,
210-
- Run the following ```kubectl edit``` command, to open the settings in a yaml file in the default editor
214+
To disable automatic upload of logs, run:
211215

212-
```
216+
```console
213217
kubectl edit datacontroller <DC name> --name <namespace>
214218
```
215219

216-
- update the autoUploadLogs property to ```"false"```, and save the file
217-
218-
220+
- update the autoUploadLogs property to `"false"`, and save the file
219221

220222
## Upload logs to Azure Monitor in **indirect** mode
221223

@@ -255,7 +257,7 @@ Once your logs are uploaded, you should be able to query them using the log quer
255257

256258
If you want to upload metrics and logs on a scheduled basis, you can create a script and run it on a timer every few minutes. Below is an example of automating the uploads using a Linux shell script.
257259

258-
In your favorite text/code editor, add the following script to the file and save as a script executable file such as .sh (Linux/Mac) or .cmd, .bat, .ps1.
260+
In your favorite text/code editor, add the following script to the file and save as a script executable file - such as .sh for Linux/Mac, or .cmd, .bat, or .ps1 for Windows.
259261

260262
```azurecli
261263
az arcdata dc export --type logs --path logs.json --force --k8s-namespace arc

0 commit comments

Comments
 (0)