Skip to content

Commit 5bbf877

Browse files
authored
Merge pull request #199821 from yoninalmsft/micro-agent-twin-config
event aggregation changes
2 parents 9c8dad6 + 7f1650b commit 5bbf877

File tree

4 files changed

+94
-66
lines changed

4 files changed

+94
-66
lines changed

articles/defender-for-iot/device-builders/concept-event-aggregation.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
---
22
title: Micro agent event collection (Preview)
3-
description: Defender for IoT security agents collects data and system events from your local device, and sends the data to the Azure cloud for processing, and analytics.
3+
description: Defender for IoT security agents collect data and system events from your local device, and send the data to the Azure cloud for processing, and analytics.
44
ms.date: 04/26/2022
55
ms.topic: conceptual
66
---
77

88
# Micro agent event collection (Preview)
99

10-
Defender for IoT security agents collects data, and system events from your local device, and sends the data to the Azure cloud for processing.
10+
Defender for IoT security agents collect data and system events from your local device, and send the data to the Azure cloud for processing.
1111

1212
If you've configured and connected a Log Analytics workspace, you'll see these events in Log Analytics. For more information, see [Tutorial: Investigate security alerts](tutorial-investigate-security-alerts.md).
1313

14-
The Defender for IoT micro agent collects many types of device events including new processes, and all new connection events. Both the new process, and new connection events may occur frequently on a device. This capability is important for comprehensive security, however, the number of messages the security agents send may quickly meet, or exceed your IoT Hub quota, and cost limits. These messages, and events contain highly valuable security information that is crucial to protecting your device.
14+
The Defender for IoT micro agent collects many types of device events including new processes, and all new connection events. Both the new process and new connection events may occur frequently on a device. This capability is important for comprehensive security, however, the number of messages the security agents send may quickly meet, or exceed your IoT Hub quota, and cost limits. These messages and events contain highly valuable security information that is crucial to protecting your device.
1515

16-
To reduce the number of messages, and costs while maintaining your device's security, Defender for IoT agents aggregate the following types of events:
16+
To reduce the number of messages and costs while maintaining your device's security, Defender for IoT agents aggregate the following types of events:
1717

18-
- ProcessCreate (Linux only)
18+
- Process events (Linux only)
1919

20-
- Network ConnectionCreate
20+
- Network Activity events
2121

