[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Interesting question
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Interesting question
- From: Patrick Nixon <pnixon (at) gmail.com>
- Date: Wed, 30 Dec 2009 11:56:51 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=CGWfcnKcRV6g1jiUckLi6tPf5/LaO74cIvV03vEPbGk=; b=lrE73HWckpnZumIpXK9WrdBRddA6C9ixCRaU38M/Nv+Cw0jFmu6TiptSN1llK+UWdl 6W8om/F9cipEw17M8zwvYNMDVbYvy1MVragvf3zc6pRRPGJ7tfAR8Ix+S7X/Twjd6ayp xvKkb+fMP/1dejvP6TNhrJ16dXbDcfUb6rZZM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=MkWFzzAVTGUTZk1Z4BQR76lBNDy8Rlt7EAVMcgWvSvZyQdY2dgyhIRe2gvoQnTVKNS W9MI78q/MUnhsPhqVRxtCXnFC5lfvCG9KKk+hk6PD1Mglskdx+aK4ZrTKIuLjBHqpXpI BLE5EsSQRe42IFQk6wC+4YNCJZZs1yW+DjZuA=
- References: <79d511080912300834veddd63atf603afa536d41f31 (at) mail.gmail.com>
I did something recently that checks the status of the conn column for
a host before running a custom script.
I accomplished it using hobbitdboard
BBJUNK=`bb localhost "hobbitdboard host=${BBHOST} test=ssh fields=color"`
if [[ "$BBJUNK" =~ "green" ]]; then
debugmsg Launching - $BBIP $BBHOST $SSHPRIV $BBJUNK;
nohup /usr/lib/hobbit/server/ext/pd2a.sh $BBIP $BBHOST $SSHPRIV &
elif [[ "$BBJUNK" == "" ]]; then
debugmsg Launching - $BBIP $BBHOST $SSHPRIV $BBJUNK;
nohup /usr/lib/hobbit/server/ext/pd2a.sh $BBIP $BBHOST $SSHPRIV &
else
outputmsg ssh down - $BBJUNK
fi
Maybe that's something you can adapt for your test?
On Wed, Dec 30, 2009 at 11:34 AM, Jerald Sheets <questy (at) gmail.com> wrote:
> I'm about to undertake writing a series of monitors for a custom app we have
> here in-house.
>
> This app lives over a networked filesystem (think cvfs or gpfs) that is
> managed by two master nodes, a master and a failover. As a result, only one
> node at a time can answer the query I want to give it.
>
> My conundrum:
>
> If I make the query form my Xymon server on node1 and it fails over to
> node2, node1 becomes completely unable to answer the question, and that
> check would go "red". Same for node2 back to node1.
>
> If I run the check locally on each system, while one is working, the other
> will go "blue".
>
> Have any of you ever written monitors for servers that carry a service in an
> active/passive configuration, and been able to keep the individual servers
> from going into some strange state as a result of failovers and such?
>
> How did you handle it?
>
>
>
> ---
> Jerald M. Sheets jr.
>