Automate Patching New Endpoints

Automate Patching New Endpoints

This article contains instructions to help you automate patching of newly built or imaged endpoints, such as servers or workstations.

Patching New Endpoints - Patch FAQs - Tanium Tech Talks #79

Description

When new endpoints are brought online, customers often need to fully patch the machines without waiting for their normal monthly patching process and maintenance windows. The goal is to get the endpoints fully patched as fast as possible to get them into service. These endpoints could be either brand new endpoints or recently imaged endpoints. Ideally, this would include overriding any normal "delays" in scanning, deployments, maintenance windows, notifications, and so on. The process outlined below focuses on Windows endpoints, but it can be adapted for Linux endpoints as well.

Prerequisites

Tanium Patch

Instructions

The automation workflow will include a combination of a few Tanium platform components.

  • Custom Tag - a custom tag will be used as a trigger that opts an endpoint into the workflow, and then the custom tag is removed after the endpoint is fully patched.

  • Computer Group - a computer group membership based upon the Custom Tag

  • Tanium Patch Scan Configuration - a scan configuration will be assigned to the computer group above that minimizes delays for patch scanning to occur (no random scan delays, no scan windows, etc.)

  • Tanium Patch Deployment - an ongoing Patch deployment targeted to the computer group above that will override maintenance windows, and force a restart with no (or short) notification.

  • Scheduled Action - a Tanium core recurring scheduled action will remove the tag after the deployment is Complete or Not Applicable.

Note:

Multiple rounds of patching may be required to fully patch a Windows endpoint, which is handled by this workflow.

Identify a Custom Tag

Choose your own custom tag that you wish to use. The custom tag should be unique for this process. In this example, we will use the tag NewBuild.

Deploy New Tanium Clients with a Custom Tag

You can deploy new Tanium clients with a Custom Tag in many different ways. Choose the deployment strategy that works best for your environment. For more information, see Manage Client deployments.

Create Computer Group

  1. Create a new computer group based upon the custom tag selected above.

  2. Go to Administration > Permissions > Computer Groups. Click New Computer Group.

    1. Name: Patch - NewBuild Computers

    2. Expression: Custom Tags matches NewBuild

Create Patch Deployment

  1. Go to Modules > Patch > Deployments. Click Create Deployment > Create Install Deployment.

  2. Create a new Tanium Patch deployment with the following parameters:

    • Name: NewBuild Patch Deployment

    • Platform: Windows

    • Description: NewBuild Patch Deployment

    • Patch List: Select your own production patch lists OR select the built in "[Tanium Patch Recommended Updates] - Windows"

    • Target: Patch - NewBuild Computers

    • Deployment Type: Ongoing deployment

    • Select Override maintenance windows.

    • Select Restart.

    • User Notifications: No notification or short notification.

  3. Note the Deployment ID, it will be used later in this process.


1

Create Scan Configuration

  1. Go to Modules > Patch > Scan Management. Click Create Scan Configuration.

  2. Create a Scan Configuration with the following parameters:

    1. Name: NewBuild Scan Configuration

    2. Platform: Windows

    3. Configuration Technique: Tanium Scan for Windows OR Offline CAB File

    4. Frequency: 3 hours

    5. Unselect Enable Random Scan Delay

  3. Click Create Scan Configuration.

  4. Enforce the newly created scan configuration to your computer group.

    1. Open the new created scan configuration.

    2. Under Targeting, click Select Computer Groups and choose the computer group Patch - NewBuild Computers.

  5. Set scan configuration priority to highest priority.

  6. From the Scan Management page, click the Prioritize button, and click and drag the NewBuild Scan Configuration to the top of the list.


2

Remove Custom Tag after Endpoint is Fully Patched

When the deployment reaches the Complete status, you can manually remove the custom tag from the machine. You can also build a scheduled action to remove the custom tag on a scheduled basis.

Note:

Allow enough time for a machine to fully patch and restart because multiple rounds of patching and scanning may be necessary.

Configure Automated Removal of the Custom Tag

  1. Add the NewBuild tag to a test machine (for help with using Custom Tags, see the knowledge article How to Group Computers Based on Your Organization’s Needs Using Custom Tags).

  2. From the Interact module, ask the following Tanium question: Get Custom Tags from all machines (It may take a few minutes for a new tag to show.)

  3. Select NewBuild.


    3
  4. Click Deploy Action.

  5. Select the package named Custom Tagging - Remove Tags.

  6. Name scheduled action Remove NewBuild Custom Tag from Patched Computers.

  7. Optionally, add a description to the new Scheduled Action.


    4
  8. Reissue every 5 hours or at your desired interval.

  9. Select appropriate action group (for example, Default - All Computers or All Windows)

  10. Click Add Filter Question. Enter the following question:

    CODE
    ( Patch - Deployment Statuses matches "^126\|(Complete|Not Applicable)\|.*$" and Patch - Coverage Status matches Optimal )

    Change the 126 in the question above to the Patch deployment ID created above.

  11. Click Show Preview and Deploy Action.


5

Every five hours this scheduled action will remove the NewBuild Custom Tag on any endpoints that have the NewBuild tag AND where the NewBuild patch deployment has completed or is no longer applicable.