Skip to content

andre487/dumbproxy-log-monitor

Repository files navigation

DumbProxy log monitor

A simple application for creating a report over dumbproxy logs and sending it to an email.

Usage

Usage of ./dumbproxy-log-monitor:
  -dbDir string
    	DB directory (default "/tmp/dumbproxy-log-monitor-test-db")
  -logCmd string
    	CMD for logs (default "sudo journalctl -fu dumbproxy.service")
  -logCmdDir string
    	CWD for log CMD (default ".")
  -mailerConfig string
    	Config for mailer (default "secrets/mailer.json")
  -printReport
    	Print report to STDOUT
  -reportMail string
    	Email to send reports
  -reportTime string
    	Report UTC time in format 22:00:00 (default "22:00:00")
  -scheduleInterval duration
    	Interval for scheduler tasks scan (default 2s)

Configs

secrets/mailer.json

{
  "host": "smtp.example.com",
  "port": "587",
  "user": "SMTP user",
  "password": "SMTP password",
  "sender": "[email protected]"
}

Report example

Report example

Build

Latest Linux x86_64