No commit activity in last 3 years
No release in over 3 years
This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install logstash-output-azure_event_hub. This gem is not a stand-alone program.
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_hub

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_hub {
        connection_string => "Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_KEY"
    }
}

Available Configuration Keys

Parameter Name Description Notes
connection_string Connection string to the Azure Event Hub. Format: Endpoint=sb://namespace_DNS_Name;EntityPath=EVENT_HUB_NAME;SharedAccessKeyName=SHARED_ACCESS_KEY_NAME;SharedAccessKey=SHARED_ACCESS_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_hub', :path => '/path/to/logstash-output-azure_event_hub'

Contributing

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