fluent-plugin-cloudstack 0.0.7 → 0.0.8
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 +4 -4
- data/README.textile +4 -0
- data/VERSION +1 -1
- data/fluent-plugin-cloudstack.gemspec +2 -2
- data/lib/fluent/plugin/in_cloudstack.rb +20 -11
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ec43570ad8d36ae5a93b602fc89d77de5d0cbcac
|
|
4
|
+
data.tar.gz: d7ec531dd7bb504cf49a81f3c14b210da873e6d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b40c4a9006bddc2c70b2e0f64d459153b55d08d97038258be3d2a809a1976928228de25e02319a0a279d99c50fd47978707fcb8b45ce0b4b08bb371b64c6098f
|
|
7
|
+
data.tar.gz: e21241dce0a24a0f7d7d70193c9eda9183fafdae18a74cf98ff90f2c2d7cc4f39a40c3518ae590cf5247669c0874509100cb45f6e3b5d2d9d2c21edf6ab40e97
|
data/README.textile
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.8
|
|
@@ -7,8 +7,8 @@ Gem::Specification.new do |gem|
|
|
|
7
7
|
gem.authors = ["Yuichi UEMURA"]
|
|
8
8
|
gem.email = ["yuichi.u@gmail.com"]
|
|
9
9
|
gem.homepage = "https://github.com/u-ichi/fluent-plugin-cloudstack"
|
|
10
|
-
gem.summary = %q{
|
|
11
|
-
gem.description = %q{
|
|
10
|
+
gem.summary = %q{Fluentd input plugin to get usages and events from CloudStack API}
|
|
11
|
+
gem.description = %q{Fluentd input plugin to get usages and events from CloudStack API}
|
|
12
12
|
|
|
13
13
|
gem.files = `git ls-files`.split("\n")
|
|
14
14
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
@@ -46,6 +46,13 @@ module Fluent
|
|
|
46
46
|
@before_events = nil
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
@before_usages_filepath = "logs/before_usages.yml"
|
|
50
|
+
if File.exist?(@before_usages_filepath)
|
|
51
|
+
@before_usages = YAML.load_file(@before_usages_filepath)
|
|
52
|
+
else
|
|
53
|
+
@before_usages = Hash.new
|
|
54
|
+
end
|
|
55
|
+
|
|
49
56
|
@event_output_tag = "#{@tag}.event"
|
|
50
57
|
@usages_output_tag = "#{@tag}.usages"
|
|
51
58
|
|
|
@@ -142,25 +149,27 @@ module Fluent
|
|
|
142
149
|
usages_per_disk_offering[volume["diskofferingname"].gsub(' ','_')] += 1
|
|
143
150
|
end
|
|
144
151
|
end
|
|
145
|
-
else
|
|
146
|
-
volumes = []
|
|
147
152
|
end
|
|
148
153
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
usages = @before_usages
|
|
155
|
+
|
|
156
|
+
usages[:vm_sum] = vms.size
|
|
157
|
+
usages[:memory_sum] = memory_sum
|
|
158
|
+
usages[:cpu_sum] = cpu_sum
|
|
159
|
+
usages[:root_volume_sum] = root_volume_sum
|
|
160
|
+
usages[:data_volume_sum] = data_volume_sum
|
|
155
161
|
|
|
156
162
|
usages_per_service_offering.each do |key,value|
|
|
157
|
-
|
|
163
|
+
usages[key] = value
|
|
158
164
|
end
|
|
159
165
|
usages_per_disk_offering.each do |key,value|
|
|
160
|
-
|
|
166
|
+
usages[key] = value
|
|
161
167
|
end
|
|
162
168
|
|
|
163
|
-
|
|
169
|
+
File.write(@before_usages_filepath, usages.to_yaml)
|
|
170
|
+
@before_usages = usages
|
|
171
|
+
|
|
172
|
+
usages
|
|
164
173
|
end
|
|
165
174
|
|
|
166
175
|
def cs
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-cloudstack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuichi UEMURA
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-10-
|
|
11
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
-
description:
|
|
69
|
+
description: Fluentd input plugin to get usages and events from CloudStack API
|
|
70
70
|
email:
|
|
71
71
|
- yuichi.u@gmail.com
|
|
72
72
|
executables: []
|
|
@@ -105,7 +105,7 @@ rubyforge_project:
|
|
|
105
105
|
rubygems_version: 2.1.10
|
|
106
106
|
signing_key:
|
|
107
107
|
specification_version: 4
|
|
108
|
-
summary:
|
|
108
|
+
summary: Fluentd input plugin to get usages and events from CloudStack API
|
|
109
109
|
test_files:
|
|
110
110
|
- test/plugin/in_cloudstack.rb
|
|
111
111
|
- test/test_helper.rb
|