简体   繁体   English

logstash文件输入插件配置不起作用

[英]logstash file input plugin configuration is not working

I have a problem with logstash when i want to print logs to a file . 当我想将日志打印到文件时,logstash出现问题。

This is my output configuration 这是我的输出配置

if "ERROR" in [log]
{  
  file 
  {    
    path => "/home/yasmine/Bureau/elk/tri.text" codec => line 
    { 
      format => "Log: %log 
    }"            
  }
}

After running logstash it shows me this error 运行logstash后,它向我显示此错误

An unexpected error occurred! {:error=>#<Errno::EEXIST: File exists...

Try this: 尝试这个:

if "ERROR" in [log]
{  
  file 
  {    
    path => "/home/yasmine/Bureau/elk/tri.text" 
    codec => line { format => "Log: %{log}"}             
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM