# Ray端点资源、作业和Ray原生指标
#### 资源指标
表1端点资源监控指标说明 
| 指标ID                                      | 指标名称         | 指标含义                  | 取值范围  | 单位         | 进制     | 维度                                                    | 监控周期  |
|:---|:---|:---|:---|:---|:---|:---|:---|
| aidatalake_ray_cpu_usage                  | 端点CPU使用量    | 端点CPU使用量。              | ≥0     | 核（Core）     | 不涉及  | workspace_id, endpoint_id, endpoint_type                | 1分钟   |
| aidatalake_ray_cpu_rate                  | 端点CPU使用率    | 端点使用CPU资源的CPU使用率平均值。 | 0～100  | 百分比（%）      | 不涉及    | workspace_id, endpoint_id, endpoint_type, resource_type | 1分钟   |
| aidatalake_ray_cpu_elastic_allocation    | 弹性CPU分配量   | 弹性CPU分配量。             | ≥0      | 核（Core）     | 不涉及   | workspace_id, endpoint_id, endpoint_type               | 1分钟   |
| aidatalake_ray_cpu_reserved_allocation   | 预留CPU分配量   | 预留CPU分配量。            | ≥0    | 核（Core）   | 不涉及   | workspace_id, endpoint_id, endpoint_type              | 1分钟 |
| aidatalake_ray_mem_usage                  | 端点内存使用量     | 端点内存使用量。             | ≥0     | 千兆字节（GiB）  | 1024    | workspace_id, endpoint_id, endpoint_type              | 1分钟  |
| aidatalake_ray_mem_rate                  | 端点内存使用率      | 端点内存使用率平均值。        | 0～100 | 百分比（%）     | 不涉及 | workspace_id, endpoint_id, endpoint_type, resource_type | 1分钟 |
| aidatalake_ray_mem_elastic_allocation   | 弹性内存分配量     | 弹性内存分配量。             | ≥0     | 千兆字节（GiB） | 1024  | workspace_id, endpoint_id, endpoint_type              | 1分钟  |
| aidatalake_ray_mem_reserved_allocation   | 预留内存分配量    | 预留内存分配量。             | ≥0    | 千兆字节（GiB） | 1024 | workspace_id, endpoint_id, endpoint_type              | 1分钟 |
| aidatalake_ray_gpu_usage                 | 端点GPU使用量    | 端点GPU使用量。             | ≥0  | 卡(Card)      | 不涉及    | workspace_id, endpoint_id, endpoint_type              | 1分钟    |
| aidatalake_ray_gpu_rate                  | 端点GPU使用率     | 端点使用GPU资源的使用率平均值。  | 0～100  | 百分比（%）     | 不涉及 | workspace_id, endpoint_id, endpoint_type              | 1分钟   |
| aidatalake_ray_gpu_elastic_allocation    | 弹性GPU卡分配量    | 弹性GPU卡分配量。            | ≥0    | 卡(Card)    | 不涉及   | workspace_id, endpoint_id, endpoint_type               | 1分钟 |
| aidatalake_ray_gpu_reserved_allocation | 预留GPU卡分配量 | 预留GPU卡分配量。            | ≥1    | 卡(Card)  | 不涉及    | workspace_id, endpoint_id, endpoint_type                | 1分钟 |
| aidatalake_ray_npu_usage                  | 端点NPU使用量    | 端点NPU使用量。          | ≥1    | 卡(Card)     | 不涉及   | workspace_id, endpoint_id, endpoint_type               | 1分钟   |
| aidatalake_ray_npu_memory_usage         | NPU显存使用率    | NPU显存资源的使用率平均值。      | 0～100 | 百分比（%）      | 不涉及  | workspace_id, endpoint_id, endpoint_type               | 1分钟 |
| aidatalake_ray_npu_rate                   | 端点NPU使用率    | 端点使用NPU资源的使用率平均值。   | 0～100   | 百分比（%）    | 不涉及    | workspace_id, endpoint_id, endpoint_type                | 1分钟 |
| aidatalake_ray_npu_elastic_allocation     | 弹性NPU卡分配量   | 弹性NPU卡分配量。          | ≥0    | 卡(Card)   | 不涉及   | workspace_id, endpoint_id, endpoint_type              | 1分钟  |
| aidatalake_ray_npu_reserved_allocation     | 预留NPU卡分配量  | 预留NPU卡分配量。           | ≥1   | 卡(Card)    | 不涉及    | workspace_id, endpoint_id, endpoint_type                | 1分钟  |
   
