Caution

Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.

Open source

loki.source.azure_event_hubs

loki.source.azure_event_hubs receives Azure Event Hubs messages by making use of an Apache Kafka endpoint on Event Hubs. For more information, see the Azure Event Hubs documentation.

To learn more about streaming Azure logs to an Azure Event Hubs, refer to Microsoft’s tutorial on how to Stream Azure Active Directory logs to an Azure event hub.

Note that an Apache Kafka endpoint is not available within the Basic pricing plan. For more information, see the Event Hubs pricing page.

Multiple loki.source.azure_event_hubs components can be specified by giving them different labels.

Usage

Alloy
loki.source.azure_event_hubs "LABEL" {
	fully_qualified_namespace = "HOST:PORT"
	event_hubs                = EVENT_HUB_LIST
	forward_to                = RECEIVER_LIST

	authentication {
		mechanism = "AUTHENTICATION_MECHANISM"
	}
}

Arguments

loki.source.azure_event_hubs supports the following arguments:

NameTypeDescriptionDefaultRequired
fully_qualified_namespacestringEvent hub namespace.yes
event_hubslist(string)Event Hubs to consume.yes
group_idstringThe Kafka consumer group id."loki.source.azure_event_hubs"no
assignorstringThe consumer group rebalancing strategy to use."range"no
use_incoming_timestampboolWhether or not to use the timestamp received from Azure Event Hub.falseno
labelsmap(string)The labels to associate with each received event.{}no
forward_tolist(LogsReceiver)