📝 Agent 无法启动一般解决办法

This commit is contained in:
naiba 2021-08-09 14:55:08 +08:00
parent 4e1f8143eb
commit 6ece7fd9de
3 changed files with 110 additions and 98 deletions

View File

@ -4,7 +4,7 @@
<br>
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
<br><br>
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.9.15&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.6.5-brightgreen?style=for-the-badge&logo=linux">
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.9.16&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github">&nbsp;<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge">&nbsp;<img src="https://img.shields.io/badge/Installer-v0.6.5-brightgreen?style=for-the-badge&logo=linux">
<br>
<br>
<p>:trollface: <b>哪吒监控</b> 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,命令批量执行和计划任务。</p>
@ -218,6 +218,13 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
</details>
<details>
<summary>Agent 不断重启/无法启动 </summary>
1. 直接执行 `/opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d` 查看是否是 DNS 问题 或 Agent 出口网络/面板入口网络防火墙问题,自行解决。
2. 如果上面命令执行正常Agent 正常上线,尝试关闭 SELinux[如何关闭 SELinux](https://www.google.com/search?q=%E5%85%B3%E9%97%ADSELINUX)
</details>
<details>
<summary>如何使 OpenWrt/LEDE 自启动?来自 @艾斯德斯</summary>

View File

@ -23,20 +23,15 @@
<section class="nav-bar clearfix">
<figure class="logo">
<a href="/">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 88 88">
<g>
<path fill="#1d71b8" d="M81.46,20.89l-.26.26-9.71,9.71h0l-9.41,9.4-9.56,9.56,0,0L43,59.36l0,0,0,0-9.58-9.58-9.46-9.47-9.77,9.77L3.36,61A43.92,43.92,0,0,1,0,45.2v0L14.35,30.81l6-6,3.52-3.52,9.57,9.58L43,40.29l0,0,9.55-9.55L63,20.22a30.47,30.47,0,0,0-26.69-5.69L25.75,4A44,44,0,0,1,72.64,10.6,44.36,44.36,0,0,1,81.46,20.89Z" />
<path fill="#36a9e1" d="M88,44A44,44,0,0,1,10.58,72.66L20.21,63a30.45,30.45,0,0,0,54.06-15.6L87,34.68A44.15,44.15,0,0,1,88,44Z" />
</g>
</svg>
<img src="/static/logo.svg?v20210804" alt="哪吒监控" width="50" height="50">
</a>
<a href="/">{{.Conf.Site.Brand}}</a>
</figure>
<div class="icon-container">
<div class="row cf">
<div class="three col">
<div class="hamburger" id="hamburger-icon"><span class="line"></span><span class="line"></span><span
class="line"></span></div>
<div class="hamburger" id="hamburger-icon"><span class="line"></span><span
class="line"></span><span class="line"></span></div>
</div>
</div>
</div>
@ -75,8 +70,10 @@
<li>@#server.State?secondToDate(server.State.Uptime):'-'#@</li>
<li>@#formatByteSize(server.State.SwapUsed)#@ / @#formatByteSize(server.Host.SwapTotal)#@</li>
<li>@#formatByteSize(server.State.DiskUsed)#@ / @#formatByteSize(server.Host.DiskTotal)#@</li>
<li>@#formatByteSize(server.State.NetInTransfer)#@ (@#formatByteSize(server.State.NetInSpeed)#@/s)</li>
<li>@#formatByteSize(server.State.NetOutTransfer)#@ (@#formatByteSize(server.State.NetOutSpeed)#@/s)</li>
<li>@#formatByteSize(server.State.NetInTransfer)#@
(@#formatByteSize(server.State.NetInSpeed)#@/s)</li>
<li>@#formatByteSize(server.State.NetOutTransfer)#@
(@#formatByteSize(server.State.NetOutSpeed)#@/s)</li>
<li>
<div class="cpu-bar">
<div>
@ -84,7 +81,9 @@
</div>
<div v-if="server.State" :class="formatPercent(server.live,server.State.CPU, 100).class"
:title="formatPercent(server.live,server.State.CPU,100).percent+'%'">
<div class="progress-bar" role="progressbar" :aria-valuenow="formatPercent(server.live,server.State.CPU,100).percent" aria-valuemin="0" aria-valuemax="100"
<div class="progress-bar" role="progressbar"
:aria-valuenow="formatPercent(server.live,server.State.CPU,100).percent"
aria-valuemin="0" aria-valuemax="100"
:style="formatPercent(server.live,server.State.CPU, 100).style">
<p>@#formatPercent(server.live,server.State.CPU,100).percent#@%</p>
</div>
@ -99,9 +98,12 @@
<div v-if="server.State"
:class="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).class"
:title="parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)+'%'">
<div class="progress-bar" role="progressbar" :aria-valuenow="parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)" aria-valuemin="0" aria-valuemax="100"
<div class="progress-bar" role="progressbar"
:aria-valuenow="parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)"
aria-valuemin="0" aria-valuemax="100"
:style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
<p>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%</p>
<p>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%
</p>
</div>
</div>
</div>
@ -114,9 +116,12 @@
<div v-if="server.State"
:class="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).class"
:title="parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)+'%'">
<div class="progress-bar" role="progressbar" :aria-valuenow="parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)" aria-valuemin="0" aria-valuemax="100"
<div class="progress-bar" role="progressbar"
:aria-valuenow="parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)"
aria-valuemin="0" aria-valuemax="100"
:style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
<p>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%</p>
<p>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%
</p>
</div>
</div>
</div>

View File

@ -13,7 +13,7 @@ import (
pb "github.com/naiba/nezha/proto"
)
var Version = "v0.9.15" // !!记得修改 README 中的 badge 版本!!
var Version = "v0.9.16" // !!记得修改 README 中的 badge 版本!!
var (
Conf *model.Config