logstash-output-thinkingdata 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/thinkingdata.rb +12 -8
- data/logstash-output-thinkingdata.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d03c9bd2f5bfd3a753641b13e92cc69607c2490ec79638fe647c3d50fbc84a39
|
4
|
+
data.tar.gz: 1563128b58ad6911ff6e31e3620163d6dbdc13d5b1d12fccf2a5206463ad006b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 487f7a87e25265510a05e15266ceae5cecc3e1d184afc128b17fff18ef6d66d6ce1621164eb51eedbb678fc6d40da0c0c02059cf3ffee2cef79c2136e54c1efa
|
7
|
+
data.tar.gz: a8626d2c8a7f289081c50905ce09cd9b97e4eba4152c364cfc00403e70d9f1324c274cb2f505c0f9e78aef185eb52e92474ff15324cf26848fa3c0eed9978468
|
data/CHANGELOG.md
CHANGED
@@ -24,9 +24,6 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
24
24
|
# 数据的项目appid
|
25
25
|
config :appid, :validate => :string
|
26
26
|
|
27
|
-
# 是否将appid封装于数据中
|
28
|
-
config :is_sync_data, :validate => :boolean, :default => false
|
29
|
-
|
30
27
|
# 触发 flush 间隔时间
|
31
28
|
config :flush_interval_sec, :validate => :number, :default => 2
|
32
29
|
|
@@ -45,7 +42,7 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
45
42
|
# 是否检测appid
|
46
43
|
config :appid_check, :validate => :boolean, :default => false
|
47
44
|
|
48
|
-
PLUGIN_VERSION = "1.0
|
45
|
+
PLUGIN_VERSION = "1.1.0"
|
49
46
|
|
50
47
|
public
|
51
48
|
|
@@ -53,7 +50,6 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
53
50
|
@logger.info("Registering thinkingdata Output",
|
54
51
|
:url => @url,
|
55
52
|
:appid => @appid,
|
56
|
-
:is_sync_data => @is_sync_data,
|
57
53
|
:flush_interval_sec => @flush_interval_sec,
|
58
54
|
:flush_batch_size => @flush_batch_size,
|
59
55
|
:compress => @compress,
|
@@ -65,7 +61,7 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
65
61
|
http_client_config = client_config
|
66
62
|
http_client_config[:user_agent] = "thinkingdata_logstash_output_plugin_" + PLUGIN_VERSION
|
67
63
|
@client = Manticore::Client.new(http_client_config)
|
68
|
-
ta_appid_check if @appid_check
|
64
|
+
ta_appid_check if @appid_check && !@appid.nil? && !@appid.empty?
|
69
65
|
@receive_count = 0
|
70
66
|
@parse_error_count = 0
|
71
67
|
@last_report_count = 0
|
@@ -156,8 +152,16 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
156
152
|
data = gz.string
|
157
153
|
compress_type = 'gzip'
|
158
154
|
end
|
159
|
-
|
160
|
-
|
155
|
+
if @appid.nil? || @appid.empty?
|
156
|
+
headers = {'custom_appid' => 'true', 'version' => PLUGIN_VERSION, 'user-agent' => 'logstash_' + PLUGIN_VERSION,
|
157
|
+
'compress' => compress_type, 'TA-Integration-Type' => 'logstash',
|
158
|
+
'TA-Integration-Version' => PLUGIN_VERSION, 'TA-Integration-Count' => events.length.to_s}
|
159
|
+
else
|
160
|
+
headers = {'appid' => @appid, 'version' => PLUGIN_VERSION, 'user-agent' => 'logstash_' + PLUGIN_VERSION,
|
161
|
+
'compress' => compress_type, 'TA-Integration-Type' => 'logstash',
|
162
|
+
'TA-Integration-Version' => PLUGIN_VERSION, 'TA-Integration-Count' => events.length.to_s}
|
163
|
+
end
|
164
|
+
|
161
165
|
until do_send(data, headers)
|
162
166
|
sleep 5
|
163
167
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-thinkingdata'
|
3
|
-
s.version = '1.0
|
3
|
+
s.version = '1.1.0'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Output plugin for Thinkingdata Analytics'
|
6
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.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-thinkingdata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sdk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|