feat:调整nezha

This commit is contained in:
okxlin 2024-10-21 01:47:25 +08:00
parent 91ddb9745e
commit 7a268018e3
27 changed files with 494 additions and 196 deletions

View File

@ -0,0 +1,3 @@
CONTAINER_NAME="nezha-agent"
NZ_CLENT_SECRET="xxxxx"
NZ_GRPC_URL="http://1.2.3.4:5555"

View File

@ -1,14 +1,16 @@
additionalProperties:
formFields:
- envKey: NZ_GRPC_URL
labelEn: "Nezha gRPC URL"
labelZh: 哪吒 gRPC 地址
required: true
type: text
edit: true
- envKey: NZ_CLENT_SECRET
labelEn: "Nezha client secret"
labelZh: 哪吒客户端密钥
required: true
type: password
edit: true
formFields:
- default: ""
edit: true
envKey: NZ_GRPC_URL
labelEn: "Nezha gRPC URL"
labelZh: 哪吒 gRPC 地址
required: true
type: text
- default: ""
edit: true
envKey: NZ_CLENT_SECRET
labelEn: "Nezha client secret"
labelZh: 哪吒客户端密钥
required: true
type: password

View File

@ -1,8 +1,8 @@
services:
nezha-agent:
image: whoer/nezha-agent:0.20.1
image: "whoer/nezha-agent:0.20.1"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
restart: always
command: --tls -s ${NZ_GRPC_URL} -p ${NZ_CLENT_SECRET} -d
volumes:
- /etc:/etc:ro

View File

@ -1,12 +1,11 @@
name: nezha-agent
name: 哪吒监控 - Agent
tags:
- 工具
- 实用工具
title: 哪吒监控 - Agent
type: 工具
description: 哪吒监控 - Agent
additionalProperties:
key: nezha-agent
name: nezha-agent
name: 哪吒监控 - Agent
tags:
- Tool
shortDescZh: 哪吒监控 - Agent
@ -15,6 +14,6 @@ additionalProperties:
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://nezha.wiki/
website: https://nezha.wiki
github: https://github.com/naiba/nezha
document: https://nezha.wiki/guide/agent.html

View File

@ -0,0 +1,3 @@
CONTAINER_NAME="nezha-agent"
NZ_CLENT_SECRET="xxxxx"
NZ_GRPC_URL="http://1.2.3.4:5555"

View File

@ -0,0 +1,16 @@
additionalProperties:
formFields:
- default: ""
edit: true
envKey: NZ_GRPC_URL
labelEn: "Nezha gRPC URL"
labelZh: 哪吒 gRPC 地址
required: true
type: text
- default: ""
edit: true
envKey: NZ_CLENT_SECRET
labelEn: "Nezha client secret"
labelZh: 哪吒客户端密钥
required: true
type: password

View File

