Coder Social home page Coder Social logo

simongino / telemonitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bboysoulcn/telemonitor

0.0 0.0 0.0 327 KB

TeleMonitor 是一个使用 Python 编写的系统监控工具,它可以监控 CPU、内存和磁盘的使用情况,并通过 Telegram 发送警告。

License: MIT License

Python 95.69% Dockerfile 4.31%

telemonitor's Introduction

TeleMonitor

TeleMonitor 是一个使用 Python 编写的系统监控工具,它可以监控 CPU、内存和磁盘的使用情况,并通过 Telegram 发送警告。

使用

首先,你需要创建一个 Telegram bot,然后获取 API token。你可以参考 Telegram 官方文档 来创建一个 Telegram bot。

然后,你需要获取你希望接收警告的 Telegram chat ID。你可以使用 @userinfobot 来获取你的 chat ID。

接下来 clone 这个项目:

git clone https://github.com/bboysoulcn/telemonitor.git

你可以使用docker compose 来运行 Telemonitor:

docker-compose up -d

或者你可以使用 k8s 来运行 Telemonitor:

kubectl apply -f deployment.yaml

下面是 Telemonitor 的环境变量:

  • TG_API_TOKEN: 你的 Telegram bot 的 API token。
  • TG_CHAT_ID: 你希望接收警告的 Telegram chat ID。
  • CPU_PERCENT: CPU 使用率的阈值,超过这个阈值时,Telemonitor 会发送警告。
  • MEMORY_PERCENT: 内存使用率的阈值,超过这个阈值时,Telemonitor 会发送警告。
  • DISK_PERCENT: 磁盘使用率的阈值,超过这个阈值时,Telemonitor 会发送警告。
  • MONITOR_INTERVAL: 监控的间隔时间(秒)。

下面是机器人的命令:

  • /start - 获取帮助
  • /help - 获取帮助
  • /status - 获取系统状态

效果展示

贡献者

许可证

这个项目使用 MIT 许可证,详情请见 LICENSE 文件。

telemonitor's People

Contributors

bboysoulcn avatar simongino avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.