Skip to main content

Azure Monitor

Microsoft Azure Pull

Synopsis

Creates an Azure Monitor collector that simultaneously gathers alerts, logs, and metrics from Azure. Director polls the source system's API at configured intervals to retrieve log and telemetry data rather than receiving pushed events. A single device runs all three collection types concurrently, each maintaining its own checkpoint for incremental updates. Collection types that are not configured are skipped automatically.

Schema

- id: <numeric>
name: <string>
description: <string>
type: azmon
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
tenant_id: <string>
client_id: <string>
client_secret: <string>
subscription_id: <string>
workspace_id: <string>
batch_size: <numeric>

Configuration

The following fields are used to define the device.

Device

FieldRequiredDefaultDescription
idYUnique identifier
nameYDevice name
descriptionN-Optional description
typeYMust be azmon
tagsN-Optional tags
pipelinesN-Optional pre-processor pipelines
statusNtrueEnable/disable the device

Authentication

All collection types share a single set of credentials.

FieldRequiredDefaultDescription
tenant_idYAzure tenant ID
client_idYAzure client ID
client_secretYAzure client secret

Collection

FieldRequiredDefaultDescription
subscription_idNAzure subscription ID (required for alerts and metrics collection)
workspace_idNLog Analytics workspace ID (required for logs collection)
batch_sizeN10000Number of records to fetch per collection cycle

Details

Collection Architecture

Each device instance runs alerts, logs, and metrics collection concurrently via separate goroutines within a single collection cycle. Collection cadence is set service-wide through the FrequencySettings Definition on the platform (the event collector frequency), not as a per-device YAML property. Each collection type maintains its own checkpoint keyed by device ID and type, so a failure in one type does not affect the others' progress.

The subscription_id is required to query Azure Monitor alerts and metrics. The workspace_id is required to query Log Analytics logs. Either or both can be provided; collection types with missing configuration are skipped.

Replay

The azlogsreplay device type re-reads Log Analytics workspace tables over a bounded historical window. The window, chunking and run controls are described in Replay Devices.

note

The replay covers logs only. Alerts and metrics have no replay: this device type reads workspace tables, so a replay device selects the tables it reads rather than collecting all three types the way the streaming device does.

Each selected table is queried once per chunk, bounded on TimeGenerated, and the rows are paged by batch_size. The streaming device's checkpoints are never touched.

FieldRequiredDefaultDescription
workspace_idY-Log Analytics workspace to read from
streamY-Workspace tables to replay, such as SecurityEvent or Syslog
batch_sizeN10000Rows per page within a chunk
start_dateY-Lower bound of the replay window
end_dateN-Upper bound, exclusive. Unset means an open window that follows the present
timezoneNUTCZone used to read an offset-less bound
window_chunkN3600Seconds of the window covered by one query. Minimum 60
intervalN60Seconds between runs while the window still has work
cronN-Cron expression for the run, taking precedence over interval

A Microsoft Sentinel workspace is a Log Analytics workspace, so azlogsreplay covers Sentinel table history as well.

Examples

Basic

Collecting all three data types from a single Azure subscription...

- id: 1
name: azmon
type: azmon
properties:
tenant_id: "00000000-0000-0000-0000-000000000000"
client_id: "11111111-1111-1111-1111-111111111111"
client_secret: "your-client-secret"
subscription_id: "22222222-2222-2222-2222-222222222222"
workspace_id: "33333333-3333-3333-3333-333333333333"