Logstash-forwarder

I am using logstash forwarder to ship my logs from AIX machine to my ELK stack on linux machine
I am trying to make an index as (hostname-ip) but it is not working
my config is as below

input {
lumberjack {
port => 5043
type => "logs"
ssl_certificate => "/etc/logstash/conf.d/lumberjack.crt"
ssl_key => "/etc/logstash/conf.d/lumberjack.key"
}
}

output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "%{[host][hostname]}-%[ip]"
user => "elastic"
password => "changeme"
}
}

how can I get my index in this form

Try

index => "%{[host][hostname]}-%{ip}"

unfortunately not working
in kibana (%{[host][hostname]}-%[ip])

My bad
it should be host not hostname
index => "logs-%{[host]}-%{+yyyy.MM.dd}"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.