Skip to content
Merged
20 changes: 11 additions & 9 deletions packages/azure/_dev/build/docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ The integration v2 preview avoids contention and inefficiencies from using multi

### Event Hub Processor v2 ✨

The integration v2 preview offers a new processor v2 starting with integration version 1.23.0.
As of version 1.23.0, the integration preview includes the new Processor v2.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does "the integration preview" mean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We introduced the new events data stream as the entry point and router for the Azure Logs integration package.

I plan to make the events data stream (aka Azure Logs v2) as the only data stream running an input.

Unfortunately, years ago we updated the Azure Logs packages to allow multiple inputs to read from the same event hub, but this is a fatal flaw. We need to get rid of this.

The other data streams (activitylogs, firewall_logs, etc) are going to stay without an input.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We marked this events data stream named Azure Logs v2 as "preview" because we were not 100% sure this approach would work. But it seems working pretty well.


The processor v2 introduces several changes:
Processor v2 introduces several key improvements:

* It uses the latest Event Hubs SDK from Azure.
* It uses a more efficient checkpoint store based on Azure Blob Storage metadata.
* Built on the latest Azure Event Hubs SDK.
* Features a more efficient checkpoint store leveraging Azure Blob Storage metadata.

The processor v2 is in preview. Processor v1 is still the default and is recommended for typical use cases.
Processor v2 is the default and the recommended standard for all use cases. Processor v1 is being retained as a legacy option to ensure backward compatibility until the next major release.

See the "Event Hub Processor v2 only" section in the integration settings for more details about enabling the processor v2.
For details on configuration, see the "Event Hub Processor v2 only" section in the integration settings.

### FAQ

Expand Down Expand Up @@ -592,7 +592,7 @@ The following settings are **event hub processor v2 only** and available in the

`processor_version` :
_string_
(processor v2 only) The processor version that the integration should use. Possible values are `v1` and `v2` (preview). The processor v2 is in preview. Using the processor v1 is recommended for typical use cases. Default is `v1`.
(processor v2 only) The processor version that the integration should use. Possible values are `v1` (legacy) and `v2`. Using the processor v2 is recommended for typical use cases. Default is `v2`.

`processor_update_interval` :
_string_
Expand All @@ -609,9 +609,11 @@ Possible values are `earliest` and `latest`.

`migrate_checkpoint` :
_boolean_
(processor v2 only) Flag to control whether the processor should perform the checkpoint information migration from v1 to v2 at startup. The checkpoint migration converts the checkpoint information from the v1 format to the v2 format.
(processor v2 only) Controls processor behavior upon the initial transition from v1 to v2. If you are starting directly with v2, you can disregard this setting.

Default is `false`, which means the processor will not perform the checkpoint migration.
Defaults to `true`, which means the processor will automatically migrate checkpoint information from the v1 format to v2.

If set to `false`, the processor will bypass existing v1 checkpoints and replay all events in the Event Hub from the start of the retention window. For example, if set to `false` on an Event Hub with a 1-hour retention period, the processor will replay the last hour's worth of data.

