logstach+elasticsearch+kibana整合后台.log文件

注意:elasticsearch和kibana不能使用root用户启动

1.logstach的yml文件

# 默认管道
pipeline.id: main
# 读取配置的地方
path.config: "/etc/LOGSTASH/logstash-8.13.4/config/*.conf"

2.logstach-sample的conf文件

# 读取日志文件
input {
  file {
    path => "/home/cli/server/logs/*.log"
    start_position => "beginning"
    sincedb_path => "/dev/null"
    codec => multiline {
      pattern => "^(\[LINE])" # 以[LINE]开头算作一行,自己在springboot中配置好日志格式
      negate => true # 其他不规范日志向上算作一行
      what => "previous"
    }
  }
}
# 输出到ES地址
output {
  stdout { codec => rubydebug }
   elasticsearch {
     hosts => ["localhost:9200"]
     index => "extranet-server"
   }
}

3.ES的Elasticsearch.yml文件配置

http.port: 9200

xpack.security.enabled: false

xpack.security.enrollment.enabled: false

xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: false
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12

cluster.initial_master_nodes: ["44"]

http.host: 0.0.0.0

4.kibana的kibana.yml配置

server.port: 5601

server.host: "0.0.0.0"

elasticsearch.hosts: ["http://localhost:9200"]

i18n.locale: "zh-CN"

相关推荐

  1. logstach+elasticsearch+kibana整合后台.log文件

    2024-05-16 11:52:05       11 阅读
  2. C++之LOG文件

    2024-05-16 11:52:05       18 阅读
  3. React搭建一个文章管理系统

    2024-05-16 11:52:05       20 阅读
  4. git log 一直出现:(冒号)

    2024-05-16 11:52:05       7 阅读
  5. 在SpringBoot-WebFlux中整合log4j2

    2024-05-16 11:52:05       46 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-05-16 11:52:05       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-05-16 11:52:05       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-05-16 11:52:05       20 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-05-16 11:52:05       20 阅读

热门阅读

  1. 解密 Unix 中的 “rc“ 后缀:自定义你的工作环境

    2024-05-16 11:52:05       10 阅读
  2. oracle 临时表 在sql 里面用完要删除吗

    2024-05-16 11:52:05       11 阅读
  3. 简单上手SpringBean的整个装配过程

    2024-05-16 11:52:05       13 阅读
  4. Oracle 数据块之变化时的SCN

    2024-05-16 11:52:05       12 阅读
  5. bert 的MLM框架任务-梯度累积

    2024-05-16 11:52:05       14 阅读