API получения конвейера
Этот API извлекает конвейеры, используемые для централизованного управления конвейерами Logstash.
Запрос
GET _logstash/pipeline
GET _logstash/pipeline/<pipeline_id>
Предварительные требования
- Если функции безопасности Elasticsearch включены, у вас должен быть
manage_logstash_pipelinesкластерный доступ для использования этого API.
Описание
Получение одного или нескольких конвейеров Logstash.
Параметры пути
-
<pipeline_id> - (Необязательно, строка) Список идентификаторов конвейеров, разделенных запятыми.
Примеры
Следующий пример извлекает конвейер с именем my_pipeline:
resp = client.logstash.get_pipeline(
id="my_pipeline",
)
print(resp) response = client.logstash.get_pipeline( id: 'my_pipeline' ) puts response
const response = await client.logstash.getPipeline({
id: "my_pipeline",
});
console.log(response); GET _logstash/pipeline/my_pipeline
Если запрос успешен, тело ответа содержит определение конвейера:
{
"my_pipeline": {
"description": "Sample pipeline for illustration purposes",
"last_modified": "2021-01-02T02:50:51.250Z",
"pipeline_metadata": {
"type": "logstash_pipeline",
"version": "1"
},
"username": "elastic",
"pipeline": "input {}\n filter { grok {} }\n output {}",
"pipeline_settings": {
"pipeline.workers": 1,
"pipeline.batch.size": 125,
"pipeline.batch.delay": 50,
"queue.type": "memory",
"queue.max_bytes": "1gb",
"queue.checkpoint.writes": 1024
}
}
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/logstash-api-get-pipeline.html