Mac OS X Logs

You can configure your Mac OS X to send system to logs to Loggly. We use fluentd to send the OS X system log over our HTTP/S endpoint. This is because OS X has an older syslog daemon that does not support the newer RFC 5424 format that Loggly requires. For alternatives, please see the Advanced Options section.

Automatic Script

  1. Run the Configure Mac script
  2. Run our automatic configure-mac script below to setup Mac OS X logging and send the logs to Loggly through your fluentd. Alternatively, you can follow our manual configuration instructions below.

    curl -O https://www.loggly.com/install/configure-mac.sh
    sudo bash configure-mac.sh -a SUBDOMAIN -u USERNAME
    

    Replace:

    • SUBDOMAIN: your account subdomain that you created when you signed up for Loggly
    • USERNAME: your Loggly username, which is visible at the top right of the Loggly console

    You will need to enter your system root password so it can update your fluentd configuration. It will then prompt for your Loggly password.

  3. Verify Events
  4. Search Loggly for events with the Mac tag over the past hour. It may take a few minutes to index the event. If it doesn’t work, see the troubleshooting section below.

    tag:Mac

    Mac OS Logs

Manual Configuration

  1. Install xcode command line tools
  2. If you haven’t already, install xcode command line tools.

    xcode-select --install

  3. Install Fluentd
  4. Install Fluentd using following command.

    sudo gem install fluentd --no-ri --no-rdoc -n/usr/local/bin

  5. Install Loggly Plugin for Fluentd
  6. Install the Loggly output plugin for the Fluentd using following command.

    sudo gem install fluent-plugin-loggly
    

  7. Configure Fluentd
  8. Open or create a new configuration file for fluentd. You can store this in your home directory or elsewhere.

    sudo vim fluentd-loggly.conf
    

    Paste the following configuration into the file.

    <source>
       type tail
       format none
       path /var/log/system.log
       tag system_logs
    </source>
    <match **>
       type loggly
       loggly_url  http://logs-01.loggly.com/inputs/TOKEN/tag/Mac
    </match>
    

    Replace:

  9. Send logs to Loggly
  10. Now run the following command to send logs to Loggly.

    fluentd -c fluentd-loggly.conf
    

  11. Verify Events
  12. Search Loggly for events with the Mac tag over the past 20 minutes. It may take a few minutes to index the event. If it doesn’t work, see the troubleshooting section below.

    tag:Mac
    

    Mac OS Logs

Advanced Mac OS Logging Options

Troubleshooting Mac OS Logs

If you don’t see any data show up in the verification step, then check for these common problems.

  • Wait a few minutes in case indexing needs to catch up
  • Check to see if the fluentd-loggly.conf is properly created and placed in the proper location. It should be in the /home/Fluentd folder.
  • Check to see if the path for the system.log file provided is correct. It should be /var/log/system.log.
  • Run “sudo tcpdump dst logs-01.loggly.com and port 80″ to verify HTTP events are being sent to Loggly
  • Search or post your own MacOS logging question in the community forum.
Thanks for the feedback! We'll use it to improve our support documentation.


Top