`endpoint_suffix` :
_string_
Expand Down
5 changes: 5 additions & 0 deletions packages/azure/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "1.34.0"
changes:
- description: Switch default processor version to v2.
type: enhancement
link: https://github.com/elastic/integrations/pull/16618
- version: "1.33.0"
changes:
- description: Support log event routing overrides in Azure Logs v2.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,30 @@ storage_account: {{storage_account}}
{{/if}}
{{#if storage_account_key}}
storage_account_key: {{storage_account_key}}
storage_account_connection_string: DefaultEndpointsProtocol=https;AccountName={{storage_account}};AccountKey={{storage_account_key}};EndpointSuffix={{endpoint_suffix}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: i'm guessing storage_account shouldn't be empty if storage_account_key is set, but since it's not in the {{#if storage_account}} there is a chance it's unset.

same with endpoint_suffix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The storage_account contains the storage account name; this option must be set for the input to work.
  • The storage_account_key contains the auth for processor v1.
  • The storage_account_connection_string contains the auth for processor v2

We'll have the opportunity to clean things up a little when we'll drop v1 in a couple of iterations.

{{/if}}
{{#if resource_manager_endpoint}}
resource_manager_endpoint: {{resource_manager_endpoint}}
{{/if}}
{{#if processor_version}}
processor_version: {{processor_version}}
{{/if}}
{{#if migrate_checkpoint}}
migrate_checkpoint: {{migrate_checkpoint}}
{{/if}}
{{#if processor_update_interval}}
processor_update_interval: {{processor_update_interval}}
{{/if}}
{{#if processor_start_position}}
processor_start_position: {{processor_start_position}}
{{/if}}
{{#if partition_receive_timeout}}
partition_receive_timeout: {{partition_receive_timeout}}
{{/if}}
{{#if partition_receive_count}}
partition_receive_count: {{partition_receive_count}}
{{/if}}

tags:
{{#if preserve_original_event}}
- preserve_original_event
Expand Down
103 changes: 103 additions & 0 deletions packages/azure/data_stream/activitylogs/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,109 @@ streams:
type: bool
multi: false
default: false
#
# Processor v2 only settings
#
- name: processor_version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we ok that integration upgrades are going to automatically enable v2 without the user explicitly choosing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to push users to the processor v2 while v1 is still available as fallback option. So if v2 falls short for any reason, users can still fallback to v1 while we address the problem.

We need to drop v11 as soon as possible, since the v1's libraries are so old that sticking with them is becoming a risk.

Footnotes

  1. drop v1 as an option and remove it from the Beats codebase.

type: select
title: Processor version
multi: false
required: false
show_user: false
default: v2
options:
- text: v1 (legacy)
value: v1
- text: v2
value: v2
description: >
The processor version that the integration should use. Possible values are v1 (legacy) and v2 (recommended).
The v2 event hub processor is recommended for typical use cases. Defaults to v2.
- name: processor_update_interval
type: text
title: Processor update interval
multi: false
required: false
show_user: false
default: 10s
description: >-
(Processor v2 only) How often the processor should attempt to claim partitions.

Default is `10` seconds.
- name: processor_start_position
type: select
title: Processor start position
multi: false
required: false
show_user: false
default: earliest
options:
- text: earliest
value: earliest
- text: latest
value: latest
description: >-
(Processor v2 only) Controls from what position in the event hub the processor should start processing messages for all partitions.

Possible values are `earliest` and `latest`.

`earliest` starts processing messages from the last checkpoint, or the beginning of the event hub if no checkpoint is available.

`latest` starts processing messages from the the latest event in the event hub and continues to process new events as they arrive.

Default is `earliest`.
- name: partition_receive_timeout
type: text
title: Partition receive timeout
multi: false
required: false
show_user: false
default: 5s
description: >-
(Processor v2 only) Maximum time to wait before processing the messages received from the event hub.

The partition consumer waits up to a "receive count" or a "receive timeout", whichever comes first.

Default is `5` seconds.
- name: partition_receive_count
type: text
title: Partition receive count
multi: false
required: false
show_user: false
default: 100
description: >-
(Processor v2 only) Maximum number of messages from the event hub to wait for before processing them.

The partition consumer waits up to a "receive count" or a "receive timeout", whichever comes first.

Default is `100` messages.
- name: migrate_checkpoint
type: bool
title: Migrate checkpoint information
multi: false
required: false
show_user: false
default: true
description: >-
(Processor v2 only) Controls processor behavior upon the initial transition from v1 to v2. If you are
starting directly with v2, you can disregard this setting.

Defaults to `true`, which means the processor will automatically migrate checkpoint information from the
v1 format to v2.

If set to `false`, the processor will bypass existing v1 checkpoints and replay all events in the
Event Hub from the start of the retention window. For example, if set to `false` on an Event Hub with
a 1-hour retention period, the processor will replay the last hour's worth of data.
- name: endpoint_suffix
type: text
default: core.windows.net
required: true
title: Storage account endpoint suffix
show_user: false
description: >-
(Processor v2 only) Override the default storage account endpoint suffix.

# Ensures agents have permissions to write data to `logs-*-*`
elasticsearch:
dynamic_dataset: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,30 @@ storage_account: {{storage_account}}
{{/if}}
{{#if storage_account_key}}
storage_account_key: {{storage_account_key}}
storage_account_connection_string: DefaultEndpointsProtocol=https;AccountName={{storage_account}};AccountKey={{storage_account_key}};EndpointSuffix={{endpoint_suffix}}
{{/if}}
{{#if resource_manager_endpoint}}
resource_manager_endpoint: {{resource_manager_endpoint}}
{{/if}}
{{#if processor_version}}
processor_version: {{processor_version}}
{{/if}}
{{#if migrate_checkpoint}}
migrate_checkpoint: {{migrate_checkpoint}}
{{/if}}
{{#if processor_update_interval}}
processor_update_interval: {{processor_update_interval}}
{{/if}}
{{#if processor_start_position}}
processor_start_position: {{processor_start_position}}
{{/if}}
{{#if partition_receive_timeout}}
partition_receive_timeout: {{partition_receive_timeout}}
{{/if}}
{{#if partition_receive_count}}
partition_receive_count: {{partition_receive_count}}
{{/if}}

tags:
{{#if preserve_original_event}}
- preserve_original_event
Expand Down
103 changes: 103 additions & 0 deletions packages/azure/data_stream/application_gateway/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,109 @@ streams:
type: bool
multi: false
default: false
#
# Processor v2 only settings
#
- name: processor_version
type: select
title: Processor version
multi: false
required: false
show_user: false
default: v2
options:
- text: v1 (legacy)
value: v1
- text: v2
value: v2
description: >
The processor version that the integration should use. Possible values are v1 (legacy) and v2 (recommended).
The v2 event hub processor is recommended for typical use cases. Defaults to v2.
- name: processor_update_interval
type: text
title: Processor update interval
multi: false
required: false
show_user: false
default: 10s
description: >-
(Processor v2 only) How often the processor should attempt to claim partitions.

Default is `10` seconds.
- name: processor_start_position
type: select
title: Processor start position
multi: false
required: false
show_user: false
default: earliest
options:
- text: earliest
value: earliest
- text: latest
value: latest
description: >-
(Processor v2 only) Controls from what position in the event hub the processor should start processing messages for all partitions.

Possible values are `earliest` and `latest`.

`earliest` starts processing messages from the last checkpoint, or the beginning of the event hub if no checkpoint is available.

`latest` starts processing messages from the the latest event in the event hub and continues to process new events as they arrive.

Default is `earliest`.
- name: partition_receive_timeout
type: text
title: Partition receive timeout
multi: false
required: false
show_user: false
default: 5s
description: >-
(Processor v2 only) Maximum time to wait before processing the messages received from the event hub.

The partition consumer waits up to a "receive count" or a "receive timeout", whichever comes first.

Default is `5` seconds.
- name: partition_receive_count
type: text
title: Partition receive count
multi: false
required: false
show_user: false
default: 100
description: >-
(Processor v2 only) Maximum number of messages from the event hub to wait for before processing them.

The partition consumer waits up to a "receive count" or a "receive timeout", whichever comes first.

Default is `100` messages.
- name: migrate_checkpoint
type: bool
title: Migrate checkpoint information
multi: false
required: false
show_user: false
default: true
description: >-
(Processor v2 only) Controls processor behavior upon the initial transition from v1 to v2. If you are
starting directly with v2, you can disregard this setting.

Defaults to `true`, which means the processor will automatically migrate checkpoint information from the
v1 format to v2.

If set to `false`, the processor will bypass existing v1 checkpoints and replay all events in the
Event Hub from the start of the retention window. For example, if set to `false` on an Event Hub with
a 1-hour retention period, the processor will replay the last hour's worth of data.
- name: endpoint_suffix
type: text
default: core.windows.net
required: true
title: Storage account endpoint suffix
show_user: false
description: >-
(Processor v2 only) Override the default storage account endpoint suffix.

# Ensures agents have permissions to write data to `logs-*-*`
elasticsearch:
dynamic_dataset: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,30 @@ storage_account: {{storage_account}}
{{/if}}
{{#if storage_account_key}}
storage_account_key: {{storage_account_key}}
storage_account_connection_string: DefaultEndpointsProtocol=https;AccountName={{storage_account}};AccountKey={{storage_account_key}};EndpointSuffix={{endpoint_suffix}}
{{/if}}
{{#if resource_manager_endpoint}}
resource_manager_endpoint: {{resource_manager_endpoint}}
{{/if}}
{{#if processor_version}}
processor_version: {{processor_version}}
{{/if}}
{{#if migrate_checkpoint}}
migrate_checkpoint: {{migrate_checkpoint}}
{{/if}}
{{#if processor_update_interval}}
processor_update_interval: {{processor_update_interval}}
{{/if}}
{{#if processor_start_position}}
processor_start_position: {{processor_start_position}}
{{/if}}
{{#if partition_receive_timeout}}
partition_receive_timeout: {{partition_receive_timeout}}
{{/if}}
{{#if partition_receive_count}}
partition_receive_count: {{partition_receive_count}}
{{/if}}

tags:
{{#if preserve_original_event}}
- preserve_original_event
Expand Down
Loading