mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
📝 Agent 无法启动一般解决办法
This commit is contained in:
parent
4e1f8143eb
commit
6ece7fd9de
@ -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"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <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"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <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>
|
||||
|
||||
|
197
resource/template/theme-daynight/home.html
vendored
197
resource/template/theme-daynight/home.html
vendored
@ -21,22 +21,17 @@
|
||||
<body data-theme="light" data-gridlist="grid">
|
||||
<header>
|
||||
<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>
|
||||
</a>
|
||||
<a href="/">{{.Conf.Site.Brand}}</a>
|
||||
</figure>
|
||||
<figure class="logo">
|
||||
<a href="/">
|
||||
<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>
|
||||
@ -51,100 +46,110 @@
|
||||
{{end}}
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
</section>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div id="app">
|
||||
<div class="server-info-container" v-for='server in servers' :id="server.ID">
|
||||
<div class="info-body">
|
||||
<ul class="server-info-body-container">
|
||||
<li>
|
||||
<div :class="'state-'+ (server.live?'online':'offline')">
|
||||
<p>@#server.live?'Running':'Down'#@</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h3>@#server.Name#@</h3>
|
||||
</li>
|
||||
<li><img :src="'/static/theme-daynight/img/flag/'+(server.Host&&server.Host.CountryCode?server.Host.CountryCode.toUpperCase():'CN')+'.png'"
|
||||
:title="server.Host.CountryCode.toUpperCase()" /></li>
|
||||
<li>@#server.Host.Platform#@</li>
|
||||
<li>@#server.Host.CountryCode.toUpperCase()#@</li>
|
||||
<li>@#formatByteSize(server.State.MemUsed)#@ / @#formatByteSize(server.Host.MemTotal)#@</li>
|
||||
<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>
|
||||
<div class="cpu-bar">
|
||||
<div>
|
||||
<h4>CPU</h4>
|
||||
|
||||
<main>
|
||||
<div id="app">
|
||||
<div class="server-info-container" v-for='server in servers' :id="server.ID">
|
||||
<div class="info-body">
|
||||
<ul class="server-info-body-container">
|
||||
<li>
|
||||
<div :class="'state-'+ (server.live?'online':'offline')">
|
||||
<p>@#server.live?'Running':'Down'#@</p>
|
||||
</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"
|
||||
:style="formatPercent(server.live,server.State.CPU, 100).style">
|
||||
<p>@#formatPercent(server.live,server.State.CPU,100).percent#@%</p>
|
||||
</li>
|
||||
<li>
|
||||
<h3>@#server.Name#@</h3>
|
||||
</li>
|
||||
<li><img :src="'/static/theme-daynight/img/flag/'+(server.Host&&server.Host.CountryCode?server.Host.CountryCode.toUpperCase():'CN')+'.png'"
|
||||
:title="server.Host.CountryCode.toUpperCase()" /></li>
|
||||
<li>@#server.Host.Platform#@</li>
|
||||
<li>@#server.Host.CountryCode.toUpperCase()#@</li>
|
||||
<li>@#formatByteSize(server.State.MemUsed)#@ / @#formatByteSize(server.Host.MemTotal)#@</li>
|
||||
<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>
|
||||
<div class="cpu-bar">
|
||||
<div>
|
||||
<h4>CPU</h4>
|
||||
</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"
|
||||
:style="formatPercent(server.live,server.State.CPU, 100).style">
|
||||
<p>@#formatPercent(server.live,server.State.CPU,100).percent#@%</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ram-bar">
|
||||
<div>
|
||||
<h4>RAM</h4>
|
||||
</div>
|
||||
<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"
|
||||
:style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
|
||||
<p>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%</p>
|
||||
</li>
|
||||
<li>
|
||||
<div class="ram-bar">
|
||||
<div>
|
||||
<h4>RAM</h4>
|
||||
</div>
|
||||
<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"
|
||||
:style="formatPercent(server.live,server.State.MemUsed, server.Host.MemTotal).style">
|
||||
<p>@#parseInt(server.State?server.State.MemUsed/server.Host.MemTotal*100:0)#@%
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="disk-bar">
|
||||
<div>
|
||||
<h4>硬盘</h4>
|
||||
</div>
|
||||
<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"
|
||||
:style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
|
||||
<p>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%</p>
|
||||
</li>
|
||||
<li>
|
||||
<div class="disk-bar">
|
||||
<div>
|
||||
<h4>硬盘</h4>
|
||||
</div>
|
||||
<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"
|
||||
:style="formatPercent(server.live,server.State.DiskUsed, server.Host.DiskTotal).style">
|
||||
<p>@#parseInt(server.State?server.State.DiskUsed/server.Host.DiskTotal*100:0)#@%
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-container">
|
||||
<ul>
|
||||
<li><i class="fas fa-sun" title="白昼模式"></i><span>白昼模式</span></li>
|
||||
<li><i class="fas fa-moon" title="暗黑模式"></i><span>暗黑模式</span></li>
|
||||
<li><i class="fas fa-th" title="网格视图"></i><span>网格视图</span></li>
|
||||
<li><i class="fas fa-list-ul" title="列表视图"></i><span>列表视图</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="sidebar-container">
|
||||
<ul>
|
||||
<li><i class="fas fa-sun" title="白昼模式"></i><span>白昼模式</span></li>
|
||||
<li><i class="fas fa-moon" title="暗黑模式"></i><span>暗黑模式</span></li>
|
||||
<li><i class="fas fa-th" title="网格视图"></i><span>网格视图</span></li>
|
||||
<li><i class="fas fa-list-ul" title="列表视图"></i><span>列表视图</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<section class="dark-light-toggle">
|
||||
<label class="switcher">
|
||||
<input type="checkbox" name="theme" id="dark-light" />
|
||||
<div>
|
||||
<i class="fas fa-adjust"></i>
|
||||
</div>
|
||||
</label>
|
||||
<label class="switcher">
|
||||
<input type="checkbox" name="theme" id="dark-light" />
|
||||
<div>
|
||||
<i class="fas fa-adjust"></i>
|
||||
</div>
|
||||
</label>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Back to top button -->
|
||||
<a id="back-to-top"></a>
|
||||
|
||||
@ -159,7 +164,7 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/static/theme-daynight/js/main.js?v202102012266" ></script>
|
||||
<script src="/static/theme-daynight/js/main.js?v202102012266"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||
|
||||
@ -294,4 +299,4 @@
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{end}}
|
||||
{{end}}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user