身安不如心安,屋宽不如心宽 。

logstash 配置无法写入redis

Logstash | 作者 yuedingwangji | 发布于2017年05月05日 | 阅读数:4696

 logstash 配置如下
  input {
     file {
         path => "/home/hui/web/ www.test.cn\ /201704/access_03.log"
         type => "nginx_access"
         start_position => "beginning"
     }
 
 }
 
 
 output {
     redis {
         host => "127.0.0.1"
         port => "6379"
         data_type => "list"
         db => "6"
         key => "nginx"
     }
 }
 
为什么数据没写到 redis ,我尝试 stdout 是可以正常输出的
补充一下 ,系统版本  ubuntu 12.04   redis 版本  2.2.12     elastic stack 版本  应该是最新的, 我用的清华大学的源安装的
已邀请:

leighton_buaa

赞同来自:

你的logstash和redis是跑在同一台机器上吗?
如果是,你在这台机器上面执行
redis-cli -h 127.0.0.1 -p 6379
看看能否通过cli连接上redis

要回复问题请先登录注册