Enable Auto-Remediation and Remove Manual Processes with CA UIM 9.0.2

by April 2, 2019

CA Unified Infrastructure Management 9.0.2 is ready to make the monitoring process easier with the enablement of auto-remediation. By leveraging webhooks, you can now eliminate manual processes that you would normally take once an alarm was raised, making the triage process faster and more efficient.

This auto-remediation process begins with the messagegtw probe, which uses a webhook, a simple notification message using an HTTP POST, to post alarms to external applications. As the messagegtw probe monitors your infrastructure and tracks metrics, an alarm is created if any thresholds are breached, which results in a webhook being triggered. Through a REST API, the webhook is able to post this alarm to any third party application. This third party application then starts the auto-remediation process, and publishes the job status back to CA UIM once it is completed.

A common application of this would be to invoke a REST API of an external application with a customizable JSON payload. The payload can be customized and configured to use variable substitution from configuration item, metric, and the alarm.  You can then, for instance, use the webhook to trigger an issue in JIRA, send an SMS message using Twilio, post a message to a Slack channel, or send the alarms to any other third-party application or web page. 

Here are the steps you need to take to configure the messagegtw probe so you can use webhooks to start the auto-remediation process.

  1. Verify Prerequisites
  2. (Optional) Configure General Properties
  3. Configure REST Endpoint/Webhook

Verify Prerequisites

  • Create an Auto-Operator in NAS for webhook 
  • Specify the instance of messagegtw to which the queue should post
  • Create an ‘attach’ queue in the hub; the queue that you create is used by messagegtw to publish messages to webhooks

Configure General Properties

Follow these steps:

  • Navigate to the Setup node and update the following information:
    • Log level: specify the level of information that is written in the log file. Default log level is 1. You can select the following log levels:
      • 0 – Logs only severe information (default)
      • 1 – Logs error information
      • 2 – Logs warning information
      • 3 – Logs general information
      • 4 – Logs debugging information
      • 5 – Logs tracing/low-level debugging information
    • data_engine: Specify the data_engine probe path if messagegtw is not deployed in primary robot. For example, data_engine = /domain/hub/robot/data_engine
  • Navigate to the Startup node and update the following information. The startup folder contains the following key-value, by default
    • java_mem_init: Sets the initial Java heap size. Do not delete.
      • Default value: -Xms64m
    • java_mem_max: Sets the maximum Java heap size. Do not delete.
      • Default value: -Xmx2048m
  • Select Apply and OK to save the configuration.

Configure REST Endpoint/Webhook

Follow these steps:

  • Create a parent profile / folder for all Listeners / REST endpoints you want to configure
  • Select New Section to create a listener profile for a webhook that you want to configure
  • Enter Section Name: Specify a Profile name for the webhook that you are setting up
  • Create the following keys:
    • uim_queuename – Specify the name of the queue you have created in the hub which messagegtw subscribes to.
    • send_exclusive –  If True, this option publishes the messages to the first configured endpoint URL. When set to False, the messages are sent to all the webhook endpoints at once. Default value is True.
    • alert_on_failure – Generates an alert if messagegtw is unable to publish to the webhook configured. Default value is True. 
    • bulk_size – Specifies the max queue size that is processed by messagegtw. Default value is 10.
    • attach_to_queue – If set to True, messagegtw subscribes to queue. If set to False, messagegtw stops the subscription to queue. Default value is False.
    • (Optional) hub_add – If messagegtw is deployed in the secondary hub, specify the primary hub address. For example, hub_add = /domain/primary_hub/robot/hub.
  • Create a section for Publishers, and create a key with the following values:
  • Create a section for probe config, and create keys with the following default values:
  • Create a section for the payload-mapping details, and create keys with the following values
  • Create a section for the endpoint details and create keys with the following values:
  • Repeat the previous step if you want to configure messagegtw to publish to multiple endpoints/webhooks.
  • Select Apply and OK to save the configuration. The messagegtw probe is configured to fetch messages from the queue it subscribes to and posts it to the webhook endpoint configured. 

To learn more about auto-remediation in CA UIM 9.0.2, visit our DocOps page.