赞
踩
Past Releases of Elastic Stack Software | Elastic
下载对应版本的Kibana,上传Linux服务器,解压/home/software/kibana-7.17/
放开的配置如下
- server.port: 5601
- server.host: "0.0.0.0"
- server.publicBaseUrl: "http://122.51.53.xxx:5601"
- elasticsearch.hosts: ["http://localhost:9200"]
-
- // 因为ElasticSearch与kibana是安装在同一服务器,所以是localhost
Kibana如果用root用户启动也会报错跟ElasticSearch一样,需要换成非root用户启动。
这里把权限加上即可
chown -R elastic:elastic /home/software/kibana-7.17
然后启动 ./logstash 不报错即可。
下载对应的版本的logstashPast Releases of Elastic Stack Software | Elastic
上传Linux服务器,解压到/home/software/logstash-7.17/
到config文件夹下,复制一份logstash-sample.conf,命名为logstash.conf,这个是启动的默认配置文件,我这里配置了input和output,从微服务的日志文件读取。
- # Sample Logstash configuration for creating a simple
- # Beats -> Logstash -> Elasticsearch pipeline.
-
- input{
- file {
- path => "/home/software/payment/logs/payment.log" #微服务的日志文件
- }
- }
-
- output {
- elasticsearch {
- hosts => ["http://localhost:9200"]
- index => "logstash-%{type}-%{+YYYY.MM.dd}" #索引
- user => "elastic"
- password => "root"
- document_type => "%{type}"
- workers => 1
- flush_size => 20000 #传输数量 默认500
- idle_flush_time => 10 #传输秒数 默认1秒
- template_overwrite => true
- }
- }

log的流传方向就是
log日志文件----》logstash----》elasticsearch----》kibana
启动 ./kibana 可能会报错
ERROR: Pipelines YAML file is empty. Location: /home/software/logstash-7.17/config/pipelines.yml
打开这个文件/config/pipelines.yml确实全都注释了,放开一部分
- - pipeline.id: test
- pipeline.workers: 1
- pipeline.batch.size: 1
- config.string: "input { generator {} } filter { sleep { time => 1 } } output { stdout { codec => dots } }"
- # - pipeline.id: another_test
- queue.type: persisted
- path.config: "/tmp/logstash/*.config"
重新启动不报错,表示成功。
更多详细也可以参考官方文档:
Logstash Processing Pipeline | Logstash Reference [2.3] | Elastic
更多阅读可以参考
logstash管道pipeline配置_奔跑的_小笼包-CSDN博客_logstash pipeline配置
安装logstash7.3.2遇到的坑及解决方案_小蜜蜂1010的博客-CSDN博客_logstash7
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。