My log are alredy formatted so I need only to rename the field.
But logstash add by itself at the begin of the message some elements (that I totally don't need)
...
"vhost" => "<133>Apr 11 17:16:54 centos7test2 apache-access 192.168.122.226", (I need only the IP)
...
For now I have solved this problem using a grok filter that divide the field in single element and the deleting what I don't need... But this is really stupid...It's only a waste of CPU for nothing, as I said my file are alredy formatted, why I should add some fields and then remove them!
grok {
match => [ "vhost", "<%{NUMBER:messType}>\s*%{MONTH:month}\s*%{MONTHDAY:day}\s*%{TIME:time}\s*%{PROG:sender}\s*%{PROG:logType}\s*%{IPORHOST:vHost}" ]
}
I'm almost sure that exist a command to force logstash to not add nothing to the incoming message but for now I don't find anything... So at the end, is this possible?
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.