The standard issue Sky Broadband SR102 ADSL router includes the capability to send syslog messages to a remote host.
Unfortunately the plucky little SR102 doesn’t send syslog messages in entirely the right format (checked using ‘syslog -F raw’):
[ASLMessageID 303320877] [Time 1463491448] [TimeNanoSec 0] [Level 2] [PID 4294967295] [UID 4294967294] [GID 4294967294] [ReadGID 80] [Host 1] [Sender 2016-05-17T14] [Facility daemon] [Message 24:08.000Z skyhub.ihr syslog - - [skySDID@32666 mac="7C4CA5D9E148" sn="A502141D002081"] Administrator login successful from IP: 192.168.0.100 .]
You can however still use Mac OS’s syslog daemon to receive these messages, but first you’ll need to enable the socket listener:
cd /System/Library/LaunchDaemons sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener dict" com.apple.syslogd.plist sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener:SockServiceName string syslog" com.apple.syslogd.plist sudo /usr/libexec/PlistBuddy -c "add :Sockets:NetworkListener:SockType string dgram" com.apple.syslogd.plist
To restart the syslog daemon:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
Next go into the Sky Hub web interface, click on the Security tab (default admin credentials are admin / sky), select Logs and then enter the IP address of your Mac in the Syslog server address.
You can check for Sky Hub syslog entries in /var/log/system.log
To filter out the Sky Hub messages into a separate log file, add these two lines to /etc/asl.conf and then restart the syslog daemon again:
# Sky SR102 broadband router saved to skyhub.log ? [S= Message skyhub.ihr ] file skyhub.log mode=0640 format=bsd rotate=seq compress all_max=50M
The query-action rule tells syslogd to match on the “skyhub.ihr” substring in the Message key and then save those entries to /var/log/skyhub.log. The options are for log file rotation, retaining up to 50MB of files.
Typical Sky Hub log entries will include connection retraining, web interface logins and NTP synchronisations.