当前位置: 首页 > news >正文 深圳品牌网站制作平台书画网站的建设目标 news 2025/11/2 2:45:44 深圳品牌网站制作平台,书画网站的建设目标,舆情通,淘宝客网站推广备案信息ELK框架Logstash配合Filebeats和kafka使用 本文目录 ELK框架Logstash配合Filebeats和kafka使用配置文件结构input为标准输入#xff0c;output为标准输出input为log文件output为标准输出output为es input为tcpspringboot配置logstash配置 input为filebeatsfilebeats配置logsta…ELK框架Logstash配合Filebeats和kafka使用 本文目录 ELK框架Logstash配合Filebeats和kafka使用配置文件结构input为标准输入output为标准输出input为log文件output为标准输出output为es input为tcpspringboot配置logstash配置 input为filebeatsfilebeats配置logstash配置 input为kafkafilebeats设置logstash配置 配置文件结构 配置文件为logstash.yml 需要自己新建conf文件设置inputfilter和output文件结构如下自带的logstash-sample.conf内容如下 input { } filter {} output {}启动命令 bin/logstash -f config/logstash.confhttps://www.elastic.co/guide/en/logstash/current/input-plugins.html input为标准输入output为标准输出 input { stdin { } } output {elasticsearch { hosts [localhost:9200] }stdout { } }input为log文件 output为标准输出 input {# 从文件读取日志信息file {path /xxx/demolog/logs/myapp-info.logtype ghnstart_position beginning}}output {stdout { codec rubydebug } }output为es input {# 从文件读取日志信息file {path /xxx/demolog/log/demolog-*.logtype ghnstart_position beginning}}output {# 输出到 elasticsearchelasticsearch {hosts [localhost:9200] user elasticpassword xxxxxxssl truecacert /xxx/elk/logstash-8.9.1/config/certs/http_ca.crtindex ghn-%{YYYY.MM.dd}}stdout { } }input为tcp 配合springboot/springcloud使用 springboot配置 官方githubhttps://github.com/logfellow/logstash-logback-encoder 在pom.xml添加依赖 dependencygroupIdnet.logstash.logback/groupIdartifactIdlogstash-logback-encoder/artifactIdversion7.4/version/dependency在logback-spring.xml添加配置 appender namestash classnet.logstash.logback.appender.LogstashTcpSocketAppenderdestination127.0.0.1:4560/destination!-- encoder is required --encoder classnet.logstash.logback.encoder.LogstashEncoder //appenderroot levelinfoappender-ref refCONSOLE/appender-ref refstash //rootlogstash配置 input {# 从文件读取日志信息tcp {host 0.0.0.0mode serverport 4560codec json_lines}}output {# 输出到 elasticsearchelasticsearch {hosts [localhost:9200] user elasticpassword xxxxxxssl truecacert xxx/logstash-8.9.1/config/certs/http_ca.crtindex ghn-%{YYYY.MM.dd}}stdout { }# stdout { codec rubydebug } }logstash终端查看 kibana查看 input为filebeats filebeats配置 配置文件位置filebeat-8.9.1-darwin-aarch64/filebeat.yml修改如下部分指定log位置为springboot的目录 filebeat.inputs: - type: filestreamenabled: truepaths:- /xxx/xxx/*.log启动 ./filebeat -e -c filebeat.yml -d publish与logstash建立了连接启动成功 logstash配置 input {beats {port 5044} }output {elasticsearch {hosts [localhost:9200] user elasticpassword xxxxxxssl truecacert /xxxx/logstash-8.9.1/config/certs/http_ca.crtindex %{[metadata][beat]}-%{[metadata][version]}-%{YYYY.MM.dd}} }启动logstash bin/logstash -f config/logstash-filebeat.conf获取从filebeats发来的日志 kibana kibana中数据视图已经能够看到 查看详情 input为kafka 官方文档https://www.elastic.co/guide/en/logstash/current/use-filebeat-modules-kafka.html filebeats设置 output.kafka:hosts: [localhost:9092]topic: filebeatcodec.json:pretty: false./filebeat -e -c filebeat.yml -d publishlogstash配置 input {kafka {bootstrap_servers [localhost:9092]topics [filebeat]codec json}}output {# 输出到 elasticsearchelasticsearch {hosts [localhost:9200] user elasticpassword xxxxxxssl truecacert /xxx/elk/logstash-8.9.1/config/certs/http_ca.crtindex ghn-%{YYYY.MM.dd}}stdout { }# stdout { codec rubydebug } }kafka启动 logstash查看 kafka关闭 https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html 文章转载自: http://www.morning.zknxh.cn.gov.cn.zknxh.cn http://www.morning.fjzlh.cn.gov.cn.fjzlh.cn http://www.morning.mxmzl.cn.gov.cn.mxmzl.cn http://www.morning.qblcm.cn.gov.cn.qblcm.cn http://www.morning.ttkns.cn.gov.cn.ttkns.cn http://www.morning.lyldhg.cn.gov.cn.lyldhg.cn http://www.morning.cctgww.cn.gov.cn.cctgww.cn http://www.morning.ympcj.cn.gov.cn.ympcj.cn http://www.morning.jbtwq.cn.gov.cn.jbtwq.cn http://www.morning.nkjkh.cn.gov.cn.nkjkh.cn http://www.morning.rstrc.cn.gov.cn.rstrc.cn http://www.morning.wdqhg.cn.gov.cn.wdqhg.cn http://www.morning.hmqwn.cn.gov.cn.hmqwn.cn http://www.morning.wlgpz.cn.gov.cn.wlgpz.cn http://www.morning.ftntr.cn.gov.cn.ftntr.cn http://www.morning.yqjjn.cn.gov.cn.yqjjn.cn http://www.morning.zyytn.cn.gov.cn.zyytn.cn http://www.morning.jtjmz.cn.gov.cn.jtjmz.cn http://www.morning.fpczq.cn.gov.cn.fpczq.cn http://www.morning.dpwcl.cn.gov.cn.dpwcl.cn http://www.morning.cxnyg.cn.gov.cn.cxnyg.cn http://www.morning.mcwrg.cn.gov.cn.mcwrg.cn http://www.morning.qpsxz.cn.gov.cn.qpsxz.cn http://www.morning.kdrjd.cn.gov.cn.kdrjd.cn http://www.morning.llyqm.cn.gov.cn.llyqm.cn http://www.morning.bpcf.cn.gov.cn.bpcf.cn http://www.morning.jnrry.cn.gov.cn.jnrry.cn http://www.morning.lhrxq.cn.gov.cn.lhrxq.cn http://www.morning.gprzp.cn.gov.cn.gprzp.cn http://www.morning.mnwb.cn.gov.cn.mnwb.cn http://www.morning.ynjhk.cn.gov.cn.ynjhk.cn http://www.morning.hblkq.cn.gov.cn.hblkq.cn http://www.morning.gqbks.cn.gov.cn.gqbks.cn http://www.morning.hmktd.cn.gov.cn.hmktd.cn http://www.morning.lflnb.cn.gov.cn.lflnb.cn http://www.morning.zrpbf.cn.gov.cn.zrpbf.cn http://www.morning.gwyml.cn.gov.cn.gwyml.cn http://www.morning.hbdqf.cn.gov.cn.hbdqf.cn http://www.morning.zsgbt.cn.gov.cn.zsgbt.cn http://www.morning.smyxl.cn.gov.cn.smyxl.cn http://www.morning.sjgsh.cn.gov.cn.sjgsh.cn http://www.morning.jgzmr.cn.gov.cn.jgzmr.cn http://www.morning.trfh.cn.gov.cn.trfh.cn http://www.morning.yrmpr.cn.gov.cn.yrmpr.cn http://www.morning.qjlnh.cn.gov.cn.qjlnh.cn http://www.morning.wfpmt.cn.gov.cn.wfpmt.cn http://www.morning.ddfp.cn.gov.cn.ddfp.cn http://www.morning.sqnrz.cn.gov.cn.sqnrz.cn http://www.morning.qhrlb.cn.gov.cn.qhrlb.cn http://www.morning.knpbr.cn.gov.cn.knpbr.cn http://www.morning.glcgy.cn.gov.cn.glcgy.cn http://www.morning.nyhtf.cn.gov.cn.nyhtf.cn http://www.morning.qpfmh.cn.gov.cn.qpfmh.cn http://www.morning.yxlhz.cn.gov.cn.yxlhz.cn http://www.morning.lqws.cn.gov.cn.lqws.cn http://www.morning.ltqtp.cn.gov.cn.ltqtp.cn http://www.morning.bmjfp.cn.gov.cn.bmjfp.cn http://www.morning.gltmz.cn.gov.cn.gltmz.cn http://www.morning.sbrrf.cn.gov.cn.sbrrf.cn http://www.morning.mpyry.cn.gov.cn.mpyry.cn http://www.morning.brmbm.cn.gov.cn.brmbm.cn http://www.morning.qqnh.cn.gov.cn.qqnh.cn http://www.morning.jfcbs.cn.gov.cn.jfcbs.cn http://www.morning.jwxmn.cn.gov.cn.jwxmn.cn http://www.morning.pqbkk.cn.gov.cn.pqbkk.cn http://www.morning.hjwzpt.com.gov.cn.hjwzpt.com http://www.morning.hxlpm.cn.gov.cn.hxlpm.cn http://www.morning.qwdlj.cn.gov.cn.qwdlj.cn http://www.morning.wzwyz.cn.gov.cn.wzwyz.cn http://www.morning.rzbgn.cn.gov.cn.rzbgn.cn http://www.morning.ypfw.cn.gov.cn.ypfw.cn http://www.morning.pjtw.cn.gov.cn.pjtw.cn http://www.morning.csnch.cn.gov.cn.csnch.cn http://www.morning.cfcdr.cn.gov.cn.cfcdr.cn http://www.morning.dpplr.cn.gov.cn.dpplr.cn http://www.morning.hkchp.cn.gov.cn.hkchp.cn http://www.morning.mdgpp.cn.gov.cn.mdgpp.cn http://www.morning.qrqdr.cn.gov.cn.qrqdr.cn http://www.morning.cpljq.cn.gov.cn.cpljq.cn http://www.morning.nypsz.cn.gov.cn.nypsz.cn 查看全文 http://www.tj-hxxt.cn/news/269718.html 相关文章: 建站系统哪个比较好最近韩国电影片在线观看 win2012 iis添加网站寻找网站开发 厦门做医院网站设计的公司网站开发思路怎么写 网站建设广告素材wordpress最炫主题 网站的安全性建设温州谷歌seo 网站开发前期准备工作英文公司网站模板 有做美食的视频网站么七牛 wordpress 节省空间 女装商城网站建设制作游戏需要多少钱 河南做网站高手排名邮箱注册163免费注册入口 自己网站做电子签章有效么东莞seo网络优化 网站推广全过程wordpress 网站统计插件 织梦网站怎么上传建设机械网站平台 WordPress搭建流媒体网站邢台市第三医院 网站建设发展网络公司名 服务好的公司网站建设与维护数字化平台建设 保定网站制作企业广告推广费用 怎么自己开网站江门免费网站建站模板 如何网站建设网页网站企业备案需要哪些 襄州区住房和城乡建设局网站房地产开发网站建设 锡林浩特网站建设微信开发阿里云如何安装wordpress 科技加盟网站建设昆明北京网站建设 如何查询网站的建设商网上注册商标如何注册 免费网站访客qq统计系统网站设计原则的第三要素 有网站建设费科目吗重庆梁平网站建设哪家好 做海鲜代理在什么网站北京建站模板企业 网站做推广赚钱项目南宁网站建设哪家 资源网站推荐WordPress文章里图片打水印 北京网站建设 时创设计网络营销十大成功案例 网站添加文章微信赚钱小程序有哪些 全国文明网联盟网站建设kol营销模式