YACE Dashboard


1. YACE Config#

AWS 官方说明这页 metrics 同时适用于 Valkey 和 Redis OSS;对于 Valkey engine,这些 metrics 保持一致。

apiVersion: v1alpha1
sts-region: ap-northeast-1
discovery:
  jobs:
    - type: AWS/ElastiCache
      regions: [ap-northeast-1]
      customTags:
        - key: environment
          value: uat
      period: 300
      length: 600
      nilToZero: true
      metrics:
        - name: EngineCPUUtilization
          statistics: [Average]
        - name: CPUUtilization
          statistics: [Average]
        - name: DatabaseMemoryUsagePercentage
          statistics: [Average]
        - name: FreeableMemory
          statistics: [Average]
        - name: Evictions
          statistics: [Sum]
        - name: CacheHits
          statistics: [Sum]
        - name: CacheMisses
          statistics: [Sum]
        - name: ReplicationLag
          statistics: [Maximum]
        - name: CurrConnections
          statistics: [Average]
        - name: NewConnections
          statistics: [Sum]
        - name: NetworkBytesIn
          statistics: [Sum]
        - name: NetworkBytesOut
          statistics: [Sum]
        - name: SwapUsage
          statistics: [Average]

Exporter naming note:

当前 dashboard 按你实际采到的 YACE metric name 对齐,例如:
    aws_elasticache_engine_cpuutilization_average
    aws_elasticache_cpuutilization_average

不要写成:
    aws_elasticache_engine_cpu_utilization_average
    aws_elasticache_cpu_utilization_average

Dashboard 选择:

aws-valkey-yace-overview-dashboard.json:
    使用 $dimension_CacheClusterId 过滤。
    适合单一环境,或者 cluster 名本身已经足够区分环境。

aws-valkey-yace-environment-overview-dashboard.json:
    使用 $environment + $dimension_CacheClusterId 过滤。
    适合同一个 Prometheus / VictoriaMetrics 里同时存在 uat、prod 等多个环境的 Valkey metrics。

Label note:

当前 overview dashboard 按 cluster 聚合,所以使用:
    dimension_CacheClusterId

如果你的 metrics 还带:
    dimension_CacheNodeId

那说明 YACE 采到了 node 维度明细。
但当前这版 dashboard 不使用它,统一按 cluster 级 overview / trend 来组织。

2. Dashboard Rows#

Row Panels
Overview engine CPU, host CPU, memory usage, connections, evictions per period, hit/miss, replication lag
Drilldown network in/out, replication lag detail
Capacity memory usage trend, host freeable memory, connection trend, network trend, eviction trend
Debug swap usage

CPU note:

Overview:
    展示 cluster 级 Engine CPU 和 Host CPU
    以及 memory / connections / hit rate / evictions / replication lag

Drilldown:
    只保留 network 和 replication lag detail
    不再重复展示 CPU / connections 这类 overview 已经覆盖的内容

这样可以同时满足:
    第一屏快速判断服务健康和缓存压力
    第二屏补流量方向和复制延迟细节

Memory note:

DatabaseMemoryUsagePercentage:
    更适合判断 Valkey 缓存空间是否接近打满。

FreeableMemory:
    是 host-level freeable memory,单位 bytes。
    它不是“Valkey 还剩多少可用缓存内存”,而是宿主机还能回收的内存。

所以 dashboard 里把它单独放成:
    Host Freeable Memory

不要把它和 memory usage percentage 混在同一个百分比 panel 里。

SwapUsage note:

SwapUsage 是 host-level 指标,不是 engine-level 指标。
它有值,不一定代表 CPU 或缓存使用率异常。

更需要关注的是:
    SwapUsage 持续升高
    或同时伴随 latency / memory pressure 变差

Evictions note:

Evictions 是因为触发 maxmemory 限制,被 Valkey / Redis OSS 淘汰掉的 key 数量。

Evictions = 0:
    很多时候是正常的,通常说明当前还没有因为内存压力开始淘汰 key。

Evictions > 0:
    说明 engine 已经开始为了腾空间而淘汰旧 key。

它不代表“有没有流量”或“缓存有没有在工作”。
判断容量压力,应该结合:
    DatabaseMemoryUsagePercentage
    Evictions
    CacheMisses
    SwapUsage
一起看。

dashboard 里的两个 eviction panel 语义不同:
    Evictions Per Period:
        当前采集周期里的 eviction 数

    Eviction Trend (1h Rolling Sum):
        最近 1 小时滚动累计 eviction,用来判断是不是持续性容量压力

Trend note:

Valkey dashboard 里的 trend panel 不是原始单点值。

Memory Usage Trend:
    最近 1 小时 rolling average

Connection Trend:
    最近 1 小时 rolling average

Network Trend:
    最近 1 小时 rolling sum

Eviction Trend:
    最近 1 小时 rolling sum

3. Verify#

{__name__=~"aws_elasticache_.*"}