Created
July 25, 2012 00:40
-
-
Save wjimenez5271/3173643 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | |
| :state => "info" | |
| ) | |
| end | |
| end | |
| Riemann::Tools::KVM.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment