fluent-plugin-site24x7 0.1.6 → 0.1.7
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/fluent-plugin-site24x7.gemspec +1 -1
- data/lib/fluent/plugin/out_site24x7.rb +6 -8
- 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: 0b5f4e324f1115eea47583eb6dbc1467394841aadf376f08af4b07e6b0618578
|
|
4
|
+
data.tar.gz: '08f30541235f4294db3a0546c5de0ee24d46cb0e68d76ecb96f3199175362844'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b47d505b63ae3bca0f033678cb01932d02732e2eecaab9d6c84f88765772daeddbe6380538d85c669cf5565df7378a63ba893e7408de704b8656d2794f77e10
|
|
7
|
+
data.tar.gz: 357ecae7bc8d57752cb0e66c94d9d3f69645eaf0258340909903759b00deaf8711c0de5aa1e10a17ca6c785dcc2a005f942f3fa40f460b958120823df34f9f4c
|
|
@@ -157,7 +157,6 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
|
|
|
157
157
|
|
|
158
158
|
@s247_tz = {'hrs': 0, 'mins': 0} #UTC
|
|
159
159
|
@log_source = Socket.gethostname
|
|
160
|
-
@valid_logtype = true
|
|
161
160
|
@log_upload_allowed = true
|
|
162
161
|
@log_upload_stopped_time = 0
|
|
163
162
|
@s247_datetime_format_string = @logtype_config['dateFormat']
|
|
@@ -461,7 +460,7 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
|
|
|
461
460
|
end
|
|
462
461
|
|
|
463
462
|
def format(tag, time, record)
|
|
464
|
-
if
|
|
463
|
+
if (@log_upload_allowed || (time.to_i - @log_upload_stopped_time > S247_LOG_UPLOAD_CHECK_INTERVAL))
|
|
465
464
|
if (record.size == 1)
|
|
466
465
|
if record.has_key?'message'
|
|
467
466
|
[record['message']].to_msgpack
|
|
@@ -585,15 +584,14 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
|
|
|
585
584
|
@log_upload_allowed = false
|
|
586
585
|
@log_upload_stopped_time =Time.now.to_i
|
|
587
586
|
elsif resp_headers.has_key?'api_upload_enabled' and resp_headers['api_upload_enabled'] == 'False'
|
|
588
|
-
log.error "[#{current_chunk_id}]:API upload not enabled for log type
|
|
589
|
-
|
|
590
|
-
@log_upload_stopped_time =Time.now.to_i
|
|
587
|
+
log.error "[#{current_chunk_id}]:API upload not enabled for log type"
|
|
588
|
+
Fluent::Engine.stop
|
|
591
589
|
elsif resp_headers.has_key?'invalid_logtype' and resp_headers['invalid_logtype'] == 'True'
|
|
592
590
|
log.error "[#{current_chunk_id}]:Log type not present in this account so stopping log collection"
|
|
593
|
-
|
|
591
|
+
Fluent::Engine.stop
|
|
594
592
|
elsif resp_headers.has_key?'invalid_account' and resp_headers['invalid_account'] == 'True'
|
|
595
593
|
log.error "[#{current_chunk_id}]: Invalid account so stopping log collection"
|
|
596
|
-
|
|
594
|
+
Fluent::Engine.stop
|
|
597
595
|
else
|
|
598
596
|
log.error "[#{current_chunk_id}]: Upload failed for reason : #{response.message}"
|
|
599
597
|
end
|
|
@@ -780,4 +778,4 @@ class Fluent::Site24x7Output < Fluent::Plugin::Output
|
|
|
780
778
|
end
|
|
781
779
|
end
|
|
782
780
|
|
|
783
|
-
end
|
|
781
|
+
end
|
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.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Magesh Rajan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-12-27 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.1.
|
|
155
|
+
rubygems_version: 3.1.6
|
|
156
156
|
signing_key:
|
|
157
157
|
specification_version: 4
|
|
158
158
|
summary: Site24x7 output plugin for Fluent event collector.
|