suresh_u
(suresh u)
June 30, 2022, 7:25am
1
Hi team,
I have one roll number like 1071-P56790-345.
First number is 1071. Remaining fields in future can be added.
So I need to extract 1071 and P56790-345 into 2 seperate fields.
I tried using filter by delimeter '-'. But array is in the record. Below is the syntax:
mutate {
split => { "doc_number" => "-" }
}
Could someone please suggest how to solve it?
Thanks.
Hello @suresh_u
You can use grok filter to make it has two separate fields
filter
{
grok
{
match => {"message" => ["doc_number", "%{DATA:firstnumber}-%{GREEDYDATA:lastnumber}"]}
}
}
suresh_u
(suresh u)
June 30, 2022, 7:52am
3
thanks @sudhagar_ramesh let me try.
suresh_u
(suresh u)
June 30, 2022, 8:29am
4
Thanks a lot @sudhagar_ramesh . It is working.
1 Like
system
(system)
Closed
July 28, 2022, 8:29am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.