fluent-plugin-appdynamics 0.0.5 → 0.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02f89af0f06e3e1191e604ad2fa5de824d6d1797
4
- data.tar.gz: 3134d8b0bb533e006b9a5cd65c0bb753c9c6930f
3
+ metadata.gz: c6752104cc71176d04417a97fa2ce63ad6dfe0fd
4
+ data.tar.gz: 5bdab9a9a3e9a55638d8b41ccbf24db7a7e57519
5
5
  SHA512:
6
- metadata.gz: 9466dc0f158364434671ddf633e46e25a0ef4ea5f5201358bea86322835d207d9b2e06b266b7150c6a1e542d5dbc52bf0522540b715447c64dcb72281ec6cbfa
7
- data.tar.gz: 2484bc41ca4f59f2698e559eb2ba65d5e61f27ef27b1e5249027467633d58798287ba8ce6f29dbad49713bc25649569afa6362962ee446a434cf4875d25191c5
6
+ metadata.gz: 2e18d0b8dbdb892374c13d6c2ed62c04b880a496c2d1aec33b75573b8cf666d66b1e1f027e704322687d1d8431b6b7cb96ece77fb462069abeba2a6bf6063e55
7
+ data.tar.gz: 2e49d0ca3efef36c15b08960c9f93a5b677b860581394d5776295852586be83f777544aeaf1da73014a674b298eac71e6fd0f0f6030204bc9c6cb91026d8c385
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-appdynamics"
6
- gem.version = "0.0.5"
6
+ gem.version = "0.0.6"
7
7
  gem.date = '2015-03-02'
8
8
  gem.authors = ["chandrashekar Tippur"]
9
9
  gem.email = ["ctippur@gmail.com"]
@@ -111,8 +111,8 @@ module Fluent
111
111
 
112
112
  def last_records(tag=nil)
113
113
  begin
114
- alertStartTime=$redis.get(tag)
115
- return alertStartTime
114
+ alertStart=$redis.get(tag)
115
+ return alertStart
116
116
  rescue Exception => e
117
117
  $log.info e.message
118
118
  $log.info e.backtrace.inspect
@@ -121,7 +121,7 @@ module Fluent
121
121
 
122
122
  def update_records(time, tag=nil)
123
123
  begin
124
- alertStartTime=$redis.set(tag,time)
124
+ alertStart=$redis.set(tag,time)
125
125
  rescue Exception => e
126
126
  $log.info e.message
127
127
  $log.info e.backtrace.inspect
@@ -227,27 +227,24 @@ module Fluent
227
227
  # Add the code to run this
228
228
  def input
229
229
  if not @stop_flag
230
- pollingStart = Engine.now.to_i * 1000
231
- #alertStartTime = (Engine.now.to_f * 1000).to_i - @interval.to_i
232
- #alertStartTime = Engine.now.to_i * 1000
230
+ alertEnd = Engine.now.to_i * 1000
231
+ #alertStart = (Engine.now.to_f * 1000).to_i - @interval.to_i
232
+ #alertStart = Engine.now.to_i * 1000
233
233
  if @state_store.last_records(@tag)
234
- alertStartTime = @state_store.last_records(@tag)
235
- $log.info @tag + " :: Got time record from state_store - #{alertStartTime}"
234
+ alertStart = @state_store.last_records(@tag)
235
+ $log.info @tag + " :: Got time record from state_store - #{alertStart}"
236
236
  else
237
- alertStartTime = pollingStart.to_i - @interval.to_i
238
- #$log.info "Spectrum :: Got time record from initial config - #{alertStartTime}"
237
+ alertStart = alertEnd.to_i - @interval.to_i
238
+ #$log.info "Spectrum :: Got time record from initial config - #{alertStart}"
239
239
  end
240
- pollingEnd = ''
241
- pollingDuration = ''
242
240
 
243
- $log.info "appdynamics :: Polling alerts for time period: #{alertStartTime.to_i} - #{(Engine.now.to_f * 1000).to_i}"
241
+ $log.info "appdynamics :: Polling alerts for time period: #{alertStart.to_i} - #{alertEnd.to_i}"
244
242
  # Post to Appdynamics and parse results
245
243
 
246
244
  begin
247
- responsePost=appdynamicsEnd(alertStartTime,(Engine.now.to_f * 1000).to_i).get
248
- pollingEnd = Engine.now.to_i * 1000
245
+ responsePost=appdynamicsEnd(alertStart,alertEnd).get
249
246
  #@state_store.update(pollingEnd, @tag)
250
- pollingDuration = pollingEnd - pollingStart
247
+ pollingDuration = alertEnd - alertStart
251
248
  rescue Exception => e
252
249
  $log.info e.message
253
250
  $log.info e.backtrace.inspect
@@ -304,7 +301,7 @@ module Fluent
304
301
  end
305
302
  }
306
303
  #pp body.class
307
- @state_store.update_records(pollingEnd, @tag)
304
+ @state_store.update_records(alertEnd, @tag)
308
305
  end # END Stop flag
309
306
  end # def Input
310
307
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-appdynamics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - chandrashekar Tippur
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.2.2
129
+ rubygems_version: 2.4.6
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Fluentd input plugin for appdynamics alerts