Update to the latest kusto java version, to receive the latest features and fixes (#35)
* Update to the latest kusto java version, to receive the latest features and fixes.
This commit is contained in:
Родитель
9f5bb1b2e9
Коммит
647b41e16f
|
@ -85,11 +85,12 @@ jobs:
|
|||
sudo apt-get update && sudo apt-get install logstash
|
||||
- name: Install plugin
|
||||
run: sudo /usr/share/logstash/bin/logstash-plugin install logstash-kusto.gem
|
||||
- run: sudo env "PATH=$PATH" bundle install
|
||||
- run: sudo chmod -R 777 /usr/share/logstash
|
||||
- run: sudo chmod -R 777 .
|
||||
- run: bundle install
|
||||
- run: lock_jars
|
||||
- name: Run e2e
|
||||
run: ruby e2e.rb
|
||||
run: jruby e2e.rb
|
||||
working-directory: 'e2e'
|
||||
env:
|
||||
ENGINE_URL: ${{ secrets.ENGINE_URL }}
|
||||
|
|
|
@ -115,7 +115,8 @@ output {
|
|||
end
|
||||
|
||||
def start
|
||||
@query_client = $kusto_java.data.ClientImpl.new($kusto_java.data.ConnectionStringBuilder::createWithAadApplicationCredentials(@engine_url, @app_id, @app_kay, @tenant_id))
|
||||
@query_client = $kusto_java.data.ClientImpl.new($kusto_java.data.auth.ConnectionStringBuilder::createWithAadApplicationCredentials(@engine_url, @app_id,
|
||||
@app_kay, @tenant_id))
|
||||
create_table_and_mapping
|
||||
run_logstash
|
||||
assert_data
|
||||
|
|
|
@ -29,7 +29,7 @@ class LogStash::Outputs::Kusto < LogStash::Outputs::Base
|
|||
@logger.debug('Preparing Kusto resources.')
|
||||
|
||||
kusto_java = Java::com.microsoft.azure.kusto
|
||||
kusto_connection_string = kusto_java.data.ConnectionStringBuilder.createWithAadApplicationCredentials(ingest_url, app_id, app_key.value, app_tenant)
|
||||
kusto_connection_string = kusto_java.data.auth.ConnectionStringBuilder.createWithAadApplicationCredentials(ingest_url, app_id, app_key.value, app_tenant)
|
||||
@logger.debug(Gem.loaded_specs.to_s)
|
||||
# Unfortunately there's no way to avoid using the gem/plugin name directly...
|
||||
name_for_tracing = "logstash-output-kusto:#{Gem.loaded_specs['logstash-output-kusto']&.version || "unknown"}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Gem::Specification.new do |s|
|
||||
s.name = 'logstash-output-kusto' #WATCH OUT: we hardcoded usage of this name in one of the classes.
|
||||
s.version = '1.0.2'
|
||||
s.version = '1.0.3'
|
||||
s.licenses = ['Apache-2.0']
|
||||
s.summary = 'Writes events to Azure Data Explorer (Kusto)'
|
||||
s.description = 'This is a logstash output plugin used to write events to an Azure Data Explorer (a.k.a Kusto)'
|
||||
|
@ -30,6 +30,6 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency 'ruby-maven', '~> 3.3.11'
|
||||
|
||||
# Jar dependencies
|
||||
s.requirements << "jar 'com.microsoft.azure.kusto, kusto-ingest, 2.1.2"
|
||||
s.requirements << "jar 'com.microsoft.azure.kusto, kusto-ingest, 2.8.2"
|
||||
s.add_runtime_dependency 'jar-dependencies'
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'logstash/outputs/kusto/ingestor'
|
|||
|
||||
describe LogStash::Outputs::Kusto::Ingestor do
|
||||
|
||||
let(:ingest_url) { "mycluster" }
|
||||
let(:ingest_url) { "https://ingest-sdkse2etest.eastus.kusto.windows.net/" }
|
||||
let(:app_id) { "myid" }
|
||||
let(:app_key) { LogStash::Util::Password.new("mykey") }
|
||||
let(:app_tenant) { "mytenant" }
|
||||
|
|
|
@ -7,7 +7,7 @@ require 'logstash/event'
|
|||
describe LogStash::Outputs::Kusto do
|
||||
|
||||
let(:options) { { "path" => "./kusto_tst/%{+YYYY-MM-dd-HH-mm}",
|
||||
"ingest_url" => "mycluster",
|
||||
"ingest_url" => "https://ingest-sdkse2etest.eastus.kusto.windows.net/",
|
||||
"app_id" => "myid",
|
||||
"app_key" => "mykey",
|
||||
"app_tenant" => "mytenant",
|
||||
|
|
Загрузка…
Ссылка в новой задаче