Thank you Jan and jochen for replying. Yes, the correct input is GELF UDP.
Below is my logstash configurations that make it worked.
input {
jdbc {
jdbc_driver_library => "/logstash-6.3.0/lib/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://XXX:XXX;databaseName=XXX"
jdbc_user => "XXX"
jdbc_password => "XXX"
schedule => "* * * * *"
statement => "select xxx from XXX"
}
}
filter {
mutate {
add_field => { "message" => "Test server" }
add_field => { "host" => "graylog_server" }
}
}
output {
gelf {
host => "graylog_ip_address"
port => 12201
short_message => "Testing gelf output"
}
stdout { codec => rubydebug }
}
Below is my GELF UDP INPUT setting.
GELF UDP : running
bind_address: graylog_server
decompress_size_limit: 8388608
override_source: <empty>
port: 12201
recv_buffer_size: 262144
Thank you.