Logstash
Forward your logs to Logtail with Logstash.
Setting up Logstash is very straightforward:
  1. 1.
    Install Logstash on your platform according to the guidelines.
  2. 2.
    Install and set up Logstash input plugins to suit your needs (e.g., Syslog).
  3. 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:
/etc/logstash/conf.d/example.conf
1
input {
2
# configure your input plugins here
3
}
4
​
5
output {
6
http {
7
url => "https://in.logtail.com/"
8
http_method => "post"
9
headers => {
10
"Authorization" => "Bearer YOUR_LOGTAIL_SOURCE_TOKEN"
11
}
12
format => "json"
13
}
14
}
Copied!
Make sure to replaceYOUR_LOGTAIL_SOURCE_TOKEN with your own source token from Logtail.com.
1
sudo systemctl restart logstash.service
Copied!
You should start seeing your logs in Logtail πŸŽ‰
Last modified 7mo ago
Copy link