The basic format of the configuration file, the input section, the filter section, and the output section.
# This is a comment. You should use comments to describe# parts of your configuration.input {...} Filter {...} Output {...}
Each section can be configured with one or more plugins. The following shows the input section, which has two file plugins.
Input {file {path = "/var/log/messages" type = "syslog"} file {path = = "/var/log/apache/access. Log "type =" Apache "}}
Plug-in value types
Array
Path = ["/var/log/messages", "/var/log/*.log"]path = "/data/mysql/mysql.log"
Boolean
Ssl_enable = True
String
name = "Hello World" name + ' it\ ' s a beautiful Day '
Hash
Match + = {"Field1" = "value1" "Field2" + "value2" ...}
Bytes
My_bytes = "1113" # 1113 bytes my_bytes = "10MiB" # 10485760 bytes my_bytes = "100kib" # 102400 bytes My _bytes = "MB" # 180000000 bytes
Code
codec = "JSON"
Value: Floating-point or integer
Port = 33
Password type: not logged or printed
My_password = "Password"
Path Type: string
My_path = "/tmp/logstash"
NOTES: Using #
This article is from the "This person's IT World" blog, be sure to keep this source http://favccxx.blog.51cto.com/2890523/1826747
Logstach configuration file Detailed