@ -0,0 +1,11 @@
services:
nezha-agent:
image: "whoer/nezha-agent:latest"
container_name: ${CONTAINER_NAME}
restart: always
command: --tls -s ${NZ_GRPC_URL} -p ${NZ_CLENT_SECRET} -d
volumes:
- /etc:/etc:ro
network_mode: host
labels:
createdBy: "Apps"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,138 +0,0 @@
additionalProperties:
formFields:
- default: 3000
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- envKey: NEZHA_BASE_URL
labelEn: NezhaBaseUrl
labelZh: 哪吒面板地址
required: true
type: text
edit: true
- envKey: NEZHA_AUTH
labelEn: NezhaAuth
labelZh: 哪吒面板API Token
required: true
type: text
edit: true
- default: 2000
edit: true
envKey: NEXT_PUBLIC_NezhaFetchInterval
labelEn: NezhaFetchInterval
labelZh: 获取数据间隔(毫秒)
required: true
type: text
- default: https://nezha-cf.buycoffee.top/apple-touch-icon.png
edit: true
envKey: NEXT_PUBLIC_CustomLogo
labelEn: CustomLogo
labelZh: 自定义Logo
required: true
type: text
- default: Nezha-Dash
edit: true
envKey: NEXT_PUBLIC_CustomTitle
labelEn: CustomTitle
labelZh: 自定义标题
required: true
type: text
- default: Nezha-Dash
edit: true
envKey: NEXT_PUBLIC_CustomDescription
labelEn: CustomDescription
labelZh: 自定义描述
required: true
type: text
- default: "zh"
edit: true
envKey: DEFAULT_LOCALE
labelEn: DefaultLocale
labelZh: 默认语言
required: true
type: select
values:
- label: "简体中文"
value: "zh"
- label: "繁体中文"
value: "zh-t"
- label: "English"
value: "en"
- label: "日本語"
value: "ja"
- default: "否"
edit: true
envKey: ForceShowAllServers
labelEn: ForceShowAllServers
labelZh: 是否强制显示所有服务器
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"
- default: "否"
edit: true
envKey: NEXT_PUBLIC_ShowFlag
labelEn: ShowFlag
labelZh: 是否显示旗帜
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"
- default: "否"
edit: true
envKey: NEXT_PUBLIC_DisableCartoon
labelEn: DisableCartoon
labelZh: 是否禁用卡通人物
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"
- default: "否"
edit: true
envKey: NEXT_PUBLIC_ShowTag
labelEn: ShowTag
labelZh: 是否显示标签
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"
- default: "否"
edit: true
envKey: NEXT_PUBLIC_ShowNetTransfer
labelEn: ShowNetTransfer
labelZh: 是否显示流量信息
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"
- default: "否"
edit: true
envKey: NEXT_PUBLIC_ForceUseSvgFlag
labelEn: ForceUseSvgFlag
labelZh: 是否强制使用SVG旗帜
required: true
type: select
values:
- label: "是"
value: "true"
- label: "否"
value: "false"

View File

@ -0,0 +1,15 @@
CONTAINER_NAME="nezha-dash"
DEFAULT_LOCALE="zh"
ForceShowAllServers="false"
NEXT_PUBLIC_CustomDescription="Nezha-Dash"
NEXT_PUBLIC_CustomLogo="https://nezha-cf.buycoffee.top/apple-touch-icon.png"
NEXT_PUBLIC_CustomTitle="Nezha-Dash"
NEXT_PUBLIC_DisableCartoon="false"
NEXT_PUBLIC_ForceUseSvgFlag="false"
NEXT_PUBLIC_NezhaFetchInterval=2000
NEXT_PUBLIC_ShowFlag="false"
NEXT_PUBLIC_ShowNetTransfer="false"
NEXT_PUBLIC_ShowTag="false"
NEZHA_AUTH="xxxx"
NEZHA_BASE_URL="http://1.2.3.4"
PANEL_APP_PORT_HTTP=40309

View File

