Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_kvm

Rating
4 votes
Favoured:
1
Current Version
1.0
Last Release Date
2010-12-17
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI 2009R1
  • Nagios Fusion 2010R1
Owner
License
GPL
Hits
105159
Files:
FileDescription
check_kvmcheck_kvm
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_kvm
Runs "virsh list" and returns the available vms.
Qemu/Kvm Nagios Integration

Runs "virsh list" and returns the available vms.

Install: Put script in nagios client directory libexec/check_kvm
As a nagios nrpe plugin, add the following line to your client nrpe.cfg
command[virt_check_kvm]=/opt/nagios/libexec/check_kvm
No sudo is necessary if you simply add nagios user to the libvirt group
libvirtd:x:118:nagios
Reviews (3)
You do not tell us how to install the plugin, YOu don't tell us if we install on the Nagios Server, the client or both. Are we suppose to edit the commands.cfg file. What is the command when we do get it working

define command {
command_name check_kvm or check_nrpe
command_line $USER1$/check_nrpe!virt_check_kvm -H $HOSTADDRESS$ -c $ARG1$
}

So what is it? Please explain this is a very very important plugin for me.

Thanks,
byshahirk, February 11, 2014
0 of 1 people found this review helpful
I tried this on Fedora and Power servers. both works well.
number of running guests shows OK
number of Paused guests shows Warning
number of shutdown guests shows Critical

Disadvantage : user has no right to define the criticality.
bynortally, January 10, 2014
1 of 1 people found this review helpful
The script works well, the only issues are with libvirt permissions, not with the script. I noticed that it truncated the "shut down" status to just "shut", so I tweaked the awk command from

{print $2":"$3}

to

{print $2":"$3" "$4}

This prints an extra space for one word commands, but I couldn't see a concise way to insert an conditional.