diff --git a/heartbeat/OMD b/heartbeat/OMD new file mode 100644 index 000000000..1d92d6084 --- /dev/null +++ b/heartbeat/OMD @@ -0,0 +1,184 @@ +#!/bin/sh +# +# OMD (Open Monitoring Distribution) OCF RA. +# Checks the status of a given OMD site. +# +# - Use in a Pacemaker/DRBD environment for OMD - +# for more information see http://blog.simon-meggle.de +# Copyright 2011 (C) by Simon Meggle +# +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +# + +####################################################################### +# Initialization: + +. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs + +# OMD binary +OMD=`which omd` + +# If only your active Node runs OMD sites, change OMDDATA directly to the +# mount point /mnt/omddata. This ensures that DRBD is mounted before trying +# to start any clustered OMD site. +# Otherwise, if your cluster should also run a OMD site on the inactive node to +# monitor OMD sites on the active node, you need OMDDATA set to /opt/omd. Symlinks +# within this directory will point to another directory. +OMDDATA='/opt/omd' +#OMDDATA='/mnt/omddata' + +####################################################################### + +meta_data() { + cat < + + +0.1 + + +This is a Resource Agent for managing OMD (Open Monitoring Distribution, www.omdistro.org) sites. + +OMD resource agent + + + + + +Name of the OMD site to check. + + +OMD Site name + + + + + + + + + + + + + + + +END +} + +####################################################################### + +# don't exit on TERM, to test that lrmd makes sure that we do exit +trap sigterm_handler TERM +sigterm_handler() { + ocf_log info "They use TERM to bring us down. No such luck." + return +} + +omd_usage() { + cat <