GroupName::Cars: mileage=19274 ~ year=2000
GroupName: students = 10000 ~ location = USA ~ classes = 50 ~ staff = 75
How can I pattern match both of these lines using the same RegEx pattern in the logstash configuration file? Is there a way to continue pattern matching until some unspecified number of "~"?
I know that it is possible to create two separate grok filters as below, but wondering if there's a cleaner way to collapse the two pattern matches into one
Thanks! Let's say that the log messages may have new GroupNames in the future with an unspecified number of parameters. All I know is that the messages will be of this format:
GroupName:: <parameter_1 name> = <parameter_1 value> ~ <parameter_2 name> = <parameter_2 value> ~ <parameter_n name> = <parameter_n value>
What's the correct syntax for the statement below?
if [path] =~ "a" OR [path] =~ "b"?
I want to perform the same filter if path contains two particular keywords. Rather than copy/paste filter, I want to collapse it into one. So instead of
if [path] =~ "a" {
// some filter
} else if [path] =~ "a" {
// same filter
}
I want
if [path] =~ "a" OR [path] =~ "b" {
// some filter
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.