User Tools

Site Tools


toolsandtechnologies:mtail

This is an old revision of the document!


mTail

mTail is a simple tool that allows us to read over log files and look for certain patterns. The count of these patterns or lines can be put into metrics for Prometheus to use.

Where does Prometheus check?

The servers that prometheus checks for mtail are defined in the mtail-sd.yml in the files/file-sd/ directory of the prometheus-monitoring-config project. This yaml file directs prometheus on where to look for the mtail metrics. It doesn't control where metrics are installed to. As long as mtail is installed and running on the server, it will report metrics. If prometheus has this servers details in the mtail-sd.yml file it will read it.

How do I install mTail to a server

In general, you shouldn't have to worry about installing mtail to a server for the first time, as that would have been dealt with already. However, if mtail is missing from a server and you want to installed it then follow the instructions below.

Use the ops-playbooks repository. This has a number of scripts and ansible playbooks in it and one of them is the mtail.yml playbook used for installing mtail on a server.

ansible-playbook ../env-configuration/host/hosts.ini mtail.yml –vault-id @prompt

This should run without too much trouble and then you will have mtail on the new server. By default, this comes with a basic linecount.mtail in the files folder. For a fuller installation, you will have to use the update-mtail playbook back in the prometheus-monitoring-config repository.

toolsandtechnologies/mtail.1647002601.txt.gz · Last modified: 2022/03/11 12:43 by 10.91.120.28