Hi,
I don't know how to use the filebeat fields listed here:
https://www.elastic.co/guide/en/beats/filebeat/current/exported-fields-log.html
In logstash.
I need to extract the application name from "log.file.path" field
This is how I see "log.file.path" in Kibana
/home/elk/sample_logs/bdp/hive/hadoop-cmf-hive-HIVESERVER2-cv38x072-internal.sos.kb.cz.log.out
where "hive" is the application name i wan't work with.
This has worked in Logstash 6.8:
ruby {
code => "event.set('app_name',event.get('source').split('/')[-2])"
}
Now with logstash 7.3. it gives an ERROR:
/elastic/log/logstash/logstash-plain.log:[2019-08-26T13:08:52,098][ERROR][logstash.filters.ruby ] Ruby exception occurred: undefined method `split' for nil:NilClas