Logstash: Input Plugins
Published in
1 min readJul 2, 2020
Logstash Input Plugins with Most Common Input Types
elasticsearch
input {
elasticsearch {
hosts => "localhost"
index => "blogs"
query => '{"localhost":{"match_all":{}}}'
type => "my-elasticsearch"
}
}
file
input {
file {
path => "/var/log/*"
exclude => "*.gz"
sincedb_path => "/dev/null"
start_position => "beginning"
type => "my-csv"
}
}
jdbc
input {
jbdc {
jbdc_driver_library => "/opt/logstash/lib/mysql-connector-java-5.1.6-bin.jar"
jbdc_driver_class => "com.mysql.jdbc.Driver"
jbdc_connection_string => "jdbc:mysql://localhost:306/mydb"
jbdc_user => "root"
jbdc_password => "pw"
statement => "SELECT * from Amdin"
}
}
s3
input {
s3 {
bucket => "my-bucket"
credentials => ["my-aws-key", "my-aws-token"]
region_endpoint => "ap-northeast-2"
codec => "json"
}
}
tcp
input {
tcp {
port => "5000"
type => "syslog"
}
}
udp
input {
udp {
port => "5000"
type => "netflow"
}
}
syslog
stdin
imap