Types in Logstash

Source: Internet
Author: User
Tags logstash

Types in Logstash
    • Array
    • Boolean
    • bytes
    • Codec
    • Hash
    • Number
    • Password
    • Path
    • String
Array

An array can is a single string value or multiple values. If you specify the same setting multiple times, it appends to the array.
Example

"/var/log/messages""/var/log/*.log""/data/mysql/mysql.log"
Boolean

Bull, True,false.
Example

true
bytes

A bytes field is a string field, that represents a valid unit of bytes. It is a convenient-to-declare specific sizes in your plugin options. Both SI (k M G T P E Z Y) and Binary (Ki Mi Gi Ti Pi Ei Zi Yi) units is supported. Binary units is in base-1024 and SI units is in base-1000.

Codec

Specify the format of the input and output
A codec is the name of Logstash codec used to represent the data. Codecs can used in both inputs and outputs.

Input codecs provide a convenient to decode your data before it enters the input. Output codecs provide a convenient to encode your data before it leaves the output. Using a input or output codec eliminates the need for a separate filter in your Logstash pipeline.

Example:

"json"
Hash

A hash is a collection of key value pairs specified in the format "field1" and "value1".
Hash, key-value pairs, enclosed in quotation marks.
Example

match => {  "field1""value1"  "field2""value2"  ...}
Password

A password is a string with a single value, which is not logged or printed.
is similar to string and will not be output.
Example:

"password"
Number

Numbers must is valid numeric values (floating point or integer).
Example

"password"
Path

A path is a string that represents a valid operating system path.
is the system path

astringasystem path.
String

A string must is a single character sequence. Note that string values is enclosed in quotes.
string, and quotation marks on the line.

"Hello world"

Specific can be seen in the original: http://www.elastic.co/guide/en/logstash/current/configuration.html

Familiarity with these types is a good understanding of other modules.
For example, Grok's Add_field, need hash type parameter, that is the following format

filter {  grok {    "foo_%{somefield}""Hello world, from %{host}" }  }}
Postscript

Logstash is a very good project, full documentation, and video, worth learning.

Types in Logstash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.