Hi,
logstash add a field named 'host' that contains the source hostname in the input section.
but how can I get the hostname where logstash is curently running ?
ty
Hi,
logstash add a field named 'host' that contains the source hostname in the input section.
but how can I get the hostname where logstash is curently running ?
ty
i'm always asking for this question ... anybody can help ?
ty
filter {
ruby {
init => "require 'socket'"
code => "event['some-field-name'] = Socket.gethostname"
}
}
ty very much magnus
© 2020. All Rights Reserved - Elasticsearch
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.