Skip to main content

This is a plugin that can generate a UptimeKuma status page summary for your Nonebot

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-uptime-kuma-puller

✨ NoneBot UptimeKuma 抓取 ✨

license pypi python

这是一个简单插件,它可以从指定的UptimeKuma展示页面抓取消息并且发送出去。

📖 介绍

这个插件在触发指令时从指定UptimeKuma网站的指定状态页面抓取内容,返回各项在线情况并且写出钉选的通知

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-uptime-kuma-puller
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-uptime-kuma-puller
pdm
pdm add nonebot-plugin-uptime-kuma-puller
poetry
poetry add nonebot-plugin-uptime-kuma-puller
conda
conda 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__up_status 🟢 在线状态标识
upk__down_status 🔴 离线状态标识
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__timeout 30 API 请求超时时间(单位:秒)
upk__retry 2 API 请求失败时的重试次数
upk__incident_type_trans {"info":"信息","primary":"重要","danger":"危险"} 事故类型映射表,用于将英文类型关键词转换为中文描述
upk__query_template ***${title}***\n${main}\n****** 查询结果模板,支持变量替换
upk__incident_template ————\n📣${incident_style}${title}\n${content}${incident_update_time_ret}\n———— 公告信息模板,支持变量替换

🎉 使用

指令表

指令 权限 需要@ 范围 说明
/健康 需查询项目 任何人 私聊&群聊 别名/uptime、/ukp

效果图

暂无

🗺️Roadmap路线图

  • 永不收费永不分版本
  • 支持核心指令查询功能
  • 支持配置文件配置目标站点
  • 上架Nonebot商店
  • 用指令更改设置

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_uptime_kuma_puller-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file nonebot_plugin_uptime_kuma_puller-0.1.1.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_uptime_kuma_puller-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b98d1905224c1c46d3105899faaf892af608f0b88766e49dd44689a429f2f2b8
MD5 782cfc09c0bf42b3db0acb8113c72b7a
BLAKE2b-256 aea006c0e79e308ad9ef66627f0cd43b937f82cf58377bc71494272f2758da9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_uptime_kuma_puller-0.1.1.tar.gz:

Publisher: pypi-publish.yml on bananaxiao2333/nonebot-plugin-uptime-kuma-puller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nonebot_plugin_uptime_kuma_puller-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_uptime_kuma_puller-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 854c8dd6a68e8f78c8f92d4471cdcecd1defbeff8b4df2dbf55536fd39224e6c
MD5 94bd00c7b62df1443d5b2cc3853390ba
BLAKE2b-256 e3908951fc84730a96514c7e539eda80284734a25c92b4df87bfe7e20eff4b63

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_uptime_kuma_puller-0.1.1-py3-none-any.whl:

Publisher: pypi-publish.yml on bananaxiao2333/nonebot-plugin-uptime-kuma-puller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page