Skip to content
extract whitebox monitoring data from application logs for collection in a timeseries database
Branch: master
Clone or download
jaqx0r Merge pull request #232 from tangdi/master
add regex pattern to ignore file and ignore subfolder
Latest commit e2ef024 May 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Eyeroll emoji. Apr 11, 2019
cmd add regex pattern to ignore file based on filename May 20, 2019
docs Test and document suggested change to Issue #230. May 17, 2019
examples the example was a bit lacking May 15, 2019
fuzz More renames missed by tests. Mar 5, 2015
hooks add post_push tagging for semantic versioning Apr 19, 2018
internal add regex pattern to ignore file based on filename May 20, 2019
.gitattributes Move the whole parser and it's cyclic mess to its own package. Dec 2, 2018
.gitignore Update git ignore list. Mar 19, 2019
.gitlab-ci.yml Refactor installation target. Dec 21, 2018
.golangci.yml Ignore undeclared name errors because typechecker can't see package w… Mar 25, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Sep 20, 2017
CONTRIBUTING.md Update contribution guide to indicate response time. Apr 22, 2018
Dockerfile Install deps correctly in the docker image. Apr 11, 2019
ISSUE_TEMPLATE.md Create Github ISSUE_TEMPLATE.md Feb 18, 2018
LICENSE Add CONTRIBUTING and LICENSE. Mar 2, 2015
Makefile Install deps correctly in the docker image. Apr 11, 2019
README.md Add golangci.com badge and config for the linter. Feb 3, 2019
TODO Update TODO. May 13, 2019
benchmark_results.csv Read up to 4K from each log. Sep 9, 2013
log_rewriter.awk Fix an output formatting bug in the rewriter script. Apr 5, 2015
logo.png Adds project logo. Sep 20, 2017
mtail-mode.el Merge branch 'master' into vsftpd Feb 12, 2019
subject_summarizer.mtail Adds a simple mtail program for counting subject lines in an mbox. Nov 7, 2018

README.md

mtail

mtail - extract whitebox monitoring data from application logs for collection into a timeseries database

GoDoc CircleCI Build Status Coverage Status Go Report Card GolangCI

mtail is a tool for extracting metrics from application logs to be exported into a timeseries database or timeseries calculator for alerting and dashboarding.

It fills a monitoring niche by being the glue between applications that do not export their own internal state (other than via logs) and existing monitoring systems, such that system operators do not need to patch those applications to instrument them or writing custom extraction code for every such application.

The extraction is controlled by mtail programs which define patterns and actions:

# simple line counter
counter line_count
/$/ {
  line_count++
}

Metrics are exported for scraping by a collector as JSON or Prometheus format over HTTP, or can be periodically sent to a collectd, StatsD, or Graphite collector socket.

Read the programming guide if you want to learn how to write mtail programs.

Mailing list: https://groups.google.com/forum/#!forum/mtail-users

Installation

There are various ways of installing mtail.

Precompiled binaries

Precompiled binaries for released versions are available in the Releases page on Github. Using the latest production release binary is the recommended way of installing mtail.

Windows, OSX and Linux binaries are available.

Building from source

To build mtail from the source code yourself you need to have a working Go environment with version 1.9 or greater installed. mtail is go getable and go installable from this repository but is best if you use the Makefile to build it.

go get -u github.com/google/mtail
cd $GOPATH/src/github.com/google/mtail
make install

If you develop the compiler you will need some additional tools like goyacc to be able to rebuild the parser.

See the Build instructions for more details.

A Dockerfile is included in this repository for local development as an alternative to installing Go in your environment, and takes care of all the build dependency installation, if you don't care for that.

Deployment

mtail works best when it paired with a timeseries-based calculator and alerting tool, like Prometheus.

So what you do is you take the metrics from the log files and you bring them down to the monitoring system?

It deals with the instrumentation so the engineers don't have to! It has the extraction skills! It is good at dealing with log files!!

Read More

Full documentation at http://google.github.io/mtail/

Read more about writing mtail programs:

Read more about hacking on mtail

Read more about deploying mtail and your programs in a monitoring environment

After that, if you have any questions, please email (and optionally join) the mailing list: https://groups.google.com/forum/#!forum/mtail-users or file a new issue.

You can’t perform that action at this time.