logstash-output-kusto 1.0.6-java → 2.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -37
  3. data/CONTRIBUTORS +10 -10
  4. data/Gemfile +11 -22
  5. data/LICENSE +201 -201
  6. data/README.md +102 -94
  7. data/SECURITY.md +41 -41
  8. data/lib/logstash/outputs/kusto/ingestor.rb +142 -138
  9. data/lib/logstash/outputs/kusto/interval.rb +81 -81
  10. data/lib/logstash/outputs/kusto.rb +422 -422
  11. data/lib/logstash-output-kusto_jars.rb +72 -149
  12. data/logstash-output-kusto.gemspec +35 -36
  13. data/spec/outputs/kusto/ingestor_spec.rb +121 -121
  14. data/spec/outputs/kusto_spec.rb +56 -56
  15. data/spec/spec_helpers.rb +21 -21
  16. data/vendor/jar-dependencies/com/azure/azure-core/1.41.0/azure-core-1.41.0.jar +0 -0
  17. data/vendor/jar-dependencies/com/azure/azure-core-http-netty/1.13.5/azure-core-http-netty-1.13.5.jar +0 -0
  18. data/vendor/jar-dependencies/com/azure/azure-data-tables/12.3.13/azure-data-tables-12.3.13.jar +0 -0
  19. data/vendor/jar-dependencies/com/azure/azure-identity/1.9.2/azure-identity-1.9.2.jar +0 -0
  20. data/vendor/jar-dependencies/com/azure/azure-json/1.0.1/azure-json-1.0.1.jar +0 -0
  21. data/vendor/jar-dependencies/com/azure/azure-storage-blob/12.23.0/azure-storage-blob-12.23.0.jar +0 -0
  22. data/vendor/jar-dependencies/com/azure/azure-storage-common/12.22.0/azure-storage-common-12.22.0.jar +0 -0
  23. data/vendor/jar-dependencies/com/azure/azure-storage-internal-avro/12.8.0/azure-storage-internal-avro-12.8.0.jar +0 -0
  24. data/vendor/jar-dependencies/com/azure/azure-storage-queue/12.18.0/azure-storage-queue-12.18.0.jar +0 -0
  25. data/{lib/com/fasterxml/jackson/core/jackson-annotations/2.12.5/jackson-annotations-2.12.5.jar → vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-annotations/2.14.2/jackson-annotations-2.14.2.jar} +0 -0
  26. data/vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-core/2.14.2/jackson-core-2.14.2.jar +0 -0
  27. data/{lib/com/fasterxml/jackson/core/jackson-databind/2.13.0/jackson-databind-2.13.0.jar → vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-databind/2.14.2/jackson-databind-2.14.2.jar} +0 -0
  28. data/vendor/jar-dependencies/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.14.2/jackson-dataformat-xml-2.14.2.jar +0 -0
  29. data/vendor/jar-dependencies/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.14.2/jackson-datatype-jsr310-2.14.2.jar +0 -0
  30. data/{lib/com/fasterxml/woodstox/woodstox-core/6.2.4/woodstox-core-6.2.4.jar → vendor/jar-dependencies/com/fasterxml/woodstox/woodstox-core/6.5.0/woodstox-core-6.5.0.jar} +0 -0
  31. data/vendor/jar-dependencies/com/microsoft/azure/kusto/kusto-data/5.0.2/kusto-data-5.0.2.jar +0 -0
  32. data/vendor/jar-dependencies/com/microsoft/azure/kusto/kusto-ingest/5.0.2/kusto-ingest-5.0.2.jar +0 -0
  33. data/vendor/jar-dependencies/com/microsoft/azure/msal4j/1.13.8/msal4j-1.13.8.jar +0 -0
  34. data/{lib/com/microsoft/azure/msal4j-persistence-extension/1.1.0/msal4j-persistence-extension-1.1.0.jar → vendor/jar-dependencies/com/microsoft/azure/msal4j-persistence-extension/1.2.0/msal4j-persistence-extension-1.2.0.jar} +0 -0
  35. data/vendor/jar-dependencies/com/nimbusds/content-type/2.2/content-type-2.2.jar +0 -0
  36. data/vendor/jar-dependencies/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar +0 -0
  37. data/vendor/jar-dependencies/com/nimbusds/nimbus-jose-jwt/9.30.2/nimbus-jose-jwt-9.30.2.jar +0 -0
  38. data/vendor/jar-dependencies/com/nimbusds/oauth2-oidc-sdk/10.7.1/oauth2-oidc-sdk-10.7.1.jar +0 -0
  39. data/vendor/jar-dependencies/commons-codec/commons-codec/1.13/commons-codec-1.13.jar +0 -0
  40. data/vendor/jar-dependencies/io/netty/netty-buffer/4.1.94.Final/netty-buffer-4.1.94.Final.jar +0 -0
  41. data/{lib/io/netty/netty-codec/4.1.68.Final/netty-codec-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-codec/4.1.94.Final/netty-codec-4.1.94.Final.jar} +0 -0
  42. data/{lib/io/netty/netty-codec-dns/4.1.68.Final/netty-codec-dns-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-codec-dns/4.1.94.Final/netty-codec-dns-4.1.94.Final.jar} +0 -0
  43. data/{lib/io/netty/netty-codec-http/4.1.68.Final/netty-codec-http-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-codec-http/4.1.94.Final/netty-codec-http-4.1.94.Final.jar} +0 -0
  44. data/{lib/io/netty/netty-codec-http2/4.1.68.Final/netty-codec-http2-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-codec-http2/4.1.94.Final/netty-codec-http2-4.1.94.Final.jar} +0 -0
  45. data/vendor/jar-dependencies/io/netty/netty-codec-socks/4.1.94.Final/netty-codec-socks-4.1.94.Final.jar +0 -0
  46. data/vendor/jar-dependencies/io/netty/netty-common/4.1.94.Final/netty-common-4.1.94.Final.jar +0 -0
  47. data/{lib/io/netty/netty-handler/4.1.68.Final/netty-handler-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-handler/4.1.94.Final/netty-handler-4.1.94.Final.jar} +0 -0
  48. data/{lib/io/netty/netty-handler-proxy/4.1.68.Final/netty-handler-proxy-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-handler-proxy/4.1.94.Final/netty-handler-proxy-4.1.94.Final.jar} +0 -0
  49. data/{lib/io/netty/netty-resolver/4.1.68.Final/netty-resolver-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-resolver/4.1.94.Final/netty-resolver-4.1.94.Final.jar} +0 -0
  50. data/vendor/jar-dependencies/io/netty/netty-resolver-dns/4.1.94.Final/netty-resolver-dns-4.1.94.Final.jar +0 -0
  51. data/vendor/jar-dependencies/io/netty/netty-resolver-dns-classes-macos/4.1.94.Final/netty-resolver-dns-classes-macos-4.1.94.Final.jar +0 -0
  52. data/vendor/jar-dependencies/io/netty/netty-resolver-dns-native-macos/4.1.94.Final/netty-resolver-dns-native-macos-4.1.94.Final.jar +0 -0
  53. data/vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/2.0.61.Final/netty-tcnative-boringssl-static-2.0.61.Final.jar +0 -0
  54. data/vendor/jar-dependencies/io/netty/netty-tcnative-classes/2.0.61.Final/netty-tcnative-classes-2.0.61.Final.jar +0 -0
  55. data/{lib/io/netty/netty-transport/4.1.68.Final/netty-transport-4.1.68.Final.jar → vendor/jar-dependencies/io/netty/netty-transport/4.1.94.Final/netty-transport-4.1.94.Final.jar} +0 -0
  56. data/vendor/jar-dependencies/io/netty/netty-transport-classes-epoll/4.1.94.Final/netty-transport-classes-epoll-4.1.94.Final.jar +0 -0
  57. data/vendor/jar-dependencies/io/netty/netty-transport-classes-kqueue/4.1.94.Final/netty-transport-classes-kqueue-4.1.94.Final.jar +0 -0
  58. data/vendor/jar-dependencies/io/netty/netty-transport-native-epoll/4.1.94.Final/netty-transport-native-epoll-4.1.94.Final.jar +0 -0
  59. data/vendor/jar-dependencies/io/netty/netty-transport-native-kqueue/4.1.94.Final/netty-transport-native-kqueue-4.1.94.Final.jar +0 -0
  60. data/vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.94.Final/netty-transport-native-unix-common-4.1.94.Final.jar +0 -0
  61. data/vendor/jar-dependencies/io/projectreactor/netty/reactor-netty-core/1.0.33/reactor-netty-core-1.0.33.jar +0 -0
  62. data/vendor/jar-dependencies/io/projectreactor/netty/reactor-netty-http/1.0.33/reactor-netty-http-1.0.33.jar +0 -0
  63. data/{lib/io/projectreactor/reactor-core/3.4.10/reactor-core-3.4.10.jar → vendor/jar-dependencies/io/projectreactor/reactor-core/3.4.32/reactor-core-3.4.32.jar} +0 -0
  64. data/vendor/jar-dependencies/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar +0 -0
  65. data/vendor/jar-dependencies/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar +0 -0
  66. data/{lib/net/minidev/accessors-smart/2.4.7/accessors-smart-2.4.7.jar → vendor/jar-dependencies/net/minidev/accessors-smart/2.4.9/accessors-smart-2.4.9.jar} +0 -0
  67. data/{lib/net/minidev/json-smart/2.4.7/json-smart-2.4.7.jar → vendor/jar-dependencies/net/minidev/json-smart/2.4.10/json-smart-2.4.10.jar} +0 -0
  68. data/vendor/jar-dependencies/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar +0 -0
  69. data/vendor/jar-dependencies/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar +0 -0
  70. data/vendor/jar-dependencies/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar +0 -0
  71. data/vendor/jar-dependencies/org/logstash/outputs/logstash-output-kusto/2.0.0/logstash-output-kusto-2.0.0.jar +0 -0
  72. data/vendor/jar-dependencies/org/ow2/asm/asm/9.3/asm-9.3.jar +0 -0
  73. data/vendor/jar-dependencies/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar +0 -0
  74. data/version +1 -0
  75. metadata +111 -113
  76. data/lib/com/azure/azure-core/1.21.0/azure-core-1.21.0.jar +0 -0
  77. data/lib/com/azure/azure-core-http-netty/1.11.1/azure-core-http-netty-1.11.1.jar +0 -0
  78. data/lib/com/azure/azure-identity/1.3.7/azure-identity-1.3.7.jar +0 -0
  79. data/lib/com/fasterxml/jackson/core/jackson-annotations/2.13.0/jackson-annotations-2.13.0.jar +0 -0
  80. data/lib/com/fasterxml/jackson/core/jackson-core/2.12.5/jackson-core-2.12.5.jar +0 -0
  81. data/lib/com/fasterxml/jackson/core/jackson-core/2.13.0/jackson-core-2.13.0.jar +0 -0
  82. data/lib/com/fasterxml/jackson/core/jackson-databind/2.12.5/jackson-databind-2.12.5.jar +0 -0
  83. data/lib/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.12.5/jackson-dataformat-xml-2.12.5.jar +0 -0
  84. data/lib/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.5/jackson-datatype-jsr310-2.12.5.jar +0 -0
  85. data/lib/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.12.5/jackson-module-jaxb-annotations-2.12.5.jar +0 -0
  86. data/lib/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar +0 -0
  87. data/lib/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar +0 -0
  88. data/lib/com/google/guava/guava/24.1.1-jre/guava-24.1.1-jre.jar +0 -0
  89. data/lib/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar +0 -0
  90. data/lib/com/microsoft/azure/azure-keyvault-core/1.2.4/azure-keyvault-core-1.2.4.jar +0 -0
  91. data/lib/com/microsoft/azure/azure-storage/8.6.6/azure-storage-8.6.6.jar +0 -0
  92. data/lib/com/microsoft/azure/kusto/kusto-data/3.1.1/kusto-data-3.1.1.jar +0 -0
  93. data/lib/com/microsoft/azure/kusto/kusto-data/3.1.3/kusto-data-3.1.3.jar +0 -0
  94. data/lib/com/microsoft/azure/kusto/kusto-data/3.2.1/kusto-data-3.2.1.jar +0 -0
  95. data/lib/com/microsoft/azure/kusto/kusto-ingest/3.1.1/kusto-ingest-3.1.1.jar +0 -0
  96. data/lib/com/microsoft/azure/kusto/kusto-ingest/3.1.3/kusto-ingest-3.1.3.jar +0 -0
  97. data/lib/com/microsoft/azure/kusto/kusto-ingest/3.2.1/kusto-ingest-3.2.1.jar +0 -0
  98. data/lib/com/microsoft/azure/msal4j/1.11.0/msal4j-1.11.0.jar +0 -0
  99. data/lib/com/nimbusds/content-type/2.1/content-type-2.1.jar +0 -0
  100. data/lib/com/nimbusds/lang-tag/1.5/lang-tag-1.5.jar +0 -0
  101. data/lib/com/nimbusds/nimbus-jose-jwt/9.9.3/nimbus-jose-jwt-9.9.3.jar +0 -0
  102. data/lib/com/nimbusds/oauth2-oidc-sdk/9.7/oauth2-oidc-sdk-9.7.jar +0 -0
  103. data/lib/commons-codec/commons-codec/1.11/commons-codec-1.11.jar +0 -0
  104. data/lib/io/netty/netty-buffer/4.1.68.Final/netty-buffer-4.1.68.Final.jar +0 -0
  105. data/lib/io/netty/netty-codec-socks/4.1.68.Final/netty-codec-socks-4.1.68.Final.jar +0 -0
  106. data/lib/io/netty/netty-common/4.1.68.Final/netty-common-4.1.68.Final.jar +0 -0
  107. data/lib/io/netty/netty-resolver-dns/4.1.68.Final/netty-resolver-dns-4.1.68.Final.jar +0 -0
  108. data/lib/io/netty/netty-resolver-dns-native-macos/4.1.68.Final/netty-resolver-dns-native-macos-4.1.68.Final-osx-x86_64.jar +0 -0
  109. data/lib/io/netty/netty-tcnative-boringssl-static/2.0.43.Final/netty-tcnative-boringssl-static-2.0.43.Final.jar +0 -0
  110. data/lib/io/netty/netty-transport-native-epoll/4.1.68.Final/netty-transport-native-epoll-4.1.68.Final-linux-x86_64.jar +0 -0
  111. data/lib/io/netty/netty-transport-native-kqueue/4.1.68.Final/netty-transport-native-kqueue-4.1.68.Final-osx-x86_64.jar +0 -0
  112. data/lib/io/netty/netty-transport-native-unix-common/4.1.68.Final/netty-transport-native-unix-common-4.1.68.Final.jar +0 -0
  113. data/lib/io/projectreactor/netty/reactor-netty-core/1.0.11/reactor-netty-core-1.0.11.jar +0 -0
  114. data/lib/io/projectreactor/netty/reactor-netty-http/1.0.11/reactor-netty-http-1.0.11.jar +0 -0
  115. data/lib/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar +0 -0
  116. data/lib/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar +0 -0
  117. data/lib/net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar +0 -0
  118. data/lib/net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.jar +0 -0
  119. data/lib/org/apache/commons/commons-lang3/3.11/commons-lang3-3.11.jar +0 -0
  120. data/lib/org/apache/commons/commons-text/1.9/commons-text-1.9.jar +0 -0
  121. data/lib/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar +0 -0
  122. data/lib/org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.jar +0 -0
  123. data/lib/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar +0 -0
  124. data/lib/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar +0 -0
  125. data/lib/org/json/json/20201115/json-20201115.jar +0 -0
  126. data/lib/org/ow2/asm/asm/9.1/asm-9.1.jar +0 -0
  127. data/lib/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar +0 -0
  128. /data/{lib → vendor/jar-dependencies}/com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar +0 -0
  129. /data/{lib → vendor/jar-dependencies}/com/univocity/univocity-parsers/2.9.1/univocity-parsers-2.9.1.jar +0 -0
  130. /data/{lib → vendor/jar-dependencies}/commons-logging/commons-logging/1.2/commons-logging-1.2.jar +0 -0
  131. /data/{lib → vendor/jar-dependencies}/io/github/resilience4j/resilience4j-core/1.7.1/resilience4j-core-1.7.1.jar +0 -0
  132. /data/{lib → vendor/jar-dependencies}/io/github/resilience4j/resilience4j-retry/1.7.1/resilience4j-retry-1.7.1.jar +0 -0
  133. /data/{lib → vendor/jar-dependencies}/io/vavr/vavr/0.10.2/vavr-0.10.2.jar +0 -0
  134. /data/{lib → vendor/jar-dependencies}/io/vavr/vavr-match/0.10.2/vavr-match-0.10.2.jar +0 -0
  135. /data/{lib → vendor/jar-dependencies}/org/apache/commons/commons-text/1.10.0/commons-text-1.10.0.jar +0 -0
  136. /data/{lib → vendor/jar-dependencies}/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar +0 -0
  137. /data/{lib → vendor/jar-dependencies}/org/jetbrains/annotations/22.0.0/annotations-22.0.0.jar +0 -0
  138. /data/{lib → vendor/jar-dependencies}/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar +0 -0
  139. /data/{lib → vendor/jar-dependencies}/org/slf4j/slf4j-simple/1.8.0-beta4/slf4j-simple-1.8.0-beta4.jar +0 -0
