зеркало из
1
0
Форкнуть 0
Logstash output for Kusto
Перейти к файлу
asafmahlev 1e81d2f646 upgrade to latest 2023-09-24 00:13:08 +03:00
.github/workflows upgrade to latest 2023-09-24 00:13:08 +03:00
.vscode Version 0.4.0 (#26) 2019-05-26 16:20:46 +03:00
e2e * Update ClientImpl call 2023-09-19 11:12:07 +05:30
lib/logstash/outputs * Update to 5.0.2 2023-09-18 19:42:34 +05:30
spec * Update to 5.0.2 2023-09-18 19:42:34 +05:30
.gitignore *Add support for proxies *Filter 0 byte files (#42) 2022-08-04 10:43:46 +05:30
.rubocop.yml publish version 0.1.6 (#1) 2018-09-20 16:09:28 +03:00
CHANGELOG.md * Fix review comments 2023-09-20 15:28:47 +05:30
CONTRIBUTORS * Update to 5.0.2 2023-09-18 19:42:34 +05:30
Gemfile * Update to 5.0.2 2023-09-18 19:42:34 +05:30
LICENSE * Update to 5.0.2 2023-09-18 19:42:34 +05:30
README.md * Update README with release note 2023-09-19 11:24:17 +05:30
Rakefile * Update to 5.0.2 2023-09-18 19:42:34 +05:30
SECURITY.md * Update to 5.0.2 2023-09-18 19:42:34 +05:30
logstash-output-kusto.gemspec json-core 2023-09-24 00:08:48 +03:00
start-run.sh * Fix review comments 2023-09-20 15:28:47 +05:30

README.md

Logstash Output Plugin for Azure Data Explorer (Kusto)

build build Gem Gem

This is a plugin for Logstash.

It is fully free and open source. The license is Apache 2.0.

This Azure Data Explorer (ADX) Logstash plugin enables you to process events from Logstash into an Azure Data Explorer database for later analysis.

Requirements

Installation

To make the Azure Data Explorer plugin available in your Logstash environment, run the following command:

bin/logstash-plugin install logstash-output-kusto

Configuration

Perform configuration before sending events from Logstash to Azure Data Explorer. The following example shows the minimum you need to provide. It should be enough for most use-cases:

output {
	kusto {
            path => "/tmp/kusto/%{+YYYY-MM-dd-HH-mm}.txt"
            ingest_url => "https://ingest-<cluster-name>.kusto.windows.net/"
            app_id => "<application id>"
            app_key => "<application key/secret>"
            app_tenant => "<tenant id>"
            database => "<database name>"
            table => "<target table>"
            json_mapping => "<mapping name>"
            proxy_host => "<proxy host>"
            proxy_port => <proxy port>
            proxy_protocol => <"http"|"https">              
	}
}

More information about configuring Logstash can be found in the logstash configuration guide

Available Configuration Keys

Parameter Name Description Notes
path The plugin writes events to temporary files before sending them to ADX. This parameter includes a path where files should be written and a time expression for file rotation to trigger an upload to the ADX service. The example above shows how to rotate the files every minute and check the Logstash docs for more information on time expressions. Required
ingest_url The Kusto endpoint for ingestion-related communication. See it on the Azure Portal. Required
app_id, app_key, app_tenant Credentials required to connect to the ADX service. Be sure to use an application with 'ingest' privileges. Required
database Database name to place events Required
table Target table name to place events Required
json_mapping Maps each attribute from incoming event JSON strings to the appropriate column in the table. Note that this must be in JSON format, as this is the interface between Logstash and Kusto Required
recovery If set to true (default), plugin will attempt to resend pre-existing temp files found in the path upon startup
delete_temp_files Determines if temp files will be deleted after a successful upload (true is default; set false for debug purposes only)
flush_interval The time (in seconds) for flushing writes to temporary files. Default is 2 seconds, 0 will flush on every event. Increase this value to reduce IO calls but keep in mind that events in the buffer will be lost in case of abrupt failure.
proxy_host The proxy hostname for redirecting traffic to Kusto.
proxy_port The proxy port for the proxy. Defaults to 80.
proxy_protocol The proxy server protocol , is one of http or https.

Note : LS_JAVA_OPTS can be used to set proxy parameters as well (using export or SET options)

export  LS_JAVA_OPTS="-Dhttp.proxyHost=1.2.34 -Dhttp.proxyPort=8989 -Dhttps.proxyHost=1.2.3.4 -Dhttps.proxyPort=8989"

Release Notes and versions

Version Release Date Notes
2.0.0 2023-09-19 - Upgrade to the latest Java SDK version 5.0.2. Tests have been performed on Logstash 8.6 and up - Fixes CVE's in common-text & outdated Jackson libraries
1.0.6 2022-11-29 - Upgrade to the latest Java SDK 3.2.1 version. Tests have been performed on Logstash 6.x and up.

Development Requirements

It is reccomened to use the bundled jdk and jruby with logstash to avoid compatibility issues.

To fully build the gem, run:

bundle install
lock_jars
gem build

Contributing

All contributions are welcome: ideas, patches, documentation, bug reports, and complaints. Programming is not a required skill. It is more important to the community that you are able to contribute. For more information about contributing, see the CONTRIBUTING file.