-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 TeleMonitor | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# Test | ||
# TeleMonitor | ||
|
||
TeleMonitor 是一个使用 Python 编写的系统监控工具,它可以监控 CPU、内存和磁盘的使用情况,并通过 Telegram 发送警告。 | ||
|
||
## 安装 | ||
|
||
首先,你需要在你的系统上安装 Docker。然后,你可以使用以下命令来构建和运行 Docker 镜像: | ||
|
||
pass | ||
|
||
## 使用 | ||
|
||
你可以通过设置环境变量来配置 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`: 监控的间隔时间(秒)。 | ||
|
||
在 Telegram 中,你可以使用 `/status` 命令来获取系统的当前状态。 | ||
|
||
## 许可证 | ||
|
||
这个项目使用 MIT 许可证,详情请见 [LICENSE](LICENSE) 文件。 |