Instructions on how to configure promtail remote agents (on remote servers)
setup instructions
apt install -y unzip
make dir to house promtail and it's config
mkdir /usr/local/bin/promtail
find latest (stable) download link on the releases page and copy the url for the relevant version, then download and unzip it.
e.g. Ubuntu 18.04 we use promtail-linux-amd64/zip
cd /usr/local/bin/promtail
wget https://github.com/grafana/loki/releases/download/v1.6.1/promtail-linux-amd64.zip
unzip promtail-linux-amd64.zip
mv promtail-linux-amd64 promtail
rm promtail-linux-amd64.zip
chmod a+x promtail
see reference config-promtail.yml and create similar config
vi config-promtail.yml
create the promtail user and add it to the relevant groups (e.g. groups where the promtail agent will read from)
useradd --system promtail
usermod -aG systemd-journal,adm,jitsi promtail
see reference promtail.service and create similar config
vi /etc/systemd/system/promtail.service
service promtail restart
service promtail status
successful response:
:root: [20-09-24 7:34:32] ➜ ~ service promtail status
● promtail.service - Promtail service
Loaded: loaded (/etc/systemd/system/promtail.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-09-24 07:20:19 UTC; 14min ago
Main PID: 6333 (promtail)
Tasks: 10 (limit: 4680)
CGroup: /system.slice/promtail.service
└─6333 /usr/local/bin/promtail/promtail -config.file /usr/local/bin/promtail/config-promtail.yml
systemctl enable promtail.service