Skip to content

ggodefroid/pve-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pve-notifier is a python script designed for system administrators who want to receive real-time notifications on Telegram whenever an login (successful or failed) occurs on their Proxmox Webui.

The project is built around a Python script that monitors authentication logs (/var/log/auth.log) and triggers formatted messages sent through a Telegram bot. It is integrated into a systemd service to ensure reliable and automatic execution upon system startup.

How to install

git clone https://github.com/ggodefroid/pve-notifier.git

Sensitive information like the bot token and chat ID are securely stored in an .env file So you need to create the .env and add your bot key and the channel id that the bot will use. you can See the Telegram documentation to create you own telegram bot

cd pve-notifier
cp .env.example .env

Install the required python packages

pip install -r requirements.txt

create a systemd

create a telegram_log_auth.service in /etc/systemd/system.

vim /etc/systemd/system/telegram_log_auth.service
[Unit]
Description=Monitoring Webui proxmix connections and sending to Telegram
After=network.target

[Service]
ExecStart=python3 /root/pve-notifier/alerter.py
Restart=on-failure
User=root

[Install]
WantedBy=multi-user.target

enable the service

systemctl daemon-reload
systemctl enable telegram_log_auth
systemctl start telegram_log_auth

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages