logstash-output-elasticsearch-test 11.16.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +649 -0
- data/CONTRIBUTORS +34 -0
- data/Gemfile +16 -0
- data/LICENSE +202 -0
- data/NOTICE.TXT +5 -0
- data/README.md +106 -0
- data/docs/index.asciidoc +1369 -0
- data/lib/logstash/outputs/elasticsearch/data_stream_support.rb +282 -0
- data/lib/logstash/outputs/elasticsearch/default-ilm-policy.json +14 -0
- data/lib/logstash/outputs/elasticsearch/http_client/manticore_adapter.rb +155 -0
- data/lib/logstash/outputs/elasticsearch/http_client/pool.rb +534 -0
- data/lib/logstash/outputs/elasticsearch/http_client.rb +497 -0
- data/lib/logstash/outputs/elasticsearch/http_client_builder.rb +201 -0
- data/lib/logstash/outputs/elasticsearch/ilm.rb +92 -0
- data/lib/logstash/outputs/elasticsearch/license_checker.rb +52 -0
- data/lib/logstash/outputs/elasticsearch/template_manager.rb +131 -0
- data/lib/logstash/outputs/elasticsearch/templates/ecs-disabled/elasticsearch-6x.json +45 -0
- data/lib/logstash/outputs/elasticsearch/templates/ecs-disabled/elasticsearch-7x.json +44 -0
- data/lib/logstash/outputs/elasticsearch/templates/ecs-disabled/elasticsearch-8x.json +50 -0
- data/lib/logstash/outputs/elasticsearch.rb +699 -0
- data/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb +237 -0
- data/lib/logstash/plugin_mixins/elasticsearch/common.rb +409 -0
- data/lib/logstash/plugin_mixins/elasticsearch/noop_license_checker.rb +9 -0
- data/logstash-output-elasticsearch.gemspec +40 -0
- data/spec/es_spec_helper.rb +225 -0
- data/spec/fixtures/_nodes/6x.json +81 -0
- data/spec/fixtures/_nodes/7x.json +92 -0
- data/spec/fixtures/htpasswd +2 -0
- data/spec/fixtures/license_check/active.json +16 -0
- data/spec/fixtures/license_check/inactive.json +5 -0
- data/spec/fixtures/nginx_reverse_proxy.conf +22 -0
- data/spec/fixtures/scripts/painless/scripted_update.painless +2 -0
- data/spec/fixtures/scripts/painless/scripted_update_nested.painless +1 -0
- data/spec/fixtures/scripts/painless/scripted_upsert.painless +1 -0
- data/spec/fixtures/template-with-policy-es6x.json +48 -0
- data/spec/fixtures/template-with-policy-es7x.json +45 -0
- data/spec/fixtures/template-with-policy-es8x.json +50 -0
- data/spec/fixtures/test_certs/ca.crt +29 -0
- data/spec/fixtures/test_certs/ca.der.sha256 +1 -0
- data/spec/fixtures/test_certs/ca.key +51 -0
- data/spec/fixtures/test_certs/renew.sh +13 -0
- data/spec/fixtures/test_certs/test.crt +30 -0
- data/spec/fixtures/test_certs/test.der.sha256 +1 -0
- data/spec/fixtures/test_certs/test.key +51 -0
- data/spec/fixtures/test_certs/test.p12 +0 -0
- data/spec/fixtures/test_certs/test_invalid.crt +36 -0
- data/spec/fixtures/test_certs/test_invalid.key +51 -0
- data/spec/fixtures/test_certs/test_invalid.p12 +0 -0
- data/spec/fixtures/test_certs/test_self_signed.crt +32 -0
- data/spec/fixtures/test_certs/test_self_signed.key +54 -0
- data/spec/fixtures/test_certs/test_self_signed.p12 +0 -0
- data/spec/integration/outputs/compressed_indexing_spec.rb +70 -0
- data/spec/integration/outputs/create_spec.rb +67 -0
- data/spec/integration/outputs/data_stream_spec.rb +68 -0
- data/spec/integration/outputs/delete_spec.rb +63 -0
- data/spec/integration/outputs/ilm_spec.rb +534 -0
- data/spec/integration/outputs/index_spec.rb +421 -0
- data/spec/integration/outputs/index_version_spec.rb +98 -0
- data/spec/integration/outputs/ingest_pipeline_spec.rb +75 -0
- data/spec/integration/outputs/metrics_spec.rb +66 -0
- data/spec/integration/outputs/no_es_on_startup_spec.rb +78 -0
- data/spec/integration/outputs/painless_update_spec.rb +99 -0
- data/spec/integration/outputs/parent_spec.rb +94 -0
- data/spec/integration/outputs/retry_spec.rb +182 -0
- data/spec/integration/outputs/routing_spec.rb +61 -0
- data/spec/integration/outputs/sniffer_spec.rb +94 -0
- data/spec/integration/outputs/templates_spec.rb +133 -0
- data/spec/integration/outputs/unsupported_actions_spec.rb +75 -0
- data/spec/integration/outputs/update_spec.rb +114 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/support/elasticsearch/api/actions/delete_ilm_policy.rb +19 -0
- data/spec/support/elasticsearch/api/actions/get_alias.rb +18 -0
- data/spec/support/elasticsearch/api/actions/get_ilm_policy.rb +18 -0
- data/spec/support/elasticsearch/api/actions/put_alias.rb +24 -0
- data/spec/support/elasticsearch/api/actions/put_ilm_policy.rb +25 -0
- data/spec/unit/http_client_builder_spec.rb +185 -0
- data/spec/unit/outputs/elasticsearch/data_stream_support_spec.rb +612 -0
- data/spec/unit/outputs/elasticsearch/http_client/manticore_adapter_spec.rb +151 -0
- data/spec/unit/outputs/elasticsearch/http_client/pool_spec.rb +501 -0
- data/spec/unit/outputs/elasticsearch/http_client_spec.rb +339 -0
- data/spec/unit/outputs/elasticsearch/template_manager_spec.rb +189 -0
- data/spec/unit/outputs/elasticsearch_proxy_spec.rb +103 -0
- data/spec/unit/outputs/elasticsearch_spec.rb +1573 -0
- data/spec/unit/outputs/elasticsearch_ssl_spec.rb +197 -0
- data/spec/unit/outputs/error_whitelist_spec.rb +56 -0
- data/spec/unit/outputs/license_check_spec.rb +57 -0
- metadata +423 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'logstash-output-elasticsearch-test'
|
3
|
+
s.version = '11.16.0'
|
4
|
+
s.licenses = ['apache-2.0']
|
5
|
+
s.summary = "Stores logs in Elasticsearch"
|
6
|
+
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
7
|
+
s.authors = ["Elastic&Test"]
|
8
|
+
s.email = 'info@elastic.co'
|
9
|
+
s.homepage = "https://www.elastic.co/guide/en/logstash/current/index.html"
|
10
|
+
s.require_paths = ["lib"]
|
11
|
+
|
12
|
+
s.platform = RUBY_PLATFORM
|
13
|
+
|
14
|
+
# Files
|
15
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
16
|
+
|
17
|
+
# Tests
|
18
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
|
+
|
20
|
+
# Special flag to let us know this is actually a logstash plugin
|
21
|
+
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
|
22
|
+
|
23
|
+
s.add_runtime_dependency "manticore", '>= 0.8.0', '< 1.0.0'
|
24
|
+
s.add_runtime_dependency 'stud', ['>= 0.0.17', '~> 0.0']
|
25
|
+
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
26
|
+
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.0'
|
27
|
+
s.add_runtime_dependency 'logstash-mixin-deprecation_logger_support', '~>1.0'
|
28
|
+
s.add_runtime_dependency 'logstash-mixin-ca_trusted_fingerprint_support', '~>1.0'
|
29
|
+
s.add_runtime_dependency 'logstash-mixin-normalize_config_support', '~>1.0'
|
30
|
+
|
31
|
+
s.add_development_dependency 'logstash-codec-plain'
|
32
|
+
s.add_development_dependency 'logstash-devutils'
|
33
|
+
s.add_development_dependency 'flores'
|
34
|
+
s.add_development_dependency 'cabin', ['~> 0.6']
|
35
|
+
s.add_development_dependency 'webrick'
|
36
|
+
s.add_development_dependency 'webmock'
|
37
|
+
s.add_development_dependency 'rspec-collection_matchers'
|
38
|
+
# Still used in some specs, we should remove this ASAP
|
39
|
+
s.add_development_dependency 'elasticsearch'
|
40
|
+
end
|
@@ -0,0 +1,225 @@
|
|
1
|
+
require_relative './spec_helper'
|
2
|
+
|
3
|
+
require 'elasticsearch'
|
4
|
+
require_relative "support/elasticsearch/api/actions/delete_ilm_policy"
|
5
|
+
require_relative "support/elasticsearch/api/actions/get_alias"
|
6
|
+
require_relative "support/elasticsearch/api/actions/put_alias"
|
7
|
+
require_relative "support/elasticsearch/api/actions/get_ilm_policy"
|
8
|
+
require_relative "support/elasticsearch/api/actions/put_ilm_policy"
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
require 'cabin'
|
12
|
+
|
13
|
+
module ESHelper
|
14
|
+
def get_host_port
|
15
|
+
if ENV["INTEGRATION"] == "true"
|
16
|
+
"elasticsearch:9200"
|
17
|
+
else
|
18
|
+
"localhost:9200"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_client
|
23
|
+
Elasticsearch::Client.new(:hosts => [get_host_port]).tap do |client|
|
24
|
+
allow(client).to receive(:verify_elasticsearch).and_return(true) # bypass client side version checking
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def doc_type
|
29
|
+
if ESHelper.es_version_satisfies?(">=8")
|
30
|
+
nil
|
31
|
+
elsif ESHelper.es_version_satisfies?(">=7")
|
32
|
+
"_doc"
|
33
|
+
else
|
34
|
+
"doc"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.action_for_version(action)
|
39
|
+
action_params = action[1]
|
40
|
+
if ESHelper.es_version_satisfies?(">=8")
|
41
|
+
action_params.delete(:_type)
|
42
|
+
end
|
43
|
+
action[1] = action_params
|
44
|
+
action
|
45
|
+
end
|
46
|
+
|
47
|
+
def todays_date
|
48
|
+
Time.now.strftime("%Y.%m.%d")
|
49
|
+
end
|
50
|
+
|
51
|
+
def field_properties_from_template(template_name, field)
|
52
|
+
template = get_template(@es, template_name)
|
53
|
+
mappings = get_template_mappings(template)
|
54
|
+
mappings["properties"][field]["properties"]
|
55
|
+
end
|
56
|
+
|
57
|
+
def routing_field_name
|
58
|
+
:routing
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.es_version
|
62
|
+
{
|
63
|
+
"number" => [
|
64
|
+
nilify(RSpec.configuration.filter[:es_version]),
|
65
|
+
nilify(ENV['ES_VERSION']),
|
66
|
+
nilify(ENV['ELASTIC_STACK_VERSION']),
|
67
|
+
].compact.first,
|
68
|
+
"build_flavor" => 'default'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
RSpec::Matchers.define :have_hits do |expected|
|
73
|
+
hits_count_path = ESHelper.es_version_satisfies?(">=7") ? %w(hits total value) : %w(hits total)
|
74
|
+
|
75
|
+
match do |actual|
|
76
|
+
@actual_hits_count = actual&.dig(*hits_count_path)
|
77
|
+
values_match? expected, @actual_hits_count
|
78
|
+
end
|
79
|
+
failure_message do |actual|
|
80
|
+
"expected that #{actual} with #{@actual_hits_count || "UNKNOWN" } hits would have #{expected} hits"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
RSpec::Matchers.define :have_index_pattern do |expected|
|
85
|
+
match do |actual|
|
86
|
+
@actual_index_pattterns = Array(actual['index_patterns'].nil? ? actual['template'] : actual['index_patterns'])
|
87
|
+
@actual_index_pattterns.any? { |v| values_match? expected, v }
|
88
|
+
end
|
89
|
+
failure_message do |actual|
|
90
|
+
"expected that #{actual} with index patterns #{@actual_index_pattterns} would have included `#{expected}`"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.es_version_satisfies?(*requirement)
|
95
|
+
es_version = nilify(RSpec.configuration.filter[:es_version]) || nilify(ENV['ES_VERSION']) || nilify(ENV['ELASTIC_STACK_VERSION'])
|
96
|
+
if es_version.nil?
|
97
|
+
puts "Info: ES_VERSION, ELASTIC_STACK_VERSION or 'es_version' tag wasn't set. Returning false to all `es_version_satisfies?` call."
|
98
|
+
return false
|
99
|
+
end
|
100
|
+
es_release_version = Gem::Version.new(es_version).release
|
101
|
+
Gem::Requirement.new(requirement).satisfied_by?(es_release_version)
|
102
|
+
end
|
103
|
+
|
104
|
+
private
|
105
|
+
def self.nilify(str)
|
106
|
+
if str.nil?
|
107
|
+
return str
|
108
|
+
end
|
109
|
+
str.empty? ? nil : str
|
110
|
+
end
|
111
|
+
|
112
|
+
public
|
113
|
+
def clean(client)
|
114
|
+
client.indices.delete_template(:name => "*")
|
115
|
+
client.indices.delete_index_template(:name => "logstash*") rescue nil
|
116
|
+
# This can fail if there are no indexes, ignore failure.
|
117
|
+
client.indices.delete(:index => "*") rescue nil
|
118
|
+
clean_ilm(client) if supports_ilm?(client)
|
119
|
+
end
|
120
|
+
|
121
|
+
def set_cluster_settings(client, cluster_settings)
|
122
|
+
client.cluster.put_settings(body: cluster_settings)
|
123
|
+
get_cluster_settings(client)
|
124
|
+
end
|
125
|
+
|
126
|
+
def get_cluster_settings(client)
|
127
|
+
client.cluster.get_settings
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_policy(client, policy_name)
|
131
|
+
client.get_ilm_policy(name: policy_name)
|
132
|
+
end
|
133
|
+
|
134
|
+
def put_policy(client, policy_name, policy)
|
135
|
+
client.put_ilm_policy({:name => policy_name, :body=> policy})
|
136
|
+
end
|
137
|
+
|
138
|
+
def put_alias(client, the_alias, index)
|
139
|
+
body = {
|
140
|
+
"aliases" => {
|
141
|
+
index => {
|
142
|
+
"is_write_index"=> true
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
client.put_alias({name: the_alias, body: body})
|
147
|
+
end
|
148
|
+
|
149
|
+
def clean_ilm(client)
|
150
|
+
client.get_ilm_policy.each_key { |key| client.delete_ilm_policy(name: key) if key =~ /logstash-policy/ }
|
151
|
+
end
|
152
|
+
|
153
|
+
def supports_ilm?(client)
|
154
|
+
begin
|
155
|
+
client.get_ilm_policy
|
156
|
+
true
|
157
|
+
rescue
|
158
|
+
false
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
def max_docs_policy(max_docs)
|
163
|
+
{
|
164
|
+
"policy" => {
|
165
|
+
"phases"=> {
|
166
|
+
"hot" => {
|
167
|
+
"actions" => {
|
168
|
+
"rollover" => {
|
169
|
+
"max_docs" => max_docs
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
end
|
177
|
+
|
178
|
+
def max_age_policy(max_age)
|
179
|
+
{
|
180
|
+
"policy" => {
|
181
|
+
"phases"=> {
|
182
|
+
"hot" => {
|
183
|
+
"actions" => {
|
184
|
+
"rollover" => {
|
185
|
+
"max_age" => max_age
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
end
|
193
|
+
|
194
|
+
def get_template(client, name)
|
195
|
+
if ESHelper.es_version_satisfies?(">=8")
|
196
|
+
t = client.indices.get_index_template(name: name)
|
197
|
+
t['index_templates'][0]['index_template']
|
198
|
+
else
|
199
|
+
t = client.indices.get_template(name: name)
|
200
|
+
t[name]
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
def get_template_settings(template)
|
205
|
+
if ESHelper.es_version_satisfies?(">=8")
|
206
|
+
template['template']['settings']
|
207
|
+
else
|
208
|
+
template['settings']
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
def get_template_mappings(template)
|
213
|
+
if ESHelper.es_version_satisfies?(">=8")
|
214
|
+
template['template']['mappings']
|
215
|
+
elsif ESHelper.es_version_satisfies?(">=7")
|
216
|
+
template['mappings']
|
217
|
+
else
|
218
|
+
template['mappings']["_default_"]
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
RSpec.configure do |config|
|
224
|
+
config.include ESHelper
|
225
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"_nodes" : {
|
3
|
+
"total" : 3,
|
4
|
+
"successful" : 3,
|
5
|
+
"failed" : 0
|
6
|
+
},
|
7
|
+
"cluster_name" : "dev",
|
8
|
+
"nodes" : {
|
9
|
+
"Ur_68iBvTlm7Xr1HgSsh6w" : {
|
10
|
+
"name" : "dev-es-master01",
|
11
|
+
"transport_address" : "http://localhost:9200",
|
12
|
+
"host" : "localhost",
|
13
|
+
"ip" : "127.0.0.1",
|
14
|
+
"version" : "6.8.10",
|
15
|
+
"build_hash" : "19c13d0",
|
16
|
+
"roles" : [
|
17
|
+
"master"
|
18
|
+
],
|
19
|
+
"http" : {
|
20
|
+
"bound_address" : [
|
21
|
+
"[::]:9200"
|
22
|
+
],
|
23
|
+
"publish_address" : "127.0.0.1:9200",
|
24
|
+
"max_content_length_in_bytes" : 104857600
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"sari4do3RG-mgh2CIZeHwA" : {
|
28
|
+
"name" : "dev-es-data01",
|
29
|
+
"transport_address" : "http://localhost:9201",
|
30
|
+
"host" : "localhost",
|
31
|
+
"ip" : "127.0.0.1",
|
32
|
+
"version" : "6.8.10",
|
33
|
+
"build_hash" : "19c13d0",
|
34
|
+
"roles" : [
|
35
|
+
"data"
|
36
|
+
],
|
37
|
+
"http" : {
|
38
|
+
"bound_address" : [
|
39
|
+
"[::]:9200"
|
40
|
+
],
|
41
|
+
"publish_address" : "127.0.0.1:9201",
|
42
|
+
"max_content_length_in_bytes" : 104857600
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"Rjy1WL66RHm4fyzXA8PCGQ" : {
|
46
|
+
"name" : "dev-es-datamaster01",
|
47
|
+
"transport_address" : "http://localhost:9202",
|
48
|
+
"host" : "localhost",
|
49
|
+
"ip" : "127.0.0.1",
|
50
|
+
"version" : "6.8.10",
|
51
|
+
"build_hash" : "19c13d0",
|
52
|
+
"roles" : [
|
53
|
+
"data",
|
54
|
+
"master"
|
55
|
+
],
|
56
|
+
"http" : {
|
57
|
+
"bound_address" : [
|
58
|
+
"[::]:9200"
|
59
|
+
],
|
60
|
+
"publish_address" : "127.0.0.1:9202",
|
61
|
+
"max_content_length_in_bytes" : 104857600
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"OguP_obcT_S9JYNB8SKKgQ" : {
|
65
|
+
"name" : "dev-es-coordinator01",
|
66
|
+
"transport_address" : "http://localhost:9203",
|
67
|
+
"host" : "localhost",
|
68
|
+
"ip" : "127.0.0.1",
|
69
|
+
"version" : "6.8.10",
|
70
|
+
"build_hash" : "19c13d0",
|
71
|
+
"roles" : [ ],
|
72
|
+
"http" : {
|
73
|
+
"bound_address" : [
|
74
|
+
"[::]:9200"
|
75
|
+
],
|
76
|
+
"publish_address" : "127.0.0.1:9203",
|
77
|
+
"max_content_length_in_bytes" : 104857600
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
{
|
2
|
+
"_nodes" : {
|
3
|
+
"total" : 3,
|
4
|
+
"successful" : 3,
|
5
|
+
"failed" : 0
|
6
|
+
},
|
7
|
+
"cluster_name" : "elasticsearch",
|
8
|
+
"nodes" : {
|
9
|
+
"kVPTh7ZvSgWmTRMy-4YExQ" : {
|
10
|
+
"name" : "kVPTh7Z",
|
11
|
+
"transport_address" : "127.0.0.1:9300",
|
12
|
+
"host" : "dev-master",
|
13
|
+
"ip" : "127.0.0.1",
|
14
|
+
"version" : "7.0.0",
|
15
|
+
"build_flavor" : "default",
|
16
|
+
"build_type" : "tar",
|
17
|
+
"build_hash" : "b0e7036",
|
18
|
+
"roles" : [
|
19
|
+
"master"
|
20
|
+
],
|
21
|
+
"attributes" : {
|
22
|
+
"ml.machine_memory" : "17179869184",
|
23
|
+
"xpack.installed" : "true",
|
24
|
+
"ml.max_open_jobs" : "20",
|
25
|
+
"ml.enabled" : "true"
|
26
|
+
},
|
27
|
+
"http" : {
|
28
|
+
"bound_address" : [
|
29
|
+
"127.0.0.1:9200",
|
30
|
+
"[::1]:9200"
|
31
|
+
],
|
32
|
+
"publish_address" : "dev-master/127.0.0.1:9200",
|
33
|
+
"max_content_length_in_bytes" : 104857600
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"J47OFlfpSHGFwRJSF2hbcg" : {
|
37
|
+
"name" : "J47OFlf",
|
38
|
+
"transport_address" : "127.0.0.1:9301",
|
39
|
+
"host" : "dev-masterdata",
|
40
|
+
"ip" : "127.0.0.1",
|
41
|
+
"version" : "7.0.0",
|
42
|
+
"build_flavor" : "default",
|
43
|
+
"build_type" : "tar",
|
44
|
+
"build_hash" : "b0e7036",
|
45
|
+
"roles" : [
|
46
|
+
"master",
|
47
|
+
"data"
|
48
|
+
],
|
49
|
+
"attributes" : {
|
50
|
+
"ml.machine_memory" : "17179869184",
|
51
|
+
"ml.max_open_jobs" : "20",
|
52
|
+
"xpack.installed" : "true",
|
53
|
+
"ml.enabled" : "true"
|
54
|
+
},
|
55
|
+
"http" : {
|
56
|
+
"bound_address" : [
|
57
|
+
"127.0.0.1:9201",
|
58
|
+
"[::1]:9201"
|
59
|
+
],
|
60
|
+
"publish_address" : "dev-masterdata/127.0.0.1:9201",
|
61
|
+
"max_content_length_in_bytes" : 104857600
|
62
|
+
}
|
63
|
+
},
|
64
|
+
"pDYE99f0QmutVb8gvsf-yw" : {
|
65
|
+
"name" : "pDYE99f",
|
66
|
+
"transport_address" : "127.0.0.1:9302",
|
67
|
+
"host" : "dev-data",
|
68
|
+
"ip" : "127.0.0.1",
|
69
|
+
"version" : "7.0.0",
|
70
|
+
"build_flavor" : "default",
|
71
|
+
"build_type" : "tar",
|
72
|
+
"build_hash" : "b0e7036",
|
73
|
+
"roles" : [
|
74
|
+
"data"
|
75
|
+
],
|
76
|
+
"attributes" : {
|
77
|
+
"ml.machine_memory" : "17179869184",
|
78
|
+
"ml.max_open_jobs" : "20",
|
79
|
+
"xpack.installed" : "true",
|
80
|
+
"ml.enabled" : "true"
|
81
|
+
},
|
82
|
+
"http" : {
|
83
|
+
"bound_address" : [
|
84
|
+
"127.0.0.1:9202",
|
85
|
+
"[::1]:9202"
|
86
|
+
],
|
87
|
+
"publish_address" : "dev-data/127.0.0.1:9202",
|
88
|
+
"max_content_length_in_bytes" : 104857600
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"license": {
|
3
|
+
"status": "active",
|
4
|
+
"uid": "d85d2c6a-b96d-3cc6-96db-5571a789b156",
|
5
|
+
"type": "enterprise",
|
6
|
+
"issue_date": "1970-01-01T00:00:00.000Z",
|
7
|
+
"issue_date_in_millis": 0,
|
8
|
+
"expiry_date": "2100-01-01T00:00:00.000Z",
|
9
|
+
"expiry_date_in_millis": 4102444800000,
|
10
|
+
"max_nodes": null,
|
11
|
+
"max_resource_units": 100000,
|
12
|
+
"issued_to": "Elastic Cloud",
|
13
|
+
"issuer": "API",
|
14
|
+
"start_date_in_millis": 0
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
worker_processes 1;
|
2
|
+
daemon off; # run in foreground
|
3
|
+
|
4
|
+
events {
|
5
|
+
worker_connections 1024;
|
6
|
+
}
|
7
|
+
|
8
|
+
http {
|
9
|
+
server {
|
10
|
+
listen 9900 default_server;
|
11
|
+
ssl on;
|
12
|
+
ssl_certificate server.crt;
|
13
|
+
ssl_certificate_key server.key;
|
14
|
+
client_max_body_size 200m;
|
15
|
+
|
16
|
+
location / {
|
17
|
+
proxy_pass http://localhost:9200;
|
18
|
+
auth_basic "Restricted Content";
|
19
|
+
auth_basic_user_file htpasswd;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
ctx._source.counter += params.event.data.count
|
@@ -0,0 +1 @@
|
|
1
|
+
ctx._source.counter = params.event.counter
|
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"template" : "overwrite-*",
|
3
|
+
"version" : 60001,
|
4
|
+
"settings" : {
|
5
|
+
"index.refresh_interval" : "1s",
|
6
|
+
"number_of_shards": 1,
|
7
|
+
"index.lifecycle.name": "overwrite-policy",
|
8
|
+
"index.lifecycle.rollover_alias": "overwrite"
|
9
|
+
},
|
10
|
+
"mappings" : {
|
11
|
+
"_default_" : {
|
12
|
+
"dynamic_templates" : [ {
|
13
|
+
"message_field" : {
|
14
|
+
"path_match" : "message",
|
15
|
+
"match_mapping_type" : "string",
|
16
|
+
"mapping" : {
|
17
|
+
"type" : "text",
|
18
|
+
"norms" : false
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}, {
|
22
|
+
"string_fields" : {
|
23
|
+
"match" : "*",
|
24
|
+
"match_mapping_type" : "string",
|
25
|
+
"mapping" : {
|
26
|
+
"type" : "text", "norms" : false,
|
27
|
+
"fields" : {
|
28
|
+
"keyword" : { "type": "keyword", "ignore_above": 256 }
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
} ],
|
33
|
+
"properties" : {
|
34
|
+
"@timestamp": { "type": "date"},
|
35
|
+
"@version": { "type": "keyword"},
|
36
|
+
"geoip" : {
|
37
|
+
"dynamic": true,
|
38
|
+
"properties" : {
|
39
|
+
"ip": { "type": "ip" },
|
40
|
+
"location" : { "type" : "geo_point" },
|
41
|
+
"latitude" : { "type" : "half_float" },
|
42
|
+
"longitude" : { "type" : "half_float" }
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"index_patterns" : "overwrite-*",
|
3
|
+
"version" : 60001,
|
4
|
+
"settings" : {
|
5
|
+
"index.refresh_interval" : "1s",
|
6
|
+
"number_of_shards": 1
|
7
|
+
},
|
8
|
+
"mappings" : {
|
9
|
+
"dynamic_templates" : [ {
|
10
|
+
"message_field" : {
|
11
|
+
"path_match" : "message",
|
12
|
+
"match_mapping_type" : "string",
|
13
|
+
"mapping" : {
|
14
|
+
"type" : "text",
|
15
|
+
"norms" : false
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}, {
|
19
|
+
"string_fields" : {
|
20
|
+
"match" : "*",
|
21
|
+
"match_mapping_type" : "string",
|
22
|
+
"mapping" : {
|
23
|
+
"type" : "text", "norms" : false,
|
24
|
+
"fields" : {
|
25
|
+
"keyword" : { "type": "keyword", "ignore_above": 256 }
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
} ],
|
30
|
+
"properties" : {
|
31
|
+
"@timestamp": { "type": "date"},
|
32
|
+
"@version": { "type": "keyword"},
|
33
|
+
"geoip" : {
|
34
|
+
"dynamic": true,
|
35
|
+
"properties" : {
|
36
|
+
"ip": { "type": "ip" },
|
37
|
+
"location" : { "type" : "geo_point" },
|
38
|
+
"latitude" : { "type" : "half_float" },
|
39
|
+
"longitude" : { "type" : "half_float" }
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"index_patterns" : "overwrite-*",
|
3
|
+
"version" : 80001,
|
4
|
+
"template" : {
|
5
|
+
"settings" : {
|
6
|
+
"index.refresh_interval" : "1s",
|
7
|
+
"number_of_shards": 1
|
8
|
+
},
|
9
|
+
"mappings" : {
|
10
|
+
"dynamic_templates" : [ {
|
11
|
+
"message_field" : {
|
12
|
+
"path_match" : "message",
|
13
|
+
"match_mapping_type" : "string",
|
14
|
+
"mapping" : {
|
15
|
+
"type" : "text",
|
16
|
+
"norms" : false
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}, {
|
20
|
+
"string_fields" : {
|
21
|
+
"match" : "*",
|
22
|
+
"match_mapping_type" : "string",
|
23
|
+
"mapping" : {
|
24
|
+
"type" : "text", "norms" : false,
|
25
|
+
"fields" : {
|
26
|
+
"keyword" : { "type": "keyword", "ignore_above": 256 }
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
} ],
|
31
|
+
"properties" : {
|
32
|
+
"@timestamp": { "type": "date" },
|
33
|
+
"@version": { "type": "keyword" },
|
34
|
+
"geoip" : {
|
35
|
+
"dynamic": true,
|
36
|
+
"properties" : {
|
37
|
+
"ip": { "type": "ip" },
|
38
|
+
"location" : { "type" : "geo_point" },
|
39
|
+
"latitude" : { "type" : "half_float" },
|
40
|
+
"longitude" : { "type" : "half_float" }
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"priority": 200,
|
47
|
+
"_meta" : {
|
48
|
+
"description": "index template for logstash-output-elasticsearch"
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIFDDCCAvQCAQEwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
|
3
|
+
BAgMAk5BMQ8wDQYDVQQHDAZMaXNib24xDjAMBgNVBAoMBU15TGFiMQ8wDQYDVQQD
|
4
|
+
DAZSb290Q0EwHhcNMjMwNTMwMTUxMDM4WhcNMjQwNTI5MTUxMDM4WjBMMQswCQYD
|
5
|
+
VQQGEwJQVDELMAkGA1UECAwCTkExDzANBgNVBAcMBkxpc2JvbjEOMAwGA1UECgwF
|
6
|
+
TXlMYWIxDzANBgNVBAMMBlJvb3RDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
|
7
|
+
AgoCggIBAMtTMqAWuH17b9XqPa5L3HNqgnZ958+gvcOt7Q/sOEvcDQJgkzZ+Gywh
|
8
|
+
5er5JF2iomYOHiD5JncYr4YmRQKuYfD6B1WI5FuQthD/OlA1/RHqtbY27J33SaO6
|
9
|
+
6ro8gal7vjHrXKQkefVYRwdfO6DqqbhV6L4sMiy8FzQ55TMpoM35cWuvoAMxvSQq
|
10
|
+
GZ4pYYKnfNSGhzHvssfNS1xu/Lwb7Vju4jPhp+43BkGwEimI5km7jNC1nwjiHtxD
|
11
|
+
sY/s93AKa/vLktXKUK5nA3jjJOhAbRTVnbOAgxFt0YbX98xW/aUqscgBUVs9J/My
|
12
|
+
TRMwVKJ7Vsmth1PdJQksUASuzESlSPl09dMjTQ+MXzJDt0JvX8SIJPmbBng78MSa
|
13
|
+
CUhpOZiii1l2mBfPWejx20I/SMCUNmzbwm2w9JD50Jv2iX4l4ge4H1CIK1/orW1p
|
14
|
+
dY9xPL0uKYm6ADsDC0B8sGgNMBXeB6aLojY1/ITwmmfpfk9c/yWPfC7stHgCYRAv
|
15
|
+
5MfGAsmv0/ya5VrWQGBJkFiYy1pon6nxUjCbgn0RABojRoGdhhY3QDipgwmSgFZx
|
16
|
+
r064RFr1bt/Ml3MJmPf535mSwPdk/j/zw4IZTvlmwKW3FyMDhwYL/zX7J0c6MzMP
|
17
|
+
LEdi73Qjzmr3ENIrir4O86wNz81YRfYkg9ZX8yKJK9LBAUrYCjJ3AgMBAAEwDQYJ
|
18
|
+
KoZIhvcNAQELBQADggIBACE5DihUXpysZv0d25Fw9V2LRI0iJXOoVOu+RrnkL2HD
|
19
|
+
LGBEbw0KOkS3mpgKpir1pD4TINAvPs5ZkAAREny8bAXrhdUY6Gd+Fpq5bwPnZHr3
|
20
|
+
UvazLCNY5YUQpg1TjgbQ9LyBwf5jz5ZHR6Kilw87kaAdqzgqRnMXOuuSZeT70vH+
|
21
|
+
M+Ra99lLpyT+A2Isp7/vzg3HhSAi/UsZCPzGLQwEeZBmlaKAtsjF0B1L8cvd5xWh
|
22
|
+
rZ3PJWfvn2Aaiz4QEVq+jiZW8Y6bqHDb/lZQPs9Z5dLOww56VDJcBU87mayAYnRH
|
23
|
+
edsshuCVqwTZU3Y3+z/g/G+IQWByYM9sr3zcgpFdI74Ly20ClbegqaXXL1wfhA76
|
24
|
+
zT4cLH616Ukdqi8bCPPgy5KnYQWjks8cvabjPT/HeHzhJ/2vkfb1vWGHBCU9fg1n
|
25
|
+
mfVWvRJlf2McwW2vogE3eHFnEJWOha85Kif/SteVH0cHHHIUacJhtD6m0wIDW7vU
|
26
|
+
1xjDkipzKGnOsxGjLxAvw/eyHHWx8XT+z7oPzQX2UBStsIB4WGYmqqW3tV19E8Li
|
27
|
+
bGk5klu+lXK0UomAm2MD3MRR10UCkVFXM4/cUfiMrAgG232yDwRLiGp1EmY3uHyD
|
28
|
+
8/5mRJzBtLsGQKbfBPPNExiFqDzXr2ZwE7tyfsB8auSV3mkVjYjYYFnDfE835U+y
|
29
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1 @@
|
|
1
|
+
86a8abdffc0dd114d50cb20c7cc635bdb4bdcb16370fdee5aa5c05b4861faacd
|