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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0215e007f329ca2c6538f6ec2d65932fe43d87c1396772e03c98ca132bc932e
4
- data.tar.gz: 288bf0b9b00ab06c19a02d4f540daed77d50a797fcaaa4c96912b2ca1cc59140
3
+ metadata.gz: 6420014cba38216a8de9dea6094e645b80e56a0751a954db2ce76fc6e57e5b72
4
+ data.tar.gz: 06113b6ebb5cc2ca01017a7a801c48ac990e57c15dad4d6ad45aef811c8bf962
5
5
  SHA512:
6
- metadata.gz: 7703c1da2e96bb1fbf1f55e72c04f8d3c22c0fe164f07496d70535b7eb358f67064b0021c3857b551e46419a6a1a62f5a26a88efed83c4b3135be1a48da943be
7
- data.tar.gz: a49bbfa5e88c5dc18d72d7d37f5141da160ee020802a2812680b5433c343cab5a70d11a5af94f2ecde638455efc836d8b47aca798411dba648b369322b8cb25d
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 = event_json
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
- lmlogs_event["message"] = event.get(@message_key).to_s
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.1.0'
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.1.0
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-29 00:00:00.000000000 Z
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