Azure Monitor Logs Sink
The Vector azure_monitor_logs
sink
sends logs to Azure Monitor
logs.
Configuration
- Common
- Advanced
- vector.toml
- vector.yaml
- vector.json
[sinks.my_sink_id]# Generaltype = "azure_monitor_logs" # requiredinputs = ["my-source-or-transform-id"] # requiredazure_resource_id = "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/otherResourceGroup/providers/Microsoft.Storage/storageAccounts/examplestorage" # optional, no defaultcustomer_id = "5ce893d9-2c32-4b6c-91a9-b0887c2de2d6" # requiredhost = "ods.opinsights.azure.com" # optional, defaultlog_type = "MyTableName" # requiredshared_key = "${AZURE_MONITOR_SHARED_KEY_ENV_VAR}" # required# Encoding# Healthcheckhealthcheck.enabled = true # optional, default
- optionalstring
azure_resource_id
Resource ID of the Azure resource the data should be associated with.
- View examples
- optionaltable
batch
Configures the sink batching behavior.
- optionaluint
max_bytes
The maximum size of a batch, in bytes, before it is flushed.
- Default:
30000000
(bytes)
- Default:
- optionaluint
timeout_secs
The maximum age of a batch before it is flushed. See Buffers & batches for more info.
- Default:
1
(seconds)
- Default:
- optionaltable
buffer
Configures the sink specific buffer behavior.
- optionaluint
max_events
The maximum number of events allowed in the buffer. See Buffers & batches for more info.
- Only relevant when: type = "memory"
- Default:
500
(events)
- required*uint
max_size
The maximum size of the buffer on the disk. See Buffers & batches for more info.
- Only required when: type = "disk"
- View examples
- optionalstring
type
The buffer's type and storage mechanism.
- Default:
"memory"
- Enum, must be one of:
"memory"
"disk"
- View examples
- Default:
- optionalstring
when_full
The behavior when the buffer becomes full.
- Default:
"block"
- Enum, must be one of:
"block"
"drop_newest"
- View examples
- Default:
- requiredstring
customer_id
The unique identifier for the Log Analytics workspace.
- View examples
- requiredtable
encoding
Configures the encoding specific sink behavior.
- optional[string]
except_fields
Prevent the sink from encoding the specified labels.
- View examples
- optional[string]
only_fields
Prevent the sink from encoding the specified labels.
- View examples
- optionalstring
timestamp_format
How to format event timestamps.
- Default:
"rfc3339"
- Enum, must be one of:
"rfc3339"
"unix"
- View examples
- Default:
- optionaltable
healthcheck
Health check options for the sink. See Health checks for more info.
- optionalbool
enabled
Enables/disables the healthcheck upon Vector boot.
- Default:
true
- View examples
- Default:
- optionalstring
host
Alternative host for dedicated Azure regions.
- Default:
"ods.opinsights.azure.com"
- View examples
- Default:
- requiredstring
log_type
The record type of the data that is being submitted. Can only contain letters, numbers, and underscore (_), and may not exceed 100 characters.
- View examples
- requiredstring
shared_key
The primary or the secondary key for the Log Analytics workspace.
- View examples
- optionaltable
tls
Configures the TLS options for incoming connections.
- optionalstring
ca_file
Absolute path to an additional CA certificate file, in DER or PEM format (X.509), or an inline CA certificate in PEM format.
- View examples
- optionalstring
crt_file
Absolute path to a certificate file used to identify this connection, in DER or PEM format (X.509) or PKCS#12, or an inline certificate in PEM format. If this is set and is not a PKCS#12 archive,
key_file
must also be set.- View examples
- optionalbool
enabled
Enable TLS during connections to the remote.
- Default:
true
- View examples
- Default:
- optionalstring
key_file
Absolute path to a private key file used to identify this connection, in DER or PEM format (PKCS#8), or an inline private key in PEM format. If this is set,
crt_file
must also be set.- View examples
- optionalstring
key_pass
Pass phrase used to unlock the encrypted key file. This has no effect unless
key_file
is set.- View examples
- optionalbool
verify_certificate
If
true
(the default), Vector will validate the TLS certificate of the remote host.- Default:
true
- View examples
- Default:
- optionalbool
verify_hostname
If
true
(the default), Vector will validate the configured remote host name against the remote host's TLS certificate. Do NOT set this tofalse
unless you understand the risks of not verifying the remote hostname.- Default:
true
- View examples
- Default:
Telemetry
This component provides the following metrics that can be retrieved through
the internal_metrics
source. See the
metrics section in the
monitoring page for more info.
- counter
processed_events_total
The total number of events processed by this component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.file
- The file that produced the errorinstance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
- counter
processed_bytes_total
The total number of bytes processed by the component. This metric includes the following tags:
component_kind
- The Vector component kind.component_name
- The Vector component ID.component_type
- The Vector component type.instance
- The Vector instance identified by host and port.job
- The name of the job producing Vector metrics.
How It Works
Buffers & batches
This component buffers & batches data as shown in the diagram above. You'll notice that Vector treats these concepts differently, instead of treating them as global concepts, Vector treats them as sink specific concepts. This isolates sinks, ensuring services disruptions are contained and delivery guarantees are honored.
Batches are flushed when 1 of 2 conditions are met:
- The batch age meets or exceeds the configured
timeout_secs
. - The batch size meets or exceeds the configured <% if component.options.batch.children.respond_to?(:max_size) %>
max_size
<% else %>max_events
<% end %>.
Buffers are controlled via the buffer.*
options.
Health checks
Health checks ensure that the downstream service is accessible and ready to accept data. This check is performed upon sink initialization. If the health check fails an error will be logged and Vector will proceed to start.
Require health checks
If you'd like to exit immediately upon a health
check failure, you can pass the
--require-healthy
flag:
vector --config /etc/vector/vector.toml --require-healthy
Disable health checks
If you'd like to disable health checks for this
sink you can set the healthcheck
option to
false
.
Transport Layer Security (TLS)
Vector uses Openssl for TLS protocols for it's
maturity. You can enable and adjust TLS behavior via the tls.*
options.