Creating a custom Automation / Notification Policy and Report to see if 'Import Patch Data for Windows' failed to run.
search cancel

Creating a custom Automation / Notification Policy and Report to see if 'Import Patch Data for Windows' failed to run.

book

Article ID: 181132

calendar_today

Updated On:

Products

Patch Management Solution for Windows

Issue/Introduction

 How do you create a custom Automation / Notification Policy and Report to see if 'Import Patch Data for Windows' failed to run?.

Environment

ITMS 8.x

Resolution

Work through the following to implement a custom Automation / Notification Policy to advise that the Import Patch Data for Windows has failed.

1. Create a Custom Task to send an email:

  • Go to Console > Manage > Jobs and Tasks > System Jobs and Tasks > Notification Server > Automation Policy Tasks
  • Right-click the Automation Policy Tasks > New > Task
    • Scroll down in the popup window
    • Select "Send E-mail" on the left hand pane
    • Define a suitable name for this task. Fill in the e-mail information.
    • Input the following into the body of the email:
        %!Results!%
    • Make other modifications to the 'To:' 'CC:' 'BCC:' 'Subject' and 'Advanced' button fields as desired.
    • click "OK" to save the task.

2. Create a custom Automation Policy:

  • Go to Console > Manage > Automation Policies
  • Select 'New policy' > Name new policy 'PMImport Failed'
    • Click OK
  • Adjust the 'Schedule' as desire
  • Edit the 'Details' as follows
    • Data Source: Click on the Dropdown selector
    • Select 'Raw SQL Query' 
      • Click on the link titled 'Edit Query'
        • Copy the attached SQL Script into the 'Parameterised Query' tab 
        • No other changes are necessary in this selector
        • Select 'OK'
          • Note: May select a report to pull from: Select Report in the drop down and use the Report Selector to input that item. (See 'Optional Step' to create a custom report for this)
    • Actions: Run job/task: Click on the link titled 'Select a Job or Task...'
      • Drill down to Jobs and Tasks > System Jobs and Tasks > Notification Server > Automation Policy Tasks
      • Select 'Send automated report e-mail'
        • Drill down to Jobs and Tasks > System Jobs and Tasks > Notification Server > Custom Automation Policy Task
        • Select the custom e-mail task created from Step 1
        • Click "OK" 
      • Select "Edit input parameter"
      • Under the Data Source for RESULTS
        • Select [Report as HTML].
      • Click OK and save the changes. 
        • May now test automation policy


3. Create a custom report for this to view (Optional)

  • Go to Console > Reports > All Reports
  • Highlight / Right-click on 'Reports' main folder in the left pane
    • Select New > Report > SQL Report
  • Delete the contents of the 'Parameterised Query' tab
    • Input the attached SQL Script into this field
  • Name: 'Import Failure: Displays the results onlyu if Import failed to run'
  • Save Changes
  • Run Report

Attachments

Report SQL Script.txt get_app