What is Nudge?
Nudge is an open source application (primarily created by Erik Gomez) that strongly encourages users to apply macOS updates.
Nudge has been written and talked about plenty of times by my fellow MacAdmins, so I’ll spare you the details. Here are some links if you want more info:
- Nudge GitHub Wiki
- Introduction to Nudge – Alan Siu
- Basic default behavior in Nudge – Alan Siu
- A Nudge in the right direction – Neil Martin (2021 MacAdmins Conference Session)
- Nudge users to keep macOS up-to-date – Dan Snelson (2021 JNUC Session)
Getting Data from Nudge into Jamf Pro
Nudge stores information about the next time Nudge will run, the minimum required OS version you have defined, and how many deferrals have been used in the plist located at
Notice this is in the user’s local Library. If we want to report this data, we will need to do it in the user context. I have developed the following Jamf Pro extension attribute to do just that.
The following EA will grab the currently logged in user (or the last user if there isn’t one) and read the
requiredMinimumOSVersion key value from the
com.github.macadmins.Nudge plist. If a value exists, we use the
is-at-least function built in to zsh to compare this to the currently installed macOS version. If an update is required, we report the number of deferrals used. This can be useful to ensure that Nudge is running successfully, or to see which users are procrastinating (and how much).
- If the
requiredMinimumOSVersionkey is not found, the EA will report
No minimum required macOS version found
- If the
requiredMinimumOSVersionkey is found, but macOS is already greater than or equal to that value, the EA will report
macOS meets minimum required version
- If macOS does not yet meet the minimum required version, the EA will report the value found in the
userDeferralskey. This key is the sum of
And here is that extension attribute. Note that it is written in
zsh so that we can access functions specific to that shell. It will not work with a
This extension attribute reports its result as a string. That means we cannot access the integer comparison tools within a Jamf Pro smart group, but we can use a regex.
I set up a smart group to find all devices where the Nudge deferral value is greater than 0 with the regex: