居然是你

能单独启一个filebeat服务 读指定文件 上传到redis中吗

Beats | 作者 tr862316121 | 发布于2017年05月22日 | 阅读数:5179


QQ图片20170522161725.png

这是我的配置文件
 

QQ图片20170522161907.png

改完配置文件后用上图的方法启动了filebeat服务
 
往/home/tt/var/log/testpython.log里添加了一行下边的数据
Mon, 22 May 2017 16:19:44 testpython.py[line:15] ERROR server is error
 
可我在redis中没有看到任何数据 
 
请问是我的步骤什么地方出了问题吗
已邀请:

xinfanwang

赞同来自: cddisk2017

Exiting: error loading config file: yaml: line 5: found a tab character that violate indentation
 line 5:用空格,不要用TAB!

zaqweb

赞同来自:

ps -ef 看一下你的filebeat进程还在吗? 
filebeat:
   prospectors:
     -
这个写法没写过。我们用的是:
filebeat.prospectors:
- input_tupe: log
  paths:
    - /sfs/sfd//sdfsf/log
 
把你的filebeat.yml 内容copy出来在线检查一下YAML语法是不是都正确

medcl - 今晚打老虎。

赞同来自:

output.Redis->output.redis
注意大小写

cddisk2017 - 80後 IT 男

赞同来自:

我也遇到相同問題,也是過不去,下面是 filebeat 配置:
 
filebeat.prospectors:
- input_tupe: log
paths:
- /var/log/*.log

output.redis:
redis:
enabled: true
hosts: [192.168.8.12]
port: 6379
db: 0
檢查「nohup.out」出現錯誤,看不出所以然 ...
 
filebeat2017/08/09 00:54:29.300306 beat.go:339: CRIT Exiting: error loading config file: yaml: line 5: found a tab character that violate indentation
Exiting: error loading config file: yaml: line 5: found a tab character that violate indentation
 

cddisk2017 - 80後 IT 男

赞同来自:

小弟剛剛測試成功了~_~ 歡迎參考以下 寫法。
filebeat.prospectors:
- input_tupe: log
paths:
- /var/log/*.log


output.redis:
redis:
enabled: true
hosts: [192.168.8.12]
port: 6379
db: 0

要回复问题请先登录注册