riemann-tools 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a836eaa2ae5d0547934c781aeeb0534b608ad953
4
- data.tar.gz: 987188b8b7cccf081f0916c0538a83bdf72d0510
3
+ metadata.gz: 379e84d65f11764bb686f8e6f0e30de4d781aba2
4
+ data.tar.gz: 471fa6319632b5d50a5a353a817049cd2637fbe6
5
5
  SHA512:
6
- metadata.gz: d3e486b8ef26b755020a1276e6a7b403448515c82aa4739a196e0cebf38244e15c74240c18c3627288723c1bf2ee07be1c6a99b1dfb36f2932e445d41e7a082c
7
- data.tar.gz: c2efb17d675954ea1c1c3c93243f3a4c1690b1a451da7c50c87c8e9f78d05be67cf8107b23c040408ed8dd2c752143956c2f38ad58e1d376ff542a7c5be840bd
6
+ metadata.gz: a514901352bad1d586732b665f03de228d05eb5540dbfbd78bea7c558f523dc17f7f7a5f8d6b21930367d23eb70d288d443a9c964395c130194422bc32ac9ee2
7
+ data.tar.gz: 49fffcc4b0712fe5ac27e92ccf36278d09c85c31cc7004975514d49f9fcd4ba23c233a5e1268cd741712f9bf0e5b6268723672c446b6a710e1958f96fa45e7f3
@@ -63,6 +63,7 @@ To install the AWS tools.
63
63
  * riemann-marathon - Monitor Marathon.
64
64
  * riemann-munin - Monitor Munin.
65
65
  * riemann-riak - Monitor Riak.
66
+ * riemann-chronos - Monitor Chronos.
66
67
 
67
68
  There are also a number of additional, stand-alone tools, contained in
68
69
  the [Riemann GitHub account](https://github.com/riemann/).
@@ -39,7 +39,7 @@ class Riemann::Tools::Health
39
39
  @load = method :freebsd_load
40
40
  @memory = method :freebsd_memory
41
41
  else
42
- @cores = cores
42
+ @cores = `nproc`.to_i
43
43
  puts "WARNING: OS '#{@ostype}' not explicitly supported. Falling back to Linux" unless @ostype == "linux"
44
44
  @cpu = method :linux_cpu
45
45
  @disk = method :disk
@@ -70,23 +70,6 @@ class Riemann::Tools::Health
70
70
  )
71
71
  end
72
72
 
73
- def cores
74
- i = 0;
75
- File.read("/proc/cpuinfo").split(/\n\n/).inject({}) do |cores, p|
76
- physical_id = p[/physical id\s+:\s+(\d+)/, 1]
77
- core_id = p[/core id\s+:\s+(\d+)/, 1]
78
- if physical_id and core_id
79
- cores["#{physical_id}:#{core_id}"] = true
80
- elsif physical_id
81
- cores["#{physical_id}:"] = true
82
- else
83
- cores[i += 1] = true;
84
- end
85
-
86
- cores
87
- end.size
88
- end
89
-
90
73
  def report_pct(service, fraction, report)
91
74
  if fraction
92
75
  if fraction > @limits[service][:critical]
@@ -8,7 +8,7 @@ class Riemann::Tools::KVM
8
8
  def tick
9
9
 
10
10
  #determine how many instances I have according to libvirt
11
- kvm_instances = %x[virsh list |grep i-|wc -l]
11
+ kvm_instances = %x[LANG=C virsh list | grep -c running]
12
12
 
13
13
  #submit them to riemann
14
14
  report(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kingsbury
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riemann-client