logstash-output-logservice 0.8.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/logservice.rb +10 -1
- data/logstash-output-logservice.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: a611f740af06a3e2e4432c29d037dbf18706059e9b089920145fa512904f5653
|
4
|
+
data.tar.gz: 3facf87139ea5e4af8eda60bc4b08d8ad71d3500c7b915cd102107d06873a2fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f148e6adc4131fdb75fde1e750b2ea28fa1ec933425d10b2f1c4da4b5f426f204150abbca7c9e38ccc18fd51af96ffdfcb87deba69fe21d18cd32ad43d982b4f
|
7
|
+
data.tar.gz: 3eb9fbb7b6398684ac40fc4b4b0b8d40f40ec714a45378af50005158de7371f410019297c918370f4ee221ad50b1b22a7823f75cecadfa4129a2bfa2a8b25fd2
|
@@ -43,6 +43,7 @@ class LogStash::Outputs::LogService < LogStash::Outputs::Base
|
|
43
43
|
config :send_retry_interval, :validate=> :number, :required=> false, :default=> 200
|
44
44
|
|
45
45
|
config :to_json, :validate=> :boolean, :required=> false, :default=> true
|
46
|
+
config :time_key, :validate=> :string, :required=> false, :default=> "@timestamp"
|
46
47
|
|
47
48
|
Log = com.aliyun.openservices.log
|
48
49
|
LogException = com.aliyun.openservices.log.exception.LogException
|
@@ -116,9 +117,17 @@ class LogStash::Outputs::LogService < LogStash::Outputs::Base
|
|
116
117
|
end
|
117
118
|
@logitem = LogCommon.LogItem.new
|
118
119
|
#@timestamp like 2016-02-18T03:23:11.053Z
|
119
|
-
@
|
120
|
+
time_value = @event_map[@time_key]
|
121
|
+
if time_value.nil?
|
122
|
+
time_value = @event_map['@timestamp']
|
123
|
+
@logger.warn("The time_key is nil, use @timestamp")
|
124
|
+
end
|
125
|
+
@logitem.SetTime(Time.parse(time_value.to_s).to_i)
|
120
126
|
@event_map.each do | key, value |
|
121
127
|
@key_str = key.to_s
|
128
|
+
if @key_str == '__time__'
|
129
|
+
next
|
130
|
+
end
|
122
131
|
if @to_json
|
123
132
|
@value_str = value.to_json
|
124
133
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-logservice'
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.11.0"
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = "post data into logservice."
|
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/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-logservice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tangkai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|