Create or update a Logstash pipeline
Added in 7.12.0
Create a pipeline that is used for Logstash Central Management. If the specified pipeline exists, it is replaced.
Path parameters
-
id
string Required An identifier for the pipeline.
Body
Required
-
description
string Required A description of the pipeline. This description is not used by Elasticsearch or Logstash.
last_modified
string | number Required A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
pipeline
string Required The configuration for the pipeline.
-
pipeline_metadata
object Required -
pipeline_settings
object Required -
username
string Required The user who last updated the pipeline.
PUT
/_logstash/pipeline/{id}
curl \
--request PUT 'http://api.example.com/_logstash/pipeline/{id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"description\": \"Sample pipeline for illustration purposes\",\n \"last_modified\": \"2021-01-02T02:50:51.250Z\",\n \"pipeline_metadata\": {\n \"type\": \"logstash_pipeline\",\n \"version\": 1\n },\n \"username\": \"elastic\",\n \"pipeline\": \"input {}\\\\n filter { grok {} }\\\\n output {}\",\n \"pipeline_settings\": {\n \"pipeline.workers\": 1,\n \"pipeline.batch.size\": 125,\n \"pipeline.batch.delay\": 50,\n \"queue.type\": \"memory\",\n \"queue.max_bytes\": \"1gb\",\n \"queue.checkpoint.writes\": 1024\n }\n}"'
Request example
Run `PUT _logstash/pipeline/my_pipeline` to create a 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
}
}