数据库 Redis® 提供一系列核心监控指标,涵盖 CPU、内存、存储、网络、连接、时延、请求及响应等关键维度,实时全面监控实例的运行环境。
Proxy 监控
每个 Redis 实例包含了至少3个 Proxy 节点,通常 Proxy 节点数是 Redis 节点数量的1.5倍,Proxy 节点提供以下监控信息。
| **分组** | **指标** | **单位** | **指标说明** |
|---|---|---|---|
| CPU | CPU 使用率 | % | Proxy CPU 使用率 |
| 请求 | 总请求 | Count/s | Proxy 执行的命令数 |
| Key 请求数 | Count/s | 命令访问的 Key 个数 | |
| Mget 请求数 | Count/s | Mget 命令执行次数 | |
| Proxy命令执行错误数 | Count/s | Proxy 命令执行错误的次数,例如,命令不存在、参数错误等情况 | |
| 大 Value 请求 | Count/s | 请求命令大小超过32KB的执行次数 | |
| 网络监控 | 连接数量 | Count | 连接到实例的 TCP 连接数量 |
| 连接使用率 | % | 实际 TCP 连接数量和最大连接数占比 | |
| 内网入流量 | MBytes/s | 每秒流入数据库的流量 | |
| 入流量限流触发 | Count | 入流量超过最大带宽的次数 | |
| 入流量使用率 | % | 内网入流量实际使用和最大流量占比 | |
| 出流量 | MBytes/s | 每秒流出数据库的流量 | |
| 出流量限流触发 | Count | 出流量超过最大带宽的次数 | |
| 出流量使用率 | % | 内网出流量实际使用和最大流量占比 | |
| 时延监控 | 平均执行时延 | ms | Proxy 到 Redis Server 的执行时延平均值 |
| P99执行时延 | ms | Proxy 到 Redis Server 99% 请求的执行时延 | |
| 最大执行时延 | ms | Proxy 到 Redis Server 的执行时延最大值 | |
| 读平均时延 | ms | Proxy 到 Redis Server 的读命令平均执行时延 | |
| 写平均时延 | ms | Proxy 到 Redis Server 的写命令平均执行时延 | |
| 其他命令平均时延 | ms | Proxy 到 Redis Server 的读写命令之外的命令平均执行时延 |
Redis 监控
Redis 节点监控提供整个实例所有主节点和从节点的监控信息,提供以下监控指标:
| 分组 | 指标 | 单位 | 指标说明 |
|---|---|---|---|
| CPU 监控 | CPU 使用率 | % | 平均 CPU 使用率 |
| 网络 | 连接数量 | Count | Proxy 连接到节点的连接数 |
| 连接使用率 | % | 节点连接数使用率 | |
| 内存监控 | 内存使用量 | mbytes | 实际使用内存容量,包含数据和缓存部分 |
| 内存使用率 | % | 实际使用内存和申请总内存之比 | |
| Key 总个数 | Count | 实例存储的总 Key 个数(一级 Key) | |
| key 过期数 | Count | 时间窗内被淘汰的 Key 个数,对应 info 命令输出的 expired_keys | |
| key 驱逐数 | Count | 时间窗内被驱逐的 Key 个数,对应 info 命令输出的 evicted_keys | |
| 请求监控 | 总请求 | Count/s | QPS,命令执行次数 |
| 读请求 | Count/s | 读命令执行次数 | |
| 写请求 | Count/s | 写命令执行次数 | |
| 其他请求 | Count/s | 读写命令之外的命令执行次数 | |
| 响应监控 | 慢查询 | Count | 执行时延大于 slowlog-log-slower-than 配置的命令请求次数 |
| 读请求命中 | Count | 读请求 Key 存在的个数,对应 info 命令输出的 keyspace_hits 指标 | |
| 读请求 Miss | Count | 读请求 Key 不存在的个数,对应 info 命令输出的 keyspace_misses 指标 | |
| 读请求命中率 | % | Key 命中 \ (Key命中 + KeyMiss),该指标可以反映 Cache Miss 的情况 |
实例监控
实例监控汇总了整个实例的监控数据,Proxy 节点和 Redis 节点的监控数据,通过 SUM、AVG、MAX、LAST 等聚合算法聚合而成。
| 分组 | 指标中文名 | 关联视图 | 单位 | 指标说明 |
| CPU 监控 | CPU 使用率 | Redis 节点 | % | 平均 CPU 使用率 |
| 内存监控 | 内存使用量 | Redis 节点 | mbytes | 实际使用内存容量,包含数据和缓存部分 |
| 内存使用率 | Redis 节点 | % | 实际使用内存和申请总内存之比 | |
| Key 总个数 | Redis 节点 | Count | 实例存储的总 Key 个数(一级 Key) | |
| Key 过期数 | Redis 节点 | Count | 时间窗内被淘汰的 Key 个数,对应 info 命令输出的 expired_keys | |
| Key 驱逐数 | Redis 节点 | Count | 时间窗内被驱逐的 Key 个数,对应 info 命令输出的 evicted_keys | |
| 网络监控 | 连接数量 | Proxy 节点 | Count | 连接到实例的 TCP 连接数量 |
| 连接使用率 | Proxy 节点 | % | 实际 TCP 连接数量和最大连接数比 | |
| 入流量 | Proxy 节点 | MBytes/s | 每秒流入数据库的流量 | |
| 入流量限流触发 | Proxy 节点 | Count | 入流量超过最大带宽的次数 | |
| 入流量使用率 | Proxy 节点 | % | 内网入流量实际使用和最大流量占比 | |
| 出流量 | Proxy 节点 | MBytes/s | 每秒流出数据库的流量 | |
| 出流量限流触发 | Proxy 节点 | Count | 出流量超过最大带宽的次数 | |
| 出流量使用率 | Proxy 节点 | % | 内网出流量实际使用和最大流量占比 | |
| 时延 | 平均执行时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的执行时延平均值 |
| 最大执行时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的执行时延最大值 | |
| 读平均时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的读命令平均执行时延 | |
| 写平均时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的写命令平均执行时延 | |
| 其他命令平均时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的读写命令之外的命令平均执行时延 | |
| P99 时延 | Proxy 节点 | ms | Proxy 到 Redis Server 的99%请求的执行时延 | |
| 请求监控 | 总请求 | Redis 节点 | Count/s | QPS,命令执行次数 |
| 读请求 | Redis 节点 | Count/s | 读命令执行次数 | |
| 写请求 | Redis 节点 | Count/s | 写命令执行次数 | |
| 其他请求 | Redis 节点 | Count/s | 读写命令之外的命令执行次数 | |
| 大 Value 请求 | Proxy 节点 | Count/s | 请求命令大小超过32KB的执行次数 | |
| Key 请求数 | Proxy 节点 | Count/s | 命令访问的 Key 个数 | |
| Mget 请求数 | Proxy 节点 | Count/s | Mget 命令执行次数 | |
| 慢查询 | Redis 节点 | Count | 执行时延大于 slowlog - log - slower - than 配置的命令次数 | |
| 读请求命中 | Redis 节点 | Count | 读请求 Key 存在的个数,对应 info 命令输出的 keyspace_hits 指标 | |
| 读请求Miss | Redis 节点 | Count | 读请求 Key 不存在的个数,对应 info 命令输出的 keyspace_misses 指标 | |
| 执行错误 | Proxy 节点 | Count | 命令执行错误的次数,例如,命令不存在、参数错误等情况 | |
| 读请求命中率 | Redis 节点 | % | Key 命中 / (Key 命中 + KeyMiss),该指标可以反映 Cache Miss 的情况 |
命令分类
| 命令分类 | 列表 |
| 读命令 | get,strlen,exists,getbit,getrange,substr,mget,llen,lindex,lrange,sismember,scard,srandmember, sinter,sunion,sdiff,smembers,sscan,zrange,zrangebyscore,zrevrangebyscore,zrangebylex, zrevrangebylex,zcount,zlexcount,zrevrange,zcard,zscore,zrank,zrevrank,zscan,hget,hmget, hlen,hstrlen,hkeys,hvals,hgetall,hexists,hscan,randomkey,keys,scan,dbsize,type,ttl,touch,pttl, dump,object,memory,bitcount,bitpos,georadius_ro,georadiusbymember_ro,geohash,geopos,geodist,pfcount |
| 写命令 | set,setnx,setex,psetex,append,del,unlink,setbit,bitfield,setrange,incr,decr,rpush,lpush,rpushx, lpushx,linsert,rpop,lpop,brpop,brpoplpush,blpop,lset,ltrim,lrem,rpoplpush,sadd,srem,smove,spop, sinterstore,sunionstore,sdiffstore,zadd,zincrby,zrem,zremrangebyscore,zremrangebyrank, zremrangebylex,zunionstore,zinterstore,hset,hsetnx,hmset,hincrby,hincrbyfloat,hdel,incrby,decrby, incrbyfloat,getset,mset,msetnx,swapdb,move,rename,renamenx,expire,expireat,pexpire,pexpireat, flushdb,flushall,sort,persist,restore,restore-asking,migrate,bitop,geoadd,georadius,georadiusbymember, pfadd,pfmerge,pfdebug |