Sha256: 2fb74b175f635cd8b63188ceb825379a358528f3327bcc34aea36a1285275f21

Contents?: true

Size: 441 Bytes

Versions: 3

Compression:

Stored size: 441 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[LANG=C virsh list | grep -c running]

  #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

3 entries across 3 versions & 1 rubygems

Version Path
riemann-tools-0.2.14 bin/riemann-kvminstance
riemann-tools-0.2.13 bin/riemann-kvminstance
riemann-tools-0.2.11 bin/riemann-kvminstance