简体   繁体   中英

I don't understand how logstash-forwarder sent log to the elk server

I have installed Logstash-Forwarder on Client Server and when I'm checking my Kibana I haven't seen any log stored. What I wanted to ask is how do you direct the log from client with logstash-forwarder to elk server?

Logstash forwarder uses lumberjack for log transport. The lumberjack protocol exists to provide a network protocol for transmission that is secure, low latency, low resource usage, and reliable. Therefore it uses TCP and SSL/TLS certificates.

I would recommend you this page to understand logstash forwarder. To put it in a nutshell, you need to build a correct SSL/TLS certificate infrastructure and specify a lumberjack input on your logstash server:

Config example:

input {
  lumberjack {
    # The port to listen on
    port => 12345

    # The paths to your ssl cert and key
    ssl_certificate => "path/to/ssl.crt"
    ssl_key => "path/to/ssl.key"

    # Set this to whatever you want.
    type => "somelogs"
  }
}

However, I would recommend you to try a few simpler inputs at first. Start with stdin{} and perhaps try syslog{} to understand the procedure and see results in kibana.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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