How can I get the logstash hostname

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 :slight_smile:

filter {
  ruby {
    init => "require 'socket'"
    code => "event['some-field-name'] = Socket.gethostname"
  }
}
4 Likes

ty very much magnus :slight_smile: