elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.14k stars 4.91k forks source link

Azure Monitor module to be able to support multiple subscriptions in the config #37215

Open gizas opened 9 months ago

gizas commented 9 months ago

Describe the enhancement: This request is coming from an existing customer that uses the Azure Monitor Integration with Elastic Agent. The enhancement focuses on the configuration of Azure Monitor and that specifically users need to repeat the credentials for every query configuration they need to make. This makes the config block really difficult to housekeep and in some cases hit the issue 2460

The enhancement will try to:

Describe a specific use case for the enhancement or feature: Customer shared below configuration. base_cfg_storageaccount.yaml.txt

The example can be divided to two categories:

Additional Details

zmoog commented 9 months ago

High-level Overview

This section outlines the core functionality of the Azure Monitor metricset in its present form.

  1. Collect existing cloud resource definitions (e.g., VMs, DBs, etc.)
  2. Collect metric definitions for each resource (e.g., CPU, memory, etc.)
  3. Collect the metric values for each resource (sequentially)

The current metricset allows it to run as a single instance. Additional metricsets running with the same config (or agent policy) would collect the same data multiple times.

Areas of investigation

To simplify the configuration, we need to investigate how to:

To scale the metricset vertically, we need to investigate how to:

To scale the metricset horizontally, we need to investigate how to:

zmoog commented 9 months ago

To move forward in this information-gathering phase, I would investigate the Azure SDK to learn more about the options to discover resources based on service principal instead of the metricset settings.

gizas commented 9 months ago

@zmoog Adding this https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/monitor/azquery

This can be a possible replacement, as this can support azidentity ,which also can support multiple ways of authentication. Maybe we can think of DefaultAzureCredential and EnvironmentCredential which can be configured with environment variables. So this will eliminate the configuration blocks from our files