

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 查看 Amazon OpenSearch Ingestion 管道
<a name="list-pipeline"></a>

您可以使用 AWS 管理控制台、或 Ingestion API 查看有关 Amazon OpenSearch Ingestion 管道的 OpenSearch 详细信息。 AWS CLI

## 控制台
<a name="list-pipeline-console"></a>

**查看管道**

1. 在 [https://console.aws.amazon.com/aos/osis](https://console.aws.amazon.com/aos/osis/home#osis/ingestion-pipelines) /home 登录亚马逊 OpenSearch 服务控制台。您将进入 “管道” 页面。

1. （可选）要查看具有特定状态的管道，请选择**任何状态**并选择要筛选的状态类型。

   管道可以具有以下状态：
   + `Active`— 管道处于活动状态，并且可以摄取数据。
   + `Creating`— 正在创建管道。
   + `Updating`— 正在更新管道。
   + `Deleting`— 正在删除管道。
   + `Create failed`— 无法创建管道。
   + `Update failed`— 无法更新管道。
   + `Stop failed`— 管道无法停止。
   + `Start failed`— 管道无法启动。
   + `Stopping`— 正在停止管道。
   + `Stopped`— 管道已停止，可以随时重新启动。
   + `Starting`— 管道正在启动。

当管道处于`Create failed`、`Creating`、和状态 OCUs 时，您无需支付摄取费用。`Deleting` `Stopped`

## CLI
<a name="list-pipeline-cli"></a>

要使用查看管道 AWS CLI，请发送[列表管道请求](https://docs.aws.amazon.com/cli/latest/reference/osis/list-pipelines.html)：

```
aws osis list-pipelines  
```

该请求返回所有现有管道的列表：

```
{
    "NextToken": null,
    "Pipelines": [
        {,
            "CreatedAt": 1.671055851E9,
            "LastUpdatedAt": 1.671055851E9,
            "MaxUnits": 4,
            "MinUnits": 2,
            "PipelineArn": "arn:aws:osis:us-west-2:123456789012:pipeline/log-pipeline",
            "PipelineName": "log-pipeline",
            "Status": "ACTIVE",
            "StatusReason": {
                "Description": "The pipeline is ready to ingest data."
            }
        },
            "CreatedAt": 1.671055851E9,
            "LastUpdatedAt": 1.671055851E9,
            "MaxUnits": 2,
            "MinUnits": 8,
            "PipelineArn": "arn:aws:osis:us-west-2:123456789012:pipeline/another-pipeline",
            "PipelineName": "another-pipeline",
            "Status": "CREATING",
            "StatusReason": {
                "Description": "The pipeline is being created. It is not able to ingest data."
            }
        }
    ]
}
```

要获取有关单个管道的信息，请使用 [get-pipeline](https://docs.aws.amazon.com/cli/latest/reference/osis/get-pipeline.html) 命令：

```
aws osis get-pipeline --pipeline-name "my-pipeline"
```

该请求返回指定管道的配置信息：

```
{
    "Pipeline": {
        "PipelineName": "my-pipeline",
        "PipelineArn": "arn:aws:osis:us-east-1:123456789012:pipeline/my-pipeline",
        "MinUnits": 9,
        "MaxUnits": 10,
        "Status": "ACTIVE",
        "StatusReason": {
            "Description": "The pipeline is ready to ingest data."
        },
        "PipelineConfigurationBody": "log-pipeline:\n source:\n http:\n processor:\n - grok:\n match:\nlog: [ '%{COMMONAPACHELOG}' ]\n - date:\n from_time_received: true\n destination: \"@timestamp\"\n  sink:\n - opensearch:\n hosts: [ \"https://search-mdp-performance-test-duxkb4qnycd63rpy6svmvyvfpi.us-east-1.es.amazonaws.com\" ]\n index: \"apache_logs\"\n aws_sts_role_arn: \"arn:aws:iam::123456789012:role/my-domain-role\"\n  aws_region: \"us-east-1\"\n  aws_sigv4: true",,
        "CreatedAt": "2022-10-01T15:28:05+00:00",
        "LastUpdatedAt": "2022-10-21T21:41:08+00:00",
        "IngestEndpointUrls": [
            "my-pipeline-123456789012.us-east-1.osis.amazonaws.com"
        ]
    }
}
```

## OpenSearch 摄取 API
<a name="list-pipelines-api"></a>

要使用 OpenSearch Ingestion API 查看 OpenSearch 摄取管道，请调用和操作。[ListPipelines[GetPipeline](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_osis_GetPipeline.html)](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_osis_ListPipelines.html)