Skip to content

06 Space Detection Notification Service Desk Tickets

Ayla Abbott edited this page Feb 16, 2020 · 1 revision

Space Notification

New with UEX v 4.1 there is a built-in Functionality that can check if there is sufficient space for installing large software or OS Updates.

Creating a UEX Policy with Space detection

Seting this up of this in your UEX policy is as easy as adding an integer to Paramter 4 of the 00-UEX-Jamf-Interaction-no-grep script.

  • In Parameter 4 Vendor;AppName;Version;SpaceReq you just add the amount of space required at the end of the Parameter Value.

  • Must be an integer in GB

    • For Example "Apple;macOS Mojave;10.14.4;20"
    • Another example "Adobe;Illustrator;19.2;5"
  • This means that for the macOS Mojave, the computer must have 20 GB of free space before the install actions can start.

  • Also for Illustrator this means that the computer needs 5 GB free before the package will cache and the install can start.

How does this work?

  • Using Diskutil the UEX script check for amount of Available/Free space (depending on OS the working is different.
  • it also takes into account the Unit of measurement (MB, GB, or TB) and then does the math to make that into an integer of GB.
  • Then it compares the $spaceRequired with the total available space.
  • if the free space number is less that the $spaceRequired then the computer does not have enough space.
    • Package caching will not start
    • User gets a newly compiled message informing that there is insufficient space for the install/update
    • The Policy is postponed until the next day after 9am

Find Clutter

If the device's macOS Version is 10.12 or higher then then have the option to 'Find Clutter'

  • This opens the Storage Management app as the user.
  • This app is found in /System/Library/CoreServices/Applications/ on macOS 10.12+ Only.

Space Checks & Service Desk Tickets

  • If the Policy is a Compliance Policy then you need to set the number of notifications the user will recieve before a ticket is generated.
  • This is set in Parameter 8 "Maximum Deferral of Postponements;Service Desk Disk Space Limit - Must be integer"
  • These must be two integers separated by a ;
  • The first number is the maximum number of general Postponements
  • The second number is the number of times you want the user to be notified they have insufficient space before the chosen service desk ticket workflow is kicked off.
  • They get a standard dialog informing that they have insufficient space but also that service desk has been informed that they need assistance and they'll be contacted shortly.

How to Set Up Service Desk Ticket Features

Requirements

  • In order for help desk ticket features to work the UEX policy must be a Compliance policy.
  • You must also enable helpTicketsEnabled varable in the hard code of the 00-UEX-Jamf-Interaction-no-grep script.
  • You must also choose which option(s) you want to use in order to kick of the service desk workflow.
  • Please read each option carefully to know how they work
  • You should also update the name of your service desk by updated the variable ServiceDeskName

Options for creating tickets

helpTicketsEnabled=false
helpTicketsEnabledViaAppRestriction=false
helpTicketsEnabledViaTrigger=false
helpTicketsEnabledViaFunction=false

Creating Helpdesk tickets via App Restriction

  • SMTP SERVER SETTINGS REQURED
  • MUST HAVE AN ENTRY CREATED IN THE JSS FOR A RESTRICTED APP
  • API CONFIGURATION TOOL CAN SET THIS UP FOR YOU
  • Notifications must enabled via email for your Jamf Pro user

This is probably the simplest method to implement since it requires no knowledge of API or encrypted strings

  1. Enable the the feature in the Jamf Interaction Configuration
  2. If you update the directory where UEX resources go then you need to update $restrictedAppName
  3. Package the User Needs Helps Clearing Space.app with your UEX Resources
  4. Enable this function in the UEX Jamf Pro configuration tool before running it
helpTicketsEnabled=true
helpTicketsEnabledViaAppRestriction=true

Creating Helpdesk tickets Via Smart Groups

  • SMTP SERVER SETTINGS REQURED
  • Notifications must enabled via email for your Jamf Pro user

  1. Enable the the feature in the Jamf Interaction Configuration
  2. Update the update the trigger name to whatever you set for the API scripts
  3. If you want a general static group then you can customize the staticGroupName= in the UEX Jamf Pro configuration tool (Leaving as default will work too.
  4. Enable this function in the UEX Jamf Pro configuration tool before running it
helpTicketsEnabled=true
helpTicketsEnabledViaAppRestriction=false
helpTicketsEnabledViaTrigger=true
helpTicketsEnabledViaFunction= false

Trigger name section (leaving default is fine 90% of the time)

UEXhelpticketTrigger="add_to_group_for_disk_space_help_ticket"
ClearHelpTicketRequirementTrigger="remove_from_group_for_disk_space_help_ticket"

Customized/Individual groups support

  1. Optionally, you can make policies and groups for individual push so that you get notifications on what policy requires them to clear space. But this has to be all be done manually.
  2. If you want distinct groups then you need to clear the static values in the Jamf Interaction Configuration like the example below:
UEXhelpticketTrigger=""
ClearHelpTicketRequirementTrigger=""
  1. This will then require a policy with the naming convention listed below in order to kick off.
  2. This is only there as a "try if you dare" and if you need that granular control. It's highly recommended to use either general groups or app restriction
  • Naming Convention Examples:
# EXAMPLE Add to Group Policy: "$UEXpolicyTrigger""_helpticket"
# EXAMPLE Remove from Group Policy: "$UEXpolicyTrigger""_clear_helpticket"

Creating Helpdesk tickets Via Function

  1. enable the the feature in the Jamf Interaction Configuration
  2. Update the function fn_create_help_desk_ticket with your code
helpTicketsEnabled=true
helpTicketsEnabledViaAppRestriction=false
helpTicketsEnabledViaTrigger=false
helpTicketsEnabledViaFunction=true

Word of Caution

  • The world is your burrito here and any brave scripter can make their own function to do whatever you want. For example one could:
    • Create ticket in Zendesk with API
    • Trigger a push notification to your iPhone
    • Make an email from your email client to a service desk mail box
    • Call the Ghostbusters...👻
    • Whatever your happy heart desires ;-)
    • PRO TIP make all the variables local in the function to avoid overlap

How to Configure this with v 4.1

To set this up you need to do the following:

  • If you use the API script with the standardized group for space notification then you need to update the Salt and K/Passphrase in the following scripts
    • 00-API-Add-Current-Computer-to-Static-Group
    • 00-API-Remove-Current-Computer-from-Static-Group
  • Then enable the features you want in the Jamf Interaction Configuration within the 00-UEX-Jamf-Interaction-no-grep script.
  • Upload the scripts and overwrite any older version
  • Enable the features you want in the UEX Jamf Pro configuration tool
  • Run the configuration tool
  • If you are using the standardized group then the monitoring smart group will open in edit mode to enable the notifications; this cannot be done with API yet
  • It will also open the Policies for adding and removing computer from the static group so you can add the encrypted user name and password.

Setting Up the API Scripts

  • You need to update the Salt and K/Passphrase in the following scripts;
    • 00-API-Add-Current-Computer-to-Static-Group
    • 00-API-Remove-Current-Computer-from-Static-Group
  • After running the configuration script, you'll need to add the user name and password of the Jamf Pro user you want to use in order to make the API Changes in these two policies. (These open automatically.) it will not overwrite these values if you run it a second time 😉
    • 00-API-Add-Current-Computer-to-Static-Group - Disk Space - Trigger
    • 00-API-Remove-Current-Computer-from-Static-Group - Disk Space - Trigger
  • The USER being used for API must have read access to computers and read and update access to static computer groups

Encrypted Strings

  • It is HIGHLY recommended that you use encrypted strings passed as a script parameter to make the API changes
  • For more information on how to set this up please check out Encrypted Script Parameters

Jamf Pro notifications for Services Desk Tickets

  • For this all to work you need to have an SMTP server configured in Jamf Pro Server
  • You also need to have an email address on the Jamf pro user you want to get the notification
  • You will also need to login to jamf pro as that user and enable Smart group change email notification under the Individual Notification Preferences

Creating a workflow for Service Desk Tickets

The work flow via Restricted Software or Smart Group Monitoring is built on the assumption that a Jamf Admin has a monitored mailbox to let you know that someone needs help. Then you must create a ticket through whatever process your organization follows for creating a ticket on the user's behalf to ask for help clearing disk space and re running the pending software installs.