KMART - Kick-Ass Mac Admin Reporting Tool
A command-line utility that generates kick-ass Jamf Pro reports:
Optionally sent via Slack:
Features
- Reporting on the following Jamf Pro objects:
- π» Mac
- Advanced Searches
- Applications
- Configuration Profiles
- Devices
- Directory Bindings
- Disk Encryptions
- Dock Items
- Extension Attributes
- Packages
- Patch Management Software Titles
- Patch Policies
- Policies
- Printers
- Restricted Software
- Scripts
- Smart Groups
- Static Groups
- π± Mobile
- Advanced Searches
- Applications
- Configuration Profiles
- Devices
- Extension Attributes
- Smart Groups
- Static Groups
- π’ Buildings
- π Categories
- π¬ Departments
- π eBooks
π ±οΈ iBeacons- πΆ Network Segments
- π» Mac
- π Customise reporting options via JSON, Property List or YAML configuration files
- π Output reports as JSON, Property List, YAML, Markdown or HTML files
- ποΈ Send reports via Slack
Usage
OVERVIEW: Kick-Ass Mac Admin Reporting Tool
Generate kick-ass Jamf Pro reports.
USAGE: kmart [--json <json>] [--plist <plist>] [--yaml <yaml>]
OPTIONS:
-j, --json <json> JSON configuration file.
-p, --plist <plist> Property List configuration file.
-y, --yaml <yaml> YAML configuration file.
--version Show the version.
-h, --help Show help information.
Configuration
-
See Sample Configs for all configuration options.
Note: Use the following command to encode your credentials in the configuration file:
printf 'username:password' | iconv --to-code ISO-8859-1 | base64
-
For Slack integration, read Basic app setup to create a Slack app with a Bot token.
Note: The Bot token will require the
chat:write
andfiles:write
permission scopes.
Privileges
Kmart requires the following user privileges in order to report correctly.
Recommendations:
- Create a separate Jamf Pro User Account
- Do not just add these permissions to an existing account
- If you are not reporting on everything, only enable the privileges that are required
Privilege | Create | Read | Update | Delete |
---|---|---|---|---|
Advanced Computer Searches | - | β | - | - |
Advanced Mobile Device | - | β | - | - |
Buildings | - | β | - | - |
Categories | - | β | - | - |
Computer Extension Attributes | - | β | - | - |
Computers | - | β | - | - |
Departments | - | β | - | - |
Directory Bindings | - | β | - | - |
Disk Encryption Configurations | - | β | - | - |
Dock Items | - | β | - | - |
eBooks | - | β | - | - |
iBeacons | - | β | - | - |
Mac App Store Apps | - | β | - | - |
macOS Configuration Profiles | - | β | - | - |
Mobile Device Apps | - | β | - | - |
Mobile Device Configuration Profiles | - | β | - | - |
Mobile Device Extension Attributes | - | β | - | - |
Mobile Devices | - | β | - | - |
Network Segments | - | β | - | - |
Packages | - | β | - | - |
Patch Management Software Titles | - | β | - | - |
Patch Policies | - | β | - | - |
Policies | - | β | - | - |
Printers | - | β | - | - |
Restricted Software Records | - | β | - | - |
Scripts | - | β | - | - |
Smart Computer Groups | - | β | - | - |
Smart Mobile Device Groups | - | β | - | - |
Static Computer Groups | - | β | - | - |
Static Mobile Device Groups | - | β | - | - |
Build Requirements
- Swift 5.5.
- Runs on macOS Monterey 12 and later.
Download
- Grab the latest version of KMART from the releases page.
- Note: Versions 1.3 and later require macOS Monterey or later.
- If you need to run KMART on an older operating system, you can still use version 1.2.
Credits / Thank You
- Project created and maintained by Nindi Gill (ninxsoft).
- Apple (apple) for Swift Argument Parser, used to perform command-line argument and flag operations.
- JP Simard (jpsim) for Yams, used to export YAML.
- John Sundell (JohnSundell) for Ink, used to generate HTML from Markdown.
- David Mohundro (drmohundro) for SWXMLHash, used to decode XML.
- Sindre Sorhus (sindresorhus) for github-markdown-css, used to make the HTML output prettier.
Version History
-
1.3.2
- Fixed an issue where
mac_policies_no_payload
was not reporting correctly (thanks monodata) - URL slugs have been updated to match recent Jamf Pro changes (thanks thomasrmartin)
- Fixed an issue where
-
1.3.1
- Nested Smart Groups are now also detected when generating reports
-
1.3
- Added support for linting Python scripts via flake8
- Added support for reporting on Patch Management Software Titles:
- New report types:
mac_patch_policies_no_scope
andmac_patch_policies_disabled
- Existing reports now factor in Patch Management Software Titles and Patch Policies
- New report types:
- Progress output is now dynamic, updating in-place
- Basic Authentication has been replaced with Bearer Token Authentication
- Option to send reports via Email has been removed
- Fixed the missing Serial Number column header for Unmanaged Mac/Mobile Device reports in Markdown and HTML
- General cosmetic bugfixes
Note: Kmart now uses Swift concurrency (async await), which significantly reduces the amount and complexity of HTTP code. Concurrency requires macOS Monterey 12, therefore support for macOS Catalina 10.15 and macOS Big Sur 11 has been dropped.
-
1.2
- Added support for sending reports via Slack
- Read Basic app setup to create a Slack app with a Bot token
- Note: The Bot token will require the
chat:write
andfiles:write
permission scopes - See Sample Configs for more information
- Added
mac_devices_unmanaged
andmobile_devices_unmanaged
report types- Mac and Mobile device reports now exclude unmanaged devices
- Added support for custom
api_timeout
value (default:10
) - Mac Packages now also display Categories in Markdown / HTML reports
- Improved file handling for Mac Extension Attributes and Mac Scripts over 64KB
- Fixed escaping of
\
in JSON reports - Fixed escaping of
_
in Markdown / HTML reports - Reduced verbosity of output messaging (reads much nicer)
- Added support for sending reports via Slack
-
1.1
- Report on one-off Mac Policies that were created via Jamf Remote (
mac_policies_jamf_remote
) - Less ambiguous descriptions for Markdown / HTML output
- Better escaping of ASCII characters for Markdown / HTML output
- Fixed false-positive linter errors for Mac Extension Attributes with carriage returns (
\r
) - Fixed Mac Directory Bindings reporting as Mac Disk Encryptions
- Fixed emailing report only if enabled is set to
true
- Report on one-off Mac Policies that were created via Jamf Remote (
-
1.0
- Initial release
License
Copyright Β© 2023 Nindi Gill
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.