Skip to content

SamanQasempour/server-bot-reporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read-only Telegram DevOps Bot

This bot reports local server status only. It has no command that restarts, removes, shuts down, or otherwise changes the server.

Setup

  1. In BotFather, revoke the token that was previously placed in source code and create a new token.

  2. Create a virtual environment and install dependencies:

    python3 -m venv .venv
    .venv/bin/pip install -r requirements.txt
  3. Copy .env.example to .env, set TELEGRAM_BOT_TOKEN, then run:

    set -a; . ./.env; set +a
    .venv/bin/python main.py

PROXY_URL is optional. SOCKS proxy support is included in requirements.txt.

Commands

/start, /help, /cpu, /ram, /disk, /uptime, /docker.

/docker executes only docker ps, which lists running containers. The service user needs permission to access Docker if you want container status; add it to the docker group only after considering that group’s elevated privileges.

systemd

  1. Replace User=CHANGE_ME in devops-telegram-bot.service with the account that owns the project.

  2. Install and start it:

    sudo cp devops-telegram-bot.service /etc/systemd/system/
    sudo systemctl daemon-reload
    sudo systemctl enable --now devops-telegram-bot
    sudo systemctl status devops-telegram-bot
  3. Inspect logs with sudo journalctl -u devops-telegram-bot -f.

About

A read-only Telegram bot for monitoring Linux server health, including CPU, RAM, disk, uptime, and Docker containers.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages