fluent-plugin-cloudstack 0.0.1 → 0.0.2
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 +8 -8
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_cloudstack.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c92a4aeaff4cab0e22f0ff7f69578c7a711e0bb9
|
|
4
|
+
data.tar.gz: 9444ac520fbe888d2e77d5b12dca4af6ee686012
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4c5c9c31f761dabbbd7aa292c42e53dab3ce76f63f20249550e07d05c3ee89106eeff2efdf4d1c493bf121bb0640844a04f7a096898ea9ff40c23729060f0ed
|
|
7
|
+
data.tar.gz: aa4332df87e596ab80709533d275929e2af0b37ece76cafcb116f1da3d19ad939bc7c15113af8c66e37358e005ba91282c5c34959d7835bd9b1ea42520b6ee18
|
data/README.textile
CHANGED
|
@@ -60,14 +60,6 @@ h2. Configuration
|
|
|
60
60
|
h2. Data Example
|
|
61
61
|
|
|
62
62
|
<pre>
|
|
63
|
-
20131027T193928+0000 cloudstack.usages {"instances_usage":1,
|
|
64
|
-
"memory_usage":512,
|
|
65
|
-
"cpu_usage":1,
|
|
66
|
-
"root_volume_usage":16106127360,
|
|
67
|
-
"data_volume_usage":42949672960,
|
|
68
|
-
"usages_per_service_offering":{"t1.micro":1},
|
|
69
|
-
"usages_per_disk_offering":{"Datadisk 40GB":1}}
|
|
70
|
-
|
|
71
63
|
20130507T041336+0000 cloudstack.event {"id":"xxxxxxx-4e64-4fa5-8045-5ecffb7e2417",
|
|
72
64
|
"username":"clnxxxxxxxxx",
|
|
73
65
|
"type":"USER.LOGIN",
|
|
@@ -79,5 +71,13 @@ h2. Data Example
|
|
|
79
71
|
"created":"2013-05-07T13:13:36+0900",
|
|
80
72
|
"state":"Completed",
|
|
81
73
|
"parentid":"0"}
|
|
74
|
+
|
|
75
|
+
20131027T202108+0000 cloudstack.usages.vm_usage 1
|
|
76
|
+
20131027T202108+0000 cloudstack.usages.memory_usage 512
|
|
77
|
+
20131027T202108+0000 cloudstack.usages.cpu_usage 1
|
|
78
|
+
20131027T202108+0000 cloudstack.usages.root_volume_usage 16106127360
|
|
79
|
+
20131027T202108+0000 cloudstack.usages.data_volume_usage 42949672960
|
|
80
|
+
20131027T202108+0000 cloudstack.usages.usages_per_service_offering.t1.micro 1
|
|
81
|
+
20131027T202108+0000 cloudstack.usages.usages_per_disk_offering.Datadisk_40GB 1
|
|
82
82
|
</pre>
|
|
83
83
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.2
|
|
@@ -80,7 +80,15 @@ module Fluent
|
|
|
80
80
|
usages = get_usages
|
|
81
81
|
time = Engine.now
|
|
82
82
|
output_tag = "#{@tag}.usages"
|
|
83
|
-
|
|
83
|
+
usages.each do |key, value|
|
|
84
|
+
if value.class == Hash
|
|
85
|
+
value.each do |key2, value2|
|
|
86
|
+
Engine.emit("#{output_tag}.#{key}.#{key2}", time, value2)
|
|
87
|
+
end
|
|
88
|
+
else
|
|
89
|
+
Engine.emit("#{output_tag}.#{key}", time, value)
|
|
90
|
+
end
|
|
91
|
+
end
|
|
84
92
|
end
|
|
85
93
|
|
|
86
94
|
def get_new_events
|
|
@@ -129,7 +137,7 @@ module Fluent
|
|
|
129
137
|
root_volume_usage += volume["size"]
|
|
130
138
|
when "DATADISK"
|
|
131
139
|
data_volume_usage += volume["size"]
|
|
132
|
-
usages_per_disk_offering[volume["diskofferingname"]] += 1
|
|
140
|
+
usages_per_disk_offering[volume["diskofferingname"].gsub(' ','_')] += 1
|
|
133
141
|
end
|
|
134
142
|
end
|
|
135
143
|
|