
# ER支持的监控指标
#### 功能说明
本节定义了企业路由器上报给云监控服务的监控指标信息，包括命名空间、监控指标列表和测量维度，您可以通过云监控提供的管理控制台或API接口来检索企业路由器产生的监控指标和告警信息。
![](https://support.huaweicloud.com/usermanual-er/public_sys-resources/note_3.0-zh-cn.png)
云监控服务最大支持4个层级维度，维度编号从0开始，编号3为最深层级。例如监控指标中的维度信息为"er_instance_id,er_attachment_id"时，表示对应的监控指标的维度存在层级关系，且"er_instance_id"为0层，"er_attachment_id"为1层。
#### 命名空间
SYS.ER
#### 监控指标
通过云监控服务，您可以监控企业路由器实例以及企业路由器连接的网络情况。
- [企业路由器实例支持的监控指标]
- [企业路由器连接支持的监控指标]
 
 表1企业路由器实例支持的监控指标 
| 指标ID                            | 指标名称       | 指标含义                             | 取值范围 | 单位    | 进制        | 测量对象（维度）       | 监控周期（原始指标） |
|:---|:---|:---|:---|:---|:---|:---|:---|
| instance_bytes_in               | 入方向流量      | 该指标用于统计企业路由器实例入方向的网络流量。          | ≥ 0  | Byte  | 1024(IEC) | er_instance_id | 1分钟        |
| instance_bytes_out              | 出方向流量      | 该指标用于统计企业路由器实例出方向的网络流量。          | ≥ 0  | Byte  | 1024(IEC) | er_instance_id | 1分钟        |
| instance_bits_rate_in           | 入方向带宽      | 该指标用于统计企业路由器实例入方向，每秒接收的比特数。      | ≥ 0  | bit/s | 1000(SI)  | er_instance_id | 1分钟        |
| instance_bits_rate_out          | 出方向带宽      | 该指标用于统计企业路由器实例出方向，每秒发送的比特数。      | ≥ 0  | bit/s | 1000(SI)  | er_instance_id | 1分钟        |
| instance_packets_in             | 入方向PPS     | 该指标用于统计企业路由器实例入方向，每秒接收的数据包数。     | ≥ 0  | pps   | 1000(SI)  | er_instance_id | 1分钟        |
| instance_packets_out            | 出方向PPS     | 该指标用于统计企业路由器实例出方向，每秒发送的数据包数。     | ≥ 0  | pps   | 1000(SI)  | er_instance_id | 1分钟        |
| instance_packets_drop_blackhole | 黑洞路由丢弃包数量  | 该指标用于统计企业路由器实例中，由于黑洞路由导致的丢包数量。   | ≥ 0  | Count | 不涉及       | er_instance_id | 1分钟        |
| instance_packets_drop_noroute   | 无匹配路由丢弃包数量 | 该指标用于统计企业路由器实例中，由于路由无法匹配导致的丢包数量。 | ≥ 0  | Count | 不涉及       | er_instance_id | 1分钟        |
   
 表2企业路由器连接支持的监控指标 
| 指标ID                              | 指标名称       | 指标含义                             | 取值范围 | 单位    | 进制        | 测量对象（维度）                        | 监控周期（原始指标） |
|:---|:---|:---|:---|:---|:---|:---|:---|
| attachment_bytes_in               | 入方向流量      | 该指标用于统计企业路由器连接入方向的网络流量。          | ≥ 0  | Byte  | 1024(IEC) | er_instance_id,er_attachment_id | 1分钟        |
| attachment_bytes_out              | 出方向流量      | 该指标用于统计企业路由器连接出方向的网络流量。          | ≥ 0  | Byte  | 1024(IEC) | er_instance_id,er_attachment_id | 1分钟        |
| attachment_bits_rate_in           | 入方向带宽      | 该指标用于统计企业路由器连接入方向，每秒接收的比特数。      | ≥ 0  | bit/s | 1000(SI)  | er_instance_id,er_attachment_id | 1分钟        |
| attachment_bits_rate_out          | 出方向带宽      | 指标用于统计企业路由器连接出方向，每秒发送的比特数。       | ≥ 0  | bit/s | 1000(SI)  | er_instance_id,er_attachment_id | 1分钟        |
| attachment_packets_in             | 入方向PPS     | 该指标用于统计企业路由器连接入方向，每秒接收的数据包数。     | ≥ 0  | pps   | 1000(SI)  | er_instance_id,er_attachment_id | 1分钟        |
| attachment_packets_out            | 出方向PPS     | 该指标用于统计企业路由器连接出方向，每秒发送的数据包数。     | ≥ 0  | pps   | 1000(SI)  | er_instance_id,er_attachment_id | 1分钟        |
| attachment_packets_drop_blackhole | 黑洞路由丢弃包数量  | 该指标用于统计企业路由器连接中，由于黑洞路由导致的丢包数量。   | ≥ 0  | Count | 不涉及       | er_instance_id,er_attachment_id | 1分钟        |
| attachment_packets_drop_noroute   | 无匹配路由丢弃包数量 | 该指标用于统计企业路由器连接中，由于路由无法匹配导致的丢包数量。 | ≥ 0  | Count | 不涉及       | er_instance_id,er_attachment_id | 1分钟        |
   
对于有多层测量维度的测量对象，使用接口查询监控指标时，需要代入具体指标的维度层级关系。
例如，需要查询企业路由器连接的入方向流量attachment_bytes_in），该指标的维度信息为"er_instance_id,er_attachment_id"，表示er_instance_id为0层，er_attachment_id为1层。
- 通过API查询单个监控指标时，mount_point的维度信息代入样例如下：
  ```
  dim.0=er_instance_id,d9f7b61f-e211-4bce-ac5f-2b76f3d0cf1d&dim.1=er_attachment_id,659614a0-e559-46c0-86ca-00c03c3d61b8
  ```
  其中，d9f7b61f-e211-4bce-ac5f-2b76f3d0cf1d和659614a0-e559-46c0-86ca-00c03c3d61b8分别为er_instance_id和er_attachment_id的维度值，具体获取方法请参见"[维度]"表格中的获取指导。
  

- 通过API批量查询监控指标时，mount_point的维度信息代入样例如下：
  ```
  "dimensions": [
      {
          "name": "er_instance_id", 
          "value": "d9f7b61f-e211-4bce-ac5f-2b76f3d0cf1d"
      }, 
      {
          "name": "er_attachment_id", 
          "value": "659614a0-e559-46c0-86ca-00c03c3d61b8"
      }
  ]
  ```
  其中，d9f7b61f-e211-4bce-ac5f-2b76f3d0cf1d和659614a0-e559-46c0-86ca-00c03c3d61b8分别为er_instance_id和er_attachment_id的维度值，具体获取方法请参见"[维度]"表格中的获取指导。
  
 
 #### 维度
| Key              | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|
| er_instance_id   | 企业路由器实例ID 该取值的获取方式为：调用[查询企业路由器列表](https://support.huaweicloud.com/api-er/ListEnterpriseRouters.html)API，从接口返回的响应参数中提取。                                                                                                                                                                                                                                                               |
| er_attachment_id | 企业路由器连接ID 该取值的获取方式为： - VPC连接：调用[查询VPC连接列表](https://support.huaweicloud.com/api-er/ListVpcAttachments.html)API，从接口返回的响应参数中提取。  - 其他类型连接：调用[查询连接列表](https://support.huaweicloud.com/api-er/ListAttachments.html)API，从接口返回的响应参数中提取。   |
   
