Centralized Logs with Grafana Loki and Promtail
Monitoring

Centralized Logs with Grafana Loki and Promtail

  • Author :Liam K.
  • Date :March 08, 2026
  • Time :13 minutes

Why Loki?

Loki stores logs as compressed chunks indexed by labels. It's cost-effective and integrates with Grafana for queries and dashboards.

Install Promtail

bash
curl -O -L "https://github.com/grafana/loki/releases/download/v2.8.2/promtail-linux-amd64.zip"
unzip promtail-linux-amd64.zip
sudo mv promtail-linux-amd64 /usr/local/bin/promtail
sudo chmod +x /usr/local/bin/promtail

Minimal Promtail Config

yaml
server:
  http_listen_port: 9080
clients:
  - url: http://loki:3100/loki/api/v1/push
scrape_configs:
  - job_name: system
    static_configs:
      - targets: [localhost]
[...]
Command truncated. Copy to view full command.

Technical Author

Technical Author - Liam K.
Liam K.

System administrator and technical writer specializing in server infrastructure, security and deployment. Creating comprehensive guides to help you master server administration.