Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eedugon/5ef9b7fa94f1d42e492c5184f0f05b4d to your computer and use it in GitHub Desktop.
Save eedugon/5ef9b7fa94f1d42e492c5184f0f05b4d to your computer and use it in GitHub Desktop.
###########
GET _ingest/processor/grok
POST _ingest/pipeline/_simulate
{
"pipeline": {
"description": "parse major.minor.patch to sub-fields",
"processors": [
{
"grok": {
"field": "version.display_name",
"patterns": [
"%{INT:version.major}.%{INT:version.minor}.%{INT:version.bugfix}"
]
}
},
{
"convert": {
"field" : "version.major",
"type": "integer"
}
},
{
"convert": {
"field" : "version.minor",
"type": "integer"
}
},
{
"convert": {
"field" : "version.bugfix",
"type": "integer"
}
}
]
},
"docs": [
{
"_source": {
"version": {
"display_name": "6.2.1"
}
}
}
]
}
###########
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment