🔖 chore: rename 哪吒面板 -> 哪吒监控

This commit is contained in:
naiba 2021-02-07 09:51:55 +08:00
parent 869a889301
commit 748346f986
10 changed files with 88 additions and 88 deletions

142
README.md
View File

@ -1,87 +1,36 @@
# 哪吒面板 # 哪吒监控
![dashboard](https://img.shields.io/badge/管理面板-v0.4.7-brightgreen?style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=%E9%9D%A2%E6%9D%BF%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20%E6%9E%84%E5%BB%BA&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.4.4-brightgreen?style=for-the-badge&logo=linux) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=管理面板%20v0.4.8&logo=github&style=for-the-badge) ![Agent release](https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge) ![shell](https://img.shields.io/badge/安装脚本-v0.4.5-brightgreen?style=for-the-badge&logo=linux)
系统状态监控报警、API(SSL 证书变更、即将到期、到期)/TCP 端口存活/PING 监控、计划任务(可以定时在 Agent 上执行命令备份、重启、What ever you want)、极省资源64M 服务器也能装 agent。 :trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,批量执行命令和计划任务。
\>> [查看针友列表](https://www.google.com/search?q=%22powered+by+%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22&filter=0) (Google)
\>> QQ 交流群955957790 \>> QQ 交流群955957790
\>> [我们的用户](https://www.google.com/search?q=%22powered+by+%E5%93%AA%E5%90%92%E7%9B%91%E6%8E%A7%22&filter=0) (Google)
| 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) | | 默认主题 | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine) |
| ------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------- | | ------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------- |
| ![首页截图1](https://s3.ax1x.com/2020/12/07/DvTCwD.jpg) | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/> | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> | | ![首页截图1](https://s3.ax1x.com/2020/12/07/DvTCwD.jpg) | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/> | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
## 一键脚本 ## 安装脚本
建议使用 WatchTower 自动更新面板Windows 终端可以使用 nssm 配置自启动(见尾部教程) 建议使用 WatchTower 自动更新面板Windows 终端可以使用 nssm 配置自启动(见尾部教程)
- 海外:
```shell ```shell
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
./nezha.sh ./nezha.sh
``` ```
- 国内加速:(有缓存可能不是最新的,非作者维护)
```shell
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
CN=true ./nezha.sh
```
## 功能说明
<details> <details>
<summary>自定义代码去版权、改LOGO、改色调、加统计代码等。</summary> <summary>国内镜像加速:(有缓存,版本更新不及时,能不用尽量不用,非作者维护)</summary>
- 默认主题更改进度条颜色示例 ```shell
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
CN=true ./nezha.sh
```
</details>
``` ## 功能说明
<style>
.ui.fine.progress> .bar {
background-color: pink !important;
}
</style>
```
- 默认主题修改 LOGO、移除版权示例来自 [@iLay1678](https://github.com/iLay1678),欢迎 PR
```
<style>
.right.menu>a{
visibility: hidden;
}
.footer .is-size-7{
visibility: hidden;
}
.item img{
visibility: hidden;
}
</style>
<script>
window.onload = function(){
var avatar=document.querySelector(".item img")
var footer=document.querySelector("div.is-size-7")
footer.innerHTML="Powered by 你的名字"
footer.style.visibility="visible"
avatar.src="你的方形logo地址"
avatar.style.visibility="visible"
}
</script>
```
- hotaru 主题更改背景图片示例
```
<style>
.hotaru-cover {
background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
}
</style>
```
</details>
<details> <details>
<summary>计划任务:备份脚本、服务重启,等定期运维任务。</summary> <summary>计划任务:备份脚本、服务重启,等定期运维任务。</summary>
@ -156,6 +105,57 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
</details> </details>
<details>
<summary>自定义代码改LOGO、改色调、加统计代码等。</summary>
- 默认主题更改进度条颜色示例
```
<style>
.ui.fine.progress> .bar {
background-color: pink !important;
}
</style>
```
- 默认主题修改 LOGO、移除版权示例来自 [@iLay1678](https://github.com/iLay1678),欢迎 PR
```
<style>
.right.menu>a{
visibility: hidden;
}
.footer .is-size-7{
visibility: hidden;
}
.item img{
visibility: hidden;
}
</style>
<script>
window.onload = function(){
var avatar=document.querySelector(".item img")
var footer=document.querySelector("div.is-size-7")
footer.innerHTML="Powered by 你的名字"
footer.style.visibility="visible"
avatar.src="你的方形logo地址"
avatar.style.visibility="visible"
}
</script>
```
- hotaru 主题更改背景图片示例
```
<style>
.hotaru-cover {
background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
}
</style>
```
</details>
## 常见问题 ## 常见问题
<details> <details>
@ -243,11 +243,11 @@ restart() {
} }
``` ```
</details> </details>
## 社区文章 ## 社区文章
- [哪吒探针 - Windows 客户端安装](https://nyko.me/2020/12/13/nezha-windows-client.html) - [哪吒探针 - Windows 客户端安装](https://nyko.me/2020/12/13/nezha-windows-client.html)
- [哪吒面板,一个便携服务器状态监控面板搭建教程,不想拥有一个自己的探针吗?](https://haoduck.com/644.html) - [哪吒监控,一个便携服务器状态监控面板搭建教程,不想拥有一个自己的探针吗?](https://haoduck.com/644.html)
- [哪吒面板:小鸡们的最佳探针](https://www.zhujizixun.com/2843.html) _已过时_ - [哪吒监控:小鸡们的最佳探针](https://www.zhujizixun.com/2843.html) _已过时_
- [>>更多教程](https://www.google.com/search?q=%22%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%22+%22%E6%95%99%E7%A8%8B%22) (Google) - [>>更多教程](https://www.google.com/search?q=%22%E5%93%AA%E5%90%92%E9%9D%A2%E6%9D%BF%7C%E5%93%AA%E5%90%92%E7%9B%91%E6%8E%A7%22+%22%E6%95%99%E7%A8%8B%22) (Google)

View File

@ -80,7 +80,7 @@ func main() {
dao.Version = version dao.Version = version
var debug bool var debug bool
flag.String("i", "", "unused 旧Agent兼容") flag.String("i", "", "unused 旧Agent配置兼容")
flag.BoolVar(&debug, "d", false, "允许不安全连接") flag.BoolVar(&debug, "d", false, "允许不安全连接")
flag.StringVar(&server, "s", "localhost:5555", "管理面板RPC端口") flag.StringVar(&server, "s", "localhost:5555", "管理面板RPC端口")
flag.StringVar(&clientSecret, "p", "", "Agent连接Secret") flag.StringVar(&clientSecret, "p", "", "Agent连接Secret")

View File

@ -2,7 +2,7 @@
<div class="ui inverted vertical footer segment"> <div class="ui inverted vertical footer segment">
<div class="ui center aligned is-size-7 container"> <div class="ui center aligned is-size-7 container">
<b>&copy; <a style="color: white;" href="/">{{.Conf.Site.Brand}}</a></b> | <small>Powered by <a href="https://github.com/naiba/nezha" <b>&copy; <a style="color: white;" href="/">{{.Conf.Site.Brand}}</a></b> | <small>Powered by <a href="https://github.com/naiba/nezha"
style="color: white;" target="_blank">哪吒面板</a> {{.Version}}</small> style="color: white;" target="_blank">哪吒监控</a> {{.Version}}</small>
</div> </div>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>

View File

@ -6,7 +6,7 @@
<form id="settingForm" class="ui large form" onsubmit="return false;"> <form id="settingForm" class="ui large form" onsubmit="return false;">
<div class="field"> <div class="field">
<label>站点标题</label> <label>站点标题</label>
<input type="text" name="Title" placeholder="哪吒面板" value="{{.Conf.Site.Brand}}"> <input type="text" name="Title" placeholder="哪吒监控" value="{{.Conf.Site.Brand}}">
</div> </div>
<div class="field"> <div class="field">
<label>管理员列表</label> <label>管理员列表</label>

View File

@ -140,7 +140,7 @@
<footer> <footer>
<div class="footer-container"> <div class="footer-container">
<div><a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒面板 · {{.Version}}</a> <div><a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒监控 · {{.Version}}</a>
<p>&copy; <span id="copyright-date"> <p>&copy; <span id="copyright-date">
<script>document.getElementById('copyright-date').appendChild(document.createTextNode(new Date().getFullYear()))</script> <script>document.getElementById('copyright-date').appendChild(document.createTextNode(new Date().getFullYear()))</script>
</span> · <a href="https://blog.jackiesung.com" target="_blank">Theme designed by Jackie Sung</a> </span> · <a href="https://blog.jackiesung.com" target="_blank">Theme designed by Jackie Sung</a>

View File

@ -108,7 +108,7 @@
<footer> <footer>
<div class="footer-container"> <div class="footer-container">
<div> <div>
<a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒面板 · {{.Version}}</a> <a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒监控 · {{.Version}}</a>
<p> <p>
&copy; &copy;
<span id="copyright-date" <span id="copyright-date"

View File

@ -34,7 +34,7 @@
<footer> <footer>
<div class="footer-container"> <div class="footer-container">
<div> <div>
<a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒面板 · {{.Version}}</a> <a href="https://github.com/naiba/nezha" target="_blank">Powered by 哪吒监控 · {{.Version}}</a>
<p> <p>
&copy;<span id="copyright-date" &copy;<span id="copyright-date"
><script> ><script>

View File

@ -133,7 +133,7 @@
</div> </div>
</div> </div>
<footer> <footer>
<p style="text-align:center;padding: 15px;">Powered by <a href="https://github.com/naiba/nezha">哪吒面板</a> build · <p style="text-align:center;padding: 15px;">Powered by <a href="https://github.com/naiba/nezha">哪吒监控</a> build ·
{{.Version}} {{.Version}}
<a href="/service">服务状态</a> <a href="/service">服务状态</a>
<a href="/server">管理后台</a> <a href="/server">管理后台</a>

View File

@ -2,7 +2,7 @@
#====================================================== #======================================================
# System Required: CentOS 7+ / Debian 8+ / Ubuntu 16+ # System Required: CentOS 7+ / Debian 8+ / Ubuntu 16+
# Description: 哪吒面板安装脚本 # Description: 哪吒监控安装脚本
# Github: https://github.com/naiba/nezha # Github: https://github.com/naiba/nezha
#====================================================== #======================================================
@ -10,7 +10,7 @@ NZ_BASE_PATH="/opt/nezha"
NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard" NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent" NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service" NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
NZ_VERSION="v0.4.4" NZ_VERSION="v0.4.5"
red='\033[0;31m' red='\033[0;31m'
green='\033[0;32m' green='\033[0;32m'
@ -129,7 +129,7 @@ install_dashboard() {
echo -e "> 安装面板" echo -e "> 安装面板"
# 哪吒面板文件夹 # 哪吒监控文件夹
mkdir -p $NZ_DASHBOARD_PATH mkdir -p $NZ_DASHBOARD_PATH
chmod 777 -R $NZ_DASHBOARD_PATH chmod 777 -R $NZ_DASHBOARD_PATH
@ -170,7 +170,7 @@ install_agent() {
echo -e "> 安装监控Agent" echo -e "> 安装监控Agent"
# 哪吒面板文件夹 # 哪吒监控文件夹
mkdir -p $NZ_AGENT_PATH mkdir -p $NZ_AGENT_PATH
chmod 777 -R $NZ_AGENT_PATH chmod 777 -R $NZ_AGENT_PATH
@ -292,7 +292,7 @@ restart_and_update() {
docker-compose down docker-compose down
docker-compose up -d docker-compose up -d
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
echo -e "${green}哪吒面板 重启成功${plain}" echo -e "${green}哪吒监控 重启成功${plain}"
echo -e "默认管理面板地址:${yellow}域名:站点访问端口${plain}" echo -e "默认管理面板地址:${yellow}域名:站点访问端口${plain}"
else else
echo -e "${red}重启失败,可能是因为启动时间超过了两秒,请稍后查看日志信息${plain}" echo -e "${red}重启失败,可能是因为启动时间超过了两秒,请稍后查看日志信息${plain}"
@ -308,7 +308,7 @@ start_dashboard() {
cd $NZ_DASHBOARD_PATH && docker-compose up -d cd $NZ_DASHBOARD_PATH && docker-compose up -d
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
echo -e "${green}哪吒面板 启动成功${plain}" echo -e "${green}哪吒监控 启动成功${plain}"
else else
echo -e "${red}启动失败,请稍后查看日志信息${plain}" echo -e "${red}启动失败,请稍后查看日志信息${plain}"
fi fi
@ -323,7 +323,7 @@ stop_dashboard() {
cd $NZ_DASHBOARD_PATH && docker-compose down cd $NZ_DASHBOARD_PATH && docker-compose down
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
echo -e "${green}哪吒面板 停止成功${plain}" echo -e "${green}哪吒监控 停止成功${plain}"
else else
echo -e "${red}停止失败,请稍后查看日志信息${plain}" echo -e "${red}停止失败,请稍后查看日志信息${plain}"
fi fi
@ -399,7 +399,7 @@ clean_all() {
} }
show_usage() { show_usage() {
echo "哪吒面板 管理脚本使用方法: " echo "哪吒监控 管理脚本使用方法: "
echo "--------------------------------------------------------" echo "--------------------------------------------------------"
echo "./nbdomain.sh - 显示管理菜单" echo "./nbdomain.sh - 显示管理菜单"
echo "./nbdomain.sh install_dashboard - 安装面板端" echo "./nbdomain.sh install_dashboard - 安装面板端"
@ -420,7 +420,7 @@ show_usage() {
show_menu() { show_menu() {
echo -e " echo -e "
${green}哪吒面板管理脚本${plain} ${red}${NZ_VERSION}${plain} ${green}哪吒监控管理脚本${plain} ${red}${NZ_VERSION}${plain}
--- https://github.com/naiba/nezha --- --- https://github.com/naiba/nezha ---
${green}0.${plain} 退出脚本 ${green}0.${plain} 退出脚本
————————————————- ————————————————-

View File

@ -13,7 +13,7 @@ import (
pb "github.com/naiba/nezha/proto" pb "github.com/naiba/nezha/proto"
) )
var Version = "v0.4.7" // !!记得修改 README 重的 badge 版本!! var Version = "v0.4.8" // !!记得修改 README 重的 badge 版本!!
const ( const (
SnapshotDelay = 3 SnapshotDelay = 3