Sysmon-OSX End-to-End Validation (Mac host + Remote AMD64 Stack)
This runbook summarizes the steps we exercised locally while getting the new
sysmon-osx checker ready for testing. Use it as the checklist when you spin up
the Docker Compose stack on a remote Linux dev box (amd64) while keeping the
macOS host collectors running on the laptop.
1. Mac Laptop (Apple Silicon) – Host Prep
- Build & install the sysmon-osx checker
make sysmonosx-build-checker-darwinsudo make sysmonosx-host-install- Verify launchd unit:
sudo launchctl list | grep com.serviceradar.sysmonosx
- Keep the gRPC listener reachable
- The checker serves gRPC on
0.0.0.0:50110. - Ensure macOS firewall allows inbound TCP/50110 so the remote Linux server can reach it (from the Linux box use
nc -vz <laptop-ip> 50110).
- The checker serves gRPC on
2. Remote Linux Dev Server (amd64) – Docker Compose Stack
- Clone & checkout branch
git clone [email protected]:carverauto/serviceradar.git
cd serviceradar
git checkout main # or whichever branch you're testing - Ensure Docker daemon is up (amd64 host with internet access to GHCR).
- Poller configuration
- We already added a
sysmon-osxgRPC entry that defaults tohost.docker.internal:50110. - For a remote server, override that hostname so the poller reaches back to the Mac. Two options:
- Copy
docker/compose/poller.docker.jsonto a temp file and replace thedetailsvalue with<laptop-ip>:50110, then mount it via an override file. - Or use an environment override: create
docker/compose/poller.override.jsonwith just the modified check.
- Copy
- If you also run packaging installers outside of Compose, update
packaging/poller/config/poller.jsonsimilarly (pointing to the Mac IP).
- We already added a
- Bring the stack up (amd64 images)
(Compose v2 automatically reads
docker compose --profile testing up -ddocker-compose.yml; usedocker composesyntax if available, otherwisedocker-composeworks as well.) - Validate services
docker compose psdocker compose logs -f core poller agent
- Confirm gRPC connectivity to the laptop
You should see
docker compose exec poller \
grpcurl -plaintext <laptop-ip>:50110 grpc.health.v1.Health/Check{"status":"SERVING"}.
3. End-to-End Test Flow
- Watch poller logs on the Linux server
Expect poll attempts and frequency payloads.
docker compose logs -f poller | grep sysmon-osx - Inspect core metrics
- CNPG/Timescale (from the Linux server):
docker compose exec cnpg psql -U postgres -d telemetry -c "SELECT * FROM cpu_metrics ORDER BY timestamp DESC LIMIT 5" - Core API (if exposed) at
http://localhost:8090->/pollers/.../sysmon/cpu.
- CNPG/Timescale (from the Linux server):
- Cross-check macOS checker
log show --predicate 'process == "serviceradar-sysmon-osx"' --last 5m- Inspect
/var/log/serviceradar/sysmon-osx.logand.err.logfor IOReport or frequency sampling details.
4. Notes / Troubleshooting
- If
sysmon-osxlogs warn about missing security, provide TLS settings in the config before starting. host.docker.internalis only defined for Docker Desktop; for a remote Docker host use the Mac's routable IP.- Network reachability: confirm both directions (Mac → Linux for OTLP, Linux → Mac for gRPC).
- The Compose stack expects GHCR credentials if the repo is private; log in via
docker login ghcr.io. - To tear everything down:
- Linux server:
docker compose down -v
- Linux server:
- Mac launchd:
sudo launchctl bootout system/com.serviceradar.sysmonosx
5. Building Installable Artifacts
-
Signed macOS installer package Ensure the Apple Timestamping Authority certificate is trusted before requesting timestamps:
curl -L -o /tmp/AppleTimestampCA.cer https://www.apple.com/certificateauthority/AppleTimestampCA.cer
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/AppleTimestampCA.cerIf your network prefers IPv6 and codesign cannot reach the TSA, set
PKG_TIMESTAMP_URL="http://17.32.213.161/ts01"(the IPv4 endpoint) or rely on the script's built-in fallback.PKG_SIGN_IDENTITY="Developer ID Installer: Carver Automation LLC (432Q4W72Q7)" \
PKG_NOTARIZE_PROFILE="serviceradar-notary" \ # optional, if configured via `xcrun notarytool store-credentials`
make sysmonosx-host-packageThe script emits both the tarball (
dist/sysmonosx/serviceradar-sysmonosx-host-macos.tar.gz) and the signed.pkg(dist/sysmonosx/serviceradar-sysmonosx-host-macos.pkg). Skip notarization by omittingPKG_NOTARIZE_PROFILE. UseSKIP_BUILD=1when the binaries are already present indist/sysmonosx/mac-host/bin. -
Bazel target for release automation (local macOS executor)
PKG_APP_SIGN_IDENTITY="Developer ID Application: Carver Automation LLC (432Q4W72Q7)" \
PKG_SIGN_IDENTITY="Developer ID Installer: Carver Automation LLC (432Q4W72Q7)" \
PKG_DISABLE_TIMESTAMP=1 \ # skip TSA when offline; drop to get timestamped signatures
#PKG_NOTARIZE_PROFILE="serviceradar-notary" \ # optional; requires stored notarytool credentials
bazel build --config=darwin_pkg //packaging/sysmonosx_host:sysmonosx_host_pkg
The resulting .pkg is placed under bazel-bin/packaging/sysmonosx_host/serviceradar-sysmonosx-host-macos.pkg and is also exposed via the aggregate //packaging:package_macos filegroup for release workflows.
Keeping this file up to date ensures anyone can repeat the cross-host validation without re-reading the entire cpu_plan.md.