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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02fcd740d4b9a7a320ad6d27e0c0fb74fa12d742
|
4
|
+
data.tar.gz: f99699001bf5b9ea218d438ba712d0bdf3cf272e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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, :
|
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']
|
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.
|
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-
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|