fluent-plugin-newrelic_metrics 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 98e173f8902f292dd80e4ea3ea04f4aee9bf84cd
4
- data.tar.gz: 8851e5668a74ff7837a2854f84a225db09ff2b88
3
+ metadata.gz: 02fcd740d4b9a7a320ad6d27e0c0fb74fa12d742
4
+ data.tar.gz: f99699001bf5b9ea218d438ba712d0bdf3cf272e
5
5
  SHA512:
6
- metadata.gz: 442e8f72f288e1c99e9bbab1fe3cc3f9e2d6e7422c6258b189b241bfe070d5b13ca483999faac0361ac1435026eb6d01299746b8e82827bdf29a31c1be80bf50
7
- data.tar.gz: 2f2e73098eee3a7925d51e73fc63782658264d86e141c62d1a49947114a29c3ae745b7d1d1cfbda9157ac40dae0c42a4f0ce1f64c1a564f186adde4374d3de51
6
+ metadata.gz: e34bf6de9396c52c9bad0f94b75038df9859069fadd5be322073caec8a52072bc99e8e6304e4d71faca3d79e151ddacb6c4a59645b850208796d0f0c1b0c34d0
7
+ data.tar.gz: fe6c8a622774a786b864778f1290c9eb486f3076de32cb78b6ff88f6c698dc38def5183ef41392684dc4a4dcade0a11a500bdf2c6a13231ff88b3f37518583ec
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-newrelic_metrics"
5
- gem.version = "0.0.1"
5
+ gem.version = "0.0.2"
6
6
  gem.summary = %q{Newrelic metrics input plugin for fluentd}
7
7
  gem.description = %q{Newrelic metrics input plugin for fluentd}
8
8
  gem.license = "MIT"
@@ -16,7 +16,10 @@ module Fluent
16
16
  config_param :tag, :string
17
17
  config_param :api_key, :string
18
18
  config_param :metrics, :string
19
- config_param :alert_policy_id, :integer, default: nil
19
+ config_param :alert_policy_id, :default => nil do |val|
20
+ val.nil? ? nil : val.split(',').map{ |id| id.to_i }
21
+ end
22
+
20
23
  config_param :interval, :time, default: '1m'
21
24
 
22
25
  def configure(conf)
@@ -45,7 +48,7 @@ module Fluent
45
48
  records = JSON.parse(results)[@metrics]
46
49
  if @alert_policy_id
47
50
  records = records.select{ |record|
48
- record['links']['alert_policy'] == @alert_policy_id
51
+ @alert_policy_id.include?(record['links']['alert_policy'])
49
52
  }
50
53
  end
51
54
  records.each do |record|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-newrelic_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Toyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client