fluent-plugin-lm-logs 0.0.7 → 0.0.8

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: 4a4b80a29df39066cf4d0d02dd5d3dd8a409253a9ffac8e2df552aa6d836c8fd
4
- data.tar.gz: 80a03e355f4485810f8f591688d2193258a480de797f5b73a627c802ce940a7e
3
+ metadata.gz: 321e02b24adb9528c90c7cdddd17ebdbc193dd3abcd0a66cdb6b7eaa1394b78e
4
+ data.tar.gz: c0ab73b0026f74fde357f5cdb38d1c2c0618b06a2e2389b5ba246d5eee7eb3ea
5
5
  SHA512:
6
- metadata.gz: d4d74839b0bf81fa4b43b79a87015dec5c1c4d15e19e021c966f5c936e1503f55643c7f6902c17cabfd3788701a0f98b6dec6c56903b3ce5aa8c2e9907f11448
7
- data.tar.gz: 7ecf5e67a5881154c9f0c5a82d0e824e6cb98bb9b8bf66abbda06bc800ecc2c472f445107bac72996df7bbf2558e4890fe61400f92b84c617c7bb2aaa1795d60
6
+ metadata.gz: 0c863145fc51cc9473113c469d81acf6e96a770481b83665b9ed11e15e13fc2c259d6bad983092620813de982ede3f9df74389fdf3e2635f4298d3a1d807c5b4
7
+ data.tar.gz: b87af1e8f8469d7b365aad2aa670d526f022132b8e7a630caef0e342c7c979db8e47a53e6e2bc79deb07c394c15e1391b1ec40e85f7f33e96f9f3c62dd4e70e9
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
 
2
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-lm-logs.svg)](http://badge.fury.io/rb/fluent-plugin-lm-logs)
2
3
  # lm-logs-fluentd (beta)
3
4
  This output plugin sends Fluentd records to the configured LogicMonitor account.
4
5
 
5
6
  ## Prerequisites
6
7
 
7
8
  Install the plugin:
8
- * With gem: `gem install lm-logs-fluentd`
9
- * For deb packages: `td-agent-gem install lm-logs-fluentd`
9
+ * With gem: `gem install fluent-plugin-lm-logs`
10
+ * For deb packages: `td-agent-gem install fluent-plugin-lm-logs`
10
11
 
11
12
  Alternatively, you can add `out_lm.rb` to your Fluentd plugins directory.
12
13
 
@@ -23,7 +24,11 @@ Create a custom `fluent.conf` or edit the existing one to specify which logs sho
23
24
  resource_mapping {"<event_key>": "<lm_property>"}
24
25
  access_id <your_lm_access_id>
25
26
  access_key <your_lm_access_key>
26
- flush_interval 1s
27
+ <buffer>
28
+ @type memory
29
+ flush_interval 1s
30
+ chunk_limit_size 5m
31
+ </buffer>
27
32
  debug false
28
33
  </match>
29
34
  ```
@@ -43,6 +48,11 @@ Returns the event:
43
48
 
44
49
  **Note:** Make sure that logs have a message field. Requests sent without a message will not be accepted.
45
50
 
51
+ ### Kubernetes
52
+ Logic Monitor collects k8s logs automatically via FluentD daemonset, It requires a plugin for this. We recommend using [fluent-plugin-kubernetes_metadata_filter](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter) to collect Kubernetes metadata.
53
+
54
+ See the [example](https://github.com/logicmonitor/lm-logs-fluentd/tree/master/Examples/k8s) to forward k8s logs to Logic Monitor.
55
+
46
56
  ### Resource mapping examples
47
57
 
48
58
  - `{"message":"Hey!!", "event_key":"lm_property_value"}` with mapping `{"event_key": "lm_property"}`
@@ -58,5 +68,4 @@ Returns the event:
58
68
  | `access_id` | LM API Token access ID. |
59
69
  | `access_key` | LM API Token access key. |
60
70
  | `flush_interval` | Defines the time in seconds to wait before sending batches of logs to LogicMonitor. Default is `60s`. |
61
- | `debug` | When `true`, logs more information to the fluentd console. |
62
-
71
+ | `debug` | When `true`, logs more information to the fluentd console. |
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-lm-logs"
8
- spec.version = '0.0.7'
8
+ spec.version = '0.0.8'
9
9
  spec.authors = ["Logic Monitor"]
10
10
  spec.email = "rubygems@logicmonitor.com"
11
11
  spec.summary = "Logic Monitor logs fluentd output plugin"
@@ -109,12 +109,9 @@ module Fluent
109
109
  request.body = body
110
110
 
111
111
  resp = http.request(request)
112
- if @debug
113
- log.info "Response #{resp.body}"
114
- end
115
-
116
- if !resp.kind_of? Net::HTTPSuccess
117
- log.error "Error sending batch #{resp.body}"
112
+ if @debug || (!resp.kind_of? Net::HTTPSuccess)
113
+ log.info "Status code #{resp.code}"
114
+ log.info "Request Id #{resp.header['x-request-id']}"
118
115
  end
119
116
  end
120
117
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-lm-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logic Monitor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd