monitor

module
v0.0.0-...-cbee766 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT

README

moox-monitor

健康检查与告警:进程探测、服务指标与主机快照接入、数据集与行情新鲜度、企业微信、飞书、钉钉与通用 Webhook 通知。

设计文档:监控

构建与测试

./scripts/build/build.sh monitor
./scripts/build/build.sh monitor-cli
go test -count=1 ./modules/monitor/...

配置

config/app.yaml、config/trpc_go.yaml;schema 在 schema/monitor.sql。schema 变化时需要同时发布服务和 moox-monitor-cli。

Collector 任务结果清单与 Storage 调用共用进程持有的网关客户端,按 Directory 选择 CollectMgr。kline_freshness 不再接受旧 collector_gateway_url / collector_gateway_node_id,也不从环境变量覆盖清单路由;只启用 K 线新鲜度检查时同样初始化并关闭网关客户端。

SysDeploy v2 的 GetCatalog、ListHosts、ListDeployments、GetHostRoutes 也复用上述进程客户端;按需 Doctor 调用使用同一客户端。Monitor 校验组件目录 SHA-256,分页读取主机与部署,并保存完整拓扑与网关观测;不再调用 SysDeploy v1。

MonitorMgr 管理接口使用 loopback 原生 tRPC 11410,经共享网关调用;健康检查继续使用原有独立 HTTP 端点。

Directories

Path Synopsis
cmd
cli command
server command
internal
alerttext
Package alerttext renders the facts alerts carry in plain Chinese, so the person reading a notification knows at once what broke and where.
Package alerttext renders the facts alerts carry in plain Chinese, so the person reading a notification knows at once what broke and where.
bootstrap
Package bootstrap wires the independent moox-monitor service process.
Package bootstrap wires the independent moox-monitor service process.
config
Package config loads moox-monitor process configuration.
Package config loads moox-monitor process configuration.
deployment
Package deployment discovers Monitor checks from the shared catalog and SysDeploy v2.
Package deployment discovers Monitor checks from the shared catalog and SysDeploy v2.
doctor
Package doctor assembles bounded Monitor facts for the interactive Doctor CLI.
Package doctor assembles bounded Monitor facts for the interactive Doctor CLI.
healthview
Package healthview projects monitoring facts onto the health overview wire model.
Package healthview projects monitoring facts onto the health overview wire model.
metrics
Package metrics owns the monitor metrics bounded context: catalog ingestion, rule evaluation, and its dedicated persistence stores.
Package metrics owns the monitor metrics bounded context: catalog ingestion, rule evaluation, and its dedicated persistence stores.
notifier
Package notifier 把一条告警推送给全部通知渠道。
Package notifier 把一条告警推送给全部通知渠道。
rpc
storagegateway
Package storagegateway provides Monitor's typed Storage calls through the shared gateway.
Package storagegateway provides Monitor's typed Storage calls through the shared gateway.
store
Package store owns monitor's SQLite connection and persistence repositories.
Package store owns monitor's SQLite connection and persistence repositories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL