Page 1 of 1
activemq nagios plugin error
Posted: Wed Mar 14, 2018 1:39 pm
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!
Re: activemq nagios plugin error
Posted: Wed Mar 14, 2018 8:37 pm
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, the
README 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.
Re: activemq nagios plugin error
Posted: Thu Mar 15, 2018 9:12 am
by tmcdonald
Thanks for the assist,
@mcapra!
@shericaocbania, let us know if you have further (related) questions.
Re: activemq nagios plugin error
Posted: Fri Mar 16, 2018 6:58 am
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, the
README 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.
Re: activemq nagios plugin error
Posted: Fri Mar 16, 2018 9:12 am
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.
Re: activemq nagios plugin error
Posted: Fri Mar 16, 2018 2:31 pm
by kyang
Thanks for the help
@mcapra!