#### 作业指标
表2端点作业监控指标说明 
| 指标ID                                      | 指标名称     | 指标含义     | 取值范围 | 单位      | 进制  | 维度                                      | 监控周期  |
|:---|:---|:---|:---|:---|:---|:---|:---|
| aidatalake_ray_submitting_jobs_count     | 提交中作业数 | 提交中作业数。  | ≥0 | Count    | 不涉及 | workspace_id, endpoint_id, endpoint_type | 1分钟  |
| aidatalake_ray_running_jobs_count         | 运行中作业数   | 运行中作业数。  | ≥0   | Count    | 不涉及 | workspace_id, endpoint_id, endpoint_type  | 1分钟  |
| aidatalake_ray_completed_jobs_count      | 已完成作业数  | 已完成作业数。    | ≥0   | Count   | 不涉及  | workspace_id, endpoint_id, endpoint_type   | 1分钟  |
| aidatalake_ray_failed_jobs_count        | 失败作业数    | 失败作业数。   | ≥0 | Count | 不涉及 | workspace_id, endpoint_id, endpoint_type  | 1分钟  |
| aidatalake_ray_cancelled_jobs_count     | 已取消作业数   | 已取消作业数。     | ≥0  | Count   | 不涉及 | workspace_id, endpoint_id, endpoint_type  | 1分钟   |
| aidatalake_ray_max_submitting_duration_ms | 最长提交时长  | 最长提交时长。 | ≥1   | ms       | 不涉及  | workspace_id, endpoint_id, endpoint_type | 1分钟 |
| aidatalake_ray_max_running_duration_ms   | 最长运行时长   | 最长运行时长。  | ≥1   | ms     | 不涉及 | workspace_id, endpoint_id, endpoint_type   | 1分钟     |
   
