Class: Riemann::Tools::Kvm
- Inherits:
-
Object
- Object
- Riemann::Tools::Kvm
- Includes:
- Riemann::Tools
- Defined in:
- lib/riemann/tools/kvm.rb
Constant Summary
Constants included from Riemann::Tools
Instance Attribute Summary
Attributes included from Riemann::Tools
Instance Method Summary collapse
Methods included from Riemann::Tools
#attributes, #endpoint_name, included, #initialize, #options, #report, #riemann, #run
Instance Method Details
#tick ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/riemann/tools/kvm.rb', line 10 def tick # determine how many instances I have according to libvirt kvm_instances = `LANG=C virsh list | grep -c running` # submit them to riemann report( service: 'KVM Running VMs', metric: kvm_instances.to_i, state: 'info', ) end |