22-
Event-based collectors are collectors that are triggered based on corresponding activity from within the device. For example, ``a process was started in the device``.
23-
24-
Triggered based collectors are collectors that are triggered in a scheduled manner based on the customer's configurations.
22+
For more information, see [event aggregation for process and network collectors](#event-aggregation-for-process-and-network-collectors).
2523

26-
## How does event aggregation work?
27-
28-
Defender for IoT agents aggregate events for the interval period, or time window. Once the interval period has passed, the agent sends the aggregated events to the Azure cloud for further analysis. The aggregated events are stored in memory until being sent to the Azure cloud.
24+
Event-based collectors are collectors that are triggered based on corresponding activity from within the device. For example, ``a process was started in the device``.
2925

30-
The agent collects identical events to the ones that are already stored in memory. This collection causes the agent to increase the hit count of this specific event to reduce the memory footprint of the agent. When the aggregation time window passes, the agent sends the hit count of each type of event that occurred. Event aggregation is simply the aggregation of the hit counts of each collected type of event.
26+
Trigger-based collectors are collectors that are triggered in a scheduled manner based on the customer's configurations.
3127

32-
## Process events (event based)
28+
## Process events (event-based collector)
3329

3430
Process events are supported on Linux operating systems.
3531

36-
Process events are considered identical when the *command line*, and *userid* are identical.
32+
Process events are considered identical when the *command line* and *userid* are identical.
3733

3834
The default buffer for process events is 256 processes. When this limit is met, the buffer will cycle, and the oldest process event is discarded in order to make room for the newest processed event. A warning to increase the cache size will be logged.
3935

@@ -48,11 +44,11 @@ The data collected for each event is:
4844
| **Type** | Can be either `fork`, or `exec`. |
4945
| **hit_count** | The aggregate count. The number of executions of the same process, during the same time frame, until the events are sent to the cloud. |
5046

51-
## Network Connection events (event-based collector)
47+
## Network Activity events (event-based collector)
5248

53-
Network Connection events are considered identical when the local port, remote port, transport protocol, local address, and remote address are identical.
49+
Network activity events are considered identical when the local port, remote port, transport protocol, local address, and remote address are identical.
5450

55-
The default buffer for a network connection event is 256. For situations where the cache is full:
51+
The default buffer for a network activity event is 256. For situations where the cache is full:
5652

5753
- **Azure RTOS devices**: No new network events will be cached until the next collection cycle starts.
5854

@@ -75,10 +71,9 @@ The data collected for each event is:
7571
| **Extended properties** | The Additional details of the connection. For example, `host name`. |
7672
| **DNS hit count** | Total hit count of DNS requests |
7773

78-
7974
## Login collector (event-based collector)
8075

81-
The Login collector, collects user sign-ins, sign-outs, and failed sign-in attempts.
76+
The Login collector collects user sign-ins, sign-outs, and failed sign-in attempts.
8277

8378
The Login collector supports the following types of collection methods:
8479

@@ -97,8 +92,7 @@ The following data is collected:
9792
| **remote_address** | The source of connection, either a remote IP address in IPv6 or IPv4 format, or `127.0.0.1/0.0.0.0` to indicate local connection. |
9893
| **Login_UsePAM** | Boolean: <br>- **True**: Only the PAM Login collector is used <br>- **False**: The UTMP Login collector is used, with SYSLOG if SYSLOG is enabled |
9994

100-
101-
## System information (trigger based collector)
95+
## System Information (trigger-based collector)
10296

10397
The data collected for each event is:
10498

@@ -116,17 +110,15 @@ The **nics** properties are composed of the following;
116110

117111
| Parameter | Description|
118112
|--|--|
119-
|**type** | one of the following values: `UNKNOWN`, `ETH`, `WIFI`, `MOBILE`, or `SATELLITE`. |
113+
|**type** | One of the following values: `UNKNOWN`, `ETH`, `WIFI`, `MOBILE`, or `SATELLITE`. |
120114
| **vlans** | The virtual lan associated with the network interface. |
121115
| **vendor** | The vendor of the network controller. |
122116
| **info** | IPS, and MACs associated with the network controller. This Includes the following fields; <br> - **ipv4_address**: The IPv4 address. <br> - **ipv6_address**: The IPv6 address. <br> - **mac**: The MAC address.|
123117

124-
## Baseline (trigger based)
118+
## Baseline (trigger-based collector)
125119

126120
The baseline collector performs periodic CIS checks, and *failed*, *pass*, and *skip* check results are sent to the Defender for IoT cloud service. Defender for IoT aggregates the results and provides recommendations based on any failures.
127121

128-
### Data collection
129-
130122
The data collected for each event is:
131123

132124
| Parameter | Description|
@@ -138,22 +130,32 @@ The data collected for each event is:
138130
| **Remediation** | The recommendation for remediation from CIS. |
139131
| **Severity** | The severity level. |
140132

141-
## SBoM (trigger based)
133+
## SBoM (trigger-based collector)
142134

143135
The SBoM (Software Bill of Materials) collector collects the packages installed on the device periodically.
144136

145137
The data collected on each package includes:
146138

147139
|Parameter |Description |
148140
|---------|---------|
149-
|**Name** | The package name |
150-
|**Version** | The package version |
151-
|**Vendor** | The package's vendor, which is the **Maintainer** field in deb packages |
152-
141+
|**Name** | The package name. |
142+
|**Version** | The package version. |
143+
|**Vendor** | The package's vendor, which is the **Maintainer** field in deb packages. |
153144

154145
> [!NOTE]
155146
> The SBoM collector currently only collects the first 500 packages ingested.
156147
148+
## Event aggregation for Process and Network collectors
149+
150+
How event aggregation works for the [Process events](#process-events-event-based-collector) and [Network Activity events](#network-activity-events-event-based-collector):
151+
152+
Defender for IoT agents aggregate events during the send interval defined in the message frequency configuration for each collector, such as [**Process_MessageFrequency**](concept-micro-agent-configuration.md#process-collector-specific-settings) or [**NetworkActivity_MessageFrequency**](concept-micro-agent-configuration.md#network-activity-collector-specific-settings). Once the send interval period has passed, the agent sends the aggregated events to the Azure cloud for further analysis. The aggregated events are stored in memory until being sent to the Azure cloud.
153+
154+
When the agent collects similar events to the ones that are already stored in memory, the agent will increase the hit count of this specific event to reduce the memory footprint of the agent. When the aggregation time window passes, the agent sends the hit count of each type of event that occurred. Event aggregation is the aggregation of the hit counts of similar events. For example, network activity with the same remote host and on the same port, is aggregated as one event, instead of as a separate event for each packet.
155+
157156
## Next steps
158157

159-
Check your [Defender for IoT security alerts](concept-security-alerts.md).
158+
For more information, see:
159+
160+
- [Micro agent configurations (Preview)](concept-micro-agent-configuration.md)
161+
- Check your [Defender for IoT security alerts](concept-security-alerts.md).

articles/defender-for-iot/device-builders/concept-micro-agent-configuration.md

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ms.topic: conceptual
99

1010
This article describes the different types of configurations that the micro agent supports. Customers can configure the micro agent to fit the needs of their devices, and network environments.
1111

12-
The micro agent's behavior is configured by a set of module twin properties. You can configure the micro agent to best suit your needs. For example, you can exclude events automatically, minimize power consumption, and reduce network bandwidth.
12+
The micro agent's behavior is configured by a set of module twin properties. You can configure the micro agent to best suit your needs. For example, you can turn off certain events to minimize power consumption, and reduce other resource usage.
1313

14-
After any change in configuration, the collector will immediately send all unsent event data. After the data is sent, the changes will be applied, and all the collectors will restart.
14+
After any change in configuration, the collector will immediately send all unsent event data. After the data is sent, the changes will be applied, and collectors will be restarted as needed.
1515

1616
## General configuration
1717

@@ -25,7 +25,7 @@ Default values are as follows:
2525
| **Medium** | 120 (2 hours) |
2626
| **High** | 30 (.5 hours) |
2727

28-
To reduce the number of messages sent to cloud, each priority should be set as a multiple of the one below it. For example, High: 60 minutes, Medium: 120 minutes, Low: 480 minutes.
28+
To reduce resource consumption on the device, each priority should be set as a multiple of the one below it. For example, High: 60 minutes, Medium: 120 minutes, Low: 480 minutes.
2929

3030
The syntax for configuring the frequencies is as follows:
3131

@@ -35,55 +35,75 @@ For example:
3535

3636
`"CollectorsCore_PriorityIntervals"` : `"30,120,1440"`
3737

38-
## Baseline collector-specific settings
38+
## Collector types and properties
39+
40+
Configure the micro agent using the following collector-specific properties and settings:
41+
42+
### Baseline collector-specific settings
3943

4044
| Setting Name | Setting options | Description | Default |
4145
|--|--|--|--|
42-
| **Baseline_GroupsDisabled** | A list of Baseline group names, separated by a comma. <br><br>For example: `Time Synchronization, Network Parameters Host` | Defines the full list of Baseline group names that should be disabled. | Null |
43-
| **Baseline_ChecksDisabled** |A list of Baseline check IDs, separated by a comma. <br><br>For example: `3.3.5,2.2.1.1` | Defines the full list of Baseline check IDs that should be disabled. | Null |
46+
| **Baseline_Disabled** | `True`/`False` | Disables the Baseline collector. | `False` |
47+
| **Baseline_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send Baseline events. | `Low` |
48+
| **Baseline_GroupsDisabled** | A list of Baseline group names, separated by a comma. <br><br>For example: `Time Synchronization, Network Parameters Host` | Defines the full list of Baseline group names that should be disabled. | `Null` |
49+
| **Baseline_ChecksDisabled** |A list of Baseline check IDs, separated by a comma. <br><br>For example: `3.3.5,2.2.1.1` | Defines the full list of Baseline check IDs that should be disabled. | `Null` |
4450

51+
### System Information collector-specific settings
4552

46-
## Event-based collector configurations
53+
| Setting Name | Setting options | Description | Default |
54+
|--|--|--|--|
55+
| **SystemInformation_Disabled** | `True`/`False` | Disables the System Information collector. | `False` |
56+
| **SystemInformation_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send System Information events. | `Low` |
4757

48-
These configurations include process, and network activity collectors.
58+
### SBoM collector-specific settings
4959

5060
| Setting Name | Setting options | Description | Default |
5161
|--|--|--|--|
52-
| **Interval** | `High` <br>`Medium`<br>`Low` | Determines the sending frequency. | `Medium` |
53-
| **Aggregation mode** | `True` <br>`False` | Determines whether to process event aggregation for an identical event. | `True` |
54-
| **Cache size** | cycle FIFO | Defines the number of events collected in between the times that data is sent. | `256` |
55-
| **Disable collector** | `True` <br> `False` | Determines whether or not the collector is operational. | `False` |
62+
| **SBoM_Disabled** | `True`/`False` | Disables the SBoM collector. | `False` |
63+
| **SBoM_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send SBoM events. | `Low` |
5664

57-
## IoT Hub Module-specific settings
65+
### Heartbeat collector-specific settings
5866

5967
| Setting Name | Setting options | Description | Default |
6068
|--|--|--|--|
61-
| **IothubModule_MessageTimeout** | Positive integer, including limits | Defines the number of minutes to retain messages in the outbound queue to the IoT Hub, after which point the messages are dropped. | `2880` (=2 days) |
62-
## Network activity collector-specific settings
69+
| **Heartbeat_Disabled** | `True`/`False` | Disables sending the Heartbeat event. | `False` |
70+
| **Heartbeat_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send Heartbeat events. | `Low` |
71+
72+
### Login collector-specific settings
6373

6474
| Setting Name | Setting options | Description | Default |
6575
|--|--|--|--|
66-
| **Devices** | A list of the network devices separated by a comma. <br><br>For example `eth0,eth1` | Defines the list of network devices (interfaces) that the agent will use to monitor the traffic. <br><br>If a network device isn't listed, the Network Raw events won't be recorded for the missing device.| `eth0` |
67-
| | | | |
68-
69-
## Process collector specific-settings
76+
| **Login_Disabled** | `True`/`False` | Disables the Login collector. | `False` |
77+
| **Login_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send Login events. | `Medium` |
78+
| **Login_UsePAM** | `True`/`False` | Use a PAM module to gather login events. Without PAM, the agent uses a combination of reading UTMP and Syslog to gather login events. If the system doesn't have UTMP or Syslog enabled, using PAM is an option, but will require additional configuration to work properly. For more information, see [Configure Pluggable Authentication Modules (PAM) to audit sign-in events](configure-pam-to-audit-sign-in-events.md) | `False` |
7079

80+
### IoT Hub module-specific settings
7181

7282
| Setting Name | Setting options | Description | Default |
7383
|--|--|--|--|
74-
| **Process_Mode** | `1` = Auto <br>`2` = Netlink <br>`3`= Polling | Determines the process collector mode. In `Auto` mode, the agent first tries to enable the Netlink mode. <br><br>If that fails, it will automatically fall back / switch to the Polling mode.| `1` |
75-
|**Process_PollingInterval** |Integer |Defines the polling interval in microseconds. This value is used when the **Process_Mode** is in `Polling` mode. | `100000` (=0.1 second) |
76-
77-
## Trigger-based collector configurations
84+
| **IothubModule_MessageTimeout** | Positive integer, including limits | Defines the number of minutes to retain messages in the outbound queue to the IoT Hub, after which point the messages are dropped. | `2880` (=2 days) |
7885

79-
These configurations include system information, and baseline collectors.
86+
### Network Activity collector-specific settings
8087

8188
| Setting Name | Setting options | Description | Default |
8289
|--|--|--|--|
83-
| **Interval** | `High` <br>`Medium`<br>`Low` | The frequency in which data is sent. | `Low` |
84-
| **Disable collector** | `True` <br> `False` | Whether or not the collector is operational. | `False` |
90+
| **NetworkActivity_Disabled** | `True`/`False` | Disables the Network Activity collector. | `False` |
91+
| **NetworkActivity_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send Network Activity events. | `Medium` |
92+
| **NetworkActivity_Devices** | A list of the network devices separated by a comma. <br><br>For example `eth0,eth1` | Defines the list of network devices (interfaces) that the agent will use to monitor the traffic. <br><br>If a network device isn't listed, the network raw events won't be recorded for the missing device.| `eth0` |
93+
| **NetworkActivity_CacheSize** | Positive integer | The number of Network Activity events (after aggregation) to keep in the cache between send intervals. Beyond that number, older events will be dropped (lost).| `256` |
8594

95+
### Process collector-specific settings
96+
97+
| Setting Name | Setting options | Description | Default |
98+
|--|--|--|--|
99+
| **Process_Disabled** | `True`/`False` | Disables the Process collector. | `False` |
100+
| **Process_MessageFrequency** | `Low`/`Medium`/`High` | Defines the frequency in which to send Process events. | `Medium` |
101+
|**Process_PollingInterval** | Positive Integer | Defines the polling interval in microseconds. This value is used when the **Process_Mode** is in `Polling` mode. | `100000` (=0.1 second) |
102+
| **Process_Mode** | `1` = Auto <br>`2` = Netlink <br>`3`= Polling | Determines the Process collector mode. In `Auto` mode, the agent first tries to enable the Netlink mode. <br><br>If that fails, it will automatically fall back / switch to the Polling mode.| `1` |
103+
| **Process_CacheSize** | Positive integer | The number of Process events (after aggregation) to keep in the cache between send intervals. Beyond that number, older events will be dropped (lost).| `256` |
86104

87105
## Next steps
88106

89-
For more information, see [Configure a micro agent twin](how-to-configure-micro-agent-twin.md).
107+
For more information, see:
108+
- [Configure a micro agent twin](how-to-configure-micro-agent-twin.md).
109+
- [Micro agent event collection (Preview)](concept-event-aggregation.md)

0 commit comments

Comments
 (0)