标签:RoCE .com png output debug cat elk pat ice
logstash的标准输入输出[root@elk-node01 logstash]# ./bin/logstash -e ‘input { stdin{} } output { stdout{ codec => rubydebug }}‘
hellow
word
{
"message" => "hellow",
"host" => "elk-node01",
"@version" => "1",
"@timestamp" => 2019-04-03T03:20:27.319Z
}
{
"message" => "word",
"host" => "elk-node01",
"@version" => "1",
"@timestamp" => 2019-04-03T03:20:27.339Z
}
[root@elk-node01 logstash]# ./bin/logstash -e ‘input { stdin{} } output { file { path => "/tmp/hanye-%{+YYYY.MM.dd}"}}‘
hellow
word
[2019-04-03T11:24:59,845][INFO ][logstash.outputs.file ] Opening file {:path=>"/tmp/hanye-2019.04.03"}
[root@elk-node01 logstash]# cat /tmp/hanye-2019.04.03
{"@version":"1","@timestamp":"2019-04-03T03:24:59.555Z","message":"word","host":"elk-node01"}
{"@version":"1","@timestamp":"2019-04-03T03:24:59.523Z","message":"hellow","host":"elk-node01"}
[root@elk-node01 logstash]# ./bin/logstash -e ‘input { stdin{} } output { elasticsearch {hosts => ["192.168.1.252:9200"] index => "hanye-%{+YYYY.MM.dd}" }}‘
hellow
word
标签:RoCE .com png output debug cat elk pat ice
原文地址:https://blog.51cto.com/9025736/2373453