No file output after I defined a file output?


(Keith Tt) #1

ELK version: 5.4.1

I am referring to this page:
https://www.elastic.co/guide/en/logstash/current/plugins-outputs-file.html

And here is my logstash pipeline config file:

input {
  beats {
    port => 5044
    codec => "json"
  }
}

output {
    if [type] == "zixun-nginx-access" {
    elasticsearch {
        hosts => ["192.168.3.56:9200","192.168.3.49:9200","192.168.3.57:9200"]
        index => "zixun-nginx-access-%{+YYYY.MM.dd}"
        document_type => "%{[@metadata][type]}"
        template_overwrite => true
        user => elastic
        password => Monkey
    }}
    file {
        path => /tmp/zixun-nginx-access-%{+YYYY-MM-dd}.txt
    }
    ...
}

And there is no file output....is there anything wrong?


(Keith Tt) #2

I am sorry , I found the problem, there should be a pair of quotation marks.

file {
    path => "/tmp/zixun-nginx-access-%{+YYYY-MM-dd}.log"
}

(system) #3

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