Bobcares

How to Monitor Apache ActiveMQ with Nagios XI

by | Mar 14, 2022

Monitor Apache ActiveMQ with Nagios XI with ease with a little assistance from the experts at Bobcares. 

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Services.

Let’s take a look at how our Support Team is ready to help customers monitor Apache ActiveMQ with Nagios XI.

How to Monitor Apache ActiveMQ with Nagios XI

Apache ActiveMQ plugins come in handy while monitoring the Apache ActiveMQ server via Nagios XI. Today, our Support Team is here to help us set up Nagios XI in order to get access to up-to-date information on the number of objects on the ActiveMQ server queue.

Before we dive into the setup, here are a few prerequisites for the process:

  • Apache ActiveMQ 5.14.3
  • activemq_watch plugin
  • Access to a user with access to read queues in queues.jsp
  • NRPE agent set up on the Apache ActiveMQ server
  • A network route from Nagios XI server to the Apache ActiveMQ server

Our Support Engineers are here to help you out with the perquisites so that you can easily monitor Apache ActiveMQ via Nagios XI.

How to install NRPE

Installing NRPE is essential since we will have to execute a plugin that helps with the monitoring process. If you do not have NRPE installed, head to this article for reference.

How to download activemq_watch plugin

After the NRPE installation, we will require Perl Packages before downloading the plugin.

  1. First, open a terminal session to the ActiveMQ server as root user and run the following command:
    yum install -y perl-Switch perl-XML-Simple
  2. Then, download the plugin by running these commands:
    cd /usr/local/nagios/libexec/
    wget https://assets.nagios.com/downloads/nagiosxi/scripts/activemq_watch
    chmod +x /usr/local/nagios/libexec/activemq_watch
  3. After that, edit the activemq_watch file and modify the following line by replacing admin:admin with the username:password of the ActiveMQ server:
    my $page = get "http://admin:admin\@$address:$port/admin/xml/queues.jsp" or
    die "Cannot get XML file: $!\n";;
  4. Next, we have to modify the file to reflect the port setup of the ActiveMQ server as well. By default, it is set to 8161.
    my $port = "8161";

How to configure NRPE To execute activemq_watch plugin on ActiveMQ Server

According to our Support Techs, we have to edit the NRPE configuration file to add a definition for the plugin. This can be done by adding the following definition at the bottom of the file, in the list of commands:

command[activemq_watch]=/usr/local/nagios/libexec/activemq_watch $ARG1$

After adding the definition we have to save the file and exit. After that we have to restart xinetd to ensure the changes to the NRPE config are active with the following command:

systemctl restart xinetd

Our Support Engineers recommend checking the plugin from NagiosXI by executing the command below after establishing a terminal session to the Nagios XI server:

cd /usr/local/nagios/libexec/
./check_nrpe -H addr.of.activemq.server -c activemq_watch -a '-w 10 -c 20'

We have to replace add.of.activemq.server with the IP Address of the ActiveMQ server. This results in an output similar to the one below:

[root@xi-r7x-x64 ~]# cd /usr/local/nagios/libexece/ [root@xi-r7x-x64 libexece]# ./check_nrpe -H 10.25.8.4 -c activemq_watch a ‘w 10 -c 20’ OK – test holding: 0 msgs OK – nagios.test holding: 2 msgs OK – test2 holding: 0 msgs

How to use NRPE Monitoring Wizard

This monitoring wizard is responsible for creating host and service objects. All we have to do is head to Configure > Run a configuring wizard and choose the NRPE wizard.

  1. Enter the address of the ActiveMQ server and select the Operating System before clicking Next.

    Monitor Apache ActiveMQ with Nagios XI

  2. Then, configure the options for monitoring. For instance, make sure we enter a valid Host name.
  3. We can ignore NRPE Agent section since we have already installed it.
  4. Complete the wizard by selecting the required options in the remaining steps and clicking Finish.

After running the wizard, we can use the View status details for <ActiveMQ Server> option to view the new host and services we created.

This finally allows us to monitor Apache ActiveMQ in Nagios XI with ease.

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our skilled Support Engineers at Bobcares demonstrated how to monitor Apache ActiveMQ with Nagios XI.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF