Skip to content

elvin-tajirzada/log-alerting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub go.mod Go version (subdirectory of monorepo) Go Reference Docker Pulls Docker Image Size (tag)

Log Alerting

Log Alerting makes it possible to send error logs to telegram.

Overview

Log Alerting depends on Log Exporter service. The log structure should be the same. Log Alerting sends a request to Loki at each evaluation time, so it retrieves logs where the status code equals 5xx and, it sends messages to telegram. It also sends a daily report to telegram.

Server Error Daily Report Daily Report

Usage

We use the following command to run it on Docker.

docker run -d \
  --name log-alerting \
  --network main \
  --env LOKI_HOST=your_loki_host \
  --env LOKI_PORT=your_loki_port \
  --env TELEGRAM_TOKEN=your_telegram_token \
  --env TELEGRAM_CHAT_ID=your_telegram_chat_id \
  --env GRAFANA_PANEL_URL=your_grafana_panel_url \
  elvintacirzade/log-alerting:latest

See more information.