Page 1 of 2
Artemis ActiveMQ Plugins for Nagios?
Posted: Mon Feb 26, 2024 11:53 am
by amoss24
Hello XI community,
I'm wondering if anyone is familiar with the 'newer' Artemis ActiveMQ solution over the 'classic' ActiveMQ solution? It seems to be a little different compared to the standard ActiveMQ implementations. My understanding is that there used to be an XML interface (as seen in the document below) and a newer REST Jolokia interface.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
We have some developers working with "Artemis" and it does not seem to be the same as the formerly mentioned interfaces. For example, see this plugin on GitHub:
https://github.com/predic8/activemq-nag ... /issues/20
I am not a Python expert currently, so to potentially modify that plugin to work with Artemis would likely take me some time. Was hoping to set something up quickly to test for our team but it looks like I might have to investigate building or modifying something existing. Thanks in advance to everyone in the community
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Wed May 15, 2024 9:57 pm
by khloec0
Can anyone answer this question
mp3 juice? I'm looking for a solution because I have the same problem
tubidy. If anyone has one
y2mate, please tag me. Thanks a lot.
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue May 21, 2024 10:18 am
by bbahn
Hello,
As Artemis ActiveMQ isn't a project that we develop/maintain and it seems you may need more extensive assistance (likely a new plugin is needed), you can create a support ticket at
https://answerhub.nagios.com/support/s/ to get assistance in this.
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Wed Jun 12, 2024 2:18 pm
by amoss24
I believe the metrics we want can be retrieved via the JMX interface with the check_jmx plugin like is similarly outlined here:
https://nagiosenterprises.my.site.com/s ... A-d7722bc4
Once the JMX interface is available I believe the Artemis metrics can be queried under org.apache.activemq.artemis but I will know more once I've tested the plugin.
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue Jun 18, 2024 2:12 pm
by amoss24
I was able to get the check_jmx plugin working on the host's commandline:
Code: Select all
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.224.48:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"NameOfBroker\" -A Uptime -vvvv
JMX OK - Uptime=7 hours 24 minutes
It appears the double quotes in the broker's name must be escaped. However, the issue I'm facing now is running the command from the Nagios server results in no output. Any ideas what is getting lost in translation from running the plugin on the server to running it from the XI server via check_ncpa.py?
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Fri Jun 21, 2024 9:17 am
by gwesterman
Hi @amoss24,
What does the command you are using on the Nagios server look like? If you run this command directly from the CLI, what does it give you? Is it just nothing? Can you run other NCPA commands successfully from the Nagios server? Other check_jmx commands?
Other than these questions, I would just make certain you followed all of the steps in
this doc correctly.
Let us know what you find.
Thank you!
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue Jun 25, 2024 12:59 pm
by amoss24
Pretty sure I have this figured out now. I reviewed my command in the CCM and it appears I was missing a single quote in my arguments. Now the service is returning a value when run from the XI server.
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue Jun 25, 2024 1:21 pm
by jsimon
Hi @amoss24,
Glad to hear you were able to get this sorted out!
@khloec0, I wanted to tag you here per your request. Let us know if this solution works for you as well, or if you have any questions.
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue Jun 25, 2024 2:06 pm
by amoss24
@jsimon
Do you happen to know off the top of your head what characters need to be escaped with check_ncpa.py? If I am on the endpoint, I can run check_jmx locally as follows:
Code: Select all
./check_jmx -q -U service:jmx:rmi:///jndi/rmi://<Endpoint_IP_Address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<broker_name>\",component=addresses,address=\"<address_in_Artemis>\" -A AddressSize -vvvv -w 300 -c 400
JMX CRITICAL - AddressSize=46954 | AddressSize=46954
However, from XI via check_ncpa.py, it does not work when drilling down further in to the Artemis address structure, likely due to the commas I'm suspecting. Here's what I get in the CCM:
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H <endpoint_IP> -t '<NCPA_token>' -P 5693 -M 'plugins/check_jmx' -q 'args=-U service:jmx:rmi:///jndi/rmi://<Endpoint_IP_Address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<broker_name\",component=addresses,address=\"<address_in_Artemis>\" -A AddressSize -vvvv -w 300 -c 400'
JMX UNKNOWN Required options not specified Usage: check_jmx -help
Re: Artemis ActiveMQ Plugins for Nagios?
Posted: Tue Jun 25, 2024 4:06 pm
by sgardil
amoss24 wrote: ↑Tue Jun 25, 2024 2:06 pm
@jsimon
Do you happen to know off the top of your head what characters need to be escaped with check_ncpa.py? If I am on the endpoint, I can run check_jmx locally as follows:
Code: Select all
./check_jmx -q -U service:jmx:rmi:///jndi/rmi://<Endpoint_IP_Address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<broker_name>\",component=addresses,address=\"<address_in_Artemis>\" -A AddressSize -vvvv -w 300 -c 400
JMX CRITICAL - AddressSize=46954 | AddressSize=46954
However, from XI via check_ncpa.py, it does not work when drilling down further in to the Artemis address structure, likely due to the commas I'm suspecting. Here's what I get in the CCM:
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H <endpoint_IP> -t '<NCPA_token>' -P 5693 -M 'plugins/check_jmx' -q 'args=-U service:jmx:rmi:///jndi/rmi://<Endpoint_IP_Address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<broker_name\",component=addresses,address=\"<address_in_Artemis>\" -A AddressSize -vvvv -w 300 -c 400'
JMX UNKNOWN Required options not specified Usage: check_jmx -help
Hey
@amoss24
I think you're on the right track. Comma's and quotes are common characters that need to be escaped. Have you tried escaping the comma's and seeing what it returns?