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 nameVersion
BMC Helix Operations Management20.08 and later
Anypoint Studio7.8.0
Mule4.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:

  1. Create a MuleSoft project and add the connector to the project
  2. Create the files required for the connector configuration
  3. Configure the connector

After you complete the configuration, you define a workflow and add the following operations:

Operation nameDescription
Create EventInserts event data into a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation.
Get EventRetrieves event data from a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation.
Search EventFinds event data at a BMC Helix Operations Management endpoint and is intended to be used as a source in an operation.
Update EventInserts 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 

  1. Log in to Anypoint Studio.
  2. Select File > New > Mule Project.
  3. 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.
  4. In the Mule Palette view, click (X) Search in Exchange.
  5. In the Add Dependencies to Project dialog box, enter BMC Helix Operations Management in the search field.
  6. From the Available Modules list, select BMC Helix Operations Management Connector - Mule 4, and click Add >.

  7. 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.

  8. 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.

  9. To save your updates, click the Save icon on the application toolbar.

Task 2: To create the files required for the connector configuration 

  1. Create a properties file for the project. 

    1. Right-click the src/main/resources branch and select New > File.
    2. Enter a name for the file; for example: project.properties.
    3. 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.
      These variables are used to configure your connector.
  2. Create a configuration file to define the connector configuration:
    1. Right-click the src/main/mule branch and select New > Mule Configuration File.
    2. In the General Information dialog box, enter config.xml in the Name and click Finish.
    3. Click Global Elements and then click Create.
    4. Select Global Configurations > Configuration Properties.
    5. On the General tab, select the project.properties file created in the previous step and then click OK.
  3. To save your updates, click the Save icon on the application toolbar.

Task 3: To configure the connector 

  1. From the Package Explorer pane, double-click the <projectName>.xml file.
  2. To execute the workflow when specific conditions are met, configure HTTP Listener as the source: 
    1. From the Mule Palette, select HTTP > Listener

    2. Select the Listener element, and add the following details: 

      Field nameActions
      Display nameEnter a short display name for the source.
      Connector configurationClick 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.
    3. Click Test Connection to verify the configuration values. 

  3. Define the connector configuration.
    1. From the Mule Palette, select BMC Helix Operations Management, and drag a BMC Helix Operations Management activity to the Message Flow. 
    2. On the Message Flow tab, select the BMC Helix Operations Management operation.
    3. To define the connector configuration, click the + icon for Connector configuration in the Basic Settings section

    4. 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 nameValue
      NameName for the connector configuration.
      General tab
      Server URL${HostName}
      Access Key${accesskey}
      Secret Key${secretkey}
      Tenant ID${tenantid}
      Proxy Config
      HostURL of the proxy server
      PortPort number for the proxy server
      UsernameUser name to connect to the proxy server
      PasswordPassword for the user to connector to the proxy server
      NTLM DomainDomain name of the NTLM active directory server
    5. Click Test Connection to verify the defined configuration values.
    6. Click OK.
    7. To save your updates, click the Save icon on the application toolbar.
    After you configure the connector, this configuration is used for all the BMC Helix Operation Management operations in your flow.

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:

  1. From the Mule Palette, select BMC Helix Operations Management > Create Event
  2. Drag the Create Event option to the Message Flow tab. 
  3. Select the Create Event brick and on the Create Event tab, enter the following configuration details:

    ParameterValue
    Display nameOperation name
    Basic Settings
    Connector configurationConfiguration 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.
  4. 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:

  1. From the Mule Palette, select BMC Helix Operations Management > Get Event
  2. Drag the Get Event option to the Message Flow tab. 
  3. Select the Get Event brick and on the Get Event tab, enter the following configuration details:

    ParameterValue
    Display nameOperation name
    Basic Settings
    Connector configurationConfiguration 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.

  4. 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:

  1. From the Mule Palette, select BMC Helix Operations Management > Search Event
  2. Drag the Search Event option to the Message Flow tab. 
  3. Select the Search Event brick and on the Search Event tab, enter the following configuration details:

    ParameterValue
    Display nameOperation name
    Basic Settings
    Connector configurationConfiguration 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 .

    SeverityEnter the severity of events to search for.
    StatusEnter the status of the events to search for.
    MessageEnter 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 pageEnter 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.

  4. 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:

  1. From the Mule Palette, select BMC Helix Operations Management > Update Event
  2. Drag the Update Event option to the Message Flow tab. 
  3. Select the Update Event brick and on the Update Event tab, enter the following configuration details:

    ParameterValue
    Display nameOperation name
    Basic Settings
    Connector configurationConfiguration 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 idEnter 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.
  4. To save your updates, click the Save icon on the application toolbar.
Was this page helpful? Yes No Submitting... Thank you

Comments