BSD Ports

sysutils/mtail 3.0.9_13 DragonFly

Extract internal monitoring data from application logs

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
APACHE20
Categories
sysutils
Package size
4438.6 KiB, 15727.0 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

The newest version among them is 3.0.9, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlysysutils/mtail3.0.9_13 newestnone known-[email protected]-
FreeBSDsysutils/mtail3.0.9_14 newestnone known-[email protected]2026-11-11
HardenedBSDsysutils/mtail3.0.9_13 newestno data-[email protected]-
GhostBSDsysutils/mtail3.0.9_13 newestno data-[email protected]-

Compare across BSDs

Version history 1

  1. 3.0.9

Upstream's version as each commit to the port's Makefile set it, or as this site first saw it in the system's packages; the tree's own revisions are not versions here.

Install

Binary package:

pkg install mtail

From DPorts:

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

Dependencies

No port depends on this one.

Configuration

No options to configure.

Service scripts
none

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.