# 指标

## Alluxio 指标

### 缓存存储

| 指标                                        | 标签 | 类型      | 组件     | 描述                                                                                                |
| ----------------------------------------- | -- | ------- | ------ | ------------------------------------------------------------------------------------------------- |
| `alluxio_cached_storage_bytes`            | -  | gauge   | worker | 缓存的数据量                                                                                            |
| `alluxio_cached_capacity_bytes`           | -  | gauge   | worker | 配置的最大缓存存储                                                                                         |
| `alluxio_cached_evicted_data_bytes_total` | -  | counter | worker | 驱逐的数据量                                                                                            |
| `alluxio_data_cached_files`               | -  | gauge   | worker | worker缓存中的文件数量，无论是完整缓存还是部分缓存。请注意同一文件可能在多个worker上存在多个副本，因此直接将该metric对多个worker 求和不能反映集群中存储的不同的文件总数。 |
| `alluxio_data_cached_pages`               | -  | gauge   | worker | worker缓存中的Page数量                                                                                  |

### 数据访问

| 指标                                         | 标签                                     | 类型        | 组件           | 描述                                   |
| ------------------------------------------ | -------------------------------------- | --------- | ------------ | ------------------------------------ |
| `alluxio_data_access_bytes`                | `method=read/write`                    | histogram | fuse, worker | 汇总的所有数据访问请求                          |
| `alluxio_data_throughput_bytes_total`      | `method=read/write`                    | counter   | worker       | 所有数据访问的吞吐量计数器                        |
| `alluxio_meta_operation_total`             | `op=getStatus/listStatus/...`          | counter   | worker       | 元数据操作的 RPC 调用计数器                     |
| `alluxio_cached_data_read_bytes_total`     | -                                      | counter   | worker       | page store 的缓存命中次数                   |
| `alluxio_missed_data_read_bytes_total`     | -                                      | counter   | worker       | page store 的缓存未命中次数                  |
| `alluxio_ufs_data_access_bytes_total`      | `method=read/write`                    | counter   | fuse, worker | ufs的访问次数                             |
| `alluxio_fuse_concurrency`                 | `method=Fuse.Getattr/Fuse.readdir/...` | gauge     | fuse         | 记录 FUSE 机制的实时并发数                     |
| `alluxio_s3_api_throughput_bytes`          | `method=read/write/list`               | histogram | fuse, worker | S3 IO API 吞吐量的直方图                    |
| `alluxio_s3_api_call_processing`           | `method=GetObject/ListObjects/...`     | gauge     | fuse, worker | 正在处理中的 S3 API 调用次数计数器                |
| `alluxio_multi_replica_read_from_workers`  | `cluster_name,local_cluster,hot_read`  | counter   | client       | 客户端在读取多副本文件时从 Alluxio Workers 读取的字节数 |
| `alluxio_passive_cache_async_loaded_files` | `result=submitted/success/failure`     | counter   | worker       | 被动缓存触发的Worker加载文件数                   |

### 分布式负载

| 指标                                                   | 标签                              | 类型      | 组件          | 描述                    |
| ---------------------------------------------------- | ------------------------------- | ------- | ----------- | --------------------- |
| `alluxio_distributed_load_job_scanned_total`         | -                               | counter | coordinator | 分布式负载中扫描的 inode数量计数器  |
| `alluxio_distributed_load_job_processed_total`       | -                               | counter | coordinator | 分布式负载中加载的非空文件副本数计数器   |
| `alluxio_distributed_load_job_skipped_total`         | -                               | counter | coordinator | 分布式负载中跳过的 inode 数量计数器 |
| `alluxio_distributed_load_job_failure_total`         | `reason, final_attempt, worker` | counter | coordinator | 分布式负载故障的计数器           |
| `alluxio_distributed_load_job_dispatched_size_total` | -                               | counter | coordinator | 分布式负载中分发的字节数计数器       |
| `alluxio_distributed_load_job_loaded_bytes_total`    | -                               | counter | coordinator | 分布式负载中加载的字节数计数器       |

### License

| 指标                                | 标签 | 类型    | 描述                   |
| --------------------------------- | -- | ----- | -------------------- |
| `alluxio_license_expiration_date` | -  | gauge | license的过期时间，取值为纪元时间 |

## 进程和JVM 指标

| 指标                           | 标签                                                 | 类型      | 描述                           |
| ---------------------------- | -------------------------------------------------- | ------- | ---------------------------- |
| `process_start_time_seconds` | -                                                  | gauge   | 自 Unix epoch 以来的进程启动时间（单位：秒） |
| `process_cpu_seconds_total`  | -                                                  | counter | 用户和系统 CPU 总耗时（单位：秒）          |
| `jvm_threads_current`        | -                                                  | gauge   | JVM 当前线程数                    |
| `jvm_memory_used_bytes`      | `area=heap/nonheap`                                | gauge   | 特定 JVM 内存区域的已使用字节数           |
| `jvm_memory_max_bytes`       | `area=heap/nonheap`                                | gauge   | 特定 JVM 内存区域的最大字节数            |
| `jvm_gc_collection_seconds`  | `gc="G1 Young Generation"/"G1 Old Generation"/...` | summary | 特定 JVM 垃圾收集器的耗时（单位：秒)        |
