Configuring an integration in IBM Tivoli Netcool/Impact for IBM Cloud Pak for AIOps

Edit the RESTful DSA data source in IBM Tivoli Netcool/Impact for an integration to IBM Cloud Pak for AIOps to finish configuring the integration and integration between IBM Tivoli Netcool/Impact and IBM Cloud Pak for AIOps.

Before you begin

  1. Ensure that you have created the IBM Tivoli Netcool/Impact integration in the IBM Cloud Pak for AIOps UI. The integration can be created from the Integrations page in the UI. For more information, see Creating IBM Tivoli Netcool/Impact integrations.

  2. Obtain the following details for your IBM Cloud Pak for AIOps deployment:

    • Your IBM Cloud Pak for AIOps hostname (cluster_address). For more information about obtaining this information, see Accessing your cluster by using the console.

    • Your encoded (base64 format) Platform UI API Key (ZenApiKey) for accessing IBM Cloud Pak for AIOps APIs. If you do not have an existing API key and need to generate a new API key, complete the following steps:

      Accessing APIs - Get authentication by using Platform UI API Key

      You can verify that your API key works by running the following command:

      curl -kv -H "Authorization: ZenApiKey ${ZenApiKey}" -H "x-tenant-id: ${tenant_id}"  "https://${CPD_ROUTE}/aiops/api/issue-resolution/v1/alerts/"
      

      Important: If you lose your API key, repeat the preceding steps to generate a new API key. Your old API key becomes invalid, and any applications or scripts cannot authenticate to the platform until you provide your new API key. For more information, see Accessing APIs.

    • The Red Hat OpenShift Container Platform certificate for IBM Cloud Pak for AIOps.

Note: When you create an IBM Tivoli Netcool/Impact integration, the integration creates a Data Source name (DSA) in the IBM Tivoli Netcool/Impact Data Model (as before). The DSA name is created in the format of AIOPs-ConnectorName-ConnectorID. Any IBM Tivoli Netcool/Impact policies will now use the new DSA instead of the old one. Therefore, you must update the new DSA with your cluster Host Name and Authorization (see step 4 below).

Configuring the RESTful DSA data source

  1. Open the IBM Tivoli Netcool/Impact GUI.

  2. Click and view the Policies tab.

    If the integration in IBM Cloud Pak for AIOps is successful, a RESTful DSA data source is already created. In addition, the following default policies are already created.

    • AIOPS_HandleAction - This file defines the wrapper that is used when IBM Cloud Pak for AIOps invokes an action in IBM Tivoli Netcool/Impact.

    • AIOPS_Mappings - This file defines how events are sent, and mapped, to IBM Cloud Pak for AIOps.

    • AIOPS_Utils - This file lists the APIs that are used for communicating with IBM Cloud Pak for AIOps.

    Ensure that these policies exist before proceeding. If they are missing, re-create the integration in IBM Cloud Pak for AIOps.

  3. Click the Data Model tab.

    An AIOps-<identifier> RESTful DSA data source is now listed. Click this data source to view the Restful API Data Source Editor for the data model.

  4. Go to the Source section and update the Host Name field with the name of the CPD route value.

  5. Update the Request Header authorization setting.

    1. Go to the Protected Request Headers section.

    2. Select the Authorization header and click Edit in the table header.

    3. Update the Header Value field to include your encoded Platform UI API Key (ZenApiKey). This value must be in the following format:

      ZenApiKey <ZenApiKey>
      

      Where <ZenApiKey> is your encoded Platform UI API Key.

    4. Click OK.

  6. Import the Red Hat OpenShift Container Platform certificate for IBM Cloud Pak for AIOps.

    To get the certficate, use the following steps:

    1. Export certificate from the IBM Cloud Pak for AIOps API Host:

      openssl s_client -showcerts -servername <cpd_route_name> -connect <cpd_route_name>:443 </dev/null
      

      This returns the certificate in the display. The certificate has the following format:

      -----BEGIN CERTIFICATE-----
      ABCDEfGHIjklMnOPQrSTUVWXYZABCdefghiJ1k2LMNoPQRSTUVwxYZABCDEFGhij
      ... certificate text...
      ... Server 1 ...
      r+wGXNPwrw==
      -----END CERTIFICATE-----
      
    2. Copy the text into a certificate file. Then, import the file to the IBM Tivoli Netcool/Impact server:

      $IMPACT_HOME/sdk/bin/keytool -import -v -keystore $IMPACT_HOME/wlp/usr/servers/ImpactUI/resources/security/trust.jks -storepass impactadmin -alias aiops -file  <exported_aiops_certificate>
      
  7. Click the Save icon to save your RESTful DSA data source configuration. Then, test your integration.

Verifying the integration

  1. Create a test event policy in IBM Tivoli Netcool/Impact to create an alert in IBM Cloud Pak for AIOps.

    Your IBM Tivoli Netcool/Impact policies must be written in JavaScript to work with IBM Cloud Pak for AIOps. The Impact Policy Language (IPL) is not supported through the integration.

    You can use the following example JavaScript structure to help you create your own test policy. Replace the variables <variable> with the values for your own test event and system details.

    Load('AIOPS_Utils');
    occurrenceTime = new Date();
    var myEventInstance = "<instance_name>";
    var event = {
        deduplicationKey: myEventInstance + " <event_name>",
        sender: {
          service: "<service>",
          name: "<sender_name>",
          type: "Success",
          location: "<location>",
          cluster: "\"quotes\"",
          controller: "<script>alert(\"<sender_controller>\");</script>"
        },
        resource: {
          name: myEventInstance + "<resource_name>",
          type: myEventInstance + " <type>",
          service: myEventInstance + " <service>",
          location: "<location>",
          controller: "<resource_controller>",
          interface: "<interface>",
          ipAddress: "<ip_address>",
          hostname: "<hostname>",
          cluster: "<cluster>"
        },
        type: {
          classification: myEventInstance + " <classification>",
          eventType: "<event_type>"
        },
        severity: 6,
        summary: myEventInstance + " <summary>",
        occurrenceTime: occurrenceTime.toISOString()
      };
    var res = aiopsUtils.postEventDSA( "AIOps-<UUID>" , event );
    Log("res: " + res);
    

    Where <event_type> can be set to problem or resolution.

    To obtain the UUID value to use for the aiopsUtils.postEventDSA( "AIOps-<UUID>" , event ) setting, run the following command:

    oc get connectorconfiguration -o json | jq -r '.items[] | (.metadata.name + " - " + .metadata.uid)'
    

    Note: You need jq to run this command. To install jq, see Download jq.

    Output:

    impact-netcool - 123abcd4-1ab2-1a23-1a2b-1aabbc234de5
    

    The value 123abcd4-1ab2-1a23-1a2b-1aabbc234de5 is the UUID value.

  2. Run the policy to test the integration from the IBM Tivoli Netcool/Impact UI Policies tab.

    Open the test policy that you created, and click the Run icon in the toolbar. Wait a few minutes, then proceeed to the next step.

  3. Open the IBM Cloud Pak for AIOps UI and from the main navigation click Incidents and alerts. Click the Alerts tab to open the Alert Viewer.

    The alert for your test event should now display.

What to do next