使用redis做缓存情况下,logstash配置文件示例

使用redis做缓存情况下,logstash配置文件示例,第1张

使用redis做缓存情况下,logstash配置文件示例
cat >/etc/logstash/config/redis.conf << 'EOF'
input {
  redis {
    host => "localhost"
    port => "6379"
    db => "0"
    key => "ng_access"
    data_type => "list"
  }
    redis {
    host => "localhost"
    port => "6379"
    db => "0"
    key => "ng_error"
    data_type => "list"
  }
}

filter {
  mutate {
    convert => ["upstream_time", "float"]
    convert => ["request_time", "float"]
  }
}

output {
    stdout {}
# 输出,这的tags就是在filebeat那边新增的自定义字段名 if "access" in [tags] { elasticsearch { hosts => "http://192.168.53.21:9200" manage_template => false index => "nginx_access-%{+yyyy}" } } if "error" in [tags] { elasticsearch { hosts => "http://192.168.53.21:9200" manage_template => false index => "nginx_error-%{+yyyy}" } } } EOF

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5118005.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-17
下一篇 2022-11-17

发表评论

登录后才能评论

评论列表(0条)

保存