Sha256: e8f2a0104d00a7d16341be1daa2bae06c0cd364fe99943e63afe0f27773c5e66

Contents?: true

Size: 431 Bytes

Versions: 26

Compression:

Stored size: 431 Bytes

Contents

#!/usr/bin/env ruby

require File.expand_path('../../lib/riemann/tools', __FILE__)

class Riemann::Tools::KVM
  include Riemann::Tools

  def tick

  #determine how many instances I have according to libvirt
  kvm_instances = %x[virsh list |grep i-|wc -l]

  #submit them to riemann
  report(
     :service => "KVM Running VMs",
     :metric => kvm_instances.to_i,
     :state => "info"
       )
  end
end

Riemann::Tools::KVM.run

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
riemann-tools-0.2.10 bin/riemann-kvminstance
riemann-tools-0.2.9 bin/riemann-kvminstance
riemann-tools-0.2.8 bin/riemann-kvminstance
riemann-tools-0.2.7 bin/riemann-kvminstance
riemann-tools-0.2.6 bin/riemann-kvminstance
riemann-tools-0.2.5 bin/riemann-kvminstance
riemann-tools-0.2.4 bin/riemann-kvminstance
riemann-tools-0.2.3 bin/riemann-kvminstance
riemann-tools-dgvz-0.2.2.3 bin/riemann-kvminstance
riemann-tools-dgvz-0.2.2.2 bin/riemann-kvminstance
riemann-tools-dgvz-0.2.2.1 bin/riemann-kvminstance
riemann-tools-0.2.2 bin/riemann-kvminstance
riemann-tools-0.2.1 bin/riemann-kvminstance
riemann-tools-0.2.0 bin/riemann-kvminstance
riemann-tools-0.1.9 bin/riemann-kvminstance
riemann-tools.haf-0.1.9 bin/riemann-kvminstance
riemann-tools-0.1.8 bin/riemann-kvminstance
riemann-tools-0.1.7 bin/riemann-kvminstance
riemann-tools-0.1.6 bin/riemann-kvminstance
riemann-tools-0.1.5 bin/riemann-kvminstance