#### Ray原生指标
表3RayCluster指标 
| 指标ID                                     | 指标名称           | 指标含义                           | 取值范围      | 单位       | 进制     | 维度                                               | 监控周期   |
|:---|:---|:---|:---|:---|:---|:---|:---|
| ray_actors_1                                | 按状态统计的Actor数量 | 按状态分组的Actor数量（依赖未就绪、待创建、存活等）。    | ≥0       | Count    | 不涉及   | workspace_id, endpoint_id, state                | 1分钟   |
| ray_tasks_1                                  | 按状态统计的任务数量    | 当前按状态分组的任务数量。                 | ≥0     | Count  | 不涉及    | workspace_id, endpoint_id, state                | 1分钟   |
| ray_resources_1                             | Ray资源          | 按状态（可用、已用）分组的逻辑Ray 资源。          | ≥0      | 不涉及     | 不涉及  | workspace_id, endpoint_id, state, resource_name | 1分钟  |
| ray_scheduler_tasks_1                       | 等待调度的任务数       | 等待调度的任务数量，按状态分组。                  | ≥0       | Count    | 不涉及   | workspace_id, endpoint_id, state                 | 1分钟  |
| ray_scheduler_unscheduleable_tasks_1       | 无法调度的待处理任务数    | 因资源约束无法调度的待处理任务数量，按原因分组。        | ≥0      | Count  | 不涉及   | workspace_id, endpoint_id, reason                | 1分钟    |
| ray_scheduler_placement_time_ms_1_bucket | 调度器放置耗时直方图分桶。   | 调度器放置耗时直方图分桶。                  | ≥0        | ms     | 不涉及     | workspace_id, endpoint_id                        | 1分钟 |
| ray_scheduler_placement_time_ms_1_count    | 调度器放置决策累计次数   | 调度器放置决策累计次数。                     | ≥0       | Count     | 不涉及       | workspace_id, endpoint_id                         | 1分钟     |
| ray_scheduler_placement_time_ms_1_sum     | 调度器放置决策累计总耗时     | 调度器放置决策累计总耗时。                    | ≥0         | ms     | 不涉及   | workspace_id, endpoint_id                        | 1分钟   |
| ray_io_context_event_loop_lag_ms_1        | 事件循环延迟时间         | I/O上下文事件循环滞后，反映从任务提交到执行的延迟。     | ≥0         | ms      | 不涉及    | workspace_id, endpoint_id                        | 1分钟   |
| ray_object_store_memory_1                | 对象存储内存         | 对象存储内存使用量，按类型分组（共享内存、磁盘映射、堆、溢出）。 | ≥0      | Bytes   | 1024   | workspace_id, endpoint_id, type                  | 1分钟   |
| ray_object_store_available_memory_1        | 对象存储可用内存        | 对象存储当前可用内存。                     | ≥0      | Bytes    | 1024 | workspace_id, endpoint_id                        | 1分钟  |
| ray_object_store_used_memory_1            | 对象存储已用内存        | 对象存储当前已用内存。                     | ≥0      | Bytes    | 1024  | workspace_id, endpoint_id                        | 1分钟    |
| ray_object_store_num_local_objects_1       | 对象存储本地对象数量     | 对象存储中当前本地对象的数量。                 | ≥0       | Count   | 不涉及   | workspace_id, endpoint_id                         | 1分钟    |
| ray_running_jobs_1                       | 运行中作业数        | 当前正在运行的Ray作业数量。                  | ≥0       | Count    | 不涉及    | workspace_id, endpoint_id                      | 1分钟 |
| ray_finished_jobs_1_total                  | 已完成作业数        | 已完成的Ray作业累计数量                   | ≥0      | Count   | 不涉及     | workspace_id, endpoint_id                       | 1分钟  |
| ray_job_duration_s_1                        | 作业持续运行时间       | 已完成作业的持续时间。                       | ≥0       | s     | 不涉及    | workspace_id, endpoint_id, job_id                | 1分钟   |
| ray_node_cpu_utilization_1                 | 端点CPU利用率       | Ray端点的CPU利用率百分比。                 | 0\~100 | %     | 不涉及     | workspace_id, endpoint_id, node_id              | 1分钟   |
| ray_node_cpu_count_1                        | 端点CPU核数      | Ray端点上的CPU核心总数。                 | ≥0        | Cores    | 不涉及    | workspace_id, endpoint_id, node_id               | 1分钟  |
| ray_node_mem_used_1                         | 端点已用内存           | Ray端点已用内存。                       | ≥0       | Bytes    | 1024    | workspace_id, endpoint_id, node_id               | 1分钟    |
| ray_node_mem_available_1                 | 端点可用内存         | Ray端点可用内存，单位为字节                 | ≥0      | Bytes  | 1024    | workspace_id, endpoint_id, node_id              | 1分钟  |
| ray_node_mem_total_1                       | 端点总内存         | Ray端点总内存。                      | ≥0        | Bytes    | 1024   | workspace_id, endpoint_id, node_id               | 1分钟    |
| ray_node_gpus_available_1                  | 端点可用GPU数      | Ray端点上可用GPU卡数量。                 | ≥0       | Cards    | 不涉及     | workspace_id, endpoint_id, node_id               | 1分钟  |
| ray_node_gpus_utilization_1               | 端点GPU利用率       | Ray端点的GPU利用率百分比。                 | 0\~100    | %       | 不涉及   | workspace_id, endpoint_id, node_id                | 1分钟    |
| ray_node_gram_used_1                       | 端点显存使用量       | Ray端点已用GPU显存。                   | ≥0        | Bytes  | 1024  | workspace_id, endpoint_id, node_id              | 1分钟    |
| ray_node_gram_available_1                  | 端点显存可用量        | Ray端点可用GPU显存。                   | ≥0        | Bytes | 1024    | workspace_id, endpoint_id, node_id                | 1分钟  |
| ray_node_npus_utilization_1                | 端点NPU利用率        | Ray端点的NPU计算利用率百分比。              | 0\~100   | %      | 不涉及   | workspace_id, endpoint_id, node_id               | 1分钟 |
| ray_node_hbm_used_1                        | 端点NPU HBM使用量 | Ray端点已用NPU HBM（高带宽内存）。         | ≥0       | Bytes    | 1024    | workspace_id, endpoint_id, node_id             | 1分钟   |
| ray_node_disk_usage_1                      | 端点磁盘使用量       | Ray端点磁盘使用量，按设备分组。                | ≥0       | Bytes  | 1024    | workspace_id, endpoint_id, node_id, device        | 1分钟   |
| ray_node_disk_utilization_percentage_1     | 端点磁盘利用率         | Ray端点磁盘利用率百分比，按设备分组。            | 0\~100    | %       | 不涉及  | workspace_id, endpoint_id, node_id, device        | 1分钟    |
| ray_node_network_sent_1                   | 端点上行发送量        | Ray端点发送的网络数据总量。                | ≥0       | Bytes    | 1024  | workspace_id, endpoint_id, node_id, interface    | 1分钟   |
| ray_node_network_received_1               | 端点下行接收量         | Ray端点接收的网络数据总量。               | ≥0        | Bytes   | 1024   | workspace_id, endpoint_id, node_id, interface    | 1分钟   |
| ray_cluster_active_nodes_1                | 集群活跃端点数        | Ray集群中活跃端点数量，按端点类型分组（头端点/工作端点）。 | ≥0       | Count   | 不涉及   | workspace_id, endpoint_id, node_type           | 1分钟    |
| ray_cluster_failed_nodes_1                 | 集群失败端点数        | Ray集群中失败端点数量，按端点类型分组。          | ≥0        | Count  | 不涉及   | workspace_id, endpoint_id, node_type            | 1分钟   |
| ray_cluster_pending_nodes_1                | 集群待定端点数        | Ray集群中待定端点数量，按端点类型分组。           | ≥0       | Count  | 不涉及   | workspace_id, endpoint_id, node_type              | 1分钟    |
| ray_component_cpu_percentage                | 组件CPU利用率       | Ray组件（如头端点、工作进程）的CPU利用率百分比。     | 0\~100   | %       | 不涉及     | workspace_id, endpoint_id, component_name        | 1分钟   |
| ray_component_cpu_percentage_1           | 组件CPU利用率        | Ray组件（如头端点、工作进程）的CPU利用率百分比。     | 0\~100  | %       | 不涉及  | workspace_id, endpoint_id, component_name       | 1分钟  |
| ray_component_rss_mb                      | 组件RSS内存       | Ray组件的RSS（常驻集大小）内存使用量。         | ≥0       | MiB      | 1024   | workspace_id, endpoint_id, component_name        | 1分钟    |
| ray_component_rss_mb_1                     | 组件RSS内存          | Ray组件的RSS（常驻集大小）内存使用量。           | ≥0       | MiB      | 1024    | workspace_id, endpoint_id, component_name           | 1分钟      |
   
