
= ActiveMQMonitor
:description: Learn how to configure and use the ActiveMQMonitor in OpenNMS {page-component-title} to test the availability of an ActiveMQ broker.

This monitor tests the availability of an ActiveMQ broker.
The service is considered available if a successful connection is made.

== Monitor facts

[cols="1,7"]
|===
| Class Name
| `org.opennms.netmgt.poller.monitors.ActiveMQMonitor`
|===

== Configuration and use

.Monitor-specific parameters for the ActiveMQMonitor
[options="header"]
[cols="1,3,2"]

|===
| Parameter
| Description
| Default

3+|*Required*

| broker-url
| The ActiveMQ Broker URL to connect to.
| vm://localhost?create=false&broker.persistent=false

3+| *Optional*

| user
| The user name used to log in to the ActiveMQ broker.
|n/a

| password
| The password used to authenticate the user on the ActiveMQ broker.
| n/a

| use-nodelabel
| A boolean to enable using the nodelabel when connecting to the ActiveMQ broker.
| false

| create-session
| A boolean to enable creating a JMS session when connecting to the ActiveMQ broker.
| false

| client-id
| The client ID to use when connecting to the ActiveMQ broker.
| n/a
|===

This monitor implements the <<reference:service-assurance/introduction.adoc#ref-service-assurance-monitors-common-parameters, Common Configuration Parameters>>.


== Examples

Sample configuration on how to configure the monitor in `poller-configuration.xml`.

Note that you must include the `monitor` section for each service in your definition.

[source, xml]
----
<service name="ActiveMQ" interval="300000" user-defined="false" status="on">
   <parameter key="broker-url" value="failover://auto+ssl://192.168.1.1:61616/"/>
   <parameter key="use-nodelabel" value="true"/>
</service>

<monitor service="ActiveMQ" class-name="org.opennms.netmgt.poller.monitors.ActiveMQMonitor" />
----

