Use Case: Closed Loop Remediation

These service orchestration scenarios show how you as a system administrator or Workflow designer can integrate an Automic Automation (Automic Automation) Workflow in a closed loop remediation process. We will look at how events in an external system can trigger an automated process. Specifically, we will look at cleaning up disk space on a Windows server automatically as its disk space gets low.

Your IT landscape is not likely to look like the one described in these examples. Nevertheless, you can use the examples to get a sense of how to orchestrate a remediation process with Automic Automation. They can also help you understand what you need to consider to implement a similar scenario in your organization.

For general information about this type of process in a business environment, see Closed Loop Remediation .

This page includes the following:

 

Planning for Automated Remediation with Automic Automation

To ensure a successful and optimal implementation of a closed remediation process, like the one in the example in this topic, you need to start with thoughtful planning. For guidance with this crucial stage of the project, see Planning Considerations for Service Orchestration.

What You Will Learn

Example: Triggering a Disk Cleanup with a Monitoring and Alarm System

In this example, we look at how you can maintain healthy disk space on a server by monitoring its free disk space and automatically cleaning it up when the free space drops too low. This way, you support the optimal performance of the databases and the business-critical applications on the server.

Prerequisites

The disk cleanup scenario in this example required the following prerequisite setup and preparation activities:

Setup: On the Windows server

Two kinds of agents need to be installed on the server that you want to manage:

Setup: Automic Automation and Automation Engine

The following things need to be prepared in Automic Automation:

Communication and planning among teams

You need to coordinate among teams to ensure that all systems can authenticate at the various endpoints and pass on the necessary data. These junctures lie in the following places:

There are several ways to communication with Automic Automation, but the REST APIs are the most technology agnostic and therefore often a good choice, and it is the one we use in our example.

The Process Overview

The general process would look like this:

Process flow of a closed loop remediation with CA UIM and Automic

The automated disk space cleanup involves the following tasks:

For a cloud-based server, the process is the same, but you would use a monitoring system that is cloud-based, such as CA Digital Experience Insights (CA DXI).

Who Is Involved

The following people play a role in this implementation:

Step 1: Defining the Workflow in Automic Automation

Define a Workflow that defines the following steps of the remediation procedure.

Tip: Consider creating sub-workflows for individual tasks that you can use in other remediation Workflows. Building your workflow in a modular approach increases the scalability of your efforts.

Automic Workflow for the remediation tasks

  1. Define a PromptSet with named variables for input to the Workflow.

    These will need to be added to the incoming REST call from CA UIM. Coordinate with the CA UIM Webhook and REST API developers to ensure that they post the inputs for the promptSet variables and that you provide the variables they need to

  2. Using the input parameters, parse the address of the server and drive. Using this address, you can identify the AE agent that is running on the server.
  3. Use the related actions from the PCK.AUTOMIC_FILE_SYSTEM action pack to do the following:
    1. Check the disk space.

      Example output:

      Total # of free bytes: 7110569984

      Total # of bytes: 524288000

      Total # of avail free bytes: 167292928

    2. Find the folders you want to delete.
    3. Delete those folders.
    4. Create a temporary folder.
    5. Find and then move files that you want to delete into the temporary folder.
    6. Delete the temp folder.
    7. Check the final disk space again
  4. Get a list of the 10 biggest files.
  5. Output the results into variables.

Step 2: Defining the Webhook to transport the alarm data in CA UIM

For complete instructions with a detailed example of how to define an alarm and webhook to the Automic system in CA UIM, see Integrate CA Automic in the CA Unified Infrastructure Management documentation. Also see, messagegtw (Message Gateway) in the CA Unified Infrastructure Management Probes documentation.

The overall procedure is this:

  1. Deploy nas on the Primary Hub
  2. Create a Hub Attach Queue
  3. Deploy the Message Gateway Probe (messagegtw) to send messages to a webhook
  4. Configure the messagegtw probe with the following specifications for the Automic Automation remediation Workflow
    • The endpoint details
    • The payload details
    • The webhook details

    You must coordinate with the Automic Automation Workflow developers to get the names of the PromptSet variables for the remediation Workflow. You need to map the UIM fields to these variables for the inputs in the REST call post. f you want to request execution data for alarm enrichment, you also need those variable names for a separate .

    Note: Each instance of the Message Gateway Probe can have multiple webhooks configured.

  5. Define a Profile in the nas Auto‑Operator

Step 3: Defining the communication via REST calls in CA UIM

Note: Also see the example use case in Integrate CA Automic in the CA Unified Infrastructure Management documentation.

Remember that for all calls to the Automic Automation, you need to provide the basic authentication parameters, Username and Password. For example:

You need REST calls for the following actions:

  1. To post the alarm:

    Define a REST call from the CA UIM alarm service that will post the start data for the disk cleanup Workflow in Automic Automation. For example:

     

    POST: http://10.243.44.171:8080/ae/api/v1/100/executions

    {

    "object_name": "JOBP.DISK_SPACE",

    "inputs": {

    "DISK#": "C",

    "DNSNAME#": "domain.name.au",

    "IP#": "10.0.0.1“

    }

    }

     

    When the Workflow execution starts successfully, the Automic Automation responds with the execution run ID.

     

    {

    "run_id": 1017267

    }

     

     

  2. To request the execution status:

    Define the REST call that will periodically get the status and details of the execution from Automic Automation to enrich the alarm data. For example:

     

    GET: http://10.243.44.171:8080/ae/api/v1/100/executions/1017267

     

    Here is a sample response.

    {

    "name" : "JOBP.DISK_SPACE",

    "type" : "JOBP",

    "run_id" : 1017267,

    "status" : 1900,

    "status_text" : "ENDED_OK - ended normally",

    "runtime" : 0,

    "activation_time" : "2018-09-24T22:42:59Z",

    "start_time" : "2018-09-24T22:43:00Z",

    "end_time" : "2018-09-24T22:43:00Z",

    "parent" : 0,

    "user" : "AUTOMIC/AUTOMIC",

    "estimated_runtime" : 1,

    "alias" : "JOBP.DISK_SPACE"

    }

    Note: If the Workflow has child Workflows, then to get a more complete picture, request the executions details for the main and sub-tasks. For example: 

     

    GET: http://10.243.44.171:8080/ae/api/v1/100/executions/1017267/children

     

For information about all the REST endpoints for AE, see REST API Reference.

Step 4: Defining the monitoring and alarm systems in CA UIM

Define the following in CA UIM:

Variation: Adding Incident Management

You can always integrate Automic Automation Workflows into your incident management system. This gives you the following added advantages:

To integrate a incident management system, change the following to your process:

See also: