Sending logs to Logtail using Logstash

Setting up Logstash is very straightforward:

  1. Install Logstash on your platform according to the guidelines  .

  2. Install and set up Logstash input plugins  to suit your needs (e.g., Syslog  ).

  3. Modify the Logstash output configuration to start sending logs to your Logtail source. A basic configuration that forwards logs from all inputs to a single Logtail source could look like this:

input {
   # configure your input plugins here
}

output {
  http {
    url => "https://in.logtail.com/"
    http_method => "post"
    headers => {
      "Authorization" => "Bearer YOUR_LOGTAIL_SOURCE_TOKEN"
    }
    format => "json"
  }
}
Copied!
  1. Restart the Logstash service:  sudo systemctl restart logstash.service You should start seeing your logs in Logtail 🎉