activemq nagios plugin error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
shericaocbania
Posts: 6
Joined: Wed Nov 22, 2017 1:49 pm

activemq nagios plugin error

Post by shericaocbania »

Hello,

I have downloaded a plugin https://github.com/predic8/activemq-nagios-plugin . Trying to run this on our nagios machine on shell, but it is returning me the following error:

check_activemq.py: error: too few arguments

What am I doing wrong?

How do I get the following: [--url-tail URL_TAIL] [-j JOLOKIA_URL] Where can I find that?

I hope someone can help, thanks!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: activemq nagios plugin error

Post by mcapra »

Plugins can be written in many different ways using many different languages. As it is unlikely anyone on these forums authored that plugin, the support we can offer is limited to what we already know about the underlying languages/frameworks/technologies involved as well as the documentation provided. I don't know much about ActiveMQ, but I work with both Python and Jolokia/JMX relatively regularly.

That said, theREADME seems pretty clear on what those arguments are used for:
With version 5.9.1 of ActiveMQ, the Hawtio console was removed. If you run a version of ActiveMQ that still includes Hawtio, you need to supply the --url-tail "hawtio/jolokia/read" parameter to the plugin.
The -j argument appears to be provided to allow users to over-ride the automatically generated URL used to access the Jolokia provided API.
The parameters --user, --pwd, --host and --port are IGNORED
if this paramter is specified!
Please set this parameter carefully as it essential
for the program to work properly and is not validated.
So, I would infer that -j really only has meaning if you're using some sort of custom URL for the Jolokia instance.
Former Nagios employee
https://www.mcapra.com/
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: activemq nagios plugin error

Post by tmcdonald »

Thanks for the assist, @mcapra!

@shericaocbania, let us know if you have further (related) questions.
Former Nagios employee
shericaocbania
Posts: 6
Joined: Wed Nov 22, 2017 1:49 pm

Re: activemq nagios plugin error

Post by shericaocbania »

mcapra wrote:Plugins can be written in many different ways using many different languages. As it is unlikely anyone on these forums authored that plugin, the support we can offer is limited to what we already know about the underlying languages/frameworks/technologies involved as well as the documentation provided. I don't know much about ActiveMQ, but I work with both Python and Jolokia/JMX relatively regularly.

That said, theREADME seems pretty clear on what those arguments are used for:
With version 5.9.1 of ActiveMQ, the Hawtio console was removed. If you run a version of ActiveMQ that still includes Hawtio, you need to supply the --url-tail "hawtio/jolokia/read" parameter to the plugin.
The -j argument appears to be provided to allow users to over-ride the automatically generated URL used to access the Jolokia provided API.
The parameters --user, --pwd, --host and --port are IGNORED
if this paramter is specified!
Please set this parameter carefully as it essential
for the program to work properly and is not validated.
So, I would infer that -j really only has meaning if you're using some sort of custom URL for the Jolokia instance.
Thank you for your input. Right now, I am not sure what the custom URL for the Jolokia intance though? Where do I find it? Sorry, not familiar with activemq, phyton and jolokia either :| So I dont really know what to do next after installing this plugin on Nagios.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: activemq nagios plugin error

Post by mcapra »

shericaocbania wrote: Right now, I am not sure what the custom URL for the Jolokia intance though? Where do I find it?
See the "Rest Management" section of the official ActiveMQ documentation:
http://activemq.apache.org/rest.html

Jolokia is basically just a HTTP->JMX bridge. It's an API ActiveMQ has decided to leverage for managing ActiveMQ internals and "checking up" on how ActiveMQ is doing. You give it a standard HTTP request, it turns that into something JMX can interpret. The ActiveMQ plugin you linked in the OP makes requests to the HTTP endpoint then converts the results into something "Nagios friendly".

My understanding is that, for non-custom ActiveMQ installations of versions 5.9.1 and greater, you won't have a "custom url"; You can just feed a --host --user --password --port and the plugin will automatically generate the appropriate URL.

But again, I have never actually even glanced at the ActiveMQ documentation or this plugin before this thread. I just know some Jolokia and JMX stuff.
Former Nagios employee
https://www.mcapra.com/
kyang

Re: activemq nagios plugin error

Post by kyang »

Thanks for the help @mcapra!
Locked