Re: How to do a check health with telnet on ActiveMQ

2020-01-22 Thread Daniel Trüssel

On 21.01.20 04:58, Tim Bain wrote:

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.


Yes. This is my wish.


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.


this is what I am doing now. Check if port open


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.

web console is disabled in our setup

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.

Can't 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.


Thanky you. It's helpful to know that what I search for doesn't exist.

Have a good day

cheers

Daniel




Re: How to do a check health with telnet on ActiveMQ

2020-01-20 Thread Tim Bain
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  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
>
>


Re: How to do a check health with telnet on ActiveMQ

2020-01-20 Thread Daniel Trüssel

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



Re: How to do a check health with telnet on ActiveMQ

2020-01-20 Thread Daniel Trüssel

On 16.01.20 20:26, Tom Hall wrote:

I think you might be better off using something like this:
https://github.com/prometheus/jmx_exporter  


-Tom


blackbox_exporter is a requirement for customer. Can't install jmx_exporter



Re: How to do a check health with telnet on ActiveMQ

2020-01-17 Thread Tim Bain
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

On Thu, Jan 16, 2020, 12:26 PM Tom Hall  wrote:

> I think you might be better off using something like this:
> https://github.com/prometheus/jmx_exporter <
> https://github.com/prometheus/jmx_exporter>
>
> -Tom
>
>
> > On Jan 16, 2020, at 11:09 AM, Daniel Trüssel 
> wrote:
> >
> > Hey
> >
> > I use Prometheus blackbox_exporter
> >
> https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md#tcp_probe
> >
> > I wish to have a telnet command to check for ActiveMQ health.
> >
> > an example for IRC protocal is this
> >
> https://github.com/prometheus/blackbox_exporter/blob/master/example.yml#L88-L97
> >
> > kind regards
> > Daniel
> >
>
>


Re: How to do a check health with telnet on ActiveMQ

2020-01-16 Thread Tom Hall
I think you might be better off using something like this: 
https://github.com/prometheus/jmx_exporter 


-Tom


> On Jan 16, 2020, at 11:09 AM, Daniel Trüssel  wrote:
> 
> Hey
> 
> I use Prometheus blackbox_exporter
> https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md#tcp_probe
> 
> I wish to have a telnet command to check for ActiveMQ health.
> 
> an example for IRC protocal is this
> https://github.com/prometheus/blackbox_exporter/blob/master/example.yml#L88-L97
> 
> kind regards
> Daniel
> 



How to do a check health with telnet on ActiveMQ

2020-01-16 Thread Daniel Trüssel

Hey

I use Prometheus blackbox_exporter
https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md#tcp_probe

I wish to have a telnet command to check for ActiveMQ health.

an example for IRC protocal is this
https://github.com/prometheus/blackbox_exporter/blob/master/example.yml#L88-L97

kind regards
Daniel