Skip to content

Instantly share code, notes, and snippets.

View davideanastasia's full-sized avatar

Davide Anastasia davideanastasia

View GitHub Profile

Setting up Flume NG, listening to syslog over UDP, with an S3 Sink

My goal was to set up Flume on my web instances, and write all events into s3, so I could easily use other tools like Amazon Elastic Map Reduce, and Amazon Red Shift.

I didn't want to have to deal with log rotation myself, so I setup Flume to read from a syslog UDP source. In this case, Flume NG acts as a syslog server, so as long as Flume is running, my web application can simply write to it in syslog format on the specified port. Most languages have plugins for this.

At the time of this writing, I've been able to get Flume NG up and running on 3 ec2 instances, and all writing to the same bucket.

Install Flume NG on instances

# - Find ODB library
# Find the native ODB includes and library
# This module defines
# ODB_INCLUDE_DIR, where to find Url.h, etc.
# ODB_LIBRARIES, libraries to link against to use ODB client C++.
# ODB_FOUND, If false, do not try to use ODB client C++.
# also defined, but not for general use are
# ODB_CORE_LIBRARY, where to find the core ODB library.
# ODB_MYSQL_LIBRARY, where to find the mysql ODB library.
# ODB_PGSQL_LIBRARY, where to find the pgsql ODB library.