Create a Broker Profile
Each broker uses a profile which contains the connection information for other Moogsoft AIOps components, such as the APIs, the database, 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 AIOps 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 values of the
rabbit_config
andmysql_config
properties 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 integrations page on 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 |
|
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 Objects |
Yes |
The top-level object containing the |
|
String |
Yes |
The host name or server name of the server that is running MySQL. |
|
String |
Yes |
The name of the primary Moogsoft AIOps database. |
|
String |
Yes |
The name of the moog_reference database |
|
String |
Yes |
The username of the MySQL user. |
|
String |
Yes |
The MySQL user's password. |
|
Integer |
Yes |
The port that MySQL uses. |
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. |
Examples
The following examples demonstrate typical use of endpoint broker-profiles
.
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": "Main 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" }, "mysql_config": { "host": "aiops.example.com", "moogdb_database_name": "moogdb", "intdb_database_name": "moog_intdb", "username": "janedoe", "password": "123eg", "port": 3306 } } }'
Response Example
Example response returning details of the newly created profile:
{ "name": "Main 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" }, "mysql_config": { "host": "aiops.example.com", "moogdb_database_name": "moogdb", "intdb_database_name": "moog_intdb", "username": "janedoe", "password": "123eg", "port": 3306 } } }
After creating a broker profile, you can use it with any broker you subsequently create in the Moogsoft AIOps UI. See Create a Broker for more information.