# NodeClusterMetricItemService
> 集群指标

---

## disableNodeClusterMetricItem
> 禁用某个指标

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterMetricItemService/disableNodeClusterMetricItem`
- RPC：`rpc disableNodeClusterMetricItem (DisableNodeClusterMetricItemRequest) returns (RPCSuccess);`

**请求对象 (`DisableNodeClusterMetricItemRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID",
  "metricItemId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterMetricItemService/disableNodeClusterMetricItem" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## enableNodeClusterMetricItem
> 启用某个指标

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterMetricItemService/enableNodeClusterMetricItem`
- RPC：`rpc enableNodeClusterMetricItem (EnableNodeClusterMetricItemRequest) returns (RPCSuccess);`

**请求对象 (`EnableNodeClusterMetricItemRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID",
  "metricItemId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterMetricItemService/enableNodeClusterMetricItem" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## existsNodeClusterMetricItem
> 检查是否已添加某个指标

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterMetricItemService/existsNodeClusterMetricItem`
- RPC：`rpc existsNodeClusterMetricItem (ExistsNodeClusterMetricItemRequest) returns (RPCExists);`

**请求对象 (`ExistsNodeClusterMetricItemRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID",
  "metricItemId": "int64"
}
```

**响应对象 (`RPCExists`)**

```json
{
  "exists": "bool"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterMetricItemService/existsNodeClusterMetricItem" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllNodeClusterMetricItems
> 查找集群中所有指标

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterMetricItemService/findAllNodeClusterMetricItems`
- RPC：`rpc findAllNodeClusterMetricItems (FindAllNodeClusterMetricItemsRequest) returns (FindAllNodeClusterMetricItemsResponse);`

**请求对象 (`FindAllNodeClusterMetricItemsRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID",
  "category": "string"
}
```

**响应对象 (`FindAllNodeClusterMetricItemsResponse`)**

```json
{
  "metricItems": "[]MetricItem"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterMetricItemService/findAllNodeClusterMetricItems" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllNodeClustersWithMetricItemId
> 查找使用指标的集群

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/NodeClusterMetricItemService/findAllNodeClustersWithMetricItemId`
- RPC：`rpc findAllNodeClustersWithMetricItemId (FindAllNodeClustersWithMetricItemIdRequest) returns (FindAllNodeClustersWithMetricItemIdResponse);`

**请求对象 (`FindAllNodeClustersWithMetricItemIdRequest`)**

```json
{
  "metricItemId": "int64"
}
```

**响应对象 (`FindAllNodeClustersWithMetricItemIdResponse`)**

```json
{
  "nodeClusters": "[]NodeCluster"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/NodeClusterMetricItemService/findAllNodeClustersWithMetricItemId" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
