No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
This is a Logstash output plugin used to write events to an Azure Event Hub
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Logstash Output Plugin for Azure Event Hubs

Gem Version

This is a plugin for Logstash. It is fully free and open source. The license is Apache 2.0. This plugin enables you to send events from Elastic Logstash to an Azure Event Hubs entity. The Azure Event Hubs Java SDK is used to send events via synchronous class methods over AMQP.

Requirements

Installation

To make the Azure Event Hubs output plugin available in your Logstash environment, run the following command:

bin/logstash-plugin install logstash-output-azure_event_hubs

Configuration

Information about configuring Logstash can be found in the Logstash configuration guide.

You will need to configure this plugin before sending events from Logstash to Azure Event Hubs. The following example shows the minimum you need to provide:

output {
    azure_event_hubs {
        service_namespace => "myeventnamespace" #Exclude .servicebus.windows.net
        event_hub => "logs"
        sas_key_name => "myeventnamespace-write"
        sas_key => '...'
    }
}

Available Configuration Keys

Parameter Name Description Notes
service_namespace Azure Service Namespace or Endpoint. Required. Exclude domain name.
service_domain Use a national Azure Cloud. Options: "servicebus.usgovcloudapi.net", "servicebus.cloudapi.de", "servicebus.chinacloudapi.cn"
event_hub Azure Event Hub (Entity) Path. Required
sas_key_name Azure Shared Access Signature (SAS) Key Name. Required
sas_key Azure Shared Access Signature (SAS) Key. Required
connection_retry_count Number of times to retry a failed Event Hubs connection. Default: 3
properties_bag Event metadata key=value pairs to set in the user-defined property bag. See EventData class for more information. This config can be used to route events dynamically for Azure Data Explorer by setting properties:
"Table" => "%{[adx_table_name]}" "Format" => "json" "IngestionMappingReference" => "adx_ingest_map"
Format: properties_bag => { "key1" => "value1" "key2" => "%{[event_field]}" }
client_threads Total threads used by Azure Event Hubs client to handle events. This value is used when creating the Java Concurrency Executor pool size. Default: 4

Development

  • Jruby 9.2.6.0+
  • Java 8/11 JDK
  • Logstash version 7+.
  • Azure Event Hubs namespace, hub, and credential to test against.
  • Gradle is used to download the .jar dependencies and generate the classpath file.
  1. Install Dependencies
rake vendor
bundle install

or

gradle vendor --info
bundle install
  1. Running your unpublished Plugin in Logstash

Run in a local Logstash clone. Edit the Logstash Gemfile and add the local plugin path at the top of the Gemfile, for example:

gem 'logstash-output-azure_event_hubs', :path => '/path/to/logstash-output-azure_event_hubs'

Contributing

All contributions are welcome: ideas, patches, documentation, bug reports, and complaints. For more information about contributing, see the CONTRIBUTING file.