Skip to main content

Monitoring

From Web Console, you could check storage usage, inodes amount, QPS and traffic.

Also, we provide API for integrating status of the JuiceFS into your monitoring system (JSON and Prometheus compatible format).

JSON API

API URL: https://juicefs.com/api/volume/VOLUME_NAME/status?token=YOUR_TOKEN

VOLUME_NAME is the name of your volume,YOUR_TOKEN could be check out from the Setting of Web Console (it's the same token when you mount)

API response example:

{
"files": 1234, // Inode amount,
"dns": "a.meta.juicefs.io", // DNS domain,
"port": 9404, // Meta service port
"size": 1024000, // Storage usage
"trash_files": 100, // Files amount in trash bin
"trash_size": 100000, // Size of files in trash bin
// Active clients within 2 hours
"clients": [
{
// Operation statistics of meta service
"operations": {
"rename": 0, // Renaming a file or directory,
"setattr": 0, // set attributes
"read": 0, // read operation
"statfs": 0, // filesystem statistics
"wbytes": 0, // write bytes
"mkdir": 0, // directory creation
"mknod": 0, // file creation
"symlink": 0, // symbol link creation
"write": 0, // write operation
"getattr": 0, // read attributes
"lookup": 0, // lookup file or directory
"rmdir": 0, // remove directory
"rbytes": 0, // read bytes
"link": 0, // hard link creation
"readlink": 0, // read symbol link
"unlink": 0, // remove link
"open": 0, // open file
"readdir": 0 // read directory
},
// Operation statistics of client
"stats": {
"uptime": 21,
"cpuusage": 356212,
"memusage": 23243000,
"fuse_ops": 179,
"fuse_ops.create": 1,
"fuse_ops.flush": 1,
"fuse_ops.getattr": 39,
"fuse_ops.getattr-cached": 7,
"fuse_ops.statfs": 60,
"fuse_ops.opendir": 2,
"fuse_ops.release": 1,
"fuse_ops.releasedir": 1,
"fuse_ops.readdir": 13,
"fuse_ops.readdir.with_attrs": 4,
"fuse_ops.lookup": 54,
"fuse_ops.lookup.master": 44,
"fuse_ops.lookup.master.positive": 2,
"fuse_ops.lookup.master.negative": 42,
"fuse_ops.lookup.internal": 2,
"fuse_ops.lookup.cached": 8,
"fuse_ops.lookup.cached.readdir": 8,
"master": 12428,
"master.usec_ping": 59166,
"master.usec_timediff": 6109,
"master.bytes_received": 3915,
"master.bytes_sent": 8210,
"master.packets_sent": 203,
"master.packets_received": 100
},
"openfiles": 0, // open file count currently
"ip": "1.2.3.4", // Client IP,
"hostname": "my-host", // Your VM's hostname,
"version": "4.2.1", // Client version,
"mountpoint": "/jfs" // Endpoint you mounted
}, // client1

// ...... Other clients' data

]
}

Prometheus API

We provide an API help you monitor the JuiceFS in Prometheus.

Prometheus API: https://juicefs.com/api/volume/VOLUME_NAME/metrics?token=YOUR_TOKEN

YOUR_JUICEFS_NAME is the name of your volume,YOUR_TOKEN could be check out from the Setting of Web Console (it's the same token when you mount).

Please add the following into configuration of Prometheus (tested with 2.4.0):

scrape_configs:
- job_name: 'juicefs'
scrape_interval: 15s
scheme: 'https'
metrics_path: '/api/vol/VOLUME_NAME/metrics'
params:
token: ['YOUR_TOKEN']
static_configs:
- targets: ['juicefs.com']

We also provide a Grafana Dashboard to show the collected metrics in Prometheus (some metrics works on client version >= 4.3.3).

For the description of the metrics: JuiceFS Metrics.

If you are not using Prometheus, we also offer tools to compatible with different platforms. Currently, we are supporting the following platforms:

  1. Open-Falcon

Client Statistics

JuiceFS has some virtual files in text format in the root directory of each mount point, which record real-time statistics and access log data of JuiceFS clients. For details, please refer to the "Fault Diagnosis and Analysis" document.