feat: 新增 redis 监控

This commit is contained in:
xlsea
2025-04-27 18:32:40 +08:00
parent 9edd78e581
commit 63b49f1d40
9 changed files with 762 additions and 2 deletions

View File

@ -94,5 +94,45 @@ declare namespace Api {
/** login infor list */
type LoginInforList = Api.Common.PaginatingQueryRecord<LoginInfor>;
/** cache info */
type CacheInfo = Common.CommonRecord<{
/** info */
info: {
/** Redis 版本 */
redis_version: string;
/** 运行模式 */
redis_mode: string;
/** 端口 */
tcp_port: number;
/** 客户端数 */
connected_clients: number;
/** 运行时间(天) */
uptime_in_days: number;
/** 使用内存 */
used_memory_human: string;
/** 使用 CPU */
used_cpu_user_children: string;
/** 内存配置 */
maxmemory_human: number;
/** AOF 是否开启 */
aof_enabled: string;
/** RDB 是否成功 */
rdb_last_bgsave_status: string;
/** Key 数量 */
dbSize: number;
/** 网络入口 */
instantaneous_input_kbps: number;
/** 网络出口 */
instantaneous_output_kbps: number;
};
/** db size */
dbSize: number;
/** command stats */
commandStats: {
name: string;
value: number;
}[];
}>;
}
}

View File

@ -24,6 +24,7 @@ declare module "@elegant-router/types" {
"iframe-page": "/iframe-page/:url";
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
"monitor": "/monitor";
"monitor_cache": "/monitor/cache";
"monitor_login-infor": "/monitor/login-infor";
"monitor_oper-log": "/monitor/oper-log";
"social-callback": "/social-callback";
@ -107,6 +108,7 @@ declare module "@elegant-router/types" {
| "login"
| "social-callback"
| "home"
| "monitor_cache"
| "monitor_login-infor"
| "monitor_oper-log"
| "system_client"