Skip to content

Instantly share code, notes, and snippets.

@quoeamaster
Created December 5, 2019 08:11
Show Gist options
  • Select an option

  • Save quoeamaster/9e01ccfb053964fc858e6483b273a6a5 to your computer and use it in GitHub Desktop.

Select an option

Save quoeamaster/9e01ccfb053964fc858e6483b273a6a5 to your computer and use it in GitHub Desktop.
POST _ingest/pipeline/_simulate
{
"pipeline": {
"processors": [
{
"dissect": {
"field": "message",
"pattern": "%{name}:%{age}"
}
},
{
"pipeline": {
"name": "func_convert_age",
"on_failure": [
{
"set": {
"field": "error",
"value": "{{ _ingest.on_failure_processor_type }} - {{ _ingest.on_failure_message }}"
}
},
{
"remove": {
"field": [ "name", "age" ]
}
}
]
}
}
]
},
"docs": [
{
"_source": {
"message": "helen wong:45"
}
},
{
"_source": {
"message": "josh blake:a46"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment