Hi again Badger...when ever a log doesnt match the grok I send the error to a file, and Im still getting log lines with the "error" string in the server field in that file, with the drop the log should not appears in my errors file, or am i wrong?
output{
if "_grokparsefailure" in [tags] {
file {
path => "/tmp/memoria_sw-warning.txt"
}
}
if the server field didnt exist, it wouldnt be shown in the errors file that is created when a grok parse failure happens, and its there in the message.
Im confused.
by the way there is other fields that I excluded from the example to simplify it.
Mind blown....So the field "server" is not created because the parse error?
The field that is provoking the parse error expect a number, but is getting a number with a colon in beetween ex: 23:2233 (I check that with the original log)
I have that field like this: (%{NUMBER:name})? so whenever the value doesn´t match with the type, that field doesnt exist anymore, then the grok parse failure should go away....but still is giving me the parse error.
Hey man you had been very pacient, and I dont want to take your time anymore, so my last doubt, in another conf I have this
grok {
match => {"message" => "%{TIME:hora}\s%{DATA:fecha}\s%{DATA:status}\s%{DATA:server}\s(%{NUMBER:segundos})?"}
}
if !([segundos]) {
mutate {
add_field => {"segundos" => "0"}
}
}
Whenever a non numeric value is in the "segundos" field, only that field is not included, but the rest of fields are created. (the oppsite of what you say) thats why later I check and add the segundos field if it is not present, and it works....
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.