Artemis ActiveMQ Plugins for Nagios?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
amoss24
Posts: 31
Joined: Thu Dec 17, 2020 1:19 pm

Artemis ActiveMQ Plugins for Nagios?

Post 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
khloec0
Posts: 1
Joined: Wed May 15, 2024 9:54 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post by khloec0 »

Can anyone answer this questionmp3 juice? I'm looking for a solution because I have the same problemtubidy. If anyone has oney2mate, please tag me. Thanks a lot.
bbahn
Posts: 380
Joined: Thu Jan 12, 2023 5:42 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
amoss24
Posts: 31
Joined: Thu Dec 17, 2020 1:19 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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.
amoss24
Posts: 31
Joined: Thu Dec 17, 2020 1:19 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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?
gwesterman
Posts: 268
Joined: Wed Aug 23, 2023 11:29 am

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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!
amoss24
Posts: 31
Joined: Thu Dec 17, 2020 1:19 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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.
jsimon
Posts: 339
Joined: Wed Aug 23, 2023 11:27 am

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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.
amoss24
Posts: 31
Joined: Thu Dec 17, 2020 1:19 pm

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: Artemis ActiveMQ Plugins for Nagios?

Post 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?
Post Reply