Page tree
Skip to end of metadata
Go to start of metadata

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

The LAM 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 LAM has been validated with RabbitMQ 3.7.3. Before you set up the LAM, 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 LAM

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

ParameterDescriptionDefault
nameDo not change.RabbitMQ Monitor
classDo not change.CRabbitMQMonitor
hostHostname/IP address of RabbitMQ server. rabbitmq-host.com
virtual hostName of the virtual host (vhost) to connect the LAM to. See the RabbitMQ docs for information on vhosts./
usernameRabbitMQ username.username
passwordRabbitMQ password.password
encrypted_passwordRabbitMQ password encrypted with the Moog Encryptor utility.4DZkk9W294Z+dDKMS1EMO8BCi7vyhGFNzra3T1w/Na4=
accept_all_jsonIf enabled, the LAM 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 LAM 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 LAM 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. 

ParameterDescriptionDefault
direct_queue_nameName of the direct queue in RabbitMQ.RabbitMQ_LAM_Queue
direct_queue_durableIf enabled, the queue persists if the RabbitMQ server restarts.false
direct_queue_autodeleteIf enabled, RabbitMQ deletes the queue when the LAM stops running.false
direct_queue_exclusive

If enabled, the queue only uses this LAM'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 LAM. Configure a topic-based queue in RabbitMQ when the client is publishing messages using topics.

ParameterDescriptionDefault
topic_queue_nameName of the topic queue in RabbitMQ.RabbitMQ_LAM_Topic_Queue
topicsNames 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 LAM if selecting a topic queue.

RabbitMQ_LAM_Topic_Exchange
topic_queue_durableIf enabled, the queue persists if the RabbitMQ server restarts.false
topic_queue_autodeleteIf enabled, RabbitMQ deletes the queue when the LAM stops running.false
topic_queue_exclusiveIf enabled, the queue only uses this LAM'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 LAM and RabbitMQ. 

There are three forms of SSL available:

  • No SSL - SSL configuration is disabled.
  • Express SSL - SSL configuration is specified but empty and specific certificates are not included.
  • Custom SSL - SSL configuration is enabled and you specify certificates for the LAM 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 LAM to also use SSL.

The available SSL parameters are as follows:

ParameterDescriptionDefault
ssl_protocolSSL protocol to be used by RabbitMQTLSv1.2
server_cert_filePath to the RabbitMQ server certificateserver/cert.pem
client_cert_filePath to the RabbitMQ client certificateclient/cert.pem
client_cert_keyPath to the RabbitMQ client keyclient/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 Field Reference for descriptions of the event and alert fields in AIOps.

  • No labels