Sha256: 0c04fe99f45d9656039c0cd862ff824a086acc359ea180b7c7009b47b405e4e5

Contents?: true

Size: 453 Bytes

Versions: 4

Compression:

Stored size: 453 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

4 entries across 4 versions & 1 rubygems

Version Path
riemann-tools-0.1.2 bin/riemann-kvminstances
riemann-tools-0.1.1 bin/riemann-kvminstances
riemann-tools-0.1.0 bin/riemann-kvminstances
riemann-tools-0.0.9 bin/riemann-kvminstances