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-monitor/essentials/activity-log.md
+6-33Lines changed: 6 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,22 +182,9 @@ Each event is stored in the PT1H.json file with the following format. This forma
182
182
183
183
## Legacy collection methods
184
184
185
-
This section describes legacy methods for collecting the activity log that were used prior to diagnostic settings. If you're using these methods, consider transitioning to diagnostic settings that provide better functionality and consistency with resource logs.
185
+
Log profiles are the legacy method for sending the activity log to storage or event hubs. If you're using this method, consider transitioning to diagnostic settings, which provide better functionality and consistency with resource logs.
186
186
187
-
### Log profiles
188
-
189
-
Log profiles are the legacy method for sending the activity log to storage or event hubs. Use the following procedure to continue working with a log profile or to disable it in preparation for migrating to a diagnostic setting.
190
-
191
-
1. From the **Azure Monitor** menu in the Azure portal, select **Activity log**.
192
-
1. Select **Export Activity Logs**.
193
-
194
-

195
-
196
-
1. Select the purple banner for the legacy experience.
197
-
198
-

199
-
200
-
### Configure a log profile by using PowerShell
187
+
### [PowerShell](#tab/powershell)
201
188
202
189
If a log profile already exists, you first must remove the existing log profile and then create a new one.
203
190
@@ -225,9 +212,9 @@ If a log profile already exists, you first must remove the existing log profile
225
212
| RetentionInDays |Yes |Number of days for which events should be retained in the storage account, from 1 through 365. A value of zero stores the logs indefinitely. |
226
213
| Category |No |Comma-separated list of event categories to be collected. Possible values are Write, Delete, and Action. |
227
214
228
-
### Example script
215
+
**Example script**
229
216
230
-
The following sample PowerShell script is used to create a log profile that writes the activity log to both a storage account and an event hub.
217
+
This sample PowerShell script creates a log profile that writes the activity log to both a storage account and an event hub.
231
218
232
219
```powershell
233
220
# Settings needed for the new log profile
@@ -247,7 +234,7 @@ The following sample PowerShell script is used to create a log profile that writ
### Configure a log profile by using the Azure CLI
237
+
### [CLI](#tab/cli)
251
238
252
239
If a log profile already exists, you first must remove the existing log profile and then create a log profile.
253
240
@@ -267,21 +254,7 @@ If a log profile already exists, you first must remove the existing log profile
267
254
|enabled | Yes |True or False. Used to enable or disable the retention policy. If True, then the `days` parameter must be a value greater than zero.
268
255
| categories |Yes |Space-separated list of event categories that should be collected. Possible values are Write, Delete, and Action. |
269
256
270
-
### Log Analytics workspace
271
-
272
-
The legacy method for sending the activity log into a Log Analytics workspace is connecting the sign-in for the workspace configuration.
273
-
274
-
1. From the **Log Analytics workspaces** menu in the Azure portal, select the workspace to collect the activity log.
275
-
1. In the **Workspace Data Sources** section of the workspace's menu, select **Azure Activity log**.
276
-
1. Select the subscription that you want to connect to.
277
-
278
-

279
-
280
-
1. Select **Connect** to connect the activity sign-in subscription to the selected workspace. If the subscription is already connected to another workspace, select **Disconnect** first to disconnect it.
281
-
282
-

283
-
284
-
To disable the setting, do the same procedure and select **Disconnect** to remove the subscription from the workspace.
0 commit comments