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
Copy file name to clipboardExpand all lines: articles/azure-arc/data/upload-logs.md
+23-21Lines changed: 23 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,11 +149,11 @@ echo $WORKSPACE_SHARED_KEY
149
149
150
150
With the environment variables set, you can upload logs to the log workspace.
151
151
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
153
153
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.
155
155
156
-
### **Enable** automatic upload of logs to Azure Log Analytics Workspace
156
+
### Enable automatic upload of logs to Azure Log Analytics Workspace
157
157
158
158
If the automatic upload of logs was disabled during Azure Arc data controller deployment, run the below command to enable automatic upload of logs.
159
159
@@ -163,7 +163,7 @@ az arcdata dc update --name <name of datacontroller> --resource-group <resource
163
163
az arcdata dc update --name arcdc --resource-group <myresourcegroup> --auto-upload-logs true
164
164
```
165
165
166
-
### **Disable** automatic upload of logs to Azure Log Analytics Workspace
166
+
### Enable automatic upload of logs to Azure Log Analytics Workspace
167
167
168
168
If the automatic upload of logs was enabled during Azure Arc data controller deployment, run the below command to disable automatic upload of logs.
169
169
```
@@ -172,14 +172,14 @@ az arcdata dc update --name <name of datacontroller> --resource-group <resource
172
172
az arcdata dc update --name arcdc --resource-group <myresourcegroup> --auto-upload-logs false
173
173
```
174
174
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
176
176
177
-
### **Enable** automatic upload of logs to Azure Log Analytics Workspace
177
+
### Enable automatic upload of logs to Azure Log Analytics Workspace
178
178
179
179
To configure automatic upload of logs using ```kubectl```:
180
180
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:
183
183
184
184
```
185
185
apiVersion: v1
@@ -193,29 +193,31 @@ metadata:
193
193
type: Opaque
194
194
```
195
195
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
- update the autoUploadLogs property to ```"false"```, and save the file
217
-
218
-
220
+
- update the autoUploadLogs property to `"false"`, and save the file
219
221
220
222
## Upload logs to Azure Monitor in **indirect** mode
221
223
@@ -255,7 +257,7 @@ Once your logs are uploaded, you should be able to query them using the log quer
255
257
256
258
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.
257
259
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.
259
261
260
262
```azurecli
261
263
az arcdata dc export --type logs --path logs.json --force --k8s-namespace arc
0 commit comments