logstash-output-lmlogs 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/logstash/outputs/lmlogs.rb +10 -4
- data/logstash-output-lmlogs.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: 6420014cba38216a8de9dea6094e645b80e56a0751a954db2ce76fc6e57e5b72
|
4
|
+
data.tar.gz: 06113b6ebb5cc2ca01017a7a801c48ac990e57c15dad4d6ad45aef811c8bf962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b2ed08cbd38d9fa41b715372384fde2872e9a98552352b4494b13185e62c5fd1df1de26a13a7b4c81951ae8c91d6fb2cad1677c152e17c260a73ca1fbd5ef2c
|
7
|
+
data.tar.gz: d42834b440dd45429b4cd0705487c6ed23c68176b560b3af1b74d315bff204ac4608080e452e7404437a636578f58a0b4984bf5124e0e1758d2368aca0456ab9
|
data/README.md
CHANGED
@@ -33,6 +33,7 @@ output {
|
|
33
33
|
| keep_timestamp | If false, LM Logs will use the ingestion timestamp as the event timestamp | true |
|
34
34
|
| timestamp_is_key | If true, LM Logs will use a specified key as the event timestamp | false |
|
35
35
|
| timestamp_key | If timestamp_is_key is set, LM Logs will use this key in the event as the timestamp | "logtimestamp" |
|
36
|
+
| include_metadata | If false, the metadata fields will not be sent to LM Logs | true |
|
36
37
|
|
37
38
|
See the [source code](lib/logstash/outputs/lmlogs.rb) for the full list of options
|
38
39
|
|
@@ -93,6 +93,9 @@ class LogStash::Outputs::LMLogs < LogStash::Outputs::Base
|
|
93
93
|
# Username to use for HTTP auth.
|
94
94
|
config :access_id, :validate => :string, :required => true
|
95
95
|
|
96
|
+
# Include/Exclude metadata from sending to LM Logs
|
97
|
+
config :include_metadata, :validate => :boolean, :default => true
|
98
|
+
|
96
99
|
# Password to use for HTTP auth
|
97
100
|
config :access_key, :validate => :password, :required => true
|
98
101
|
|
@@ -258,12 +261,15 @@ class LogStash::Outputs::LMLogs < LogStash::Outputs::Base
|
|
258
261
|
documents = []
|
259
262
|
chunk.each do |event|
|
260
263
|
event_json = JSON.parse(event.to_json)
|
261
|
-
lmlogs_event =
|
262
|
-
lmlogs_event.delete("@timestamp") # remove redundant timestamp field
|
263
|
-
lmlogs_event["event"].delete("original") # remove redundant log field
|
264
|
+
lmlogs_event = {}
|
264
265
|
|
265
|
-
|
266
|
+
if @include_metadata
|
267
|
+
lmlogs_event = event_json
|
268
|
+
lmlogs_event.delete("@timestamp") # remove redundant timestamp field
|
269
|
+
lmlogs_event["event"].delete("original") # remove redundant log field
|
270
|
+
end
|
266
271
|
|
272
|
+
lmlogs_event["message"] = event.get(@message_key).to_s
|
267
273
|
lmlogs_event["_lm.resourceId"] = {}
|
268
274
|
lmlogs_event["_lm.resourceId"]["#{@lm_property}"] = event.get(@property_key.to_s)
|
269
275
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-lmlogs'
|
3
|
-
s.version = '1.
|
3
|
+
s.version = '1.2.0'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = "Logstash output plugin for LM Logs"
|
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-lmlogs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LogicMonitor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|