Gatus:服务可用性面板

封面
(封面图源Gatus主页)

TL;DR

在建家里云的时候,难免会出现一些问题,比如没法实时知道某个服务是否可用,这个时候就需要一个健康度检查面板了。

这是项目官方的仓库

安装

官方提供了docker的安装方式,但其实是可以直接编译安装的,它编译出来就是一个单独的二进制文件,直接运行就行了。

⚠️注意:
请确保你机器上安装了go

首先克隆官方仓库:

1
git clone --depth=1 https://github.com/TwiN/gatus.git

然后直接开始编译:

1
2
3
4
5
export GOARCH=amd64
go build -o "$(basename `pwd`)-${GOOS}-${GOARCH}"
# 也可以交叉编译arm版的,这样可以兼容410棒子
export GOARCH=arm64
go build -o "$(basename `pwd`)-${GOOS}-${GOARCH}"

然后就会在项目根目录里生成一个二进制文件。

运行和配置

要运行的话,得先设置一个环境变量。当然也可以用我的这个脚本来运行:

1
2
export GATUS_CONFIG_PATH=$(pwd)/config.yaml
./gatus-linux-amd64

接下来就是配置了,直接贴我的配置文件吧:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
web:
address: 0.0.0.0
port: 9999

ui:
# 文档标题,显示在浏览器标签页上
# 默认值: "Health Dashboard ǀ Gatus"
title: "家里云 Status"

# 页面meta描述,用于SEO
# 默认值: "Gatus is an advanced health dashboard"
description: "See what's running"

# 仪表板主标题(位于头部和端点列表之间)
# 默认值: "Health Dashboard"
dashboard-heading: "Health Dashboard"

# 仪表板副标题(位于主标题下方)
# 默认值: "Monitor the health of your endpoints in real-time"
dashboard-subheading: "Monitor the health of your endpoints in real-time"

# 顶部显示的应用名称/标题
# 默认值: "Gatus"
header: "家里云 Status"

# 要显示的LOGO的URL地址(留空则不显示LOGO)
# 默认值: ""
logo: "http://192.168.1.1010:1080/cxk.svg"

# 点击LOGO时打开的链接(通常链接到你的主页)
# 默认值: ""
link: "http://192.168.1.1010:1080"

# 是否默认启用深色模式
# 注意:此设置会被用户操作系统主题偏好覆盖
# 默认值: true
dark-mode: true

# 端点列表的默认排序方式
# 可选值: "name"(按名称), "group"(按分组), "health"(按健康状态)
# 注意:用户个人偏好会覆盖此设置
# 默认值: "name"
default-sort-by: "group"

# 端点列表的默认筛选条件(留空表示不筛选)
# 格式示例: "group:api"(仅显示api分组)
# 默认值: ""
default-filter-by: ""

# 自定义CSS样式(可覆盖默认样式)
# 示例: ".endpoint-name { font-weight: bold; }"
# 默认值: ""
custom-css: ".w-12.h-12.flex.items-center.justify-center{transition: transform 0.5s ease;} .w-12.h-12.flex.items-center.justify-center:hover{transform: rotate(1800deg);} .bg-background.text-foreground{background-image: url('https://source.unsplash.com/random');background-size: cover;background-position: center;background-attachment: fixed;min-height: 100vh;position: relative;} .dashboard-container.bg-background,.rounded-lg.border,.bg-card.border-b,.past-announcements{background-color: rgba(255, 255, 255, 0.2);backdrop-filter: blur(10px);-webkit-backdrop-filter: blur(10px)}"

# 头部按钮配置(数组格式,可配置多个按钮)
# 每个按钮会显示在仪表板头部右侧
buttons:
- name: "Follow on 𝕏" # 按钮显示的文字(必填)
link: "https://x.com/realdonaldtrump" # 点击按钮时打开的链接(必填)
# 可以继续添加更多按钮,例如:
# - name: "Documentation"
# link: "https://github.com/TwinProduction/gatus/blob/master/README.md"

#announcements:
# - timestamp: 1919-08-10T02:45:14Z
# type: outage
# message: "Scheduled maintenance on database servers from 14:00 to 16:00 UTC"
# - timestamp: 1919-08-10T02:45:15Z
# type: operational
# message: "Database maintenance completed successfully. All systems operational."
# - timestamp: 1919-08-10T02:45:16Z
# type: information
# message: "New monitoring dashboard features will be deployed next week"
# - timestamp: 1919-08-10T02:45:17Z
# type: warning
# message: "Elevated API response times observed for US customers"
# archived: true

endpoints:
- name: Alist
group: 家里云
url: "http://192.168.1.105:5244"
interval: 5m
alerts:
- type: slack
description: "healthcheck failed"
send-on-resolved: true
conditions:
- "[STATUS] == 200"
#- "[BODY].status == UP"
#- "[RESPONSE_TIME] < 150"

- name: Calibre-Web
group: 家里云
url: "http://192.168.1.106:8083"
interval: 5m
alerts:
- type: slack
description: "healthcheck failed"
send-on-resolved: true
conditions:
- "[STATUS] == 200"

- name: wine-noVNC
group: 家里云
url: "http://192.168.1.102:5999"
interval: 5m
alerts:
- type: slack
description: "healthcheck failed"
send-on-resolved: true
conditions:
- "[STATUS] == 200"

Gatus:服务可用性面板
http://blog.coolenoch.ink/2026/01/06/Linux/32-Gatus:服务可用性面板-260104/
作者
CoolestEnoch
发布于
2026年1月6日
许可协议