logstash check if field exists

前端 未结 4 790
清酒与你
清酒与你 2020-12-13 08:27

I have log files coming in to an ELK stack. I want to copy a field (foo) in order to perform various mutations on it, However the field (foo) isn\'t always present.

4条回答
  •  萌比男神i
    2020-12-13 09:18

    On Logstash 2.2.2, the ("" in [field]) construct does not appear to work for me.

    if ![field] { }
    

    does, for a non-numerical field.

提交回复
热议问题