Skip to content

dkamyshov/telegram-loki-forwarder

Repository files navigation

telegram-loki-forwarder

Reliably forward log entries from Loki to a Telegram chat of your choice.

Features

  • Forwards events with minimal latency thanks to gRPC streaming (Loki tailing) mode.
  • Uses polling as a backup to ensure no messages are lost.
  • Uses the transactional outbox pattern (powered by sqlite) to reliably deliver events.
  • Built-in templating allows structured logs to be converted to a human-readable format.
  • Supports multiple filters and individual template per filter.

Deployment

Pre-build Docker image coming soon!

For now:

  • Build & push a Docker image.
  • Run using your favourite container orchestrator:
    • Place a config file (telegram-loki-forwarder.yml) in /opt/app/config/.
    • Mount a persistent volume at /opt/app/data/ - sqlite database goes in there by default.
    • Pass TELEGRAM_BOT_TOKEN as an envronment variable.
    • Deploy!

Configuration

See example.telegram-loki-forwarder.yml for example configuration.

Missing features

  • Service healthchecks.

About

Reliably forward log entries from Loki to a Telegram chat of your choice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors