Skip to main content
Version: 1.3.0

Azure Blob Storage

Microsoft Azure Long Term Storage

Synopsis

Creates a target that writes log messages to Azure Blob Storage with support for various file formats, authentication methods, and retry mechanisms. Inherits file format capabilities from the base target.

Schema

- name: <string>
description: <string>
type: azblob
pipelines: <pipeline[]>
status: <boolean>
properties:
account: <string>
tenant_id: <string>
client_id: <string>
client_secret: <string>
container: <string>
name: <string>
type: <string>
extension: <string>
compression: <string>
schema: <string>
field_format: <string>
no_buffer: <boolean>
max_retry: <numeric>
retry_interval: <numeric>
timeout: <numeric>
max_size: <numeric>
batch_size: <numeric>
debug:
status: <boolean>
dont_send_logs: <boolean>

Configuration

The following fields are used to define the target:

FieldRequiredDefaultDescription
nameYTarget name
descriptionN-Optional description
typeYMust be azblob
pipelinesN-Optional post-processor pipelines
statusNtrueEnable/disable the target

Azure

FieldRequiredDefaultDescription
accountYAzure storage account name
tenant_idN*-Azure tenant ID (required unless using managed identity)
client_idN*-Azure client ID (required unless using managed identity)
client_secretN*-Azure client secret (required unless using managed identity)
containerN"vmetric"Blob container name

* = Conditionally required (see notes in the Azure section above)

Connection

FieldRequiredDefaultDescription
max_retryN5Maximum number of upload retries
retry_intervalN10Base interval between retries in seconds
timeoutN30Connection timeout in seconds
max_sizeN0Maximum file size in bytes
batch_sizeN100000Maximum number of messages per file
note

When max_size is reached, the current file is uploaded to blob storage and a new file is created. For unlimited file size, set the field to 0.

Files

The following fields can be used for files:

FieldRequiredDefaultDescription
nameN"vmetric.{{.Timestamp}}.{{.Extension}}"Blob name template
typeN"json"File format (json, multijson, avro, parquet)
extensionNMatches typeCustom file extension
compressionN"zstd"Compression algorithm
schemaN-Data schema for Avro/Parquet formats or schema template name
no_bufferNfalseDisable write buffering
field_formatN-Data normalization format. See applicable Normalization section

Debug Options

FieldRequiredDefaultDescription
debug.statusNfalseEnable debug logging
debug.dont_send_logsNfalseProcess logs but don't send to Azure (testing)

Details

The Azure Blob Storage target supports writing to different containers with various file formats and schemas. When using the SystemS3 field in your logs, the value will be used to route the message to the appropriate container.

The target supports the following built-in schema templates for structured data formats:

  • {{Syslog}} - Standard schema for Syslog messages
  • {{CommonSecurityLog}} - Schema compatible with Common Event Format (CEF)

Templates

The following template variables can be used in the blob name:

VariableDescriptionExample
{{.Year}}Current year2024
{{.Month}}Current month01
{{.Day}}Current day15
{{.Timestamp}}Current timestamp in nanoseconds1703688533123456789
{{.Format}}File formatjson
{{.Extension}}File extensionjson
{{.Compression}}Compression typezstd
{{.TargetName}}Target namemy_logs
{{.TargetType}}Target typeazblob
{{.Table}}Container namelogs

Formats

FormatDescription
jsonEach log entry is written as a separate JSON line (JSONL format)
multijsonAll log entries are written as a single JSON array
avroApache Avro format with schema
parquetApache Parquet columnar format with schema

Compression

FormatCompression Options
JSON/MultiJSONzstd (default)
Avronull, deflate, snappy, zstd
Parquetuncompressed, gzip, snappy, zstd, brotli, lz4
warning

Failed uploads are retried automatically based on the max_retry and retry_interval settings. The retry_interval setting is based on an exponential backoff which is retry_interval * 2 ^ attempt, therefore each retry will wait longer than the previous one.

note

Files with no messages (i.e. with counter=0) are automatically skipped during upload.

Examples

The following upload configurations are available.

JSON

The minimum configuration for a JSON blob storage:

targets:
- name: basic_blob
type: azblob
properties:
account: "mystorageaccount"
tenant_id: "00000000-0000-0000-0000-000000000000"
client_id: "00000000-0000-0000-0000-000000000000"
client_secret: "your-client-secret"

Parquet

Configuration for daily partitioned Parquet files:

targets:
- name: parquet_blob
type: azblob
properties:
account: "mystorageaccount"
tenant_id: "00000000-0000-0000-0000-000000000000"
client_id: "00000000-0000-0000-0000-000000000000"
client_secret: "your-client-secret"
container: "logs"
type: "parquet"
compression: "zstd"
name: "logs/year={{.Year}}/month={{.Month}}/day={{.Day}}/data_{{.Timestamp}}.parquet"
max_size: 536870912 # 512MB

High Reliability

Configuration with enhanced retry settings:

targets:
- name: reliable_blob
type: azblob
pipelines:
- checkpoint
properties:
account: "mystorageaccount"
tenant_id: "00000000-0000-0000-0000-000000000000"
client_id: "00000000-0000-0000-0000-000000000000"
client_secret: "your-client-secret"
max_retry: 10
retry_interval: 30
timeout: 60
no_buffer: true

Debug Configuration

Configuration with debugging enabled:

targets:
- name: debug_blob
type: azblob
properties:
account: "mystorageaccount"
tenant_id: "00000000-0000-0000-0000-000000000000"
client_id: "00000000-0000-0000-0000-000000000000"
client_secret: "your-client-secret"
debug:
status: true
dont_send_logs: true # Test mode that doesn't actually upload