Monitoring

JUICE module monitoring and metrics.

JuiceFS instances expose Prometheus metrics via juicefs mount --metrics. In JUICE, metrics listen on 0.0.0.0:<port>, default port 9567.


Monitoring Architecture

JuiceFS Mount (metrics: 0.0.0.0:<port>)
    ↓
VictoriaMetrics (scrape)
    ↓
Grafana Dashboard

If INFRA is deployed, juice_register writes scrape targets to:

/infra/targets/juice/<hostname>.yml

Target File Example

- labels: { ip: 10.10.10.10, ins: "node-jfs", cls: "jfs" }
  targets: [ 10.10.10.10:9567 ]

To register manually:

./juice.yml -l <host> -t juice_register

Key Metrics

Object Storage

MetricTypeDescription
juicefs_object_request_durations_histogram_secondshistogramObject storage request latency
juicefs_object_request_errorscounterObject storage errors

Cache

MetricTypeDescription
juicefs_blockcache_hitscounterCache hits
juicefs_blockcache_misscounterCache misses

Metadata Transactions

MetricTypeDescription
juicefs_transaction_durations_histogram_secondshistogramMetadata transaction latency (histogram)
juicefs_transaction_durations_histogram_seconds_countcounterMetadata transaction request count

Common PromQL

Cache hit ratio:

rate(juicefs_blockcache_hits[5m]) /
(rate(juicefs_blockcache_hits[5m]) + rate(juicefs_blockcache_miss[5m]))

Object storage P99 latency:

histogram_quantile(0.99, rate(juicefs_object_request_durations_histogram_seconds_bucket[5m]))