fluent-plugin-site24x7 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -11
- data/fluent-plugin-site24x7.gemspec +1 -1
- data/lib/fluent/plugin/out_site24x7.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a33475317d8f77918035c64d70be3fbeb32ea214554da51753f83b51904c7f68
|
4
|
+
data.tar.gz: 31284ae4e2d074f1545c7bb6641886bc12b3a4ca2ed6fd5de2a12e319409a2bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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,
|
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
|
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
|
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
|
60
|
-
max_retry |
|
61
|
-
retry_interval |
|
62
|
-
http_idle_timeout | Timeout in 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
|
|
@@ -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
|
-
|
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
|
-
|
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.
|
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-
|
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
|
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.
|