macadmins / macadmins/osquery-extension

Tables for macOS Content Caching

Open
#122 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
132
Forks
41
Avg merge
1d 48m
Merged PRs (30d)
3

Description

Recently I've been debugging some networking issues causing my fleets to not have reliable connectivity to my macOS Content Cache servers. I've been debugging doing some fleet-wide scripting but it would've been nice to have a osquery table that exposes the output of `AssetCacheLocatorUtil` so that I could see that data in a more structured way and changes over time.

Can I submit a PR to add a table with the output of `AssetCacheLocatorUtil --json` ? Here's the output from my computer (JSON prettified), I'd like to get most of this data into the table:

```
robbiet480@Robbie T's MacBook Pro-H176YH ~ % AssetCacheLocatorUtil --json
2026-08-21 12:25:09.440 AssetCacheLocatorUtil[93394:79416625] AssetCacheLocatorUtil version 140.120.2, framework version 140.120.2
2026-08-21 12:25:09.440 AssetCacheLocatorUtil[93394:79416625] Determining public IP address...
2026-08-21 12:25:10.246 AssetCacheLocatorUtil[93394:79416625] This computer's public IP address is 216.200.20.23.
2026-08-21 12:25:10.246 AssetCacheLocatorUtil[93394:79416625] --- Information for system services:
2026-08-21 12:25:10.246 AssetCacheLocatorUtil[93394:79416625] Checking whether there might be content caches available...
2026-08-21 12:25:10.246 AssetCacheLocatorUtil[93394:79416625] There might not be content caches available.
2026-08-21 12:25:10.246 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting personal caching...
2026-08-21 12:25:10.247 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.247 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting personal caching and import...
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting shared caching...
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Determining saved configured public IP address ranges...
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] No public IP address ranges are configured.
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Determining saved favored server ranges...
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] No favored server ranges are configured.
2026-08-21 12:25:10.248 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting personal caching...
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting personal caching and import...
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting shared caching...
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Determining refreshed configured public IP address ranges...
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] No public IP address ranges are configured.
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Determining refreshed favored server ranges...
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] No favored server ranges are configured.
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] --- Information for user 501 (results for other users may be different):
2026-08-21 12:25:10.371 AssetCacheLocatorUtil[93394:79416625] Checking whether there might be content caches available...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] There might not be content caches available.
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting personal caching...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting personal caching and import...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Finding saved content caches supporting shared caching...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Determining saved configured public IP address ranges...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] No public IP address ranges are configured.
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Determining saved favored server ranges...
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] No favored server ranges are configured.
2026-08-21 12:25:10.372 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting personal caching...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting personal caching and import...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Finding refreshed content caches supporting shared caching...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Found 0 content caches
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Determining refreshed configured public IP address ranges...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] No public IP address ranges are configured.
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Determining refreshed favored server ranges...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] No favored server ranges are configured.
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] Testing all found content caches for reachability...
2026-08-21 12:25:10.472 AssetCacheLocatorUtil[93394:79416625] No content caches to test.
{
"results": {
"current user": {
"might have": false,
"refreshed favored server ranges": [
[]
],
"refreshed public IP address ranges": [
[]
],
"refreshed servers": {
"all servers": [],
"personal caching": [],
"personal caching and import": [],
"shared caching": []
},
"saved favored server ranges": [
[]
],
"saved public IP address ranges": [
[]
],
"saved servers": {
"all servers": [],
"personal caching": [],
"personal caching and import": [],
"shared caching": []
}
},
"public IP address": "4.2.2.1",
"reachability": [],
"system": {
"might have": false,
"refreshed favored server ranges": [
[]
],
"refreshed public IP address ranges": [
[]
],
"refreshed servers": {
"all servers": [],
"personal caching": [],
"personal caching and import": [],
"shared caching": []
},
"saved favored server ranges": [
[]
],
"saved public IP address ranges": [
[]
],
"saved servers": {
"all servers": [],
"personal caching": [],
"personal caching and import": [],
"shared caching": []
}
}
},
"versions": {
"AssetCacheLocatorUtil": "140.120.2",
"framework": "140.120.2"
}
}
robbiet480@Robbie T's MacBook Pro-H176YH ~ %
```

I may also be interested in adding a table for output of `AssetCacheManagerUtil`:

```
production@Robbie T's Mac Studio-J07HJ2 ~ % AssetCacheManagerUtil status -j
{
"name": "status",
"result": {
"Activated": true,
"Active": true,
"ActualCacheUsed": 0,
"CacheDetails": {},
"CacheFree": 171990891520,
"CacheLimit": 500000000000,
"CacheStatus": "OK",
"CacheUsed": 0,
"Parents": [],
"Peers": [],
"PersonalCacheFree": 171990891520,
"PersonalCacheLimit": 500000000000,
"PersonalCacheUsed": 0,
"Port": 62373,
"PrivateAddresses": [
"192.168.4.192"
],
"PublicAddress": "4.2.2.1",
"RegistrationStatus": 1,
"RestrictedMedia": false,
"ServerGUID": "D4C4735F-8C73-4688-81C9-DD0CE0C4D2D8",
"StartupStatus": "OK",
"TetheratorStatus": 0,
"TotalBytesAreSince": "2026-08-21 16:02:12 +0000",
"TotalBytesDropped": 0,
"TotalBytesImported": 0,
"TotalBytesReturnedToChildren": 0,
"TotalBytesReturnedToClients": 0,
"TotalBytesReturnedToPeers": 0,
"TotalBytesStoredFromOrigin": 0,
"TotalBytesStoredFromParents": 0,
"TotalBytesStoredFromPeers": 0
}
}
production@Robbie T's Mac Studio-J07HJ2 ~ % AssetCacheManagerUtil settings -j
{
"name": "settings",
"result": {
"AllowPersonalCaching": false,
"AllowSharedCaching": true,
"AllowTetheredCaching": false,
"CacheLimit": 500000000000,
"DataPath": "/Library/Application Support/Apple/AssetCache/Data",
"ListenRangesOnly": false,
"LocalSubnetsOnly": true,
"ParentSelectionPolicy": "round-robin",
"PeerLocalSubnetsOnly": true
}
}
production@Robbie T's Mac Studio-J07HJ2 ~ %
```

Thanks all

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing osquery extension table entry points and how they define schemas and tests; the issue names AssetCacheLocatorUtil --json and AssetCacheManagerUtil status -j/settings -j as the data sources. Clarify which utility or utilities are in scope and which fields must be exposed, then add coverage showing the resulting table output matches the requested data.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
operating-systems, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.