当我尝试从Logstash进行弹性搜索中创建索引时出错

您好,我尝试从Logstash在ElasticSearch中创建索引时遇到以下错误:

[Converge Pipelineaction :: Create]代理-无法执行操作 {:action => LogStash :: Pipelineaction :: Create / pipeline_id:main, :exception =>“ LogStash :: ConfigurationError”,:message =>“预期的#,输入,过滤器,输出之一 第1行,第1列(字节1)”

您能告诉我我的.conf文件中是否有问题吗

iput {
    file {
    path => "/opt/sis-host/process/uptime_test*"
#        start_position => "beginning"
        ignore_older => 0
    }
}*emphasized text*

 filter {
     grok {
       match => { "message" => "%{DATA:hora} %{DATA:fecha} %{DATA:status} %{DATA:server} % 
 {INT:segundos}" }
     }
     date {
       match => ["horayfecha","HH:mm:ss MM/dd/YYYY" ]
       target => "@timestamp"
     }
 }

 output {
       elasticsearch {
           hosts => ["host:9200"]
           index => "uptime_test-%{+YYYY.MM.dd}"
       }
       stdout { codec => rubydebug }
}
liaozhongfa 回答:当我尝试从Logstash进行弹性搜索中创建索引时出错

配置文件应以输入开头,而不是“ iput”

input {  # not iput
    file {
    path => "/opt/sis-host/process/uptime_test*"
#        start_position => "beginning"
        ignore_older => 0
    }
}

 filter {
     grok {
       match => { "message" => "%{DATA:hora} %{DATA:fecha} %{DATA:status} %{DATA:server} % 
 {INT:segundos}" }
     }
     date {
       match => ["horayfecha","HH:mm:ss MM/dd/YYYY" ]
       target => "@timestamp"
     }
 }

 output {
       elasticsearch {
           hosts => ["host:9200"]
           index => "uptime_test-%{+YYYY.MM.dd}"
       }
       stdout { codec => rubydebug }
}
本文链接:https://www.f2er.com/3143257.html

大家都在问