nezha

module
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: Apache-2.0

README



LOGO designed by 熊大 .

GitHub release (with filter)

:trollface: Nezha Dashboard Compat: Based on V0, Provide V1 Dashboard API.

:trollface: 哪吒面板兼容版: 基于 V0 版本提供 V1 的面板 API 。

Forked from: RefactorAI/nezha:v0-final

Usage / 用法

Just like original Nezha Monitoring, to install or upgrade from original version:

和原版类似,要安装或者从原版中升级到兼容版:

curl -L https://raw.githubusercontent.com/chenx-dust/nezha-compat/compat/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

Then follow the prompt. English version temporarily not provided.

然后跟随指引即可。暂不提供英语版本。

Compatible API / 兼容 API

所有已实现的 v1 API 在文件 compat_v1.go 中。目前支持了:

  • 前台界面的所有 API (包括 WebSocket)
  • 后台界面的部分只读 API
    • 支持基于 API Key 的登录
    • 支持服务器、告警、通知的信息获取
    • 可以兼容 hiDandelion/Nezha-Mobile 的大部分只读功能
  • 关于鉴权
    • 基于 API Key 实现的鉴权
    • 支持模仿 /api/v1/login 接口实现登录
      • 账号:API Key 对应备注
      • 密码: API Key
    • 支持三种提供 API Key 的方式
      • Cookie: nz-jwt (v1 版本默认使用)
      • Header: Authorization: Bearer <API Key> (v1 版本 API 使用)
      • Header: Authorization: <API Key> (v0 版本 API 使用)
    • 强制设置网站 CookieName 为 nz-jwt 便于保证兼容性

Acknowledge / 致谢

Directories

Path Synopsis
cmd
dashboard command
dashboard/controller
为 v1 版本提供兼容接口
为 v1 版本提供兼容接口
pkg
service
rpc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL