5.02021-11-21T21:29:55ZTemplatesmacOS Content CachemacOS Content Cache## Description
Runtime stats and storage monitoring for macOS High Sierra Caching Service.
## Overview
With the release of macOS 10.13 High Sierra, Apple have made a big change to their App and iCloud content caching services. This function used to be part of their add-on macOS Server package, but with 10.13 they've moved the feature into the regular macOS operating system. This means that any Macintosh computer running 10.13 High Sierra can serve as a content cache for a local network.
The old macOS Server version had fancy logs and graphs that allowed you to monitor cahing performance and activity to keep an eye on the efficacy and health of the service. When they moved it all to regular macOS all that stuff disappeared. It's basically just an on/off checkbox.
Instead, there's just a command-line tool that outputs the raw data from the service. You can see the stats by running `AssetCacheManagerUtil status` from a Terminal window.
This template parses the JSON output of AssetCacheManagerUtil for monitoring in Zabbix.
Requires Zabbix 3.4 and RemoteCommands=1 in the Zabbix Agent.
TemplatesmacOS Content Cache- ActivatedDEPENDENTcontentcache.activated07dContent Caching is enabled (true or false)macOS Content CacheJSONPATH$.result.ActivatedBOOL_TO_DECIMALsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- ActiveDEPENDENTcontentcache.active07dContent Caching is running (true or false)macOS Content CacheJSONPATH$.result.ActiveBOOL_TO_DECIMALsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]{last()}=0macOS Content Caching service is not running on {HOST.NAME}https://support.apple.com/en-ca/HT208025WARNINGThe Content Caching sharing service is not running on this macOS host.
- Bytes ImportedDEPENDENTcontentcache.bytes.imported07dBpsBytes Imported by Caching ServicemacOS Content CacheJSONPATH$.result.TotalBytesImportedCHANGE_PER_SECONDsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Bytes Returned to ClientsDEPENDENTcontentcache.bytes.returnedtoclients07dBpsDownload rate (bytes per second) to local macOS and iOS clientsmacOS Content CacheJSONPATH$.result.TotalBytesReturnedToClientsCHANGE_PER_SECONDsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Bytes Stored from OriginDEPENDENTcontentcache.bytes.storedfromorigin07dBpsDownload rate (bytes per second) from Apple's app and iCloud serversmacOS Content CacheJSONPATH$.result.TotalBytesStoredFromOriginCHANGE_PER_SECONDsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Cache LimitDEPENDENTcontentcache.cachelimit07dBContent Caching configured maximum storage (bytes)macOS Content CacheJSONPATH$.result.CacheLimitsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Cache UsedDEPENDENTcontentcache.cacheused07dBContent Caching storage in usemacOS Content CacheJSONPATH$.result.CacheUsedsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Stored: BooksDEPENDENTcontentcache.details.books07dBAmount of data currently in cache for "Books"macOS Content CacheJSONPATH$.result.CacheDetails.Bookssystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Stored: iCloudDEPENDENTcontentcache.details.icloud07dBAmount of data currently in cache for "iCloud"macOS Content CacheJSONPATH$.result.CacheDetails.iCloudsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Stored: iOS SoftwareDEPENDENTcontentcache.details.ios07dBAmount of data currently in cache for "iOS Software"macOS Content CacheJSONPATH$.result.CacheDetails['iOS Software']system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Stored: macOS SoftwareDEPENDENTcontentcache.details.macos07dBAmount of data currently in cache for "macOS Software"macOS Content CacheJSONPATH$.result.CacheDetails['Mac Software']system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Stored: OtherDEPENDENTcontentcache.details.other07dBAmount of data currently in cache for "Other"macOS Content CacheJSONPATH$.result.CacheDetails.Othersystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Server GUIDDEPENDENTcontentcache.guid07d0CHARApple-generated server GUIDmacOS Content CacheJSONPATH$.result.ServerGUIDsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- iCloud Content FreeDEPENDENTcontentcache.icloudfree07dBmacOS Content CacheJSONPATH$.result.PersonalCacheFreesystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- iCloud Content LimitDEPENDENTcontentcache.icloudlimit07dBmacOS Content CacheJSONPATH$.result.PersonalCacheLimitsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- iCloud Content UsedDEPENDENTcontentcache.icloudused07dBmacOS Content CacheJSONPATH$.result.PersonalCacheUsedsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- RegisteredDEPENDENTcontentcache.registered07dContent Caching is registered with Apple's servers (true or false)macOS Content CacheJSONPATH$.result.RegistrationStatusBOOL_TO_DECIMALsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Startup StatusDEPENDENTcontentcache.startupstatus07d0CHARStartup Status (normally "OK")macOS Content CacheJSONPATH$.result.StartupStatussystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Total Cached Data Returned to ClientsCALCULATEDcontentcache.total.cacheddatareturned60s7dBlast(contentcache.total.returnedtoclients)-last(contentcache.total.storedfromorigin)Total data returned to clients from cachemacOS Content Cache
- Cache Hit RateCALCULATEDcontentcache.total.hitrate60s7d%last(contentcache.total.cacheddatareturned)/last(contentcache.total.returnedtoclients)*100Ratio of cached data to uncached data sent to clients as a percentage (greater than 100% is possible)macOS Content Cache
- Total Returned to ClientsDEPENDENTcontentcache.total.returnedtoclients07dBTotal data returned to clientsmacOS Content CacheJSONPATH$.result.TotalBytesReturnedToClientssystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Total Stored from OriginDEPENDENTcontentcache.total.storedfromorigin07dBTotal data downloaded from Apple's serversmacOS Content CacheJSONPATH$.result.TotalBytesStoredFromOriginsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]
- Content Cache StatsZABBIX_ACTIVEsystem.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]60s0TEXTmacOS Content Cache
macOS Content Cache Capacity000000- macOS Content Cachecontentcache.cachelimit
1FILLED_REGION009999- macOS Content Cachecontentcache.cacheused
macOS Content Cache Hit Rate00BB00- macOS Content Cachecontentcache.total.hitrate
macOS Content Cache Stored DataSTACKED4B4A67- macOS Content Cachecontentcache.details.books
1DDD1C7- macOS Content Cachecontentcache.details.icloud
2C2CFB2- macOS Content Cachecontentcache.details.ios
38DB580- macOS Content Cachecontentcache.details.macos
47E8987- macOS Content Cachecontentcache.details.other
macOS Content Cache Traffic95009900- macOS Content Cachecontentcache.bytes.returnedtoclients
1FILLED_REGION888888- macOS Content Cachecontentcache.bytes.storedfromorigin