BSD Ports

sysutils/mtail 3.0.9_13 FreeBSD

Extract internal monitoring data from application logs

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
d81b7ba3c3
License
APACHE20
Categories
sysutils
Package size
4538.4 KiB, 15873.6 KiB installed

Description

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.

In the other systems

SystemPortVersion
FreeBSDsysutils/mtail3.0.9_13
NetBSDmisc/mtail1.1.1nb8

Install

Binary package:

pkg install mtail

From the ports tree:

cd /usr/ports/sysutils/mtail/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	mtail>0:sysutils/mtail

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest3.0.9_123.0.9_12--3.0.9_12
FreeBSD:14:quarterly3.0.9_123.0.9_12n/a-3.0.9_12
FreeBSD:15:latest3.0.9_123.0.9_12n/a--
FreeBSD:15:quarterly3.0.9_123.0.9_12n/an/an/a
FreeBSD:16:latest3.0.9_113.0.9_12n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 1

No port depends on this one.

Configuration

Options name: sysutils_mtail

OptionDefaultDescription
DOCSoffBuild and/or install documentation
EXAMPLESoffBuild and/or install examples
USES
go:modules
Service scripts
mtail

Message after installing

To use mtail you will need to provide the service flags you want to
enable via the mtail_args setting in rc.conf. Most important is that
you need to specify a path for -progs and a comma separated list for
-logs which indicates the log files to monitor. The progs directory will
contain the .mtail files which define the rules and patterns it uses to
generate metrics from your log files. You can find examples for some
common services in /usr/local/share/examples/mtail. 

A working example for Apache might look like the following:

mkdir -p /usr/local/etc/mtail
cp /usr/local/share/examples/mtail/apache_common.mtail /usr/local/etc/mtail/

In rc.conf:
mtail_enable="YES"
mtail_args="-address 127.0.0.1 -port 3903 -progs /usr/local/etc/mtail -logs /var/log/httpd-access.log"

Now you can start the mtail service and it should begin providing the
Prometheus style metrics on http://127.0.0.1:3903/metrics.

The documentation explaining the syntax can be found in /usr/local/share/doc/mtail.
You may find examples for other common services on the internet.

It is important to ensure the mtail service user can read the log files.

Files

pkg-plist 34
  • bin/mfmt
  • bin/mtail
  • share/doc/mtail/Building.md
  • share/doc/mtail/Deploying.md
  • share/doc/mtail/Interoperability.md
  • share/doc/mtail/Language.md
  • share/doc/mtail/Metrics.md
  • share/doc/mtail/Programming-Guide.md
  • share/doc/mtail/Testing.md
  • share/doc/mtail/Troubleshooting.md
  • share/doc/mtail/debugging.md
  • share/doc/mtail/faq.md
  • share/doc/mtail/index.md
  • share/doc/mtail/reading-y-output.md
  • share/doc/mtail/references.md
  • share/doc/mtail/state.md
  • share/doc/mtail/style.md
  • share/examples/mtail/apache_combined.mtail
  • share/examples/mtail/apache_common.mtail
  • share/examples/mtail/apache_metrics.mtail
  • share/examples/mtail/dhcpd.mtail
  • share/examples/mtail/histogram.mtail
  • share/examples/mtail/lighttpd.mtail
  • share/examples/mtail/linecount.mtail
  • share/examples/mtail/mysql_slowqueries.mtail
  • share/examples/mtail/nocode.mtail
  • share/examples/mtail/ntpd.mtail
  • share/examples/mtail/ntpd_peerstats.mtail
  • share/examples/mtail/postfix.mtail
  • share/examples/mtail/rails.mtail
  • share/examples/mtail/rsyncd.mtail
  • share/examples/mtail/sftp.mtail
  • share/examples/mtail/timer.mtail
  • share/examples/mtail/vsftpd.mtail
