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
For Event Hubs, IoT Central exports new messages data to your event hub or Service Bus queue or topic in near real time. In the user properties (also referred to as application properties) of each message, the `iotcentral-device-id`, `iotcentral-application-id`, `iotcentral-message-source`, and `iotcentral-message-type` are included automatically.
For Service Bus, IoT Central exports new messages data to your event hub or Service Bus queue or topic in near real time. In the user properties (also referred to as application properties) of each message, the `iotcentral-device-id`, `iotcentral-application-id`, `iotcentral-message-source`, and `iotcentral-message-type` are included automatically.
Copy file name to clipboardExpand all lines: articles/iot-central/core/howto-use-audit-logs.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ This article describes how to use audit logs to track who made what changes at w
19
19
- Filter the audit log.
20
20
- Customize the audit log.
21
21
- Manage access to the audit log.
22
+
- Export the audit log records.
22
23
23
24
The audit log records information about who made a change, information about the modified entity, the action that made change, and when the change was made. The log tracks changes made through the UI, programatically with the REST API, and through the CLI.
24
25
@@ -76,6 +77,12 @@ The built-in **App Administrator** role has access to the audit logs by default.
76
77
> [!IMPORTANT]
77
78
> Any user granted permission to view the audit log can see all log entries even if they don't have permission to view or modify the entities listed in the log. Therefore, any user who can view the log can view the identity of and changes made to any modified entity.
78
79
80
+
## Export logs
81
+
82
+
You can export the audit log records to various destinations for long-term storage, detailed analysis, or integration with other logs. For more information, see [Export IoT data](howto-export-to-event-hubs.md).
83
+
84
+
To send audit logs to [Log Analytics in Azure Monitor](../../azure-monitor/logs/log-analytics-overview.md), use IoT Central data export to send the audit logs to Event Hubs, and then use an Azure Function to add the audit log data to Log Analytics.
85
+
79
86
## Next steps
80
87
81
88
Now that you've learned how to manage users and roles in your IoT Central application, the suggested next step is to learn how to [Manage IoT Central organizations](howto-create-organizations.md).
Each audit log message represents a user-initiated change to an auditable entity inside the IoT Central application. Information in the exported message includes:
16
+
17
+
-`actor`: Information about the user who modified the entity.
18
+
-`applicationId`: The ID of the IoT Central application.
19
+
-`messageSource`: The source for the message - `audit`.
20
+
-`messageType`: The type of change that occurred. One of: `updated`, `created`, `deleted`.
21
+
-`updated`: Only present if `messageType` is `updated`. Provides more detail about the update.
22
+
-`resource`: Details of the modified entity.
23
+
-`schema`: The name and version of the payload schema.
24
+
-`deviceId`: The ID of the device that was changed.
25
+
-`enqueuedTime`: The time at which this change occurred in IoT Central.
26
+
-`enrichments`: Any enrichments set up on the export.
| Device template lifecycle | Export published device template changes including created, updated, and deleted. |[Device template lifecycle changes message format](#device-template-lifecycle-changes-format)|
37
+
| Audit logs | Logs of user-initiated updates to entities in the application. To learn more, see [Use audit logs to track activity in your IoT Central application](../articles/iot-central/core/howto-use-audit-logs.md)|[Audit log message format](#audit-log-format)|
37
38
38
39
1. Optionally, add filters to reduce the amount of data exported. There are different types of filter available for each data export type:
39
40
<aname="DataExportFilters"></a>
@@ -45,6 +46,7 @@ Now that you have a destination to export your data to, set up data export in yo
45
46
|Device connectivity|<ul><li>Filter by device name, device ID, device template, organizations, and if the device is simulated</li><li>Filter stream to only contain changes from devices with properties matching the filter conditions</li></ul>|
46
47
|Device lifecycle|<ul><li>Filter by device name, device ID, device template, and if the device is provisioned, enabled, or simulated</li><li>Filter stream to only contain changes from devices with properties matching the filter conditions</li></ul>|
47
48
|Device template lifecycle|<ul><li>Filter by device template</li></ul>|
49
+
|Audit logs|N/A|
48
50
49
51
1. Optionally, enrich exported messages with extra key-value pair metadata. The following enrichments are available for the telemetry, property changes, device connectivity, and device lifecycle data export types:
Copy file name to clipboardExpand all lines: includes/iot-central-data-export.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,26 +2,26 @@
2
2
title: include file
3
3
description: include file
4
4
services: iot-central
5
-
author: v-krishnag
5
+
author: dominicbetts
6
6
ms.service: iot-central
7
7
ms.topic: include
8
-
ms.date: 04/27/2022
9
-
ms.author: v-krishnag
8
+
ms.date: 11/14/2022
9
+
ms.author: dobett
10
10
ms.custom: include file
11
11
---
12
12
13
13
Use this feature to continuously export filtered and enriched IoT data from your IoT Central application. Data export pushes changes in near real time to other parts of your cloud solution for warm-path insights, analytics, and storage.
14
14
15
15
For example, you can:
16
16
17
-
- Continuously export telemetry, property changes, device connectivity, device lifecycle, and device template lifecycle data in JSON format in near real time.
17
+
- Continuously export telemetry, property changes, device connectivity, device lifecycle, device template lifecycle, and audit log data in JSON format in near real time.
18
18
- Filter the data streams to export data that matches custom conditions.
19
19
- Enrich the data streams with custom values and property values from the device.
20
20
-[Transform the data](../articles/iot-central/core/howto-transform-data-internally.md) streams to modify their shape and content.
21
21
22
-
> [!Tip]
22
+
> [!TIP]
23
23
> When you turn on data export, you get only the data from that moment onward. Currently, data can't be retrieved for a time when data export was off. To retain more historical data, turn on data export early.
24
24
25
25
## Prerequisites
26
26
27
-
To use data export features, you must have the [Data export](../articles/iot-central/core/howto-manage-users-roles.md) permission.
27
+
To use data export features, you must have the [Data export](../articles/iot-central/core/howto-manage-users-roles.md) permission.
0 commit comments