@ -0,0 +1,140 @@
additionalProperties:
formFields:
- default: "40309"
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ""
envKey: NEZHA_BASE_URL
labelEn: Nezha Base Url
labelZh: 哪吒面板地址
required: true
type: text
edit: true
- default: ""
envKey: NEZHA_AUTH
labelEn: Nezha API Token
labelZh: 哪吒面板 API Token
required: true
type: text
edit: true
- default: "2000"
edit: true
envKey: NEXT_PUBLIC_NezhaFetchInterval
labelEn: Nezha Fetch Interval
labelZh: 获取数据间隔(毫秒)
required: true
type: number
- default: "https://nezha-cf.buycoffee.top/apple-touch-icon.png"
edit: true
envKey: NEXT_PUBLIC_CustomLogo
labelEn: Custom Logo
labelZh: 自定义 Logo
required: true
type: text
- default: "Nezha-Dash"
edit: true
envKey: NEXT_PUBLIC_CustomTitle
labelEn: Custom Title
labelZh: 自定义标题
required: true
type: text
- default: "Nezha-Dash"
edit: true
envKey: NEXT_PUBLIC_CustomDescription
labelEn: Custom Description
labelZh: 自定义描述
required: true
type: text
- default: "zh"
edit: true
envKey: DEFAULT_LOCALE
labelEn: DefaultLocale
labelZh: 默认语言
required: true
type: select
values:
- label: "简体中文"
value: "zh"
- label: "繁体中文"
value: "zh-t"
- label: "English"
value: "en"
- label: "日本語"
value: "ja"
- default: "false"
edit: true
envKey: ForceShowAllServers
labelEn: Force Show All Servers
labelZh: 是否强制显示所有服务器
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowFlag
labelEn: Show Flag
labelZh: 是否显示旗帜
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_DisableCartoon
labelEn: Disable Cartoon
labelZh: 是否禁用卡通人物
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowTag
labelEn: Show Tag
labelZh: 是否显示标签
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowNetTransfer
labelEn: Show Net Transfer
labelZh: 是否显示流量信息
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ForceUseSvgFlag
labelEn: Force Use Svg Flag
labelZh: 是否强制使用 SVG 旗帜
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"

View File

@ -20,7 +20,7 @@ services:
- NEXT_PUBLIC_CustomLogo=${NEXT_PUBLIC_CustomLogo}
- NEXT_PUBLIC_CustomTitle=${NEXT_PUBLIC_CustomTitle}
- NEXT_PUBLIC_CustomDescription=${NEXT_PUBLIC_CustomDescription}
image: hamster1963/nezha-dash:v0.6.0-fix
image: "hamster1963/nezha-dash:v0.6.2"
labels:
createdBy: "Apps"

View File

@ -1,12 +1,11 @@
name: nezha-dash
name: NezhaDash
tags:
- 工具
- 实用工具
title: 一个基于 Next.js 和 哪吒监控 的仪表盘
type: 工具
description: 一个基于 Next.js 和 哪吒监控 的仪表盘
additionalProperties:
key: nezha-dash
name: nezha-dash
name: NezhaDash
tags:
- Tool
shortDescZh: 一个基于 Next.js 和 哪吒监控 的仪表盘
@ -15,6 +14,6 @@ additionalProperties:
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://nezha-cf.buycoffee.top/zh
website: https://nezha-cf.buycoffee.top
github: https://github.com/hamster1963/nezha-dash
document: https://github.com/hamster1963/nezha-dash?tab=readme-ov-file#nezhadash
document: https://github.com/hamster1963/nezha-dash

View File

@ -0,0 +1,15 @@
CONTAINER_NAME="nezha-dash"
DEFAULT_LOCALE="zh"
ForceShowAllServers="false"
NEXT_PUBLIC_CustomDescription="Nezha-Dash"
NEXT_PUBLIC_CustomLogo="https://nezha-cf.buycoffee.top/apple-touch-icon.png"
NEXT_PUBLIC_CustomTitle="Nezha-Dash"
NEXT_PUBLIC_DisableCartoon="false"
NEXT_PUBLIC_ForceUseSvgFlag="false"
NEXT_PUBLIC_NezhaFetchInterval=2000
NEXT_PUBLIC_ShowFlag="false"
NEXT_PUBLIC_ShowNetTransfer="false"
NEXT_PUBLIC_ShowTag="false"
NEZHA_AUTH="xxxx"
NEZHA_BASE_URL="http://1.2.3.4"
PANEL_APP_PORT_HTTP=40309

View File

