I have been trying to split up the input of a script from execbeat.
So far everything has been going smooth.
I have input of similar fashion.
rpm-2109130090009900.x86-64 Thu 2019 ... and so on.
So basically an information of the installed RPM package and the DATE it has been installed.
Now I was trying the following grok in logstash:
if [type] == "execbeat" {
split {
field => "[exec][stdout]"
}
grok {
match => {
"[exec][stdout]" => "%{NOTSPACE:rpm} %{GREEDYDATA:installdate}"
"rpm" => "%{GREEDYDATA}-%{INT:rpmtimestamp}"
}
}
}
I was thinking that I could access the 'rpm' variable for the 2nd match but it doesn't appear to work. Is there a better way to make this work or do I have an error somewhere? If i use the second grok on [exec][stdout] then I get the rpmtimestamp variable in the index, so the grok pattern itself is correct.