Moogsoft Docs

RabbitMQ

The RabbitMQ Integration allows Moogsoft AIOps to ingest events from both direct queues and topic-based queues in RabbitMQ.

The integration ingests JSON messages from an active RabbitMQ broker, for example:

  • A broker within your infrastructure.
  • A broker connected to third-party monitoring tools.

See the RabbitMQ documentation for details on RabbitMQ components.

Before You Begin

The RabbitMQ integration has been validated with RabbitMQ 3.7.3. Before you set up the integration, ensure you have met the following requirements:

  • You have installed RabbitMQ.
  • You have your RabbitMQ server name.
  • You have a user with permissions to access the RabbitMQ server.
  • The configured port is accessible by both parties. The default RabbitMQ port is 5672.
  • You have set up the appropriate RabbitMQ exchange. The type must be 'direct' or 'topic'.

Configure the RabbitMQ Integration

To configure the RabbitMQ integration, you can edit the rabbitmq_lam.conf configuration file. This contains the following parameters:

Parameter Description Default
name Do not change. RabbitMQ Monitor
class Do not change. CRabbitMQMonitor
host Hostname/IP address of RabbitMQ server. rabbitmq-host.com
virtual host Name of the virtual host (vhost) to connect the integration to. See the RabbitMQ docs for information on vhosts. /
username RabbitMQ username. username
password RabbitMQ password. password
encrypted_password RabbitMQ password encrypted with the MOOG Encryptor utility. 4DZkk9W294Z+dDKMS1EMO8BCi7vyhGFNzra3T1w/Na4=
accept_all_json If enabled, the integration accepts and processes all forms of JSON. true
lists_contain_multiple_events

If enabled and Moogsoft Rest protocol is not in use, AIOps interprets a list as a collection of multiple events
If disabled, a list represents a single event.

true
message_prefetch

Controls how many messages the integration takes from the RabbitMQ queue and holds in memory as a buffer for processing. This allows processes to have throttled message consumption to ease backlog and memory consumption issues.

When set to '0', the message prefetch is unlimited so the integration takes as many messages as are available. To achieve high availability of messages and ensure messages get processed, the number should be higher than zero.

0

The other parameters are queue specific, so your configuration depends on the type of queue.

Direct Queue

Configure a direct queue in RabbitMQ if the client is publishing messages to a specific queue name.

The parameters in rabbitmq_lam.conf must match your queue information precisely. Pay special attention of you are using an existing queue . Alternatively, if you want to create one, configure as required.

Parameter Description Default
direct_queue_name Name of the direct queue in RabbitMQ. RabbitMQ_LAM_Queue
direct_queue_durable If enabled, the queue persists if the RabbitMQ server restarts. false
direct_queue_autodelete If enabled, RabbitMQ deletes the queue when the integration stops running. false
direct_queue_exclusive

If enabled, the queue only uses this integration's connection and is deleted when the connection closes.
If the queue is exclusive, it cannot be durable.

false

See the RabbitMQ docs for more information on these parameters.

Topic Queue

The topic exchange must exist in RabbitMQ before you start the integration. Configure a topic-based queue in RabbitMQ when the client is publishing messages using topics.

Parameter Description Default
topic_queue_name Name of the topic queue in RabbitMQ. RabbitMQ_LAM_Topic_Queue
topics Names of the topics for the topic queue. ["RabbitMQ_LAM_Topic1", "RabbitMQ_LAM_Topic2"],
topic_exchange

Name of the topic exchange in RabbitMQ.
This must exist prior to starting the integration if selecting a topic queue.

RabbitMQ_LAM_Topic_Exchange
topic_queue_durable If enabled, the queue persists if the RabbitMQ server restarts. false
topic_queue_autodelete If enabled, RabbitMQ deletes the queue when the integration stops running. false
topic_queue_exclusive If enabled, the queue only uses this integration's connection and is deleted when the connection closes.
If the queue is exclusive, it cannot be durable.
false

Configure SSL

You can configure SSL to secure communication between the RabbitMQ integration and RabbitMQ.

There are three forms of SSL available:

  • No SSL - SSL configuration is disabled.
  • Express SSL - SSL configuration is specifed but empty and specific certificates are not included.
  • Custom SSL - SSL configuration is enabled and you specify certificates for the integration to use when connecting to RabbitMQ.

The client key and certificate are optional. If neither are specified then client certification verification is not performed. However, if the RabbitMQ broker you are connecting to has SSL enabled, then you need to configure the integration to also use SSL.

The available SSL parameters are as follows:

Parameter Description Default
ssl_protocol SSL protocol to be used by RabbitMQ TLSv1.2
server_cert_file Path to the RabbitMQ server certificate server/cert.pem
client_cert_file Path to the RabbitMQ client certificate client/cert.pem
client_cert_key Path to the RabbitMQ client key client/key.key

See the RabbitMQ docs on TLS and SSL support for more information.

Example Events

You can follow RabbitMQ tutorials to send a test event to Moogsoft AIOps.

Use the following JSON payload as a Moogsoft event example:

{
 "signature":"my_test_box:application:Network",
 "source_id":"192.0.2.0",
 "external_id":"id-1234",
 "manager":"my_manager",
 "source":"my_test_box",
 "class":"application",
 "agent_location":"my_agent_location",
 "type":"Network",
 "severity":3,
 "description":"high network utilization in application A",
 "agent_time":"1411134582"
 }

See Alert and Event Fields Reference for descriptions of the event and alert fields in AIOps.