parent
							
								
									09c20413c0
								
							
						
					
					
						commit
						b4e6bc2ac8
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
# 哪吒监控
 | 
					# 哪吒监控
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
 | 
					
 | 
				
			||||||
:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。
 | 
					:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -8,7 +8,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
\>> [我们的用户](https://www.google.com/search?q="powered+by+哪吒"+"监控%7C面板"&filter=0) (Google)
 | 
					\>> [我们的用户](https://www.google.com/search?q="powered+by+哪吒"+"监控%7C面板"&filter=0) (Google)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 默认主题                                                | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru [@CokeMine](https://github.com/CokeMine)                        |
 | 
					| 默认主题                                                | DayNight [@JackieSung](https://github.com/JackieSung4ev) | hotaru                        |
 | 
				
			||||||
| ------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------- |
 | 
					| ------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------------------- |
 | 
				
			||||||
|  | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/>   | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
 | 
					|  | <img src="https://s3.ax1x.com/2021/01/20/sfJv2q.jpg"/>   | <img src="https://s3.ax1x.com/2020/12/09/rPF4xJ.png" width="1600px" /> |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										18
									
								
								resource/template/common/menu.html
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								resource/template/common/menu.html
									
									
									
									
										vendored
									
									
								
							@ -5,13 +5,16 @@
 | 
				
			|||||||
            <img src="/static/logo.png">
 | 
					            <img src="/static/logo.png">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        {{if .IsAdminPage}}
 | 
					        {{if .IsAdminPage}}
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /server"}} active{{end}}" href="/server">Agent</a>
 | 
					        <a class="item{{if eq .MatchedPath " /server"}} active{{end}}" href="/server"><i class="server icon"></i>资产</a>
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /monitor"}} active{{end}}" href="/monitor">Service</a>
 | 
					        <a class="item{{if eq .MatchedPath " /monitor"}} active{{end}}" href="/monitor"><i class="rss icon"></i>服务</a>
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /cron"}} active{{end}}" href="/cron">Cron</a>
 | 
					        <a class="item{{if eq .MatchedPath " /cron"}} active{{end}}" href="/cron"><i class="clock icon"></i>任务</a>
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /notification"}} active{{end}}" href="/notification">报警</a>
 | 
					        <a class="item{{if eq .MatchedPath " /notification"}} active{{end}}" href="/notification"><i class="bell icon"></i>报警</a>
 | 
				
			||||||
 | 
					        <a class="item{{if eq .MatchedPath " /setting"}} active{{end}}" href="/setting">
 | 
				
			||||||
 | 
					            <i class="settings icon"></i>设置
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
        {{else}}
 | 
					        {{else}}
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /"}} active{{end}}" href="/">首页</a>
 | 
					        <a class="item{{if eq .MatchedPath " /"}} active{{end}}" href="/"><i class="home icon"></i>首页</a>
 | 
				
			||||||
        <a class="item{{if eq .MatchedPath " /service"}} active{{end}}" href="/service">服务状态</a>
 | 
					        <a class="item{{if eq .MatchedPath " /service"}} active{{end}}" href="/service"><i class="rss icon"></i>服务状态</a>
 | 
				
			||||||
        {{end}}
 | 
					        {{end}}
 | 
				
			||||||
        <div class="right menu">
 | 
					        <div class="right menu">
 | 
				
			||||||
            <div class="item">
 | 
					            <div class="item">
 | 
				
			||||||
@ -23,9 +26,6 @@
 | 
				
			|||||||
                    <i class="dropdown icon"></i>
 | 
					                    <i class="dropdown icon"></i>
 | 
				
			||||||
                    <div class="menu">
 | 
					                    <div class="menu">
 | 
				
			||||||
                        {{if .IsAdminPage}}
 | 
					                        {{if .IsAdminPage}}
 | 
				
			||||||
                        <a class="item" href="/setting">
 | 
					 | 
				
			||||||
                            <i class="settings icon"></i>系统设置
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
                        <a class="item" href="/">
 | 
					                        <a class="item" href="/">
 | 
				
			||||||
                            <i class="chart area icon"></i>返回前台
 | 
					                            <i class="chart area icon"></i>返回前台
 | 
				
			||||||
                        </a>
 | 
					                        </a>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
{{define "theme-horaru/viewpassword"}}
 | 
					{{define "theme-hotaru/viewpassword"}}
 | 
				
			||||||
{{template "common/header" .}}
 | 
					{{template "common/header" .}}
 | 
				
			||||||
{{if ts .CustomCode}}
 | 
					{{if ts .CustomCode}}
 | 
				
			||||||
{{.CustomCode|safe}}
 | 
					{{.CustomCode|safe}}
 | 
				
			||||||
 | 
				
			|||||||
@ -149,7 +149,7 @@ install_dashboard() {
 | 
				
			|||||||
    command -v docker-compose >/dev/null 2>&1
 | 
					    command -v docker-compose >/dev/null 2>&1
 | 
				
			||||||
    if [[ $? != 0 ]]; then
 | 
					    if [[ $? != 0 ]]; then
 | 
				
			||||||
        echo -e "正在安装 Docker Compose"
 | 
					        echo -e "正在安装 Docker Compose"
 | 
				
			||||||
        wget -O /usr/local/bin/docker-compose "https://${GITHUB_URL}/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" >/dev/null 2>&1 &&
 | 
					        wget -O /usr/local/bin/docker-compose "https://${GITHUB_URL}/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" >/dev/null 2>&1 &&
 | 
				
			||||||
            chmod +x /usr/local/bin/docker-compose
 | 
					            chmod +x /usr/local/bin/docker-compose
 | 
				
			||||||
        if [[ $? != 0 ]]; then
 | 
					        if [[ $? != 0 ]]; then
 | 
				
			||||||
            echo -e "${red}下载脚本失败,请检查本机能否连接 ${GITHUB_URL}${plain}"
 | 
					            echo -e "${red}下载脚本失败,请检查本机能否连接 ${GITHUB_URL}${plain}"
 | 
				
			||||||
 | 
				
			|||||||
@ -13,7 +13,7 @@ import (
 | 
				
			|||||||
	pb "github.com/naiba/nezha/proto"
 | 
						pb "github.com/naiba/nezha/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var Version = "v0.4.8" // !!记得修改 README 重的 badge 版本!!
 | 
					var Version = "v0.4.9" // !!记得修改 README 重的 badge 版本!!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	SnapshotDelay = 3
 | 
						SnapshotDelay = 3
 | 
				
			||||||
 | 
				
			|||||||
@ -25,8 +25,10 @@ func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Rece
 | 
				
			|||||||
		// SSL 证书报警
 | 
							// SSL 证书报警
 | 
				
			||||||
		var errMsg string
 | 
							var errMsg string
 | 
				
			||||||
		if strings.HasPrefix(r.GetData(), "SSL证书错误:") {
 | 
							if strings.HasPrefix(r.GetData(), "SSL证书错误:") {
 | 
				
			||||||
			// 证书错误提醒
 | 
								// 排除超时错误
 | 
				
			||||||
			errMsg = r.GetData()
 | 
								if !strings.HasSuffix(r.GetData(), "i/o timeout") {
 | 
				
			||||||
 | 
									errMsg = r.GetData()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			var last model.MonitorHistory
 | 
								var last model.MonitorHistory
 | 
				
			||||||
			var newCert = strings.Split(r.GetData(), "|")
 | 
								var newCert = strings.Split(r.GetData(), "|")
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user