{"id":13461564,"url":"https://github.com/google/mtail","last_synced_at":"2025-10-22T06:25:40.507Z","repository":{"id":17465105,"uuid":"20239198","full_name":"google/mtail","owner":"google","description":"extract internal monitoring data from application logs for collection in a timeseries database","archived":false,"fork":false,"pushed_at":"2025-03-14T14:37:56.000Z","size":6903,"stargazers_count":3895,"open_issues_count":51,"forks_count":384,"subscribers_count":69,"default_branch":"main","last_synced_at":"2025-03-22T00:42:14.651Z","etag":null,"topics":["bytecode","calculator","collector","compiler","extraction","go","instrumentation","logs","metrics","monitoring","mtail","mtail-programs","observability","prometheus","proxy","timeseries","vm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-27T23:46:16.000Z","updated_at":"2025-03-19T15:35:12.000Z","dependencies_parsed_at":"2023-01-13T19:20:47.383Z","dependency_job_id":"2c99fde4-b89f-44ac-bf3a-6f8a392dc53e","html_url":"https://github.com/google/mtail","commit_stats":{"total_commits":3274,"total_committers":89,"mean_commits":36.78651685393258,"dds":"0.11545510079413557","last_synced_commit":"f8396d061665f67ad2f6a9ff37b710159810109c"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmtail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmtail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmtail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmtail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/mtail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366197,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytecode","calculator","collector","compiler","extraction","go","instrumentation","logs","metrics","monitoring","mtail","mtail-programs","observability","prometheus","proxy","timeseries","vm"],"created_at":"2024-07-31T11:00:44.505Z","updated_at":"2025-10-22T06:25:35.467Z","avatar_url":"https://github.com/google.png","language":"Go","readme":"\u003cimg src=\"https://raw.githubusercontent.com/google/mtail/main/logo.png\" alt=\"mtail\" title=\"mtail\" align=\"right\" width=\"140\"\u003e\n\n# mtail - extract internal monitoring data from application logs for collection into a timeseries database\n\n[![ci](https://github.com/google/mtail/workflows/CI/badge.svg)](https://github.com/google/mtail/actions?query=workflow%3ACI+branch%3main)\n[![GoDoc](https://godoc.org/github.com/google/mtail?status.png)](http://godoc.org/github.com/google/mtail)\n[![Go Report Card](https://goreportcard.com/badge/github.com/google/mtail)](https://goreportcard.com/report/github.com/google/mtail)\n[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/mtail.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:mtail)\n[![codecov](https://codecov.io/gh/google/mtail/branch/main/graph/badge.svg)](https://codecov.io/gh/google/mtail)\n\n`mtail` is a tool for extracting metrics from application logs to be exported\ninto a timeseries database or timeseries calculator for alerting and\ndashboarding.\n\nIt fills a monitoring niche by being the glue between applications that do not\nexport their own internal state (other than via logs) and existing monitoring\nsystems, such that system operators do not need to patch those applications to\ninstrument them or writing custom extraction code for every such application.\n\nThe extraction is controlled by [mtail programs](docs/Programming-Guide.md)\nwhich define patterns and actions:\n\n    # simple line counter\n    counter lines_total\n    /$/ {\n      lines_total++\n    }\n\nMetrics are exported for scraping by a collector as JSON or Prometheus format\nover HTTP, or can be periodically sent to a collectd, StatsD, or Graphite\ncollector socket.\n\nRead the [programming guide](docs/Programming-Guide.md) if you want to learn how\nto write mtail programs.\n\nAsk general questions on the users mailing list: https://groups.google.com/g/mtail-users\n\n## Installation\n\nThere are various ways of installing **mtail**.\n\n### Precompiled binaries\n\nPrecompiled binaries for released versions are available in the\n[Releases page](https://github.com/google/mtail/releases) on Github. Using the\nlatest production release binary is the recommended way of installing **mtail**.\n\nWindows, OSX and Linux binaries are available.\n\n### Building from source\n\nThe simplest way to get `mtail` is to `go get` it directly.\n\n`go get github.com/google/mtail/cmd/mtail`\n\nThis 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).\n\nIf 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.\n\n```\nGO111MODULE=on go get -u github.com/google/mtail\ncd $GOPATH/src/github.com/google/mtail\nmake install\n```\n\nIf you develop the compiler you will need some additional tools\nlike `goyacc` to be able to rebuild the parser.\n\nSee the [Build instructions](docs/Building.md) for more details.\n\nA `Dockerfile` is included in this repository for local development as an\nalternative to installing Go in your environment, and takes care of all the\nbuild dependency installation, if you don't care for that.\n\n\n## Deployment\n\n`mtail` works best when paired with a timeseries-based calculator and\nalerting tool, like [Prometheus](http://prometheus.io).\n\n\u003e So what you do is you take the metrics from the log files and\n\u003e you bring them down to the monitoring system?\n\n[It deals with the instrumentation so the engineers don't have\nto!](http://www.imdb.com/title/tt0151804/quotes/?item=qt0386890)  It has the\nextraction skills!  It is good at dealing with log files!!\n\n## Read More\n\nFull documentation at http://google.github.io/mtail/\n\nRead more about writing `mtail` programs:\n\n* [Programming Guide](docs/Programming-Guide.md)\n* [Language Reference](docs/Language.md)\n* [Metrics](docs/Metrics.md)\n* [Managing internal state](docs/state.md)\n* [Testing your programs](docs/Testing.md)\n\nRead more about hacking on `mtail`\n\n* [Building from source](docs/Building.md)\n* [Contributing](CONTRIBUTING.md)\n* [Style](docs/style.md)\n\nRead more about deploying `mtail` and your programs in a monitoring environment\n\n* [Deploying](docs/Deploying.md)\n* [Interoperability](docs/Interoperability.md) with other systems\n* [Troubleshooting](docs/Troubleshooting.md)\n* [FAQ](docs/faq.md)\n\n\n## Getting more help and reporting defects\n\nIf you have any questions, please use the [GitHub Discussions Q\u0026A](https://github.com/google/mtail/discussions/new?category=q-a).\n\nWe also have an email list : https://groups.google.com/forum/#!forum/mtail-users\n\nFor any defects please [file a new issue](https://github.com/google/mtail/issues/new).\n","funding_links":[],"categories":["Go","Go (134)","go","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的","Repositories"],"sub_categories":["\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmtail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fmtail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmtail/lists"}