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!
activemq nagios plugin error
Re: activemq nagios plugin error
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:
That said, theREADME seems pretty clear on what those arguments are used for:
The -j argument appears to be provided to allow users to over-ride the automatically generated URL used to access the Jolokia provided API.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.
So, I would infer that -j really only has meaning if you're using some sort of custom URL for the Jolokia instance.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.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: activemq nagios plugin error
Thanks for the assist, @mcapra!
@shericaocbania, let us know if you have further (related) questions.
@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
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 eithermcapra 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:
The -j argument appears to be provided to allow users to over-ride the automatically generated URL used to access the Jolokia provided API.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.
So, I would infer that -j really only has meaning if you're using some sort of custom URL for the Jolokia instance.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.
Re: activemq nagios plugin error
See the "Rest Management" section of the official ActiveMQ documentation:shericaocbania wrote: Right now, I am not sure what the custom URL for the Jolokia intance though? Where do I find it?
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/
https://www.mcapra.com/