zoukankan      html  css  js  c++  java
  • Logstash 使用inpu-tcp plugin 接收快速接受日志文件

    Logstash: 7.1.0
    这一段时间在学习ELK,今天偶而看到input tcp插件 ,其中一个应用场景是接受他机的日志文件,实际操作记录一下。

    Logstash 主机上的配置
    input_tcp.conf
    input {
            tcp {
                    mode => "server"
                    host => "192.168.72.129"
                    port => 7124 
                    ssl_enable => false 
                    tcp_keep_alive => true 
           }   
    }
    filter {
    }
    output{
        stdout {
                    codec=>rubydebug
            }
    }
    
    运行logstash 
    $ ./bin/logstash -f  ./config/input_tcp.conf
    需要传输文件的服务器上运行Nc
    nc 192.168.72.129  7124  < logstash-plain.log 

    在logstash上就可以看到运行效果了





  • 相关阅读:
    vim
    Linux 软链接和硬链接
    常用命令
    linux 二级目录结构
    关于bash shell的理解
    虚拟机网络模式
    安装虚拟机
    date 命令
    使用3种协议搭建yum仓库
    ubuntu update时发生错误
  • 原文地址:https://www.cnblogs.com/xiaoshancun/p/12353095.html
Copyright © 2011-2022 走看看