You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin sends Logstash events to the [Logicmonitor Logs](https://www.logicmonitor.com)
3
+
This plugin sends Logstash events to the [Logicmonitor Logs](https://www.logicmonitor.com)
4
4
5
5
# Getting started
6
6
@@ -28,27 +28,28 @@ You would need either `access_id` and `access_id` both or `bearer_token` for aut
28
28
29
29
| Option | Description| Default |
30
30
| --- | --- | --- |
31
-
| batch_size | Event batch size to send to LM Logs.| 100 |
31
+
| batch_size | Event batch size to send to LM Logs.| 100 |
32
32
| message_key | Key that will be used by the plugin as the system key | "message" |
33
33
| lm_property | Key that will be used by LM to match resource based on property | "system.hostname" |
34
34
| keep_timestamp | If false, LM Logs will use the ingestion timestamp as the event timestamp | true |
35
35
| timestamp_is_key | If true, LM Logs will use a specified key as the event timestamp | false |
36
36
| timestamp_key | If timestamp_is_key is set, LM Logs will use this key in the event as the timestamp | "logtimestamp" |
37
-
| include_metadata | If false, the metadata fields will not be sent to LM Logs | true |
37
+
| include_metadata | If true, all metadata fields will be sent to LM Logs | false |
38
+
| include_metadata_keys | Array of json keys for which plugin looks for these keys and adds as event meatadata. A dot "." can be used to add nested subjson. If config `include_metadata` is set to true, all metadata will be sent regardless of this config. |[]|
38
39
39
40
See the [source code](lib/logstash/outputs/lmlogs.rb) for the full list of options
40
41
41
42
The syntax for `message_key` and `source_key` values are available in the [Logstash Event API Documentation](https://www.elastic.co/guide/en/logstash/current/event-api.html)
42
43
43
-
## Known issues
44
+
## Known issues
44
45
- Installation of the plugin fails on Logstash 6.2.1.
45
-
46
-
46
+
47
+
47
48
## Contributing
48
-
49
+
49
50
Bug reports and pull requests are welcome. This project is intended to
50
51
be a safe, welcoming space for collaboration.
51
-
52
+
52
53
## Development
53
-
54
+
54
55
We use docker to build the plugin. You can build it by running `docker-compose run jruby gem build logstash-output-lmlogs.gemspec `
@logger.error"Bearer token not specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor."
170
182
raiseLogStash::ConfigurationError,'No valid authentication specified. Either access_id and access_key both or bearer_token must be specified for authentication with Logicmonitor.'
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"
let(:logstash_event){LogStash::Event.new("message"=>"hello this is log 1",
12
+
"host"=>"host1",
13
+
"nested1"=>{"nested2"=>{"nested3"=>"value"},
14
+
"nested2a"=>{"nested3a"=>{"nested4"=>"valueA"}},
15
+
"nested2b"=>{"nested3b"=>"value"}
16
+
},
17
+
"nested1_"=>"value",
18
+
"nested"=>{"nested2"=>{"nested3"=>"value",
19
+
"nested3b"=>"value"},
20
+
"nested_ignored"=>"somevalue"
21
+
}
22
+
)}
23
+
let(:sample_lm_logs_event){{"message"=>"hello this is log 1","_lm.resourceId"=>{"test.property"=>"host1"},"timestamp"=>"2021-03-22T04:28:55.907121106Z"}}
0 commit comments