zabbix-ruby-client 0.0.11 → 0.0.12
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.
- data/CHANGELOG.md +5 -1
- data/lib/zabbix-ruby-client/plugins/memory.rb +4 -4
- data/lib/zabbix-ruby-client/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
Zabbbix Ruby Client Changelog
|
2
2
|
-----------------------------
|
3
3
|
|
4
|
-
### v0.0.
|
4
|
+
### v0.0.12 - 2013-10-07
|
5
|
+
|
6
|
+
* bugfix on memory calculation
|
7
|
+
|
8
|
+
### v0.0.11 - 2013-10-07
|
5
9
|
|
6
10
|
* fix on the memory statistiics collection
|
7
11
|
* added a who plugin, but not happy about it. I need to have a use of the API to reate graphs from the client, to list who is logged in. Sounds like an interesting way to get processes list up there too.
|
@@ -13,12 +13,12 @@ class ZabbixRubyClient
|
|
13
13
|
return []
|
14
14
|
end
|
15
15
|
|
16
|
-
mem_total = info["MemTotal"]
|
17
|
-
mem_free = (info['MemFree'] + info['Buffers'] + info['Cached'])
|
16
|
+
mem_total = info["MemTotal"] * 1024
|
17
|
+
mem_free = (info['MemFree'] + info['Buffers'] + info['Cached']) * 1024
|
18
18
|
mem_used = mem_total - mem_free
|
19
19
|
mem_percent = (mem_used / mem_total.to_f * 100).to_i
|
20
|
-
swap_total = info['SwapTotal']
|
21
|
-
swap_free = info['SwapFree']
|
20
|
+
swap_total = info['SwapTotal'] * 1024
|
21
|
+
swap_free = info['SwapFree'] * 1024
|
22
22
|
swap_used = swap_total - swap_free
|
23
23
|
swap_percent = 0
|
24
24
|
unless swap_total == 0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbix-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -153,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
segments:
|
155
155
|
- 0
|
156
|
-
hash: -
|
156
|
+
hash: -2344962165856229527
|
157
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
158
|
none: false
|
159
159
|
requirements:
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
segments:
|
164
164
|
- 0
|
165
|
-
hash: -
|
165
|
+
hash: -2344962165856229527
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
168
|
rubygems_version: 1.8.23
|