- Notifications
You must be signed in to change notification settings - Fork0
extract whitebox monitoring data from application logs for collection in a timeseries database
License
dnck/mtail
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
mtail - extract internal monitoring data from application logs for collection into a timeseries database
mtail
is a tool for extracting metrics from application logs to be exportedinto a timeseries database or timeseries calculator for alerting anddashboarding.
It fills a monitoring niche by being the glue between applications that do notexport their own internal state (other than via logs) and existing monitoringsystems, such that system operators do not need to patch those applications toinstrument them or writing custom extraction code for every such application.
The extraction is controlled bymtail programswhich define patterns and actions:
# simple line countercounter lines_total/$/ { lines_total++}
Metrics are exported for scraping by a collector as JSON or Prometheus formatover HTTP, or can be periodically sent to a collectd, StatsD, or Graphitecollector socket.
Read theprogramming guide if you want to learn howto write mtail programs.
Ask general questions on the users mailing list:https://groups.google.com/g/mtail-users
There are various ways of installingmtail.
Precompiled binaries for released versions are available in theReleases page on Github. Using thelatest production release binary is the recommended way of installingmtail.
Windows, OSX and Linux binaries are available.
The simplest way to getmtail
is togo get
it directly.
go get github.com/google/mtail/cmd/mtail
This assumes you have a working Go environment with a recent Go version. Usually mtail is tested to work with the last two minor versions (e.g. Go 1.12 and Go 1.11).
If you want to fetch everything, you need to turn on Go Modules to succeed because of the way Go Modules have changed the way go get treats source trees with no Go code at the top level.
GO111MODULE=on go get -u github.com/google/mtailcd $GOPATH/src/github.com/google/mtailmake install
If you develop the compiler you will need some additional toolslikegoyacc
to be able to rebuild the parser.
See theBuild instructions for more details.
ADockerfile
is included in this repository for local development as analternative to installing Go in your environment, and takes care of all thebuild dependency installation, if you don't care for that.
mtail
works best when it paired with a timeseries-based calculator andalerting tool, likePrometheus.
So what you do is you take the metrics from the log files andyou bring them down to the monitoring system?
It deals with the instrumentation so the engineers don't haveto! It has theextraction skills! It is good at dealing with log files!!
Full documentation athttp://google.github.io/mtail/
Read more about writingmtail
programs:
Read more about hacking onmtail
Read more about deployingmtail
and your programs in a monitoring environment
- Deploying
- Interoperability with other systems
- Troubleshooting
- FAQ
After that, if you have any questions, please email (and optionally join) the mailing list:https://groups.google.com/forum/#!forum/mtail-users orfile a new issue.
About
extract whitebox monitoring data from application logs for collection in a timeseries database
Resources
License
Code of conduct
Stars
Watchers
Forks
Packages0
Languages
- Go95.8%
- Yacc2.1%
- Makefile1.2%
- Emacs Lisp0.4%
- Shell0.2%
- Dockerfile0.2%
- Awk0.1%