fluent-plugin-site24x7 0.1.6 → 0.1.7

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: fc1338accf3055ea6b93742a4280cdbdb8ec4b5e0ab97ea4ffc79e77855f4f28
4
- data.tar.gz: ce48c6512000a972e2f3209b4b142d6ef4cffcec7268720f0a56fed15e75553c
3
+ metadata.gz: 0b5f4e324f1115eea47583eb6dbc1467394841aadf376f08af4b07e6b0618578
4
+ data.tar.gz: '08f30541235f4294db3a0546c5de0ee24d46cb0e68d76ecb96f3199175362844'
5
5
  SHA512:
6
- metadata.gz: a48c2d71823a1756d55ae9343017331f1a6b0579c42f9fcec1c61070062bb51071adfb614b71cd162015943fd368fa179d4f932662d2b8a6e54678ce7e167539
7
- data.tar.gz: d95117ea90350c380ee4dcacc1dd2238bac3d67e8338fa973c8231a81f2f701ead6d8f02d306b82789afb396094e250507a915ba974f64509ef480339597c881
6
+ metadata.gz: 8b47d505b63ae3bca0f033678cb01932d02732e2eecaab9d6c84f88765772daeddbe6380538d85c669cf5565df7378a63ba893e7408de704b8656d2794f77e10
7
+ data.tar.gz: 357ecae7bc8d57752cb0e66c94d9d3f69645eaf0258340909903759b00deaf8711c0de5aa1e10a17ca6c785dcc2a005f942f3fa40f460b958120823df34f9f4c
@@ -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.6"
6
+ spec.version = "0.1.7"
7
7
  spec.authors = ["Magesh Rajan"]
8
8
  spec.email = ["magesh.rajan@zohocorp.com"]
9
9
 
@@ -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 @valid_logtype && (@log_upload_allowed || (time.to_i - @log_upload_stopped_time > S247_LOG_UPLOAD_CHECK_INTERVAL))
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
- @log_upload_allowed = false
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
- @valid_logtype = false
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
- @valid_logtype = false
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.6
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-08-26 00:00:00.000000000 Z
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.2
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.