zabbix_export: version: '6.0' date: '2021-11-21T21:29:57Z' groups: - uuid: 7df96b18c230490a9a0a9e2307226338 name: Templates templates: - uuid: a900d42e3b3344a6948a708d82bdee50 template: 'macOS Content Cache' name: 'macOS Content Cache' description: | ## 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. groups: - name: Templates items: - uuid: 984225c7d450461581249913f2a401ee name: Activated type: DEPENDENT key: contentcache.activated delay: '0' history: 7d description: 'Content Caching is enabled (true or false)' preprocessing: - type: JSONPATH parameters: - $.result.Activated - type: BOOL_TO_DECIMAL parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 77b00bc3a4e64be0871969450ace1b76 name: Active type: DEPENDENT key: contentcache.active delay: '0' history: 7d description: 'Content Caching is running (true or false)' preprocessing: - type: JSONPATH parameters: - $.result.Active - type: BOOL_TO_DECIMAL parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' triggers: - uuid: 521f9d56367d498ca3bf260fc7c695cc expression: 'last(/macOS Content Cache/contentcache.active)=0' name: 'macOS Content Caching service is not running on {HOST.NAME}' url: 'https://support.apple.com/en-ca/HT208025' priority: WARNING description: 'The Content Caching sharing service is not running on this macOS host.' - uuid: 0314b17ee7bc4fe395ae865578f4a1e8 name: 'Bytes Imported' type: DEPENDENT key: contentcache.bytes.imported delay: '0' history: 7d units: Bps description: 'Bytes Imported by Caching Service' preprocessing: - type: JSONPATH parameters: - $.result.TotalBytesImported - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: afe737173085473fb36a4e0da493019e name: 'Bytes Returned to Clients' type: DEPENDENT key: contentcache.bytes.returnedtoclients delay: '0' history: 7d units: Bps description: 'Download rate (bytes per second) to local macOS and iOS clients' preprocessing: - type: JSONPATH parameters: - $.result.TotalBytesReturnedToClients - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: cd28640c7ba74d4da39eb01005fe7b5a name: 'Bytes Stored from Origin' type: DEPENDENT key: contentcache.bytes.storedfromorigin delay: '0' history: 7d units: Bps description: 'Download rate (bytes per second) from Apple''s app and iCloud servers' preprocessing: - type: JSONPATH parameters: - $.result.TotalBytesStoredFromOrigin - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 00afd91c31d84de8804761545ef14e6f name: 'Cache Limit' type: DEPENDENT key: contentcache.cachelimit delay: '0' history: 7d units: B description: 'Content Caching configured maximum storage (bytes)' preprocessing: - type: JSONPATH parameters: - $.result.CacheLimit master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: bbedc29a4bb84da986179a82b37079be name: 'Cache Used' type: DEPENDENT key: contentcache.cacheused delay: '0' history: 7d units: B description: 'Content Caching storage in use' preprocessing: - type: JSONPATH parameters: - $.result.CacheUsed master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 218419f32024424494fcae516ee7c25a name: 'Stored: Books' type: DEPENDENT key: contentcache.details.books delay: '0' history: 7d units: B description: 'Amount of data currently in cache for "Books"' preprocessing: - type: JSONPATH parameters: - $.result.CacheDetails.Books master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: d0f0f937e3454f3a9e7409bc43b51d17 name: 'Stored: iCloud' type: DEPENDENT key: contentcache.details.icloud delay: '0' history: 7d units: B description: 'Amount of data currently in cache for "iCloud"' preprocessing: - type: JSONPATH parameters: - $.result.CacheDetails.iCloud master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: eca650cec32e4cbcb547534f904eeead name: 'Stored: iOS Software' type: DEPENDENT key: contentcache.details.ios delay: '0' history: 7d units: B description: 'Amount of data currently in cache for "iOS Software"' preprocessing: - type: JSONPATH parameters: - '$.result.CacheDetails[''iOS Software'']' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: c163df5f3d214a638fbc5e3ad1cd07ec name: 'Stored: macOS Software' type: DEPENDENT key: contentcache.details.macos delay: '0' history: 7d units: B description: 'Amount of data currently in cache for "macOS Software"' preprocessing: - type: JSONPATH parameters: - '$.result.CacheDetails[''Mac Software'']' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 6878ef887b6e4832a79287e33485c308 name: 'Stored: Other' type: DEPENDENT key: contentcache.details.other delay: '0' history: 7d units: B description: 'Amount of data currently in cache for "Other"' preprocessing: - type: JSONPATH parameters: - $.result.CacheDetails.Other master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: cf9df7adee314efbb145098fd63b270f name: 'Server GUID' type: DEPENDENT key: contentcache.guid delay: '0' history: 7d trends: '0' value_type: CHAR description: 'Apple-generated server GUID' preprocessing: - type: JSONPATH parameters: - $.result.ServerGUID master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 2ed4bd163e4e469e9514a3b90014eb8b name: 'iCloud Content Free' type: DEPENDENT key: contentcache.icloudfree delay: '0' history: 7d units: B preprocessing: - type: JSONPATH parameters: - $.result.PersonalCacheFree master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 05396e10bf4e40c497b832949fa4248d name: 'iCloud Content Limit' type: DEPENDENT key: contentcache.icloudlimit delay: '0' history: 7d units: B preprocessing: - type: JSONPATH parameters: - $.result.PersonalCacheLimit master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 8012748b9e8c4adaa82292fa6d8913de name: 'iCloud Content Used' type: DEPENDENT key: contentcache.icloudused delay: '0' history: 7d units: B preprocessing: - type: JSONPATH parameters: - $.result.PersonalCacheUsed master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 3bb7df5ece774e7389f2cc29e73d22c4 name: Registered type: DEPENDENT key: contentcache.registered delay: '0' history: 7d description: 'Content Caching is registered with Apple''s servers (true or false)' preprocessing: - type: JSONPATH parameters: - $.result.RegistrationStatus - type: BOOL_TO_DECIMAL parameters: - '' master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 27c9ff8c519d440e86a66c1c4824411b name: 'Startup Status' type: DEPENDENT key: contentcache.startupstatus delay: '0' history: 7d trends: '0' value_type: CHAR description: 'Startup Status (normally "OK")' preprocessing: - type: JSONPATH parameters: - $.result.StartupStatus master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: dc136fef4ffb4b4abd7d911ef4be4b3d name: 'Total Cached Data Returned to Clients' type: CALCULATED key: contentcache.total.cacheddatareturned delay: 60s history: 7d units: B params: last(//contentcache.total.returnedtoclients)-last(//contentcache.total.storedfromorigin) description: 'Total data returned to clients from cache' tags: - tag: Application value: 'macOS Content Cache' - uuid: d28fd5f12b664f2eb7bf4fef3e150585 name: 'Cache Hit Rate' type: CALCULATED key: contentcache.total.hitrate delay: 60s history: 7d units: '%' params: 'last(//contentcache.total.cacheddatareturned)/last(//contentcache.total.returnedtoclients)*100' description: 'Ratio of cached data to uncached data sent to clients as a percentage (greater than 100% is possible)' tags: - tag: Application value: 'macOS Content Cache' - uuid: 95d0c9c716ee49ab9d4909caeb342843 name: 'Total Returned to Clients' type: DEPENDENT key: contentcache.total.returnedtoclients delay: '0' history: 7d units: B description: 'Total data returned to clients' preprocessing: - type: JSONPATH parameters: - $.result.TotalBytesReturnedToClients master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 8e977ae6af1a41dea4485543c2287fc1 name: 'Total Stored from Origin' type: DEPENDENT key: contentcache.total.storedfromorigin delay: '0' history: 7d units: B description: 'Total data downloaded from Apple''s servers' preprocessing: - type: JSONPATH parameters: - $.result.TotalBytesStoredFromOrigin master_item: key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' tags: - tag: Application value: 'macOS Content Cache' - uuid: 5aaf7c30af5a43e8b401b48bedcff9ee name: 'Content Cache Stats' type: ZABBIX_ACTIVE key: 'system.run[/usr/bin/AssetCacheManagerUtil status --json 2> /dev/null]' delay: 60s trends: '0' value_type: TEXT tags: - tag: Application value: 'macOS Content Cache' graphs: - uuid: 90527a06327844fdb4a3e3a88cf24dba name: 'macOS Content Cache Capacity' graph_items: - color: '000000' item: host: 'macOS Content Cache' key: contentcache.cachelimit - sortorder: '1' drawtype: FILLED_REGION color: '009999' item: host: 'macOS Content Cache' key: contentcache.cacheused - uuid: faa0ebc9666e4b0ea3b3b522b62aa0c6 name: 'macOS Content Cache Hit Rate' graph_items: - color: 00BB00 item: host: 'macOS Content Cache' key: contentcache.total.hitrate - uuid: d830493bccdb4dbdb06190d869a5a15a name: 'macOS Content Cache Stored Data' type: STACKED graph_items: - color: 4B4A67 item: host: 'macOS Content Cache' key: contentcache.details.books - sortorder: '1' color: DDD1C7 item: host: 'macOS Content Cache' key: contentcache.details.icloud - sortorder: '2' color: C2CFB2 item: host: 'macOS Content Cache' key: contentcache.details.ios - sortorder: '3' color: 8DB580 item: host: 'macOS Content Cache' key: contentcache.details.macos - sortorder: '4' color: '7E8987' item: host: 'macOS Content Cache' key: contentcache.details.other - uuid: 572e49cf22d34c9bbe265f80e1bdf9df name: 'macOS Content Cache Traffic' percent_left: '95' graph_items: - color: '009900' item: host: 'macOS Content Cache' key: contentcache.bytes.returnedtoclients - sortorder: '1' drawtype: FILLED_REGION color: '888888' item: host: 'macOS Content Cache' key: contentcache.bytes.storedfromorigin