A simple project that notifies you via a Telegram bot if the server's RAM or CPU are higher than necessary.
- Create
.envfile:
TELEGRAM_BOT_TOKEN=
TELEGRAM_ADMIN_ID=- You can change some settings in the
notifier/config.pyfile:
CPU_MAX_PERSENT- trigger limits for the CPU in percentageRAM_MAX_PERSENT- trigger limits for the RAM in percentageSEND_ALERT_TIME- the time interval between sending messages to TelegramSERVER_NAME- your server nameMESSAGE_BODY- message that sends to TelegramTIMEZONE- your time relative to UTC (timestamp will be UTC + YOUR TIMEZONE hours)
- Build the image:
docker build -t python-notifier .- Start the container:
docker run -d \
--name notifier \
--env-file ./.env \
python-notifierThis project is licensed under the MIT License.
