Creating an Automation Policy in Altiris to notify administrators when Package Server free disk space is low
search cancel

Creating an Automation Policy in Altiris to notify administrators when Package Server free disk space is low

book

Article ID: 184828

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

Example Situation

You have multiple package servers and need to monitor and alert when the free disk space on any of these servers is below a specified percentage. In the example below, we will generate an email notification to a select group of administrators with a list of package servers where the free space is less than 10%. In this example, we have sites with desktop computers serving as package servers and other sites with servers serving as package servers, and they all have set naming conventions. The desktops all start their names with “Desk”, and the Servers all start their names with “Serv.” Additionally, the desktops only have a C drive, and the servers are configured to use non-system drives and are either set as E or F.

Resolution

  1. In the ITMS console, navigate to Reports > All Reports, and then to a folder where you want the below report to reside. Right-click the folder and select New > Report > SQL Report. Give the report a desired name at the top, replace all text in the Parametrized Query tab with the below SQL code, and click Save changes.

SELECT DISTINCT

vc.[Name] AS SiteServer,

ld.[Device ID] AS Drive,

(ld.[Size (Bytes)])/1024/1024/1024 AS [Disk Size GB],

(ld.[Free Space (Bytes)])/1024/1024 AS [Free Space MB],

CONVERT(DECIMAL(5,2),100.0 * ld.[Free Space (Bytes)] / ld.[Size (Bytes)]) AS [Free Space(%)] --this is the percentage field

FROM vComputer vc

JOIN vSiteServices ss ON ss.ComputerGuid = vc.[Guid]

INNER JOIN vHWLogicalDisk ld ON vc.[Guid] = ld._ResourceGuid

WHERE

LOWER(ld.[Description]) LIKE '%local%'

AND (

(vc.Name like 'Serv%' AND ld.[Device ID] = 'E:') or

(vc.Name like 'Serv%' AND ld.[Device ID] = 'F:') or

(vc.Name like 'Desk%' AND ld.[Device ID] = 'C:')

)

AND CONVERT(DECIMAL(5,2),100.0 * ld.[Free Space (Bytes)] / ld.[Size (Bytes)]) < '10' ---this is the percentage parameter

ORDER BY vc.[Name]

 

  1. Navigate to Manage > Automation Policies and click the New Policy button.
  2.  Click on the name and give the policy a suitable name
  3. Once testing is complete, set the schedule as desired based on how often you want to check for low disk space. Keep in mind that the data on free disk space is populated by hardware inventories. For example, if you run delta hardware inventories every day, you can set the schedule to once per day for a reasonable amount of time after the inventories are scheduled to get updated results.
  4. In the Data Source section, the Data Source should be Report, and then click on Select Report and scroll to or search for the report you created above.
  5. Leave Conditions – Evaluation Rule at the default of Run for non-empty data
  6. Under Actions, click the Select a Job or Task link navigate to Jobs and Tasks > System Jobs and Tasks > Notification Server > Automation Policy Tasks, and select Send automated report e-mail. Then click the OK button. Click the Edit input parameter link and change the “To” drop-down to [Custom] and type in your email address (as a test). For Report name, in the drop-down select Report Name. For Policy name, select Results as HTML.
  7. Click Save changes; then select the policy on the left and click the Turn on button in the grey bar above; then Save changes again.
  8. Check your email and verify that it looks correct and adjust if needed. Note you may need to adjust the report to obtain results for testing by changing the percentage from 10% to a higher value.