首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Logstash 基础6

Logstash 基础6

作者头像
franket
发布2022-02-10 20:32:46
发布2022-02-10 20:32:46
2010
举报
文章被收录于专栏:技术杂记技术杂记

配置logstash并且运行

代码语言:javascript
复制
[root@h102 etc]# cat  logstash-filebeat-es-simple.conf
input {
	stdin{}
	beats{port => 5044}
}
output {
	elasticsearch {
		hosts=>"localhost:9200"
		index=>"%{[@metadata][beat]}-%{+YYYY.MM.dd}"
		document_type => "%{[@metadata][type]}"
	}
	stdout {codec=>rubydebug}
}
[root@h102 etc]# 
[root@h102 etc]# /opt/logstash/bin/logstash -f logstash-filebeat-es-simple.conf 
Settings: Default filter workers: 1
Logstash startup completed
{
       "message" => "Dec 25 00:37:20 h102 init: tty (/dev/tty2) main process (2300) killed by TERM signal",
      "@version" => "1",
    "@timestamp" => "2016-01-05T07:52:48.994Z",
          "beat" => {
        "hostname" => "h102.temp",
            "name" => "h102.temp"
    },
         "count" => 1,
        "fields" => nil,
    "input_type" => "log",
        "offset" => 247376,
        "source" => "/var/log/messages-20151230",
          "type" => "log",
          "host" => "h102.temp"
}
...
...

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档