fluent-plugin-chef-api 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-chef-api.gemspec +1 -1
- data/lib/fluent/plugin/in_chef_api.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed998fcc5dee1671058a5b3cf846a8695ccb84ba
|
4
|
+
data.tar.gz: 4483d34b1774c20ce7fdd275237670d040ecb2c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 665fb3a320bb653f6c91ad9c2afe69d5ac90da92f0dd938df15c27bca0a6eb95aaecad1e01e08825a35202566928726d76ac3bd3ea7245a950cd54bec176332d
|
7
|
+
data.tar.gz: c7be0994d88923faa353d323e168d66eceb0165a2f3a7b53491957be7f586c425ef34a73d13fff9b5d2fd854ee4d21032176d18dd7ca290e32a9f9d3ad04ffa2
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-chef-api"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.3.0"
|
8
8
|
spec.authors = ["Yamashita Yuu"]
|
9
9
|
spec.email = ["peek824545201@gmail.com"]
|
10
10
|
spec.license = "Apache-2.0"
|
@@ -11,6 +11,7 @@ module Fluent
|
|
11
11
|
config_param :node_name, :string, :default => nil
|
12
12
|
config_param :tag, :string, :default => "chef_api"
|
13
13
|
config_param :chef_environment, :string, :default => nil
|
14
|
+
config_param :default_values, :hash, :default => nil
|
14
15
|
|
15
16
|
def initialize
|
16
17
|
super
|
@@ -95,12 +96,15 @@ module Fluent
|
|
95
96
|
end
|
96
97
|
|
97
98
|
def run_once(connection)
|
99
|
+
if @default_values
|
100
|
+
data = @default_values.dup
|
101
|
+
else
|
102
|
+
data = {}
|
103
|
+
end
|
98
104
|
if @chef_environment
|
99
105
|
nodes = connection.environments.fetch(@chef_environment).nodes
|
100
|
-
data = {"chef_environment" => @chef_environment}
|
101
106
|
else
|
102
107
|
nodes = connection.nodes
|
103
|
-
data = {}
|
104
108
|
end
|
105
109
|
Engine.emit("#{@tag}.nodes", Engine.now, data.merge({"value" => nodes.count}))
|
106
110
|
nodes.each do |node|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-chef-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yamashita Yuu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|