@ -0,0 +1,140 @@
additionalProperties:
formFields:
- default: "40309"
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ""
envKey: NEZHA_BASE_URL
labelEn: Nezha Base Url
labelZh: 哪吒面板地址
required: true
type: text
edit: true
- default: ""
envKey: NEZHA_AUTH
labelEn: Nezha API Token
labelZh: 哪吒面板 API Token
required: true
type: text
edit: true
- default: "2000"
edit: true
envKey: NEXT_PUBLIC_NezhaFetchInterval
labelEn: Nezha Fetch Interval
labelZh: 获取数据间隔(毫秒)
required: true
type: number
- default: "https://nezha-cf.buycoffee.top/apple-touch-icon.png"
edit: true
envKey: NEXT_PUBLIC_CustomLogo
labelEn: Custom Logo
labelZh: 自定义 Logo
required: true
type: text
- default: "Nezha-Dash"
edit: true
envKey: NEXT_PUBLIC_CustomTitle
labelEn: Custom Title
labelZh: 自定义标题
required: true
type: text
- default: "Nezha-Dash"
edit: true
envKey: NEXT_PUBLIC_CustomDescription
labelEn: Custom Description
labelZh: 自定义描述
required: true
type: text
- default: "zh"
edit: true
envKey: DEFAULT_LOCALE
labelEn: DefaultLocale
labelZh: 默认语言
required: true
type: select
values:
- label: "简体中文"
value: "zh"
- label: "繁体中文"
value: "zh-t"
- label: "English"
value: "en"
- label: "日本語"
value: "ja"
- default: "false"
edit: true
envKey: ForceShowAllServers
labelEn: Force Show All Servers
labelZh: 是否强制显示所有服务器
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowFlag
labelEn: Show Flag
labelZh: 是否显示旗帜
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_DisableCartoon
labelEn: Disable Cartoon
labelZh: 是否禁用卡通人物
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowTag
labelEn: Show Tag
labelZh: 是否显示标签
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ShowNetTransfer
labelEn: Show Net Transfer
labelZh: 是否显示流量信息
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: NEXT_PUBLIC_ForceUseSvgFlag
labelEn: Force Use Svg Flag
labelZh: 是否强制使用 SVG 旗帜
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"

View File

@ -0,0 +1,29 @@
services:
nezha-dash:
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:3000"
environment:
- NezhaBaseUrl=${NEZHA_BASE_URL}
- NezhaAuth=${NEZHA_AUTH}
- DefaultLocale=${DEFAULT_LOCALE}
- ForceShowAllServers=${ForceShowAllServers}
- NEXT_PUBLIC_NezhaFetchInterval=${NEXT_PUBLIC_NezhaFetchInterval}
- NEXT_PUBLIC_ShowFlag=${NEXT_PUBLIC_ShowFlag}
- NEXT_PUBLIC_DisableCartoon=${NEXT_PUBLIC_DisableCartoon}
- NEXT_PUBLIC_ShowTag=${NEXT_PUBLIC_ShowTag}
- NEXT_PUBLIC_ShowNetTransfer=${NEXT_PUBLIC_ShowNetTransfer}
- NEXT_PUBLIC_ForceUseSvgFlag=${NEXT_PUBLIC_ForceUseSvgFlag}
- NEXT_PUBLIC_CustomLogo=${NEXT_PUBLIC_CustomLogo}
- NEXT_PUBLIC_CustomTitle=${NEXT_PUBLIC_CustomTitle}
- NEXT_PUBLIC_CustomDescription=${NEXT_PUBLIC_CustomDescription}
image: "hamster1963/nezha-dash:latest"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 708 B

View File

@ -0,0 +1,3 @@
CONTAINER_NAME="nezha-dashboard"
PANEL_APP_PORT_GRPC=5555
PANEL_APP_PORT_HTTP=40308

View File

@ -1,18 +1,18 @@
additionalProperties:
formFields:
- default: 3000
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: HTTP Port
labelZh: HTTP 端口
required: true
rule: paramPort
type: number
- default: 5555
edit: true
envKey: PANEL_APP_PORT_GRPC
labelEn: GRPC Port
labelZh: GRPC 端口
required: true
rule: paramPort
type: number
formFields:
- default: "40308"
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: HTTP Port
labelZh: HTTP 端口
required: true
rule: paramPort
type: number
- default: "5555"
edit: true
envKey: PANEL_APP_PORT_GRPC
labelEn: GRPC Port
labelZh: GRPC 端口
required: true
rule: paramPort
type: number

