fluent-plugin-cloudwatch-transform 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: a025e5995d9b256900600da9feecbf60bbd67682
4
- data.tar.gz: f193e656ccffe26f843e26d642151157c758b99a
3
+ metadata.gz: d2049729cdc16d2272af9e4a8624c75664783fa5
4
+ data.tar.gz: 522eb8adeb406890ecb9ddf01b4990ed61420c5b
5
5
  SHA512:
6
- metadata.gz: c283f6a9b5296a131ea618b42c6b88afe2ee168ea157d033141f57c9db1a2f3da95a56c1b3d188d43892b6d214aac7037efa58f1e215cc6497988af78b3d46dc
7
- data.tar.gz: 5758b0ac68903a90700a9b19921df25346b843f46130e2fb39c7e2b6b9ea33fe3a5ad67b74728986e17f5ac933ace0bf063c2b9953014d6da7138f2c7669c3b7
6
+ metadata.gz: e3bf5bef0729c12ec15cf16992ffc41dbb7be10a2a53414c4d10f80d07bc45747ce0d05dfa6c1e881a02f5a240c2db8cca4e3f634bbad52e65ef2c5dc2ecb1e9
7
+ data.tar.gz: b9f316ec8905c247521dde1dd725f9b81386e053954db40171bf82b451304f4fc372dda49e332744d8c1fc90da5fb613a4400325259528dcf5eddd93432946e7
@@ -3,8 +3,8 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-cloudwatch-transform"
6
- gem.version = "0.0.5"
7
- gem.date = '2015-03-26'
6
+ gem.version = "0.0.6"
7
+ gem.date = '2015-04-21'
8
8
  gem.authors = ["Ling Zhang"]
9
9
  gem.email = ["zhangling.ice@gmail.com"]
10
10
  gem.summary = %q{Fluentd output plugin for transform cloudwatch alerts }
@@ -4,10 +4,10 @@ module Fluent
4
4
  # and identifies the plugin in the configuration file.
5
5
  Fluent::Plugin.register_output('cloudwatch_transform', self)
6
6
 
7
- #config_param :tag, :string, default:'alert.cloudwatch.out'
8
- config_param :tag, :string
7
+ config_param :out_tag, :string
9
8
  config_param :state_type, :string, :default => nil
10
9
  config_param :state_file, :string, :default => nil
10
+ config_param :state_tag, :string, :default => nil
11
11
 
12
12
  # This method is called before starting.
13
13
  def configure(conf)
@@ -64,18 +64,18 @@ module Fluent
64
64
  newhash["runbook"] = runbook_url
65
65
  newhash["event_type"] = "alert.cloudwatch"
66
66
 
67
- if @highwatermark.last_records(@tag)
68
- last_hwm = @highwatermark.last_records(@tag)
67
+ if @highwatermark.last_records(@state_tag)
68
+ last_hwm = @highwatermark.last_records(@state_tag)
69
69
  $log.info "got hwm form state file: #{last_hwm.to_i}"
70
70
  else
71
71
  $log.info "no hwm yet"
72
72
  end
73
73
 
74
- @highwatermark.update_records(timestamp.to_s,@tag)
74
+ @highwatermark.update_records(timestamp.to_s,@state_tag)
75
75
 
76
76
  #log the transformed message and emit it
77
77
  $log.info "Tranformed message #{newhash}"
78
- Fluent::Engine.emit @tag, time.to_i, newhash
78
+ Fluent::Engine.emit @out_tag, time.to_i, newhash
79
79
  }
80
80
  end
81
81
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cloudwatch-transform
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
  - Ling Zhang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd