configuration-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 26  →  ?path2? @ 27
/monit/debian/templates/libvirt-domain
@@ -0,0 +1,16 @@
###########################################################################
## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
###########################################################################
 
# It is surprisingly easy to check virsh qemu-kvm processes using monit.
# It suffices to supply the PID file and to stop and restart the virtual
# machine using virsh.
 
check process example.domain with pidfile /var/run/libvirt/qemu/example.domain.pid
start program "/usr/bin/virsh start example.domain"
stop program "/usr/bin/virsh stop example.domain"
check host example.domain with address example.domain
start program "/usr/bin/virsh start example.domain"
stop program "/usr/bin/virsh stop example.domain"
if failed icmp type echo count 5 with timeout 15 seconds then restart