distinfo 23
FileSizeSHA256
google-mtail-v3.0.9_GH0.tar.gz57162516c59fe81d2b192bd57b988b00ca16f943ed85746ed2081de44127d5c7d0a439
beorn7-perks-v1.0.1_GH0.tar.gz1086798db84bb0224a26094e6adba91b7ee7a1a7ace28cb648d818f8e779e6a19f825
census-ecosystem-opencensus-go-exporter-jaeger-v0.2.1_GH0.tar.gz2333695d6a2259b26232de5c973a015ffac2ce3f822ae837b6a6532f40700c779964a
census-instrumentation-opencensus-go-v0.24.0_GH0.tar.gz176752048708914541817193330ce052026deb0c617c9d953ac15ae601ab2bde5788d1
cespare-xxhash-v2.2.0_GH0.tar.gz12334b8c684b9e5e136510913727e6a845b28f8176e55db827b11f17769fba970fe13
davecgh-go-spew-v1.1.1_GH0.tar.gz421527d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
golang-glog-v1.2.2_GH0.tar.gz367535aa6cb3b9204b24d4f26fa475c84d337fe1dc47dc365e10199b88d2e70ad893d
golang-groupcache-41bb18bfe9da_GH0.tar.gz261011e89795970d6593affdafe1d09dcf947681ca1ea82528e8e4fb9974a77f2e394
golang-protobuf-v1.5.3_GH0.tar.gz17182248457a6a9e8c78a7556ff5ff4a4c77d7df9bf70e882491ee0f3f1ff06db2bfaa
golang-sync-v0.7.0_GH0.tar.gz1818139bf56d2dc04d16baabbf5eb5d847a2ad68762b5efde7ca3a8fdb24bdcdd9461
golang-sys-v0.24.0_GH0.tar.gz1.50168e+063402ba7b578406df222693bac2b4011b5c9ab9180b0c123db1ed92da8ba11052
google-go-cmp-v0.6.0_GH0.tar.gz104784d14f7d57b0f6d25771bee3d7d5d038f532539e71bfc934772b1c0467ab90fa86
google-go-genproto-daa745c078e1_GH0.tar.gz6.013726e+0687a8a728aa937071545b8080654a8d2e6f4088227cc53215aa1101f7add10697
googleapis-google-api-go-client-v0.105.0_GH0.tar.gz3.0246907e+07821b0fec67835fdf03166c4b7929226e7db26c6eb09feff0708ac6d71f026dec
grpc-grpc-go-v1.56.3_GH0.tar.gz1.944195e+06c3020aee3538563378c1b06e5a27f284bc6d615d7b9179017f7e7d0408bb0c4c
munnerz-goautoneg-a7dc8b61c822_GH0.tar.gz28103a455e3bcf8237ecee0385f97223ca821ec2547284e827e90f94a4984801ca1c
pkg-errors-v0.9.1_GH0.tar.gz1341556bfd893023daa498508bfe161de1be83299fcf15376035e7df79cbd7d6fa608
prometheus-client_golang-v1.19.1_GH0.tar.gz1.083469e+06f707e66fc60a43ae135c493bfd16fd96d5033661d7af80e7c3a10a04212e72b0
prometheus-client_model-v0.6.1_GH0.tar.gz17373b9b690bc35d80061f255faa7df7621eae39fe157179ccd78ff6409c3b004f05e
prometheus-common-v0.55.0_GH0.tar.gz147527b9cabec7dadf615ae8bf86414d916f6680bc9e641d7631deaad71422b104ab6b

Commit history 6

DateCommitCreditsLog message
d81b7ba3c3 Dag-Erling Smørgrav various: Bump Go ports for Go 1.26.10 / 1.27.3
031fc6bfbf Dag-Erling Smørgrav various: Bump Go ports
dd0905142a Adam Weinberger many: Bump go ports for 1.26.8 and 1.27.1
4867821cd6 Dag-Erling Smørgrav various: Bump go ports for go-1.25.14 / 1.26.7
6d39dcf04e Dag-Erling Smørgrav various: Bump go ports for go-1.25.13 / 1.26.6

The latest 5 of 6 in the history this site was built from.