This is a plugin that can generate a UptimeKuma status page summary for your Nonebot
Project description
这是一个简单插件,它可以从指定的UptimeKuma展示页面抓取消息并且发送出去。
📖 介绍
这个插件在触发指令时从指定UptimeKuma网站的指定状态页面抓取内容,返回各项在线情况并且写出钉选的通知
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-uptime-kuma-puller
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-uptime-kuma-puller
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-uptime-kuma-puller"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| upk__query_url | 是 | 无 | UptimeKuma 地址 |
| upk__proj_name_list | 是 | 无 | 需要监控的项目名称列表(需与 UptimeKuma 项目名称完全匹配) |
| upk__status_mapping | 否 | {0 : "🔴",1 : "🟢",2 : "🟡",3 : "🔵","unknow" : "❓"} | 状态标识 |
| upk__show_ping | 否 | True | 是否在结果中显示 Ping 测试结果 |
| upk__show_incident | 否 | True | 是否在结果中显示公告信息 |
| upk__error_prompt | 否 | 查询过程中发生错误,查询终止! | 当发生致命错误时返回的提示信息(后附带错误信息) |
| upk__suggest_proj_prompt | 否 | 请选择需查项目 | 当未指定项目时,交互式选择的引导提示 |
| upk__no_arg_prompt | 否 | 由于用户未能提供有效参数,请重新触发指令 | 当参数缺失时返回的错误提示 |
| upk__incident_update_time_text | 否 | 🕰本通知更新于 | 公告信息中显示更新时间的前缀文本 |
| upk__show_incident_update_time | 否 | True | 是否在公告信息中显示最后更新时间 |
| upk__show_incident_type | 否 | True | 是否在公告信息中显示事故类型(如:信息/重要/危险) |
| upk__show_tags | 否 | True | 是否在结果中显示标签信息 |
| upk__show_maintenance | 否 | 是否显示维护信息 | |
| upk__timeout | 否 | 30 | 超时时间(单位:秒) |
| upk__retry | 否 | 0 | 询问参数失败时的重试次数 |
| upk__incident_type_trans | 否 | {"info":"信息","primary":"重要","danger":"危险"} |
事故类型映射表,用于将英文类型关键词转换为中文描述 |
| upk__maintenance_strategy_trans | 否 | {"single":"单一时间窗口","manual":"手动","cron":"命令调度"} |
维护策略类型映射表,用于将英文类型关键词转换为中文描述 |
| upk__maintenance_time_template_list | 否 | {"cron":"\n⊢${cron} 周期${duration}分钟(每${interval_day}天一次)\n⊢时区 ${timezone} ${timezone_offset}"} |
维护策略描述模板映射表,支持变量替换 |
| upk__query_template | 否 | ***${title}***\n统计:${status_statistics_msg}\n${ping_statistics_msg}\n------${maintenance_msg}\n------\n${proj_msg}\n${incident_msg}\n******${took_time} |
查询结果模板,支持变量替换 |
| upk__maintenance_template | 否 | ⚠️🔵ID${id} ${title}(${strategy})\n⊢${description}${maintenance_time} |
否 |
| upk__incident_template | 否 | ————\n📣${incident_style}${title}\n${content}${incident_update_time_ret}\n———— |
公告信息模板,支持变量替换 |
| upk__status_statistics_template | 否 | ${icon}:${number} |
状态统计模板,支持变量替换 |
| upk__ping_statistics_template | 否 | 最大${max}ms 最小${min}ms 平均${argv}ms |
PING统计模板,支持变量替换 |
| upk__ava_template | 否 | 目前支持查询项目的有:${list} |
可用项查询模版,支持变量 |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| /健康 需查询项目 | 任何人 | 否 | 私聊&群聊 | 别名/uptime、/ukp |
效果图
暂无
🗺️Roadmap路线图
- 永不收费永不分版本
- 支持核心指令查询功能
- 支持配置文件配置目标站点
- 上架Nonebot商店
- 用指令更改设置
- 重构优化,解耦代码
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_uptime_kuma_puller-0.2.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_uptime_kuma_puller-0.2.2.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f90d26d3473ab9e6b81996cd42a897bd4844a43d3c26b55e97b04519442102e
|
|
| MD5 |
5662aecba82938663b6b27a6a529b624
|
|
| BLAKE2b-256 |
225227849cbbe067e31e2f8535c4d94de94a4958ee906c0d3936f7f3c9d45f34
|
Provenance
The following attestation bundles were made for nonebot_plugin_uptime_kuma_puller-0.2.2.tar.gz:
Publisher:
pypi-publish.yml on bananaxiao2333/nonebot-plugin-uptime-kuma-puller
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_uptime_kuma_puller-0.2.2.tar.gz -
Subject digest:
2f90d26d3473ab9e6b81996cd42a897bd4844a43d3c26b55e97b04519442102e - Sigstore transparency entry: 214122614
- Sigstore integration time:
-
Permalink:
bananaxiao2333/nonebot-plugin-uptime-kuma-puller@e7ce38d1595f873a46372cb9a1da5afd519be80b -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/bananaxiao2333
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e7ce38d1595f873a46372cb9a1da5afd519be80b -
Trigger Event:
release
-
Statement type:
File details
Details for the file nonebot_plugin_uptime_kuma_puller-0.2.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_uptime_kuma_puller-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6064a07ad8a28ab1d2384a2d3138ec3864f7a0baf0d17c486c1fb3c14757cb5
|
|
| MD5 |
f12e859b905474b05562d398cccf46fc
|
|
| BLAKE2b-256 |
28c49e388a0266c5c59a0d66e68559df4e9ac10c53b4e01089d69c78cda64b21
|
Provenance
The following attestation bundles were made for nonebot_plugin_uptime_kuma_puller-0.2.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on bananaxiao2333/nonebot-plugin-uptime-kuma-puller
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_uptime_kuma_puller-0.2.2-py3-none-any.whl -
Subject digest:
e6064a07ad8a28ab1d2384a2d3138ec3864f7a0baf0d17c486c1fb3c14757cb5 - Sigstore transparency entry: 214122620
- Sigstore integration time:
-
Permalink:
bananaxiao2333/nonebot-plugin-uptime-kuma-puller@e7ce38d1595f873a46372cb9a1da5afd519be80b -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/bananaxiao2333
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e7ce38d1595f873a46372cb9a1da5afd519be80b -
Trigger Event:
release
-
Statement type: