fluent-plugin-site24x7 0.1.2 → 0.1.3

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: c2391265977dd8a33dde6dab1876296406fae59c7633aa0ec0045821bb5688f1
4
- data.tar.gz: 6bd7a51fca919c3c38c4f12cf226f403772c473d12f8c2a716f72ccb844f5ec7
3
+ metadata.gz: a33475317d8f77918035c64d70be3fbeb32ea214554da51753f83b51904c7f68
4
+ data.tar.gz: 31284ae4e2d074f1545c7bb6641886bc12b3a4ca2ed6fd5de2a12e319409a2bc
5
5
  SHA512:
6
- metadata.gz: aab17017da06b62df8c7ebc8b2ee5e045e9833687945fd1f262890bd32bc9478f58208e1e07675e4295dd5c05fc6691bad50a19c35ea635c50d627438bb6dd01
7
- data.tar.gz: de638056920dcc7cce4a00c1bddad3a4628ce5342e3b837e430d599f5f0db949ffcd81ff18efa55eca2e2d07b8dec761f3bd673367a076af3c69e8dcee6dd7ef
6
+ metadata.gz: c90315b127043a5ce466c5af1aada7b26fa15614b4e498fd802ef3b88bf145d56dd8fe6e8f038b564750bc5b9d40d3be5f2c83de6c2dfcfd3ee09f5e199b7d6b
7
+ data.tar.gz: 75c9d7cc52685aef20717a37e544dd7adc4b31951fa984449ec9ee7f23f58366ebf85bde6f54716008d88c2923d6013fb6ad836d76807a9550d1b2a2e9037298
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fluentd output plugin for Site24x7
2
2
 
3
- This output plugin allows parse and sending logs directly from Fluentd to Site2x7 - so you don't have to use a separate log shipper.
3
+ With Site24x7 plugin for Fluentd, you can parse and send logs directly from Fluentd, without having to use a separate log shipper.
4
4
 
5
5
 
6
6
  ## Installation
@@ -10,7 +10,7 @@ To add the plugin to your fluentd agent, use the following command:
10
10
  ```
11
11
  $ gem install fluent-plugin-site24x7
12
12
  ```
13
- If you installed the td-agent instead
13
+ If you have installed the td-agent instead
14
14
 
15
15
  ```
16
16
  $ /usr/sbin/td-agent-gem install fluent-plugin-site24x7
@@ -20,7 +20,7 @@ $ /usr/sbin/td-agent-gem install fluent-plugin-site24x7
20
20
 
21
21
  **Configure the output plugin**
22
22
 
23
- To match events and send them to Site24x7, simply add the following code to your configuration file.
23
+ To match events and send them to Site24x7, add the following code to your configuration file.
24
24
 
25
25
  ```cfg
26
26
  # Match events tagged with "site24x7.**" and send them to Site24x7
@@ -49,21 +49,22 @@ To match events and send them to Site24x7, simply add the following code to your
49
49
 
50
50
  </match>
51
51
  ```
52
- After a restart of FluentD, any events tagged with site24x7 are shipped to site24x7 platform.
52
+ After restarting FluentD, any events tagged with site24x7 are shipped to Site24x7 platform.
53
53
 
54
54
  ## Parameters
55
- As fluent-plugin-site24x7 is an output_buffer, you can set all output_buffer properties like it's describe in the [fluentd documentation](http://docs.fluentd.org/articles/output-plugin-overview#buffered-output-parameters).
55
+ As fluent-plugin-site24x7 is an output_buffer, you can set all the output_buffer properties like it's described in the [fluentd documentation](http://docs.fluentd.org/articles/output-plugin-overview#buffered-output-parameters).
56
56
 
57
57
  Property | Description | Default Value
58
58
  ------------ | -------------|------------
59
- log_type_config | log_type_config for your configured log type in site24x7 | nil
60
- max_retry | How many times to resend failed uploads | 3
61
- retry_interval | How long to sleep initially between retries, exponential step-off | 2 seconds
62
- http_idle_timeout | Timeout in seconds that the http persistent connection will stay open without traffic | 5 seconds
63
- http_read_timeout | Timeout in seconds when the socket connects until the connection breaks | 30 secods
59
+ log_type_config | log_type_config of your configured log type in site24x7 | nil
60
+ max_retry | Number of times to resend failed uploads | 3
61
+ retry_interval | Time interval to sleep initially between retries, exponential step-off | 2 seconds
62
+ http_idle_timeout | Timeout (in seconds) for which http persistent connection will stay open without traffic | 5 seconds
63
+ http_read_timeout | Timeout (in seconds) when the socket connects until the connection breaks | 30 secods
64
64
  http_proxy | Your proxy uri | nil
65
65
 
66
66
  ## Release Notes
67
-
67
+ * 0.1.2 - Timezone parsing issue fixed
68
+ * 0.1.1 - Minor changes
68
69
  * 0.1.0 - Initial Release
69
70
 
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-site24x7"
6
- spec.version = "0.1.2"
6
+ spec.version = "0.1.3"
7
7
  spec.authors = ["Magesh Rajan"]
8
8
  spec.email = ["magesh.rajan@zohocorp.com"]
9
9
 
@@ -210,7 +210,7 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
210
210
  if !line.empty?
211
211
  current_log_size = 0
212
212
  formatted_line = {}
213
- event_obj = Yajl::Parser.parse(line)
213
+ event_obj = if line.is_a?(String) then Yajl::Parser.parse(line) else line end
214
214
  @logtype_config['jsonPath'].each do |path_obj|
215
215
  value = get_json_value(event_obj, path_obj[if path_obj.has_key?'key' then 'key' else 'name' end], path_obj['type'])
216
216
  if value
@@ -231,7 +231,7 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
231
231
 
232
232
  def format(tag, time, record)
233
233
  if @valid_logtype && (@log_upload_allowed || (time.to_i - @log_upload_stopped_time > S247_LOG_UPLOAD_CHECK_INTERVAL))
234
- [record['message']].to_msgpack
234
+ if !@logtype_config.has_key?'jsonPath' then [record['message']].to_msgpack else [record].to_msgpack end
235
235
  end
236
236
  end
237
237
 
@@ -262,7 +262,7 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
262
262
  current_batch = []
263
263
  current_batch_size = 0
264
264
  encoded_events.each_with_index do |encoded_event, i|
265
- current_event_size = encoded_event.bytesize
265
+ current_event_size = String(encoded_event).bytesize
266
266
  if current_event_size > S247_MAX_RECORD_SIZE
267
267
  encoded_event = encoded_event[0..(S247_MAX_RECORD_SIZE-DD_TRUNCATION_SUFFIX.length)]+DD_TRUNCATION_SUFFIX
268
268
  current_event_size = encoded_event.bytesize
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-site24x7
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magesh Rajan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.2.24
155
+ rubygems_version: 3.1.2
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Site24x7 output plugin for Fluent event collector.