jeudi 5 mars 2020

Logstash conditional check for nil/null value in a field

I have a json data with some field value as null (eg: "location": null). I would need to check whether this field is null, and take some action.

I have tried using if [location] == 'null' { do something } but it fails, also I have tried with if [location] == 'nill' { do something }

Found some relative links that mentioned to check whether the field exist if [location] but this can't be used in my case.

Please help me to solve this, thanks in advance.

Aucun commentaire:

Enregistrer un commentaire