Wednesday, May 12, 2021

Debug logs for nest wifi and google wifi

 There are no logs available in the app, but there's quite a lot available from the diagnostic report API. It's in protobuf format, so someone wrote a handy little parser.


go get github.com/benmanns/onhub/cmd/onhubdump
~/go/bin/onhubdump http://192.168.86.1/api/v1/diagnostic-report > logs.json

$ jq 'keys' logs.json 
[
  "commandOutputs",
  "fileLengths",
  "files",
  "networkConfig",
  "stormVersion",
  "unixTime",
  "unknown1",
  "unknownPairs",
  "version",
  "wanInfo",
  "whirlwindVersion"
]

$ jq -r '.files[].path' logs.json
/etc/lsb-release
/etc/resolv.conf
/proc/net/arp
/proc/slabinfo
/proc/meminfo
/sys/firmware/log
/var/log/debug-log/debug-log
/var/log/boot.log
/var/log/net.log
/var/log/update_engine/update_engine.20200102-000001
/var/log/update_engine/update_engine.20190102-000001
/var/lib/ap/monitor/wan_idle_usage
/var/lib/ap/monitor/child_idle_usage
/var/lib/ap/health-monitor/wan_connectivity_history
/var/log/ap_fresh_dns_messages
/var/log/ap_https_server_messages
/var/log/critical_events.log
/var/log/messages

# Get /var/log/messages content:

$ jq -r '.files[17].content' logs.json | less