BMC Helix Operations Management connector powered by MuleSoft
The BMC Helix Operations Management connector, powered by MuleSoft provides a connection between the MuleSoft connector engine and BMC Helix Operations Management, and is used to configure activities for the connection that can be used as a source or target within operations defined for the connection. You can perform get, create, search, and update operations on events by using the connector.
Before you begin
Make sure that you have the following subscriptions, applications, and access to set up and use the integration:
- Administrator access to BMC Helix Operations Management
- Anypoint Studio version 7.8.0 is installed
- An API access key, secret key, and tenant ID for BMC Helix Operations Management to register the application with your BMC Helix Operations Management instance. To do this, create an API user in BMC Helix Portal, and then add the access key, secret key, and tenant ID to the hom_tenant_id.
Supported product versions
Product name | Version |
---|---|
BMC Helix Operations Management | 20.08 and later |
Anypoint Studio | 7.8.0 |
Mule | 4.0 |
Configuring the BMC Helix Operations Management connector for MuleSoft in Anypoint Studio
Use Anypoint Studio to configure the connector. You can design and update your application, properties, and configuration files for the connector. You configure the connector in Anypoint Studio and then publish it in the cloud platform for distribution.
Complete the following procedures to configure the connector in Anypoint Studio:
- Create a MuleSoft project and add the connector to the project
- Create the files required for the connector configuration
- Configure the connector
After you complete the configuration, you define a workflow and add the following operations:
Operation name | Description |
---|---|
Create Event | Inserts event data into a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation. |
Get Event | Retrieves event data from a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation. |
Search Event | Finds event data at a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation. |
Update Event | Inserts event data into a BMC Helix Operations Management endpoint and is intended to be used as a target in an operation. |
Task 1: To create a MuleSoft project and add the connector to the project
- Log in to Anypoint Studio.
- Select File > New > Mule Project.
- Enter a name for your project and click Finished.
To populate the XML code with the connector's name space and schema location, and required dependencies to the project's pom.xml file, add the connector to your project. - In the Mule Palette view, click (X) Search in Exchange.
- In the Add Dependencies to Project dialog box, enter BMC Helix Operations Management in the search field.
From the Available Modules list, select BMC Helix Operations Management Connector - Mule 4, and click Add >.
Click Finish.
Important
You have to add the connector to each project you create. Adding the connector to a project does not make it available to other projects in Anypoint Studio.
In the Package Explorer tab, open the pom.xml for your project and verify that the following dependency is included in the file:
<dependency> <groupId>org.mule.connector.hom</groupId> <artifactId>hom-mule-connector</artifactId> <version>1.0.0</version> <classifier>mule-plugin</classifier> </dependency>
The BMC Helix Operations Management connector should be listed in the Mule Palette for your project.
- To save your updates, click the Save icon on the application toolbar.
Task 2: To create the files required for the connector configuration
Create a properties file for the project.
- Right-click the src/main/resources branch and select New > File.
- Enter a name for the file; for example: project.properties.
- Enter the following variable values in the file and save it:
- HostName — Enter the URL of the BMC Helix Operations Management instance.
- tenantid — Enter the tenant ID of the BMC Helix Operations Management instance.
- accesskey — Enter the API access key generated for BMC Helix Operations Management.
- secretkey — Enter the client secret for the access key.
- Create a configuration file to define the connector configuration:
- Right-click the src/main/mule branch and select New > Mule Configuration File.
- In the General Information dialog box, enter config.xml in the Name and click Finish.
- Click Global Elements and then click Create.
- Select Global Configurations > Configuration Properties.
- On the General tab, select the project.properties file created in the previous step and then click OK.
- To save your updates, click the Save icon on the application toolbar.
Task 3: To configure the connector
- From the Package Explorer pane, double-click the <projectName>.xml file.
- To execute the workflow when specific conditions are met, configure HTTP Listener as the source:
From the Mule Palette, select HTTP > Listener.
Select the Listener element, and add the following details:
Field name Actions Display name Enter a short display name for the source. Connector configuration Click the + sign to add the connector configuration and add the following details: - Name—Enter a name for the configuration.
- Protocol—Select HTTP or HTTPS.
- Host—Select the default value.
- Port—For HTTP enter 8081 and for HTTPS enter 8082.
Important: If the selected port is in use, enter a different value. - Base path—Enter a path for the flow.
- Listener interceptors—Select None.
Click Test Connection to verify the configuration values.
- Define the connector configuration.
- From the Mule Palette, select BMC Helix Operations Management, and drag a BMC Helix Operations Management activity to the Message Flow.
- On the Message Flow tab, select the BMC Helix Operations Management operation.
To define the connector configuration, click the + icon for Connector configuration in the Basic Settings section
Enter the following variables defined in the project.properties file in Step 3b:
Important
Create a properties file for the proxy configuration and add the variable values instead of the actual values.
Field name Value Name Name for the connector configuration. General tab Server URL ${HostName} Access Key ${accesskey} Secret Key ${secretkey} Tenant ID ${tenantid} Proxy Config Host URL of the proxy server Port Port number for the proxy server Username User name to connect to the proxy server Password Password for the user to connector to the proxy server NTLM Domain Domain name of the NTLM active directory server - Click Test Connection to verify the defined configuration values.
- Click OK.
- To save your updates, click the Save icon on the application toolbar.
After you set up the project configuration files and the details for the BMC Helix Operations Management connector for MuleSoft, you can create flows between BMC Helix Operations Management and other applications.
A typical flow requires the source configuration, for example HTTP > Listener, a request Transform Message that writes information to the BMC Helix Operations Management operation, the activity configuration, a response Transform Message that receives the information from the activity and a final logger element to write to data to your target application.
Important
When using a BMC Helix Operations Management operation in a flow, to get data from an external source, you have to define the payload metadata in the Transform message element. Select the JSON data format from the type dropdown, and then select Example from the dropdown. Then select the JSON file for the input metadata.
For more information, about adding the metadata, see
Create metadata class
.
After you create the workflow, run the project (right-click project name and select Run Project As > Mule Application), and then execute the flowing by using an application like Postman.
The following images show examples of sample flows created for the BMC Helix Operations Management operations:
Create Event Flow
Get Event Flow
Search Event Flow
Update Event Flow
Create Event operation
The Create Event operation gathers the data to create a new event at the BMC Helix Operations Management endpoint. It is intended to be used as a target in a workflow.
To configure the Create Event operation:
- From the Mule Palette, select BMC Helix Operations Management > Create Event.
- Drag the Create Event option to the Message Flow tab.
Select the Create Event brick and on the Create Event tab, enter the following configuration details:
Parameter Value Display name Operation name Basic Settings Connector configuration Configuration file created for the connector General Event class Select an event class from the list.
The request and response schemas for the Input payloads are populated based on the selected event class.
Input payloads To define specific field mappings for the operation, click
and add your payload data.For example:
[
{
"class": "EVENT",
"severity": "CRITICAL",
"object": "CPU_0",
"object_class": "CPU",
"msg": "Test message ram HOm5",
"source_identifier": "abc.bmc.com:3182",
"status": "OPEN",
"source_attributes": {
"source_hostname": "abc.bmc.com",
"source_port": "3182",
"source_address": "127.21.22.170"
},
"priority": "PRIORITY_1",
"details": "Long message details"
}
]
After you complete mapping the field values, click Done.
Important:
- To add attachments for the Create and Update operations, add the details of the file name and Base64 format of the file content to your payload data, or in the payload metadata in the Transform message.
For example,"attachment": (payload.attachment map
{
"fileName": "bmc_readme.txt",
"fileContent":"4oCiCUFkZGluZyBwcm9qZWN0IHZhcmlhYmxlIGZvciBjdXN0b20gQVBJIHRpbWVvdXRzLg0K4oCiCUZpeCBvZiBoYXJkY29kZWQgdmFsdWUgaW4gdGhlIHNjcmlwdHMNCg==
},
- When using this operation in a flow, to get data from an external source, define the payload metadata in the Transform message.
- To add attachments for the Create and Update operations, add the details of the file name and Base64 format of the file content to your payload data, or in the payload metadata in the Transform message.
To save your updates, click the Save icon on the application toolbar.
Get Event operation
The Get Event operation gathers data for an event at the BMC Helix Operations Management endpoint. It is intended to be used as a source in a workflow.
To configure the Get Event operation:
- From the Mule Palette, select BMC Helix Operations Management > Get Event.
- Drag the Get Event option to the Message Flow tab.
Select the Get Event brick and on the Get Event tab, enter the following configuration details:
Parameter Value Display name Operation name Basic Settings Connector configuration Configuration file created for the connector General Get event payload To define specific field mappings for the operation, click
and add your payload data.For example:
{
"eventid": "2189127981271289121"
}
After you complete mapping the field values, click Done.
Important:
When using this operation in a flow, to get data from an external source, define the payload metadata in the Transform message.
Event class Select an event class from the list.
The request and response schemas for the Input payloads are populated based on the selected event class.
Event id Enter the ID of the event for which data is to be retrieved, if you have not defined the Get event payload.
The Get event payload mappings take precedence over the data entered in this field.
To save your updates, click the Save icon on the application toolbar.
Search Event operation
The Search Event operation searches event data at the BMC Helix Operations Management endpoint. It is intended to be used as a source in a workflow.
To configure the Search Event operation:
- From the Mule Palette, select BMC Helix Operations Management > Search Event.
- Drag the Search Event option to the Message Flow tab.
Select the Search Event brick and on the Search Event tab, enter the following configuration details:
Parameter Value Display name Operation name Basic Settings Connector configuration Configuration file created for the connector General Search payload To define specific field mappings for the operation, click
and add your payload data.For example:
{
"severity": "CRITICAL",
"status": "OPEN",
"msg":"Test"
"startDate": "1614232233881",
"endDate": "1614262533882"
}
After you complete mapping the field values, click Done.
Important:
When using this operation in a flow, to get data from an external source, define the payload metadata in the Transform message.
Start date Enter the start date to search for events created from that date. Use the EPOCH date format. For converting the date to the Epoch format, see Epoch Converter
.
End date Enter an end date to search for events created until that date. Use the EPOCH date format. For converting the date to the Epoch format, see Epoch Converter
.
Severity Enter the severity of events to search for. Status Enter the status of the events to search for. Message Enter the message text of the events to search for. Maximum processed records Enter a value for the number of records to process.
Leave the field blank for unlimited records.
Maximum records per page Enter a value between 200 and 2000 for the number of records to be displayed per page. Event class Select an event class from the list.
The request and response schemas for the Input payloads are populated based on the selected event class.
To save your updates, click the Save icon on the application toolbar.
Update Event
The Update Event operation searches event data at the BMC Helix Operations Management endpoint. It is intended to be used as a target in a workflow.
To configure the Update Event operation:
- From the Mule Palette, select BMC Helix Operations Management > Update Event.
- Drag the Update Event option to the Message Flow tab.
Select the Update Event brick and on the Update Event tab, enter the following configuration details:
Parameter Value Display name Operation name Basic Settings Connector configuration Configuration file created for the connector General Event class Select an event class from the list.
The request and response schemas for the Input payloads are populated based on the selected event class.
Event id Enter the ID of the event to update. Input payloads To define specific field mappings for the operation, click
and add your payload data.For example:
{
msg: "update message with identifier 1",
notes: "new note 1",
severity: "CRITICAL",
Priority : "PRIORITY_4",
eventid:"28342938"
}
After you complete mapping the field values, click Done.
Important:
- To add attachments for the Create and Update operations, add the details of the file name and Base64 format of the file content to your payload data, or in the payload metadata in the Transform message.
For example,"attachment": (payload.attachment map
{
"fileName": "bmc_readme.txt",
"fileContent":"4oCiCUFkZGluZyBwcm9qZWN0IHZhcmlhYmxlIGZvciBjdXN0b20gQVBJIHRpbWVvdXRzLg0K4oCiCUZpeCBvZiBoYXJkY29kZWQgdmFsdWUgaW4gdGhlIHNjcmlwdHMNCg==
},
- When using this operation in a flow, to get data from an external source, define the payload metadata in the Transform message.
- To add attachments for the Create and Update operations, add the details of the file name and Base64 format of the file content to your payload data, or in the payload metadata in the Transform message.
- To save your updates, click the Save icon on the application toolbar.
Comments
Log in or register to comment.