[Xymon] ports check for a VIP...
Christoph Zechner
zechner at vrvis.at
Fri Oct 1 17:08:00 CEST 2021
On 01/10/2021 16:21, Ian Diddams wrote:
> that's interesting
>
> but presumably it would require something like
>
> VIP V
> system A
> system B
My example is a bit different than your setup, since I'm only checking
for connection and I'm doing this from two different xymon proxies which
both report to the main xymon server. I suspect you have to define it
like you wrote, yes.
>
> V.ports = (V.conn && A.ports) || (V.conn && B.ports)
Do you also need the connection status as well? "ports" and "conn" are
two different colums, I don't think mixing them would be wise?
>
> but that would need A & B reporting on ports (ie 3306) - but one of
> those will still always be red though?
That's why you need the "||", it's an or, so as long as one of your two
hosts is green, your overall status is green.
>
>
> I suspect Ive not understood something!
I don't think so, I fear, my example was not really that great, sorry.
As I said, I've never tried it with a ports check, only connection,
which works like a charm.
Cheers
Christoph
>
>
> On Friday, 1 October 2021, 13:41:02 BST, Christoph Zechner
> <zechner at vrvis.at> wrote:
>
>
> Hi,
>
> On 01/10/2021 14:15, Ian Diddams via Xymon wrote:
> > we have a HA mysql db cluster that runs with a VIP (drbd, pacemaker,
> > corosync)
> >
> > we want a ports check for 3306 - but if we configure it for the two
> > systems in the cluster one of them will always be red as its the slave
> > and not running mysqld (it only runs on the master).
> >
> > the clear alternative is to somehow run a 3306 check on the VIP... but
> > the VIP itself is only an IP in hosts.cfg (so we can conn check its
> > existence etc) and so isnt a client sending reports back to the server.
> >
> > any hints as to how we can acheive such a test ?
>
>
> You could try a combo status test, I've implemented these for connection
> tests, but it should work for port checks too, I guess (have not tried
> it though).
>
> (all paths are for Debian, that's what I am using)
>
> I defined a target in /etc/xymon/combo.cfg like this:
>
> computer.conn = (computer1.conn || computer2.conn)
>
> This returns green if one of the machines is green and also shows both
> statuses in the web interface.
>
> I guess, this should also work with ports...
>
> Good luck!
> Christoph
>
More information about the Xymon
mailing list