app开发者平台在数字化时代的重要性与发展趋势解析
808
2022-10-29
mtail是一种工具,用于从应用程序日志中提取指标然后导到时间序列数据库中
mtail - extract whitebox monitoring data from application logs for collection into a timeseries database
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 countercounter 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/mtailcd $GOPATH/src/github.com/google/mtailmake 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!!
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~