Overview

Patch management process definitions work with resources and other patch configuration settings already defined in Patch Management to automate some patch management processes.

This tutorial walks you through creating a simple patch management process definition for patching agents. You can then use this process in the Patch Management > Patch Configuration workflow.

The following image shows the simple patch management process definition you create in this tutorial:

Process Definition Patch Management Example

A patch management process allows you to do the following types of patch service tasks:

TaskDescription
Run Missing PatchesIt will initiate the patch scan in the given resource.
Approve patchesApproves patches based on filters.
Run Patch InstallInstalls the approved patches on the machine.
Patch MaintenancePuts the machine being patched into maintenance mode. When the machine is in maintenance mode, the alerts are sent to the maintenance queue instead of the active alert queue.
Run Patch ComplianceRuns a selected patch compliance configuration on the machine to measure patch compliance. The compliance configuration must already exist in the compliance configuration list, Automation > Patch Management > Patch Compliance Configuration.
Get Compliance ResourceIt will calculate and return the list of compliant resources based on the baseline and compliance name.
Search PatchesThis will help you to get the desired patches based on the provided filter criteria.
Rate PatchesWith the help of this task you will be able to rate the patches based on the given criteria.
Exclude/Include PatchesThis task will help you in performing patch exclusion/inclusion at the resource level.
Process Definition Patch Management Example

While this tutorial does not include script tasks or platform service tasks, you can add these more advanced tasks to your patch management process definitions.

In the following tutorial, refer to the Process Definition Reference for detailed information about each component type and the properties available for customization.

Prerequisite

Agent: 10.0.0 and above.

Create a New Process for Patch Management

To create a new patch management process definition, follow the below 6 steps:

patch management

Step 1: Define the Process Definition

In this step, you create a new process definition. Ensure the Remediation and Automation package is enabled for the client.
If not enabled, refer to the “Set up the Process Definition” to know how to enable it.

  1. Login to OpsRamp portal.
  2. Navigate to Automation > Process Automation > Process Definitions to display the list of defined process definitions.
  3. To add a new process definition, click + ADD to display the canvas and tools for rendering a new visualization.
  4. Select Patch Management in the Category list.
  5. In the Name. field, enter Simple Patch Workflow as an example. The name is the process name you select when you use this patch management process definition in the patch management workflow.
  6. Enable the process definition with the Enable Process Definition toggle.
  7. If you want to get the notifications, enable the Notify toggle and refer here to know how to configure it. This is optional.

Step 2: Define the Start Event

The first step of any process is to define the start condition.

  1. Click the Create StartEvent symbol from the component tools menu, and place it on the canvas with a click.

  2. Click the Start Event symbol to display the start event properties.

  3. In the Properties Name. field, enter Start. The ID property is automatically populated.

  4. For the Input Type select Resource.

    You do not need any other start properties because this process is started by the patch management schedule.

    When the process definition is used in the patch management workflow, a new process instance is created for each resource, and the process instance receives the resource ID as input.

Step 3: Define the Patch Scan Task

After adding the start event, add tasks to complete the process. The first task is to scan for missing patches.

  1. Click the Start Event, and click Append Task.

    Process Definition Append Task
  2. Select the task, click the Change type (wrench) icon and select Service Task.

  3. Click the task on the canvas to display the task properties.

  4. Enter Patch Scan for the Name. The name is displayed in the task symbol as you enter it. The task ID is automatically populated.

  5. Select Patch Service for the Service.

  6. Select Run Missing Patches for the Task.

  7. The resource field is context sensitive to the objects in the process definition. Enter a value in the Resource ID field in parts, using the following steps:

    • Enter a $, and the name of the start event, displays below the field, select or enter Start.
    • Enter a period . after $Start and select or enter resource.
    • Enter a period . after $Start.resource, and a list of possible values displays below the field, select or enter uuid.

    The value in the Resource ID field should be $Start.resource.uuid.

Step 4: Define the Patch Approval Task

After you scan for missing patches, you decide which patches are approved by filtering the patches on different patch properties.

  1. Click the Patch Scan task, and click Append Task.

  2. Select the task, click the Change type (wrench) icon and select Service Task.

  3. Click the task on the canvas to display the task properties.

  4. Enter Patch Approval for the Name. The task ID is automatically populated.

  5. Select Patch Service for the Service.

  6. Select Approve Patches for the Task.

  7. Enter a value in the Resource ID field in parts, using the following steps:

    • Enter a $, and the name of the start event, displays below the field, select or enter Start.
    • Enter a period . after $Start and select or enter resource.
    • Enter a period . after $Start.resource, and a list of possible values displays below the field, select or enter uuid.

    The value in the Resource ID field should be $Start.resource.uuid.

  8. Select the Approval Type: Generic or Emergency.

  9. In the Filter Criteria field enter patch.name = "update-notifier-common" to include all patches named update-notifier-common.

    You can add more filters, but for this simple tutorial, one filter will do.

    The following table shows patch properties and queries for different filters.

    FilterProperty and Query
    Patches based on patch namepatch.name = "update-notifier-common"
    Patches if patch name contains "ABCD"patch.name LIKE "%ABCD%"
    Patches based on external Id'spatch.externalId LIKE '%release-upgrade%'
    Patches based on severitypatch.severity = optional
    Patches based on categorypatch.category LIKE "%update%"
    Patches with rebootRequired flagpatch.rebootRequried = false
    Only windows patchespatch.patchType = WINDOWS
    Only Linux patchespatch.patchType = LINUX
    All missing patchespatchStatus = "MISSING"
    Patches that showed up as missing in the scan in the last 2 hoursscanTime < -2h
    Standard update categories patchespatch.serverity = 'standard' AND patch.category LIKE '%update%'
    Important update categories patchespatch.serverity = 'important' AND patch.category LIKE '%update%'

Step 5: Define the Patch Installation Task

After you define which patches is installed, add a task to install the patches.

  1. Click the Patch Approval task, and click Append Task.

  2. Select the task, click the Change type (wrench) icon and select Service Task.

  3. Click the task on the canvas to display the task properties.

  4. Enter Patch Installation for the Name. The task ID is automatically populated.

  5. Select Patch Service for the Service.

  6. Select Run Patch Install for the Task.

  7. Enter a value in the Resource ID field in parts, using the following steps:

    • Enter a $, and the name of the start event, displays below the field, select or enter Start.
    • Enter a period . after $Start and select or enter resource.
    • Enter a period . after $Start.resource, and a list of possible values displays below the field, select or enter uuid.

    The value in the Resource ID field should be $Start.resource.uuid.

  8. Choose the Installation Type: Generic, Emergency, or Baseline.

Step 6: Append the End Event, Save and Deploy

When you are finished defining the patch management process, add an end event and save and deploy the process definition for use in your patch management schedules.

  1. Click the Patch Installation task, and click Append EndEvent.
  2. Click the task on the canvas to display the task properties.
  3. Enter End for the Name.
  4. Click Save & Deploy. The Simple Patch Workflow displays in the Process Definitions list.

Now, the newly created process has been created and you can view it on the Process Definitions Page.

Next Steps

After you create and deploy the Simple Patch Workflow patch management process, you can select the process in patch schedules as shown in the following figure.

Process Available in Patch Schedule

See Configure Patch Scan Schedules for information on using a patch management process in a patch management schedule

Refer to the Patch Automation for more information on Patch Process Automation.