You can send your logs from the open source log collector Fluentd to Loggly. It has a variety of filters and parsers that allow you to pre-process logs locally before sending them to Loggly. For alternatives, please see the Advanced Options section.
Fluentd Logs Setup
1. Install Fluentd
If you haven’t already, download fluentd and then install it.
2. Install Loggly Gem
sudo gem install fluent-plugin-loggly
3. Configure Fluentd
Paste in the follow code to create a Loggly client and log a hello world message.
<match your_match> type loggly loggly_url https://logs-01.loggly.com/inputs/TOKEN/tag/fluentd </match>
- TOKEN: your customer token from the source setup page
4. Send Test Events
Run Fluentd with some example logs to send test events to Loggly.
5. Verify Events
Search Loggly for events with the fluentd 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.
Click on one of the logs to show a list of JSON fields. If you don’t see them, please check that you are using one of our automatically parsed formats.
Advanced Fluentd Logging Options
- GitHub Readme – Describes setup as well as source code
- Fluentd tags – Example of how to populate Loggly tags from Fluentd tags using fluent-plugin-forest
- Loggly Libraries Catalog – New libraries are added to our catalog
- Download Fluentd – Get Fluentd on RHEL / CentOS, Ubuntu, MacOS X, Windows, or Ruby.
- Search or post your own Fluentd logging questions in the community forum.
Troubleshooting Fluentd Logs
If you don’t see any data show up in the verification step, then check for these common problems.
Check the fluentd plugin:
- Wait a few minutes in case indexing needs to catch up
- 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 question in the community forum.
Still Not Working?