@@ -1,150 +1,73 @@
1
- # this is a generated file, to avoid over-writing it just delete this comment
2
- begin
3
- require 'jar_dependencies'
4
- rescue LoadError
5
- require 'io/netty/netty-resolver-dns-native-macos/4.1.68.Final/netty-resolver-dns-native-macos-4.1.68.Final-osx-x86_64.jar'
6
- require 'com/google/guava/guava/24.1.1-jre/guava-24.1.1-jre.jar'
7
- require 'com/microsoft/azure/azure-storage/8.6.6/azure-storage-8.6.6.jar'
8
- require 'io/projectreactor/netty/reactor-netty-http/1.0.11/reactor-netty-http-1.0.11.jar'
9
- require 'net/java/dev/jna/jna/5.5.0/jna-5.5.0.jar'
10
- require 'io/netty/netty-handler-proxy/4.1.68.Final/netty-handler-proxy-4.1.68.Final.jar'
11
- require 'org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar'
12
- require 'io/netty/netty-codec-socks/4.1.68.Final/netty-codec-socks-4.1.68.Final.jar'
13
- require 'org/apache/commons/commons-lang3/3.11/commons-lang3-3.11.jar'
14
- require 'org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar'
15
- require 'com/microsoft/azure/azure-keyvault-core/1.2.4/azure-keyvault-core-1.2.4.jar'
16
- require 'com/fasterxml/jackson/core/jackson-core/2.12.5/jackson-core-2.12.5.jar'
17
- require 'io/github/resilience4j/resilience4j-core/1.7.1/resilience4j-core-1.7.1.jar'
18
- require 'io/netty/netty-codec-dns/4.1.68.Final/netty-codec-dns-4.1.68.Final.jar'
19
- require 'com/nimbusds/nimbus-jose-jwt/9.9.3/nimbus-jose-jwt-9.9.3.jar'
20
- require 'io/netty/netty-transport/4.1.68.Final/netty-transport-4.1.68.Final.jar'
21
- require 'com/fasterxml/jackson/core/jackson-annotations/2.12.5/jackson-annotations-2.12.5.jar'
22
- require 'org/jetbrains/annotations/22.0.0/annotations-22.0.0.jar'
23
- require 'io/netty/netty-transport-native-unix-common/4.1.68.Final/netty-transport-native-unix-common-4.1.68.Final.jar'
24
- require 'io/netty/netty-transport-native-epoll/4.1.68.Final/netty-transport-native-epoll-4.1.68.Final-linux-x86_64.jar'
25
- require 'com/microsoft/azure/kusto/kusto-ingest/3.2.1/kusto-ingest-3.2.1.jar'
26
- require 'io/vavr/vavr/0.10.2/vavr-0.10.2.jar'
27
- require 'io/netty/netty-resolver-dns/4.1.68.Final/netty-resolver-dns-4.1.68.Final.jar'
28
- require 'com/azure/azure-identity/1.3.7/azure-identity-1.3.7.jar'
29
- require 'com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.12.5/jackson-module-jaxb-annotations-2.12.5.jar'
30
- require 'com/fasterxml/jackson/core/jackson-databind/2.12.5/jackson-databind-2.12.5.jar'
31
- require 'net/java/dev/jna/jna-platform/5.6.0/jna-platform-5.6.0.jar'
32
- require 'io/netty/netty-resolver/4.1.68.Final/netty-resolver-4.1.68.Final.jar'
33
- require 'jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar'
34
- require 'commons-logging/commons-logging/1.2/commons-logging-1.2.jar'
35
- require 'net/minidev/accessors-smart/2.4.7/accessors-smart-2.4.7.jar'
36
- require 'io/netty/netty-codec/4.1.68.Final/netty-codec-4.1.68.Final.jar'
37
- require 'commons-codec/commons-codec/1.11/commons-codec-1.11.jar'
38
- require 'com/microsoft/azure/msal4j-persistence-extension/1.1.0/msal4j-persistence-extension-1.1.0.jar'
39
- require 'com/fasterxml/woodstox/woodstox-core/6.2.4/woodstox-core-6.2.4.jar'
40
- require 'org/apache/commons/commons-text/1.10.0/commons-text-1.10.0.jar'
41
- require 'com/github/stephenc/jcip/jcip-annotations/1.0-1/jcip-annotations-1.0-1.jar'
42
- require 'io/netty/netty-transport-native-kqueue/4.1.68.Final/netty-transport-native-kqueue-4.1.68.Final-osx-x86_64.jar'
43
- require 'io/netty/netty-handler/4.1.68.Final/netty-handler-4.1.68.Final.jar'
44
- require 'com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar'
45
- require 'org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar'
46
- require 'org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar'
47
- require 'com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar'
48
- require 'io/netty/netty-codec-http/4.1.68.Final/netty-codec-http-4.1.68.Final.jar'
49
- require 'com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.12.5/jackson-dataformat-xml-2.12.5.jar'
50
- require 'org/ow2/asm/asm/9.1/asm-9.1.jar'
51
- require 'com/azure/azure-core-http-netty/1.11.1/azure-core-http-netty-1.11.1.jar'
52
- require 'com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.5/jackson-datatype-jsr310-2.12.5.jar'
53
- require 'org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar'
54
- require 'org/json/json/20201115/json-20201115.jar'
55
- require 'io/netty/netty-tcnative-boringssl-static/2.0.43.Final/netty-tcnative-boringssl-static-2.0.43.Final.jar'
56
- require 'io/netty/netty-common/4.1.68.Final/netty-common-4.1.68.Final.jar'
57
- require 'net/minidev/json-smart/2.4.7/json-smart-2.4.7.jar'
58
- require 'io/projectreactor/reactor-core/3.4.10/reactor-core-3.4.10.jar'
59
- require 'io/netty/netty-buffer/4.1.68.Final/netty-buffer-4.1.68.Final.jar'
60
- require 'jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar'
61
- require 'io/github/resilience4j/resilience4j-retry/1.7.1/resilience4j-retry-1.7.1.jar'
62
- require 'com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar'
63
- require 'com/univocity/univocity-parsers/2.9.1/univocity-parsers-2.9.1.jar'
64
- require 'io/vavr/vavr-match/0.10.2/vavr-match-0.10.2.jar'
65
- require 'com/nimbusds/content-type/2.1/content-type-2.1.jar'
66
- require 'org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar'
67
- require 'com/microsoft/azure/kusto/kusto-data/3.2.1/kusto-data-3.2.1.jar'
68
- require 'com/microsoft/azure/msal4j/1.11.0/msal4j-1.11.0.jar'
69
- require 'com/nimbusds/lang-tag/1.5/lang-tag-1.5.jar'
70
- require 'com/azure/azure-core/1.21.0/azure-core-1.21.0.jar'
71
- require 'com/nimbusds/oauth2-oidc-sdk/9.7/oauth2-oidc-sdk-9.7.jar'
72
- require 'org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.jar'
73
- require 'io/netty/netty-codec-http2/4.1.68.Final/netty-codec-http2-4.1.68.Final.jar'
74
- require 'org/slf4j/slf4j-simple/1.8.0-beta4/slf4j-simple-1.8.0-beta4.jar'
75
- require 'io/projectreactor/netty/reactor-netty-core/1.0.11/reactor-netty-core-1.0.11.jar'
76
- end
1
+ # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
77
2
 
