I'm trying to grok the host name field only if it contains a period using the conditional below:
if ([host][name] =~ ".") { grok host.name field }
For some reason, when the host name field doesn't contain a period, I get _grokparsefailure. I'm confused as to why this is happening. I would think if there's no period, the conditional won't be satisfied & the grok statement won't be executed. It seems like it is anyway.
I also tried this & it produces the same outcome
if ([host][name] =~ /./) { grok host.name field }
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.