1. 程式人生 > >logstash配置語法

logstash配置語法

ali unary geoip path unix 字段 {} host 配置

Logstash 用 {} 來定義區域

input {

stdin {}

syslog {}

}

數據類型

  • bool

debug => true

  • string

host => "hostname"

  • number

port => 514

  • array

match => ["datetime", "UNIX", "666"]

  • hash

options => {

key1 => "value1",

key2 => "value2"

}

字段引用

[geoip][location][0]

條件判斷

  • equality, etc: ==, !=, <, >, <=, >=

  • regexp: =~, !~

  • inclusion: in, not in

  • boolean: and, or, nand, xor

  • unary: !()

命令行參數

-e " " 執行配置內容並啟動

--config 或 -f 指定配置文件或目錄運行

--configtest 或 -t 檢查配置語法是否正確

--log 或 -l 運行日誌路徑

--filterworkers 或 -w -w 5 5個線程執行

--pluginpath 或 -P 加載插件路徑

--verbose 輸出一定的調試日誌

--debug 輸出更多調試日誌


logstash配置語法