# google/mtail

extract internal monitoring data from application logs for collection in a timeseries database

Repository: https://github.com/google/mtail
Canonical: https://ross.abutalabs.com/products/mtail
Language: Go
License: Apache-2.0
License Family: permissive
Topics: monitoring, logs, observability, prometheus, collector, proxy, metrics, go, extraction, mtail, calculator, vm, compiler, bytecode, mtail-programs, timeseries, instrumentation
Last push: 2026-03-19T00:00:37+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 72, release rhythm 8, longevity 100
- inputs: {"age_days": 4481, "days_push": 168, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4027, forks 392 (observed 2026-08-28T04:08:32.674886+00:00)

## What it is
mtail is a Google open-source tool that extracts metrics from application logs using small pattern-action programs and exports them to timeseries databases. It bridges applications that only expose state via logs with monitoring systems like Prometheus, StatsD, Graphite, and collectd.

## Use cases
- extract prometheus metrics from application logs
- monitor log files and export counters and gauges
- instrument legacy apps that only write logs
- parse log lines into timeseries metrics for alerting
- tail logs and push metrics to statsd or graphite
- build dashboards from unstructured log data

## When to choose
- your application only exposes internal state through logs and you can't patch it
- you already run Prometheus or a timeseries database and need a log-to-metrics bridge
- you want declarative pattern-based extraction instead of custom parsing scripts

## When to avoid
- your application can export metrics natively (e.g. a Prometheus client library)
- you need full log aggregation and search rather than metric extraction
- you need structured JSON log ingestion at high throughput — a log pipeline like Vector or Fluent Bit may fit better

## Facets
- artifact type: service
- maturity: active
- function: monitoring, logging, parser
- domain: monitoring, developer-tools
- platform: windows, go, cli, self-hosted
- tags: log-metrics-extraction, prometheus-exporter, timeseries, log-parsing, mtail-programs, statsd, graphite, collectd, devops, linux, macos

## Member repositories
- google/mtail (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:32.674886+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:53.012517+00:00, confidence not recorded.
  - readme: https://github.com/google/mtail (fetched 2026-08-28T04:08:32.674886+00:00, sha e9c7741a48f6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
