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
kibana and logstash have different ways of representing fields inside objects. If the log object contains a field called file then kibana will call it log.file, but in logstash that is referenced using [log][file].
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.