View File

@ -1,8 +1,8 @@
services:
nezha-dashboard:
image: ghcr.io/naiba/nezha-dashboard:v0.20.4
image: "ghcr.io/naiba/nezha-dashboard:v0.20.4"
container_name: ${CONTAINER_NAME}
restart: unless-stopped
restart: always
volumes:
- ./data:/dashboard/data
- ./config.yaml:/dashboard/data/config.yaml

View File

@ -16,3 +16,11 @@ Nezha Dashboard 是一款强大的开源监控和可视化工具,主要用于
- **开放API**:提供 RESTful API方便与其他系统集成。
Nezha Dashboard 是一个高度可定制、可扩展的监控平台,适合不同规模的用户,帮助运维人员和开发者及时掌握系统健康状态,进行系统调优与性能管理。
## 使用说明
可以通过编辑目录下的配置文件来修改一些配置。
例如:
```
/opt/1panel/apps/local/nezha-dashboard/nezha-dashboard/config.yaml
```

View File

@ -1,12 +1,11 @@
name: nezha-dashboard
name: 哪吒监控 - Dashboard
tags:
- 工具
- 实用工具
title: 哪吒监控 - Dashboard
type: 工具
description: 哪吒监控 - Dashboard
additionalProperties:
key: nezha-dashboard
name: nezha-dashboard
name: 哪吒监控 - Dashboard
tags:
- Tool
shortDescZh: 哪吒监控 - Dashboard
@ -15,6 +14,6 @@ additionalProperties:
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://nezha.wiki/
website: https://nezha.wiki
github: https://github.com/naiba/nezha
document: https://nezha.wiki/guide/dashboard.html

View File

@ -0,0 +1,3 @@
CONTAINER_NAME="nezha-dashboard"
PANEL_APP_PORT_GRPC=5555
PANEL_APP_PORT_HTTP=40308

View File

@ -0,0 +1,14 @@
debug: false
httpport: 80 # HTTP 端口,请勿修改
nz_language: zh-CN # 语言zh-CN/zh-TW/en-US/es-ES
grpcport: 5555 # gRPC 端口,请勿修改
oauth2: # Oauth2 登录接入,查看 https://nezha.wiki/guide/dashboard.html
type: "nz_oauth2_type" # Oauth2 登录接入类型github/gitlab/jihulab/gitee/gitea
admin: "nz_admin_logins" # 管理员列表,半角逗号隔开
clientid: "nz_github_oauth_client_id" # 在 https://github.com/settings/developers 创建,无需审核 Callback 填 http(s)://域名或IP/oauth2/callback
clientsecret: "nz_github_oauth_client_secret"
endpoint: "" # 如gitea自建需要设置
site:
brand: "nz_site_title" # 网站标题
cookiename: "nezha-dashboard" # 浏览器 Cookie 字段名,可不改
theme: "default" # 主题default/daynight/mdui/hotaru/angel-kanade/server-status

View File

@ -0,0 +1,18 @@
additionalProperties:
formFields:
- default: "40308"
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: HTTP Port
labelZh: HTTP 端口
required: true
rule: paramPort
type: number
- default: "5555"
edit: true
envKey: PANEL_APP_PORT_GRPC
labelEn: GRPC Port
labelZh: GRPC 端口
required: true
rule: paramPort
type: number

View File

@ -0,0 +1,19 @@
services:
nezha-dashboard:
image: "ghcr.io/naiba/nezha-dashboard:latest"
container_name: ${CONTAINER_NAME}
restart: always
volumes:
- ./data:/dashboard/data
- ./config.yaml:/dashboard/data/config.yaml
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:80
- ${PANEL_APP_PORT_GRPC}:5555
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB