<commit_before>[![Travis](https://img.shields.io/travis/heroku/lumbermill.svg)](https://travis-ci.org/heroku/lumbermill)
[![GoDoc](https://godoc.org/github.com/heroku/lumbermill?status.svg)](http://godoc.org/github.com/heroku/lumbermill)

# Lumbermill

This is a Go app which takes Heroku Log drains and parses the router and dyno information, and then pushes metrics to influxdb.

## Setup
### Setup Prometheus

Have it fetch metrics on `/metrics`, and it'll start downloading.

### Deploy to Heroku

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

### Add the drain to an app

```
heroku drains:add https://<lumbermill_app>.herokuapp.com/drain --app <the-app-to-mill-for>
```

You'll then start getting metrics in your prometheus host!

### Environment Variables

* `CRED_STORE`: `user1:pass1|user2:pass2|userN:passN` -- Basic Auth credentials for HTTP endpoints.
* `DEBUG`: Turn on debug mode
* `PORT`: 
<commit_msg>Add app-query parameter in README.<commit_after>[![Travis](https://img.shields.io/travis/heroku/lumbermill.svg)](https://travis-ci.org/heroku/lumbermill)
[![GoDoc](https://godoc.org/github.com/heroku/lumbermill?status.svg)](http://godoc.org/github.com/heroku/lumbermill)

# Lumbermill

This is a Go app which takes Heroku Log drains and parses the router and dyno information, and then pushes metrics to influxdb.

## Setup
### Setup Prometheus

Have it fetch metrics on `/metrics`, and it'll start downloading.

### Deploy to Heroku

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

### Add the drain to an app

```
heroku drains:add https://<lumbermill_app>.herokuapp.com/drain?app=<the-app-to-mill-for> --app <the-app-to-mill-for>
```

You'll then start getting metrics in your prometheus host!

### Environment Variables

* `CRED_STORE`: `user1:pass1|user2:pass2|userN:passN` -- Basic Auth credentials for HTTP endpoints.
* `DEBUG`: Turn on debug mode
* `PORT`: 

{'fraction_non_alphanumeric': 0.15361293582617483, 'fraction_numerical': 0.00404244567963618, 'mean_word_length': 4.91044776119403, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008378', 'n_tokens_mistral': 716, 'n_tokens_neox': 678, 'n_words': 166}