Pepeline.conf


(Little Five) #1

The following is the contents of my Logstash pipeline.conf configuration file:

output {
    elasticsearch {
        hosts => [ "xxx.xxx.xxx.xxx:9200" ]
        index => "%{[@metahostname]}"           # How to write dynamic name
    }
}

How to configure the index section. After the log is sent from Logstash to elasticsearch, I can create an index on her own hostname in elasticsearch.


(Vikas) #2

index => "logstash-%{+YYYY.MM.dd}" // this will create a index a/c to date .
OR
Index =>"any_name_you_prefer" //this will create an index the name you provide.


(system) #3

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