Create a Broker Profile
Each broker uses a profile which contains the connection information for other Moogsoft Enterprise components, such as the APIs and the Message Bus.
You use the broker-profiles
endpoint of the integrations API to create a broker profile, for example:
<host>/integrations/api/v1/broker-profiles
Where <host>
is the URL of the Moogsoft Enterprise instance you want to create the new profile on.
Before you begin
Before you create your new profile, ensure you have met the following requirements:
You are running RHEL/CentOS 7.
You have the
rabbit_config
property value from the system.conf file. You can find the file in$MOOGSOFT_HOME/config
.The ports you want to configure the profile on are open.
Request body
Endpoint broker-profiles
takes the following properties:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | The name of the new broker. |
| JSON Object | Yes | The top-level object containing the |
| String | Yes | The URL of the UI service for your instance. For example |
| Integer | Yes | Minimum port number for the broker to use. |
| Integer | Yes | Maximum port number for the broker to use. |
| JSON Object | Yes | The top-level object containing the If you omit this property, the broker communicates using WebSockets on the value of |
| JSON Object | Yes | The |
| String | Yes | The name of the zone. |
| String | Yes | The username of the RabbitMQ user. |
| String | Yes | The password for the RabbitMQ user. |
| JSON Object | No | The proxy object used for broker HTTP communication. It contains the following parameters:
|
Note
You can configure a broker profile to communicate using WebSockets instead of RabbitMQ. Omit the rabbit_config
property from your configuration when you create the broker profile. Brokers you assign this profile will then communicate over the address of controller_url
instead. Any integrations running on the broker also inherit this configuration.
You cannot configure the internal broker to communicate over WebSockets because the internal broker uses the default profile.
Response
The endpoint returns the following response:
Type | Description |
---|---|
HTTP | HTTP status or error code indicating request success or failure. See HTTP status code definitions for more information. |
Configure the Moogsoft Enterprise Integration
After you create the broker profile, you install integrations using the UI at Integrations > Available Integrations.
Brokers communicate with Moogsoft Enterprise using either RabbitMQ or WebSockets.
If you have set up a WebSockets broker, when you are installing an integration, you select where the integration will be run:
Run on Remote Broker if the broker communicates using WebSockets.
Run on Moogsoft Cloud if the broker communicates using RabbitMQ.
Examples
The following examples demonstrate typical use of endpoint broker-profiles
for RabbitMQ and WebSockets broker responses.
RabbitMQ Broker Request Example
Example cURL request to https://aiops.example.com/integrations/api/v1/broker-profiles
:
curl -X POST \ https://aiops.example.com/integrations/api/v1/broker-profiles \ -H 'Content-Type: application/json' \ -u john.doe:<password> \ -d '{ "name": "RabbitMQ Broker Profile", "config": { "controller_url": "https://aiops.example.com", "port_range_min": 50000, "port_range_max": 51000, "rabbit_config": { "brokers": [ { "host": "aiops.example.com", "port": 5672 }], "zone": "zonex", "username": "jdoe", "password": "eg123" } } }'
RabbitMQ Broker Response Example
Example response returning details of the newly created profile:
{ "name": "RabbitMQ Broker Profile", "config": { "controller_url": "https://aiops.example.com", "port_range_min": 50000, "port_range_max": 51000, "rabbit_config": { "brokers": [ { "host": "aiops.example.com", "port": 5672 }], "zone": "zonex", "username": "jdoe", "password": "eg123" } } }
After creating a broker profile, you can use it with any broker you subsequently create in the Moogsoft Enterprise UI. See Create a Broker for more information.
WebSockets Broker Request Example
Example cURL request to https://aiops.example.com/integrations/api/v1/broker-profiles
. This example includes a proxy:
curl -X POST \ https://aiops.example.com/integrations/api/v1/broker-profiles \ -H 'Content-Type: application/json' \ -u john.doe:<password> \ -d '{ "name": "WebSocket Broker Profile (with proxy)", "config": { "controller_url": "https://aiops.example.com", "port_range_min": 50000, "port_range_max": 51000, "proxy": { "host": "10.1.1.2", "port": 3128, "username": "test", "password": "pass1234" } } }'
WebSockets Broker Response Example
Example response returning details of the newly created profile:
{ "name": "WebSocket Broker Profile (with proxy)", "config": { "controller_url": "https://aiops.example.com", "port_range_min": 50000, "port_range_max": 51000, "proxy": { "host": "10.1.1.2", "port": 3128, "username": "test", "password": "pass1234" } } }
After creating a broker profile, you can use it with any broker you subsequently create in the Moogsoft Enterprise UI. See Create a Broker for more information.