78
- if defined? Jars
79
- require_jar 'io.netty', 'netty-resolver-dns-native-macos', 'osx-x86_64', '4.1.68.Final'
80
- require_jar 'com.google.guava', 'guava', '24.1.1-jre'
81
- require_jar 'com.microsoft.azure', 'azure-storage', '8.6.6'
82
- require_jar 'io.projectreactor.netty', 'reactor-netty-http', '1.0.11'
83
- require_jar 'net.java.dev.jna', 'jna', '5.5.0'
84
- require_jar 'io.netty', 'netty-handler-proxy', '4.1.68.Final'
85
- require_jar 'org.codehaus.mojo', 'animal-sniffer-annotations', '1.14'
86
- require_jar 'io.netty', 'netty-codec-socks', '4.1.68.Final'
87
- require_jar 'org.apache.commons', 'commons-lang3', '3.11'
88
- require_jar 'org.reactivestreams', 'reactive-streams', '1.0.3'
89
- require_jar 'com.microsoft.azure', 'azure-keyvault-core', '1.2.4'
90
- require_jar 'com.fasterxml.jackson.core', 'jackson-core', '2.12.5'
91
- require_jar 'io.github.resilience4j', 'resilience4j-core', '1.7.1'
92
- require_jar 'io.netty', 'netty-codec-dns', '4.1.68.Final'
93
- require_jar 'com.nimbusds', 'nimbus-jose-jwt', '9.9.3'
94
- require_jar 'io.netty', 'netty-transport', '4.1.68.Final'
95
- require_jar 'com.fasterxml.jackson.core', 'jackson-annotations', '2.12.5'
96
- require_jar 'org.jetbrains', 'annotations', '22.0.0'
97
- require_jar 'io.netty', 'netty-transport-native-unix-common', '4.1.68.Final'
98
- require_jar 'io.netty', 'netty-transport-native-epoll', 'linux-x86_64', '4.1.68.Final'
99
- require_jar 'com.microsoft.azure.kusto', 'kusto-ingest', '3.2.1'
100
- require_jar 'io.vavr', 'vavr', '0.10.2'
101
- require_jar 'io.netty', 'netty-resolver-dns', '4.1.68.Final'
102
- require_jar 'com.azure', 'azure-identity', '1.3.7'
103
- require_jar 'com.fasterxml.jackson.module', 'jackson-module-jaxb-annotations', '2.12.5'
104
- require_jar 'com.fasterxml.jackson.core', 'jackson-databind', '2.12.5'
105
- require_jar 'net.java.dev.jna', 'jna-platform', '5.6.0'
106
- require_jar 'io.netty', 'netty-resolver', '4.1.68.Final'
107
- require_jar 'jakarta.activation', 'jakarta.activation-api', '1.2.1'
108
- require_jar 'commons-logging', 'commons-logging', '1.2'
109
- require_jar 'net.minidev', 'accessors-smart', '2.4.7'
110
- require_jar 'io.netty', 'netty-codec', '4.1.68.Final'
111
- require_jar 'commons-codec', 'commons-codec', '1.11'
112
- require_jar 'com.microsoft.azure', 'msal4j-persistence-extension', '1.1.0'
113
- require_jar 'com.fasterxml.woodstox', 'woodstox-core', '6.2.4'
114
- require_jar 'org.apache.commons', 'commons-text', '1.10.0'
115
- require_jar 'com.github.stephenc.jcip', 'jcip-annotations', '1.0-1'
116
- require_jar 'io.netty', 'netty-transport-native-kqueue', 'osx-x86_64', '4.1.68.Final'
117
- require_jar 'io.netty', 'netty-handler', '4.1.68.Final'
118
- require_jar 'com.google.code.findbugs', 'jsr305', '1.3.9'
119
- require_jar 'org.checkerframework', 'checker-compat-qual', '2.0.0'
120
- require_jar 'org.apache.httpcomponents', 'httpclient', '4.5.13'
121
- require_jar 'com.google.j2objc', 'j2objc-annotations', '1.1'
122
- require_jar 'io.netty', 'netty-codec-http', '4.1.68.Final'
123
- require_jar 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-xml', '2.12.5'
124
- require_jar 'org.ow2.asm', 'asm', '9.1'
125
- require_jar 'com.azure', 'azure-core-http-netty', '1.11.1'
126
- require_jar 'com.fasterxml.jackson.datatype', 'jackson-datatype-jsr310', '2.12.5'
127
- require_jar 'org.codehaus.woodstox', 'stax2-api', '4.2.1'
128
- require_jar 'org.json', 'json', '20201115'
129
- require_jar 'io.netty', 'netty-tcnative-boringssl-static', '2.0.43.Final'
130
- require_jar 'io.netty', 'netty-common', '4.1.68.Final'
131
- require_jar 'net.minidev', 'json-smart', '2.4.7'
132
- require_jar 'io.projectreactor', 'reactor-core', '3.4.10'
133
- require_jar 'io.netty', 'netty-buffer', '4.1.68.Final'
134
- require_jar 'jakarta.xml.bind', 'jakarta.xml.bind-api', '2.3.2'
135
- require_jar 'io.github.resilience4j', 'resilience4j-retry', '1.7.1'
136
- require_jar 'com.google.errorprone', 'error_prone_annotations', '2.1.3'
137
- require_jar 'com.univocity', 'univocity-parsers', '2.9.1'
138
- require_jar 'io.vavr', 'vavr-match', '0.10.2'
139
- require_jar 'com.nimbusds', 'content-type', '2.1'
140
- require_jar 'org.slf4j', 'slf4j-api', '1.8.0-beta4'
141
- require_jar 'com.microsoft.azure.kusto', 'kusto-data', '3.2.1'
142
- require_jar 'com.microsoft.azure', 'msal4j', '1.11.0'
143
- require_jar 'com.nimbusds', 'lang-tag', '1.5'
144
- require_jar 'com.azure', 'azure-core', '1.21.0'
145
- require_jar 'com.nimbusds', 'oauth2-oidc-sdk', '9.7'
146
- require_jar 'org.apache.httpcomponents', 'httpcore', '4.4.15'
147
- require_jar 'io.netty', 'netty-codec-http2', '4.1.68.Final'
148
- require_jar 'org.slf4j', 'slf4j-simple', '1.8.0-beta4'
149
- require_jar 'io.projectreactor.netty', 'reactor-netty-core', '1.0.11'
150
- end
3
+ require 'jar_dependencies'
4
+ require_jar('com.azure', 'azure-core-http-netty', '1.13.5')
5
+ require_jar('com.azure', 'azure-core', '1.41.0')
6
+ require_jar('com.azure', 'azure-data-tables', '12.3.13')
7
+ require_jar('com.azure', 'azure-identity', '1.9.2')
8
+ require_jar('com.azure', 'azure-json', '1.0.1')
9
+ require_jar('com.azure', 'azure-storage-blob', '12.23.0')
10
+ require_jar('com.azure', 'azure-storage-common', '12.22.0')
11
+ require_jar('com.azure', 'azure-storage-internal-avro', '12.8.0')
12
+ require_jar('com.fasterxml.jackson.dataformat', 'jackson-dataformat-xml', '2.14.2')
13
+ require_jar('com.azure', 'azure-storage-queue', '12.18.0')
14
+ require_jar('com.fasterxml.jackson.core', 'jackson-annotations', '2.14.2')
15
+ require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.14.2')
16
+ require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.14.2')
17
+ require_jar('com.fasterxml.jackson.datatype', 'jackson-datatype-jsr310', '2.14.2')
18
+ require_jar('com.fasterxml.woodstox', 'woodstox-core', '6.5.0')
19
+ require_jar('com.github.stephenc.jcip', 'jcip-annotations', '1.0-1')
20
+ require_jar('com.microsoft.azure.kusto', 'kusto-data', '5.0.2')
21
+ require_jar('com.microsoft.azure.kusto', 'kusto-ingest', '5.0.2')
22
+ require_jar('com.microsoft.azure', 'msal4j-persistence-extension', '1.2.0')
23
+ require_jar('com.microsoft.azure', 'msal4j', '1.13.8')
24
+ require_jar('com.nimbusds', 'content-type', '2.2')
25
+ require_jar('com.nimbusds', 'lang-tag', '1.7')
26
+ require_jar('com.nimbusds', 'nimbus-jose-jwt', '9.30.2')
27
+ require_jar('com.nimbusds', 'oauth2-oidc-sdk', '10.7.1')
28
+ require_jar('com.univocity', 'univocity-parsers', '2.9.1')
29
+ require_jar('commons-codec', 'commons-codec', '1.13')
30
+ require_jar('commons-logging', 'commons-logging', '1.2')
31
+ require_jar('io.github.resilience4j', 'resilience4j-core', '1.7.1')
32
+ require_jar('io.github.resilience4j', 'resilience4j-retry', '1.7.1')
33
+ require_jar('io.netty', 'netty-buffer', '4.1.94.Final')
34
+ require_jar('io.netty', 'netty-codec-dns', '4.1.94.Final')
35
+ require_jar('io.netty', 'netty-codec-http2', '4.1.94.Final')
36
+ require_jar('io.netty', 'netty-codec-http', '4.1.94.Final')
37
+ require_jar('io.netty', 'netty-codec-socks', '4.1.94.Final')
38
+ require_jar('io.netty', 'netty-codec', '4.1.94.Final')
39
+ require_jar('io.netty', 'netty-common', '4.1.94.Final')
40
+ require_jar('io.netty', 'netty-handler-proxy', '4.1.94.Final')
41
+ require_jar('io.netty', 'netty-handler', '4.1.94.Final')
42
+ require_jar('io.netty', 'netty-resolver-dns-classes-macos', '4.1.94.Final')
43
+ require_jar('io.netty', 'netty-resolver-dns-native-macos', '4.1.94.Final')
44
+ require_jar('io.netty', 'netty-resolver-dns', '4.1.94.Final')
45
+ require_jar('io.netty', 'netty-resolver', '4.1.94.Final')
46
+ require_jar('io.netty', 'netty-tcnative-boringssl-static', '2.0.61.Final')
47
+ require_jar('io.netty', 'netty-tcnative-classes', '2.0.61.Final')
48
+ require_jar('io.netty', 'netty-transport-classes-epoll', '4.1.94.Final')
49
+ require_jar('io.netty', 'netty-transport-classes-kqueue', '4.1.94.Final')
50
+ require_jar('io.netty', 'netty-transport-native-epoll', '4.1.94.Final')
51
+ require_jar('io.netty', 'netty-transport-native-kqueue', '4.1.94.Final')
52
+ require_jar('io.netty', 'netty-transport-native-unix-common', '4.1.94.Final')
53
+ require_jar('io.netty', 'netty-transport', '4.1.94.Final')
54
+ require_jar('io.projectreactor.netty', 'reactor-netty-core', '1.0.33')
55
+ require_jar('io.projectreactor.netty', 'reactor-netty-http', '1.0.33')
56
+ require_jar('io.projectreactor', 'reactor-core', '3.4.32')
57
+ require_jar('io.vavr', 'vavr-match', '0.10.2')
58
+ require_jar('io.vavr', 'vavr', '0.10.2')
59
+ require_jar('net.java.dev.jna', 'jna-platform', '5.13.0')
60
+ require_jar('net.java.dev.jna', 'jna', '5.13.0')
61
+ require_jar('net.minidev', 'accessors-smart', '2.4.9')
62
+ require_jar('net.minidev', 'json-smart', '2.4.10')
63
+ require_jar('org.apache.commons', 'commons-lang3', '3.12.0')
64
+ require_jar('org.apache.commons', 'commons-text', '1.10.0')
65
+ require_jar('org.apache.httpcomponents', 'httpclient', '4.5.14')
66
+ require_jar('org.apache.httpcomponents', 'httpcore', '4.4.16')
67
+ require_jar('org.codehaus.woodstox', 'stax2-api', '4.2.1')
68
+ require_jar('org.jetbrains', 'annotations', '22.0.0')
69
+ require_jar('org.ow2.asm', 'asm', '9.3')
70
+ require_jar('org.reactivestreams', 'reactive-streams', '1.0.4')
71
+ require_jar('org.slf4j', 'slf4j-api', '1.8.0-beta4')
72
+ require_jar('org.slf4j', 'slf4j-simple', '1.8.0-beta4')
73
+ require_jar('org.logstash.outputs', 'logstash-output-kusto', '2.0.0')
@@ -1,36 +1,35 @@
1
- Gem::Specification.new do |s|
2
- s.name = 'logstash-output-kusto' #WATCH OUT: we hardcoded usage of this name in one of the classes.
3
- s.version = '1.0.6'
4
- s.licenses = ['Apache-2.0']
5
- s.summary = 'Writes events to Azure Data Explorer (Kusto)'
6
- s.description = 'This is a logstash output plugin used to write events to an Azure Data Explorer (a.k.a Kusto)'
7
- s.homepage = 'https://github.com/Azure/logstash-output-kusto'
8
- s.authors = ['Tamir Kamara', 'Asaf Mahlev']
9
- s.email = 'nugetkusto@microsoft.com'
10
- s.require_paths = ['lib']
11
- s.platform = 'java'
12
-
13
- # Files
14
- s.files = Dir['lib/**/*', 'spec/**/*', 'vendor/**/*', '*.gemspec', '*.md', 'CONTRIBUTORS', 'Gemfile', 'LICENSE', 'NOTICE.TXT']
15
-
16
- # Tests
17
- s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
-
19
- # Special flag to let us know this is actually a logstash plugin
20
- s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
21
-
22
- # Gem dependencies
23
- s.add_runtime_dependency 'logstash-core-plugin-api', '~> 2.0'
24
- s.add_runtime_dependency 'logstash-codec-json_lines'
25
- s.add_runtime_dependency 'logstash-codec-line'
26
-
27
- s.add_development_dependency 'logstash-devutils'
28
- s.add_development_dependency 'flores'
29
- s.add_development_dependency 'logstash-input-generator'
30
- s.add_development_dependency 'ruby-maven', '~> 3.3.11'
31
- s.add_development_dependency 'rspec_junit_formatter'
32
-
33
- # Jar dependencies
34
- s.requirements << "jar 'com.microsoft.azure.kusto, kusto-ingest, 3.2.1'"
35
- s.add_runtime_dependency 'jar-dependencies'
36
- end
1
+ Gem::Specification.new do |s|
2
+ s.name = 'logstash-output-kusto' #WATCH OUT: we hardcoded usage of this name in one of the classes.
3
+ s.version = ::File.read('version').split("\n").first
4
+ s.licenses = ['Apache-2.0']
5
+ s.summary = 'Writes events to Azure Data Explorer (Kusto)'
6
+ s.description = 'This is a logstash output plugin used to write events to an Azure Data Explorer (a.k.a Kusto)'
7
+ s.homepage = 'https://github.com/Azure/logstash-output-kusto'
8
+ s.authors = ['Tamir Kamara', 'Asaf Mahlev']
9
+ s.email = 'nugetkusto@microsoft.com'
10
+ s.require_paths = ["lib", "vendor/jar-dependencies"]
11
+ s.platform = 'java'
12
+
13
+ # Files
14
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*", "vendor/jar-dependencies/**/*.rb", "version", "docs/**/*"]
15
+
16
+ # Tests
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+
19
+ # Special flag to let us know this is actually a logstash plugin
20
+ s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
21
+
22
+ # Gem dependencies
23
+ s.add_runtime_dependency 'logstash-core', '>= 8.3.0'
24
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
25
+ s.add_runtime_dependency 'logstash-codec-json_lines'
26
+ s.add_runtime_dependency 'logstash-codec-line'
27
+
28
+ s.add_development_dependency 'logstash-devutils'
29
+ s.add_development_dependency 'flores'
30
+ s.add_development_dependency 'logstash-input-generator'
31
+ s.add_development_dependency 'jar-dependencies', '~> 0.4'
32
+ s.add_development_dependency 'rspec_junit_formatter'
33
+
34
+
35
+ end
@@ -1,121 +1,121 @@
1
- # encoding: utf-8
2
- require_relative "../../spec_helpers.rb"
3
- require 'logstash/outputs/kusto'
4
- require 'logstash/outputs/kusto/ingestor'
5
-
6
- describe LogStash::Outputs::Kusto::Ingestor do
7
-
8
- let(:ingest_url) { "https://ingest-sdkse2etest.eastus.kusto.windows.net/" }
9
- let(:app_id) { "myid" }
10
- let(:app_key) { LogStash::Util::Password.new("mykey") }
11
- let(:app_tenant) { "mytenant" }
12
- let(:database) { "mydatabase" }
13
- let(:table) { "mytable" }
14
- let(:proxy_host) { "localhost" }
15
- let(:proxy_port) { 80 }
16
- let(:proxy_protocol) { "http" }
17
- let(:json_mapping) { "mymapping" }
18
- let(:delete_local) { false }
19
- let(:logger) { spy('logger') }
20
-
21
- describe '#initialize' do
22
-
23
- it 'does not throw an error when initializing' do
24
- # note that this will cause an internal error since connection is being tried.
25
- # however we still want to test that all the java stuff is working as expected
26
- expect {
27
- ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol, logger)
28
- ingestor.stop
29
- }.not_to raise_error
30
- end
31
-
32
- dynamic_name_array = ['/a%{name}/', '/a %{name}/', '/a- %{name}/', '/a- %{name}']
33
-
34
- context 'doesnt allow database to have some dynamic part' do
35
- dynamic_name_array.each do |test_database|
36
- it "with database: #{test_database}" do
37
- expect {
38
- ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, test_database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
39
- ingestor.stop
40
- }.to raise_error(LogStash::ConfigurationError)
41
- end
42
- end
43
- end
44
-
45
- context 'doesnt allow table to have some dynamic part' do
46
- dynamic_name_array.each do |test_table|
47
- it "with database: #{test_table}" do
48
- expect {
49
- ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, test_table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
50
- ingestor.stop
51
- }.to raise_error(LogStash::ConfigurationError)
52
- end
53
- end
54
- end
55
-
56
- context 'doesnt allow mapping to have some dynamic part' do
57
- dynamic_name_array.each do |json_mapping|
58
- it "with database: #{json_mapping}" do
59
- expect {
60
- ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
61
- ingestor.stop
62
- }.to raise_error(LogStash::ConfigurationError)
63
- end
64
- end
65
- end
66
-
67
- context 'proxy protocol has to be http or https' do
68
- it "with proxy protocol: socks" do
69
- expect {
70
- ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,'socks',logger)
71
- ingestor.stop
72
- }.to raise_error(LogStash::ConfigurationError)
73
- end
74
- end
75
-
76
- end
77
-
78
- # describe 'receiving events' do
79
-
80
- # context 'with non-zero flush interval' do
81
- # let(:temporary_output_file) { Stud::Temporary.pathname }
82
-
83
- # let(:event_count) { 100 }
84
- # let(:flush_interval) { 5 }
85
-
86
- # let(:events) do
87
- # event_count.times.map do |idx|
88
- # LogStash::Event.new('subject' => idx)
89
- # end
90
- # end
91
-
92
- # let(:output) { described_class.new(options.merge( {'path' => temporary_output_file, 'flush_interval' => flush_interval, 'delete_temp_files' => false } )) }
93
-
94
- # before(:each) { output.register }
95
-
96
- # after(:each) do
97
- # output.close
98
- # File.exist?(temporary_output_file) && File.unlink(temporary_output_file)
99
- # File.exist?(temporary_output_file + '.kusto') && File.unlink(temporary_output_file + '.kusto')
100
- # end
101
-
102
- # it 'eventually flushes without receiving additional events' do
103
- # output.multi_receive_encoded(events)
104
-
105
- # # events should not all be flushed just yet...
106
- # expect(File.read(temporary_output_file)).to satisfy("have less than #{event_count} lines") do |contents|
107
- # contents && contents.lines.count < event_count
108
- # end
109
-
110
- # # wait for the flusher to run...
111
- # sleep(flush_interval + 1)
112
-
113
- # # events should all be flushed
114
- # expect(File.read(temporary_output_file)).to satisfy("have exactly #{event_count} lines") do |contents|
115
- # contents && contents.lines.count == event_count
116
- # end
117
- # end
118
- # end
119
-
120
- # end
121
- end
1
+ # encoding: utf-8
2
+ require_relative "../../spec_helpers.rb"
3
+ require 'logstash/outputs/kusto'
4
+ require 'logstash/outputs/kusto/ingestor'
5
+
6
+ describe LogStash::Outputs::Kusto::Ingestor do
7
+
8
+ let(:ingest_url) { "https://ingest-sdkse2etest.eastus.kusto.windows.net/" }
9
+ let(:app_id) { "myid" }
10
+ let(:app_key) { LogStash::Util::Password.new("mykey") }
11
+ let(:app_tenant) { "mytenant" }
12
+ let(:database) { "mydatabase" }
13
+ let(:table) { "mytable" }
14
+ let(:proxy_host) { "localhost" }
15
+ let(:proxy_port) { 80 }
16
+ let(:proxy_protocol) { "http" }
17
+ let(:json_mapping) { "mymapping" }
18
+ let(:delete_local) { false }
19
+ let(:logger) { spy('logger') }
20
+
21
+ describe '#initialize' do
22
+
23
+ it 'does not throw an error when initializing' do
24
+ # note that this will cause an internal error since connection is being tried.
25
+ # however we still want to test that all the java stuff is working as expected
26
+ expect {
27
+ ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol, logger)
28
+ ingestor.stop
29
+ }.not_to raise_error
30
+ end
31
+
32
+ dynamic_name_array = ['/a%{name}/', '/a %{name}/', '/a- %{name}/', '/a- %{name}']
33
+
34
+ context 'doesnt allow database to have some dynamic part' do
35
+ dynamic_name_array.each do |test_database|
36
+ it "with database: #{test_database}" do
37
+ expect {
38
+ ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, test_database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
39
+ ingestor.stop
40
+ }.to raise_error(LogStash::ConfigurationError)
41
+ end
42
+ end
43
+ end
44
+
45
+ context 'doesnt allow table to have some dynamic part' do
46
+ dynamic_name_array.each do |test_table|
47
+ it "with database: #{test_table}" do
48
+ expect {
49
+ ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, test_table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
50
+ ingestor.stop
51
+ }.to raise_error(LogStash::ConfigurationError)
52
+ end
53
+ end
54
+ end
55
+
56
+ context 'doesnt allow mapping to have some dynamic part' do
57
+ dynamic_name_array.each do |json_mapping|
58
+ it "with database: #{json_mapping}" do
59
+ expect {
60
+ ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,proxy_protocol,logger)
61
+ ingestor.stop
62
+ }.to raise_error(LogStash::ConfigurationError)
63
+ end
64
+ end
65
+ end
66
+
67
+ context 'proxy protocol has to be http or https' do
68
+ it "with proxy protocol: socks" do
69
+ expect {
70
+ ingestor = described_class.new(ingest_url, app_id, app_key, app_tenant, database, table, json_mapping, delete_local, proxy_host, proxy_port,'socks',logger)
71
+ ingestor.stop
72
+ }.to raise_error(LogStash::ConfigurationError)
73
+ end
74
+ end
75
+
76
+ end
77
+
78
+ # describe 'receiving events' do
79
+
80
+ # context 'with non-zero flush interval' do
81
+ # let(:temporary_output_file) { Stud::Temporary.pathname }
82
+
83
+ # let(:event_count) { 100 }
84
+ # let(:flush_interval) { 5 }
85
+
86
+ # let(:events) do
87
+ # event_count.times.map do |idx|
88
+ # LogStash::Event.new('subject' => idx)
89
+ # end
90
+ # end
91
+
92
+ # let(:output) { described_class.new(options.merge( {'path' => temporary_output_file, 'flush_interval' => flush_interval, 'delete_temp_files' => false } )) }
93
+
94
+ # before(:each) { output.register }
95
+
96
+ # after(:each) do
97
+ # output.close
98
+ # File.exist?(temporary_output_file) && File.unlink(temporary_output_file)
99
+ # File.exist?(temporary_output_file + '.kusto') && File.unlink(temporary_output_file + '.kusto')
100
+ # end
101
+
102
+ # it 'eventually flushes without receiving additional events' do
103
+ # output.multi_receive_encoded(events)
104
+
105
+ # # events should not all be flushed just yet...
106
+ # expect(File.read(temporary_output_file)).to satisfy("have less than #{event_count} lines") do |contents|
107
+ # contents && contents.lines.count < event_count
108
+ # end
109
+
110
+ # # wait for the flusher to run...
111
+ # sleep(flush_interval + 1)
112
+
113
+ # # events should all be flushed
114
+ # expect(File.read(temporary_output_file)).to satisfy("have exactly #{event_count} lines") do |contents|
115
+ # contents && contents.lines.count == event_count
116
+ # end
117
+ # end
118
+ # end
119
+
120
+ # end
121
+ end