If I'm understanding you correctly, you want to connect to a TCP port, send
some text, and have the broker respond with text that says it's healthy or
unhealthy. I'm not aware of a way to do specifically that for ActiveMQ.

You can check that the OpenWire port is open, but you won't get the status
back explicitly (you have to assume that a connected TCP port means nothing
is wrong, which might not be accurate) and you'll get unwanted logging due
to the connections not actually being in the OpenWire protocol.

You can check that the web console returns a 200 (which might play nicer
with certain third-party monitoring tools and doesn't result in unwanted
logging), but you're still assuming that a 200 means that the broker is OK,
which may be inaccurate.

You can use JMX to check for certain known failure conditions (e.g.
persistent store being full), but you've said that you don't want to use
JMX.

Those are basically the options as I know them, unless you want to get into
the ActiveMQ code and build a health check endpoint that behaves exactly
how you want it to.

Tim

On Mon, Jan 20, 2020, 8:47 AM Daniel Trüssel <trues...@airmail.cc> wrote:

> On 18.01.20 03:09, Tim Bain wrote:
> > One thing to keep in mind when health checking ActiveMQ (whether via
> > Prometheus or a load balancer) is that anything that opens a TCP socket
> to
> > the OpenWire port without actually sending any content will result in the
> > broker logging some content for each such connection. So I second the
> idea
> > of a JMX-based health check or you could do an HTTP check against the web
> > console, but if you do choose to use a simple TCP socket check against
> the
> > OpenWire port, be sure you account for the logging it will cause.
> >
> > Tim
>
> I not only wish a simple TCP socket check, I also wish to get some kind
> of health status.
>
> See examples in orignal posting for IRC
>
>

Reply via email to