您好,登錄后才能下訂單哦!
配置文件的基本格式,輸入部分,過濾器部分和輸出部分。
# This is a comment. You should use comments to describe # parts of your configuration. input { ... } filter { ... } output { ... }
每個(gè)部分都可以配置一個(gè)或多個(gè)插件。下面展示的是輸入部分,有兩個(gè)file插件。
input { file { path => "/var/log/messages" type => "syslog" } file { path => "/var/log/apache/access.log" type => "apache" } }
插件的值類型
數(shù)組
path => [ "/var/log/messages", "/var/log/*.log" ] path => "/data/mysql/mysql.log"
布爾
ssl_enable => true
字符串
name => "Hello world" name => 'It\'s a beautiful day'
哈希
match => { "field1" => "value1" "field2" => "value2" ... }
字節(jié)
my_bytes => "1113" # 1113 bytes my_bytes => "10MiB" # 10485760 bytes my_bytes => "100kib" # 102400 bytes my_bytes => "180 mb" # 180000000 bytes
代碼
codec => "json"
數(shù)值:浮點(diǎn)或整型
port => 33
密碼型:不會(huì)記錄到日志或打印出來
my_password => "password"
路徑型:字符串
my_path => "/tmp/logstash"
注釋:使用#
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。