• Stars
    star
    284
  • Rank 145,616 (Top 3 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created over 12 years ago
  • Updated almost 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert a formatted log stream into metrics

An Important Update

L2met was born out of the desire to expose an effortless ingress point into Librato's systems. The project boasted no client libraries, 0-configuration (for the app developer), and percentile calculations. Since the inception of this project, the fine folks at Librato have always taken an interest in l2met. Librato has taken their interest to the extreme in that they now offer a hosted version of l2met. You should be using their service for production metrics. For instructions on how to integrate with Librato's log processing tier, see their knowledge base article and their Heroku integration page.

This project is no longer maintained. It will remain here as a historical artifact. If you have a use case that doesn't allow you to use Librato's hosted l2met, please open a support ticket with Librato.

Thanks for all of the contributions. I can take very little credit for the ideas that made l2met what it is today. Such OSS. Thanks to Heroku for providing me a home while I was developing this project. Finally, thanks to Librato for furthering the state of the art in metrics.

– Ryan Smith

l2met

Turn these:

$stdout.puts("measure#db.latency=4ms")
$stdout.puts("count#db.vaccum=1")
$stdout.puts("sample#db.size=100GB")

Into this:

img

L2met receives HTTP requests that contain a body of RFC5424 formatted data. Commonly, data is drained into l2met by logplex or log-shuttle. Once data is delivered, l2met extracts and parses the log lines using the logging conventions and then stores the data in redis so that l2met outlets can read the data, build metrics, and deliver the metrics to your Librato account.

Checkout the wiki for information related to: usage, architecture, and administration.

Getting Started

The easiest way to get l2met up and running is to deploy to Heroku. This guide assumes you have already created a Heroku & Librato account.

$ curl https://drone.io/github.com/ryandotsmith/l2met/files/l2met.tar.gz | tar xvz
$ ./scripts/setup my-l2met [email protected] abc123
...
Drain URL: https://[email protected]/logs

This command will create Heroku app named my-l2met and return a drain URL with encrypted Librato credentials for a Librato account with email [email protected] and an API token of abc123. After you have created my-l2met, you can add the drain URL to a Heroku app. A copy of the log stream will be delivered to my-l2met and metrics will be sent to the Librato account which your provided in the setup.

$ heroku drains:add https://[email protected]/logs -a myapp

Hacking on l2met

L2met is an open source, community project. Patches are welcome. Open an issue prior to submitting a patch to ensure that your patch will be accepted. You will also receive tips & tricks on how to best implement your patch.

Communcation

Documentation

Running Tests

Build Status

$ ./redis-server --version
Redis server v=2.6.14 sha=f2f2b4eb:0 malloc=libc bits=64
$ go version
go version go1.1.1 darwin/amd64
$ git clone git://github.com/ryandotsmith/l2met.git $GOPATH/src/github.com/ryandotsmith/l2met
$ cd $GOPATH/src/github.com/ryandotsmith/l2met
$ export SECRETS=$(dd if=/dev/urandom bs=32 count=1 2>/dev/null | openssl base64)
$ export TZ=UTC
$ export REDIS_URL=redis://localhost:6379
$ ./redis-server &
$ go test ./...

More Repositories

1

null-buildpack

Shell
200
star
2

wcld

log data storage
Go
60
star
3

ddbsync

DynamoDB Mutual Exclusion Locking for Go
Go
46
star
4

tat

tab completion for tmux sessions
Shell
38
star
5

redisync

Go synchronization on top of Redis using Lua.
Go
26
star
6

fire-camp

a camp fire app implemented with Backbone.js + Sinatra
JavaScript
25
star
7

adf-config

Config management for Amazon Docker Workflow
Go
24
star
8

log-shuttle

New Repository: https://github.com/heroku/log-shuttle
Go
22
star
9

librato-dash

A librato metric/instrument/dashboard creator
Ruby
13
star
10

queue_classic_example

An example of how to use queue_classic in a Rails3 app
Ruby
12
star
11

instruments

simple instrumentation of popular ruby libs
Ruby
10
star
12

amzn-base

AMI Builder for AWS Platform
Shell
9
star
13

spree-extensions

an extension for an affiliate program among other things.
Ruby
8
star
14

f-lock

A water lock for internet protocol data flow
Ruby
7
star
15

amzn-ship

CLI Controle Plane for AWS Platform
Ruby
6
star
16

metchan

Send metrics from Go to Librato
Go
5
star
17

team-building

A list of team building material submitted by friends and colleagues.
5
star
18

komrade-client

A client for the Komrade worker system.
Ruby
4
star
19

unicorn-instruments

Instrument latency as close to the syscall as possible
Ruby
3
star
20

ontheboard

a extensive set of tools for tracking tallys
JavaScript
3
star
21

sfdb

bdb experiment
C
3
star
22

Elevator

an elevator simulation
Ruby
3
star
23

log_jam

somewhat structured log drains
Ruby
3
star
24

m2pg

Read & Write metrics to a PostgreSQL database with some notion of HA.
Go
3
star
25

bookup

trade books
Ruby
2
star
26

onmorething

Before you go, let me tell you one more thing.
JavaScript
2
star
27

treadex

Ruby
2
star
28

bidstore

a home for you bids
JavaScript
2
star
29

queue_lkls

A lock-free, non-blocking queue data structure.
C
2
star
30

websearch

UMKC CS499
Java
2
star
31

simplecolor

simple colorscheme
Vim Script
2
star
32

decorator

An example of Decorator in Ruby using some meta techniques
2
star
33

DecorationsApp

An application for extending BaseCamp's TODO Lists
Ruby
2
star
34

nile-ha

The nile-ha manages a fleet of monitors to provide ha dns routing as a service
Ruby
2
star
35

command_face

building a ruby cmd app using TDD
Ruby
2
star
36

lpxc

Fast & simple ruby client for Heroku's logplex.
Ruby
1
star
37

TrieHouse

a trie data structure (foudation for a more robust auto-complete search)
Ruby
1
star
38

onholiday

An intuitive approach to tracking time off.
Ruby
1
star
39

simplex.rb-

An optimization algorithm in ruby
Ruby
1
star
40

leader

a front end for csv dumps
JavaScript
1
star
41

rack_createdb

Rack app for creating postgres databases on localhost
Ruby
1
star
42

sickle

Ruby
1
star
43

qman

Go
1
star
44

lscan

convert k=v log lines into Go maps
Go
1
star
45

boc

expose sql boolean query over http. (useful for health checks)
Go
1
star
46

gcal_push

pushes AR models with a date to google's calendar API
Ruby
1
star
47

Bacon

Calculates distance between verticeis in a graph. Also looking at performance using a set for the data structure
Ruby
1
star
48

home

files from my home dir
Vim Script
1
star
49

heroku-lock

lock your heroku app to prevent an accidental `heroku rake db:reset` on production. (also known as "pulling a github")
Ruby
1
star
50

gse_smith_public_web

www.gsenterprises.com and www.smith-transportation.com
JavaScript
1
star
51

l2met-canary

A canary to test a production instance of l2met
Go
1
star
52

af-ruby-example

Amazon Flow Ruby Example
Ruby
1
star
53

Safari-Extension-Key-Logger

captures keyup events and send the data to a remote server
JavaScript
1
star