server_metrics 1.2.10 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3aebbe051cf12c1a996535f3359b213f3026810b
4
- data.tar.gz: 5eb809d59f3981e206c42ebc149d0b2607c24bbe
3
+ metadata.gz: ce6751357cb11a50fb04e0be00dbb8c13ca1361d
4
+ data.tar.gz: 367228911a31a4080e84e9f8f4df8390d8070d4c
5
5
  SHA512:
6
- metadata.gz: 81484a0193175e0949da286981798d2628266ad3da3759727568a2c3a619bd51eeab5e59e6cf82e3f3e9e01890e5d41d7eddcebeb26a4c8642f161f7f88dc3b2
7
- data.tar.gz: ffc706e8feded5e097a94d38cfe00965b50baf1e2b769fe4daac8034bcc70ebcbb9c8136ef127c3272b14c52d0190d3d9c8d1a8fe5bf5d6e25810adf9a1ac8f9
6
+ metadata.gz: a8738ebe560ed97c83ae27389a27abdeef0c19d602c65f9e294d5830b8e1e6acfb2015c5108f7d277697d8c3034dee72543b48bf37380afbcc810561842c84c5
7
+ data.tar.gz: 32630edf7458d70c9f447ebfd3a50bf8830a5375c1d1461e9029e071edcf2bdb8379e1b9ca4bde4131c380d0ceb54ba3c82956c8fb70f3becafadc57753ba5a7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # 1.2.12
2
+
3
+ * Check if disk is symlink during size check
4
+
5
+ # 1.2.11
6
+
7
+ * Ignore docker/lxc/etc veth interfaces with more than 4 characters
8
+
9
+ # 1.2.10
10
+
11
+ * Fix comm name detection with parenthesis
12
+
1
13
  # 1.2.9.1
2
14
 
3
15
  * Ruby 1.8.7 fix
@@ -44,6 +44,10 @@ class ServerMetrics::Disk < ServerMetrics::MultiCollector
44
44
  end
45
45
  end
46
46
  end
47
+ @devices.each do |device|
48
+ symlink_name = File.readlink(device[:name]) rescue nil
49
+ device[:aliases] << symlink_name if symlink_name
50
+ end
47
51
  end
48
52
  @devices
49
53
  end
@@ -98,6 +102,10 @@ class ServerMetrics::Disk < ServerMetrics::MultiCollector
98
102
  if ios > 0
99
103
  await = ((stats['ruse'] - old['ruse']) + (stats['wuse'] - old['wuse'])) / ios.to_f
100
104
 
105
+ # FIXME: sometimes calculating await results in a large negative number.
106
+ # If that happens, just set await to -1.
107
+ await = -1 if await < 0
108
+
101
109
  report(device_name, :await => await)
102
110
  end
103
111
  end
@@ -9,7 +9,7 @@ class ServerMetrics::Network < ServerMetrics::MultiCollector
9
9
  lines.each do |line|
10
10
  iface, rest = line.split(':', 2).collect { |e| e.strip }
11
11
  interfaces << iface
12
- next if iface =~ /lo/
12
+ next if iface =~ /^(lo|veth\w{4,})$/
13
13
  found = true
14
14
  cols = rest.split(/\s+/)
15
15
 
@@ -1,3 +1,3 @@
1
1
  module ServerMetrics
2
- VERSION = '1.2.10'
2
+ VERSION = '1.2.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Lewis
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-11 00:00:00.000000000 Z
13
+ date: 2015-11-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler