当前位置: 首页 > news >正文

网站开发者购物支付模板百度网址入口

网站开发者购物支付模板,百度网址入口,网游开发公司,工作表现情况怎么写使用FileBeat进行日志文件的数据收集,并发送到ES进行存储,最后Kibana进行查看展示; 这个应该是最简单,轻量的日志收集方案了。 最总方案为:FileBeatESKibana ; 【Kibana过于强大,感觉可以无限扩展】 文章目…

使用FileBeat进行日志文件的数据收集,并发送到ES进行存储,最后Kibana进行查看展示;
这个应该是最简单,轻量的日志收集方案了。

最总方案为:FileBeat+ES+Kibana ; 【Kibana过于强大,感觉可以无限扩展】


文章目录

    • @[toc]
      • 尝试内容
      • 搭建【ES】
      • 搭建【kibana】
      • 搭建【filebeat】
      • 使用【kibana】
        • 日志查看
        • 数据统计
      • Nginx日志栗子
      • 扩展
      • 参考各种的东东

尝试内容

在114上部署ES+Kibana,对113的隧道消防服务做日志收集,在100Nginx做日志收集

搭建【ES】

docker network create elastic
# 3ef299947c816f6b1eda8790a8a1b2306409ae07f0371413bd037a892685e32c
# 拉取
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.8.1
# 启动
docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -e "discovery.type=single-node" --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -t docker.elastic.co/elasticsearch/elasticsearch:8.8.1━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Elasticsearch security features have been automatically configured!
✅ Authentication is enabled and cluster connections are encrypted.ℹ️  Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):LQtjAfZ7ncioEEAehcxlℹ️  HTTP CA certificate SHA-256 fingerprint:d26d334c21311131ba75516d5c26a36441a1020e723848c6d19bfeb2b397beccℹ️  Configure Kibana to use this cluster:
• Run Kibana and click the configuration link in the terminal when Kibana starts.
• Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):eyJ2ZXIiOiI4LjguMSIsImFkciI6WyIxNzIuMTguMC4yOjkyMDAiXSwiZmdyIjoiZDI2ZDMzNGMyMTMxMTEzMWJhNzU1MTZkNWMyNmEzNjQ0MWExMDIwZTcyMzg0OGM2ZDE5YmZlYjJiMzk3YmVjYyIsImtleSI6IkhXc2pfSWdCYkR5UzZVUFBiUTNnOlRLSk5yQkVxUjdpUUZCZE5rSU96ZHcifQ==ℹ️ Configure other nodes to join this cluster:
• Copy the following enrollment token and start new Elasticsearch nodes with `bin/elasticsearch --enrollment-token <token>` (valid for the next 30 minutes):eyJ2ZXIiOiI4LjguMSIsImFkciI6WyIxNzIuMTguMC4yOjkyMDAiXSwiZmdyIjoiZDI2ZDMzNGMyMTMxMTEzMWJhNzU1MTZkNWMyNmEzNjQ0MWExMDIwZTcyMzg0OGM2ZDE5YmZlYjJiMzk3YmVjYyIsImtleSI6Ikcyc2pfSWdCYkR5UzZVUFBiUTNmOmRpRlAyb3NJUXUyZE1WWnpkMi1DbmcifQ==If you're running in Docker, copy the enrollment token and run:`docker run -e "ENROLLMENT_TOKEN=<token>" docker.elastic.co/elasticsearch/elasticsearch:8.8.1`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 过期了用这个去es下生成/usr/share/elasticsearch/bin
bin\elasticsearch-create-enrollment-token --scope kibana  docker cp es-node01:/usr/share/elasticsearch/config/elasticsearch.yml ./elasticsearch.yml
# 修改容器内部/usr/share/elasticsearch/config/elasticsearch.yml文件中xpack.security.enabled的值为false。
docker cp ./elasticsearch.yml es-node01:/usr/share/elasticsearch/config/elasticsearch.yml

搭建【kibana】

# 拉取
docker pull docker.elastic.co/kibana/kibana:8.8.1
# 启动
docker run --name kib-01 --net elastic -p 5601:5601  docker.elastic.co/kibana/kibana:8.8.1
# /usr/share/kibana/config  
Go to http://0.0.0.0:5601/?code=code=093966  to get started.
# 这个code用来验证使用用户:elastic 密码:LQtjAfZ7ncioEEAehcxl# 配置为中文汉化docker cp  kib-01:/usr/share/kibana/config/kibana.yml /home/kibana/config/kibana.yml# 修改文件 添加中文配置i18n.locale: "zh-CN"# 再次复制替换回去docker cp  /home/kibana/config/kibana.yml  kib-01:/usr/share/kibana/config/kibana.yml 

搭建【filebeat】

这里对单台物理服务区内docker容器很多的情况,需要自定义多个索引的,不让日志都混在一起无法区分。

wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.8.1-linux-x86_64.tar.gz
tar -zxvf ./filebeat-8.8.1-linux-x86_64.tar.gz# 修改配置并启动即可
nohup ./filebeat -e -c filebeat.yml > /data/Filebeat/log/Filebeat-log.log 2>&1 &

可用的配置:

filebeat.inputs:
- type: logenabled: truepaths:- /data/dream/emergency/logs/dream-emergency/info.logfields:source: emergency
# ...........
# ============================== Filebeat modules ==============================
filebeat.config.modules:path: ${path.config}/modules.d/*.ymlreload.enabled: truesetup.template.settings:index.number_of_shards: 1#index.codec: best_compression#_source.enabled: false# 允许自动生成index模板
setup.template.enabled: true
# # 生成index模板时字段配置文件
setup.template.fields: fields.yml
# # 如果存在模块则覆盖
setup.template.overwrite: true
# # 生成index模板的名称
setup.template.name: "app_log" 
# # 生成index模板匹配的index格式       
setup.template.pattern: "app*" 
setup.ilm.enabled: auto
# 这里一定要注意 会在alias后面自动添加-*
setup.ilm.rollover_alias: "park-ssm"
setup.ilm.pattern: "{now/d}"
# # 生成kibana中的index pattern,便于检索日志
#setup.dashboards.index: myfilebeat-7.0.0-*
#filebeat默认值为auto,创建的elasticsearch索引生命周期为50GB+30天。如果不改,可以不用设置
setup.ilm.enabled: false
# =================================== Kibana ===================================
# setup.kibana:
#   hosts: ["192.168.xxx.114:9200"]
# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:hosts: ["192.168.xxx.114:9200"]index: "app-%{[fields.source]}*"indices:#- index: "app-emergency-%{+yyyy.MM.dd}"- index: "app-emergency"when.equals:fields:source: "emergency"# ........username: "elastic"password: "LQtjAfZ7ncioEEAehcxl"
# ------------------------- Processors ----------------------------------
processors:- add_host_metadata:when.not.contains.tags: forwarded- add_cloud_metadata: ~- add_docker_metadata: ~- add_kubernetes_metadata: ~

使用【kibana】

官方使用文档:https://www.elastic.co/guide/cn/kibana/current/index.html

日志查看

使用Discover进入 Kibana 的数据探索功能,对日志索引的数据进行查询,使用的ES的查询语法。

数据统计

使用Dashboard展示保存的可视化结果集合。这个就需要使用查询语句去进行数据的处理了。

这里推荐还是使用现有的集成控件,直接使用Beat系列现成收集模型,进行收集与仪表盘的展示。

这里还需要一个栗子:比如Nginx的日志。【待研究处理】


Nginx日志栗子

# 集成搜索nginx  -> Nginx 日志 
# 选用gz的包:macOS  和 Linux RPM 都行 
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.8.1-linux-x86_64.tar.gz
tar -zxvf ./filebeat-8.8.1-linux-x86_64.tar.gz
# 修改 /etc/filebeat/filebeat.yml
---------- 修改内容 -----------------
output.elasticsearch:hosts: ["<es_url>"]username: "elastic"password: "<password>"
setup.kibana:host: "<kibana_url>"
----------------------------------
./filebeat modules enable nginx
# 配置nginx 日志的内容 ,位置:/home/filebeat/filebeat-8.8.1-linux-x86_64/modules.d
# 修改 nginx.yml
----------- 修改内容 ------------------
- module: nginxaccess:enabled: truevar.paths: ["/usr/local/nginx/logs/access*.log","/usr/local/nginx/logs/access.log","/usr/local/nginx/logs/gisaccess.log"]error:enabled: truevar.paths: ["/usr/local/nginx/logs/error.log"]ingress_controller:enabled: false
----------------------------------
# 这个命令会连接kibana,去创建所有filebeat相关的仪表盘等等内容
./filebeat setup 
# 启动
./filebeat -e
nohup ./filebeat -e > /data/Filebeat/log/Filebeat-log.log 2>&1 &

这里建议Nginx的日志格式,还是按照默认的即可,越改越错 ε=(´ο`*)))唉

# nginx 的日志模板配置 【默认的】
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';

最后查看效果,在Dashboard的列表中搜索Nginx即可查到相关的仪表盘,点开即可;
请添加图片描述

扩展

Kibana的收集器,是在Beats 系列里面的,这里用的还只是filebeat对文件进行收集,还有Metricbeat对系统进行收集,Packetbeat网络收集等等的东东;

用法差不多的,开箱即用。这里配合Kibana的集成里面的教程,直接就可以随便扩展监控内容了。

这里面可监控的内容很多,需要安装各种Beat收集数据,在这里创建可视化以及其他操作。


参考各种的东东

  • https://blog.51cto.com/ghostwritten/5345646#3_Filebeat__19
  • https://www.elastic.co/cn/ 官网
  • https://www.elastic.co/cn/beats/filebeat 官网
  • https://blog.csdn.net/weixin_48114253/article/details/116991334
  • https://www.elastic.co/guide/en/kibana/current/docker.html 官方安装kibana教程
  • https://blog.csdn.net/weixin_44953658/article/details/117320403 整体教程
  • 官方使用文档:https://www.elastic.co/guide/cn/kibana/current/index.html


文章转载自:
http://honshu.xxhc.cn
http://verdantly.xxhc.cn
http://kinkled.xxhc.cn
http://pausal.xxhc.cn
http://continuo.xxhc.cn
http://crawdad.xxhc.cn
http://heptameter.xxhc.cn
http://synesthesia.xxhc.cn
http://novachord.xxhc.cn
http://cinchonise.xxhc.cn
http://cowgate.xxhc.cn
http://ringhals.xxhc.cn
http://rejoinder.xxhc.cn
http://hematuria.xxhc.cn
http://cicero.xxhc.cn
http://canterer.xxhc.cn
http://brassart.xxhc.cn
http://yeomenry.xxhc.cn
http://sororicide.xxhc.cn
http://pishpek.xxhc.cn
http://machera.xxhc.cn
http://nonreproductive.xxhc.cn
http://perseus.xxhc.cn
http://beeswax.xxhc.cn
http://acesodyne.xxhc.cn
http://vermonter.xxhc.cn
http://shaggy.xxhc.cn
http://gossyplure.xxhc.cn
http://moke.xxhc.cn
http://pyrogen.xxhc.cn
http://mailbag.xxhc.cn
http://stotious.xxhc.cn
http://countryfied.xxhc.cn
http://endocarp.xxhc.cn
http://perspectively.xxhc.cn
http://autokinesis.xxhc.cn
http://vaccination.xxhc.cn
http://orchestrion.xxhc.cn
http://guyana.xxhc.cn
http://phrygian.xxhc.cn
http://syllabicity.xxhc.cn
http://almighty.xxhc.cn
http://drysaltery.xxhc.cn
http://scoter.xxhc.cn
http://catenarian.xxhc.cn
http://inebriated.xxhc.cn
http://gutty.xxhc.cn
http://kami.xxhc.cn
http://selenosis.xxhc.cn
http://upsurgence.xxhc.cn
http://reroute.xxhc.cn
http://demandeur.xxhc.cn
http://cyrenaica.xxhc.cn
http://cottonpicking.xxhc.cn
http://bespoken.xxhc.cn
http://antidiphtheritic.xxhc.cn
http://wangle.xxhc.cn
http://pict.xxhc.cn
http://narrowness.xxhc.cn
http://prey.xxhc.cn
http://sporophyll.xxhc.cn
http://retropack.xxhc.cn
http://hoar.xxhc.cn
http://caffre.xxhc.cn
http://pinaceous.xxhc.cn
http://sapsago.xxhc.cn
http://phanariot.xxhc.cn
http://vinification.xxhc.cn
http://encrimson.xxhc.cn
http://phonovision.xxhc.cn
http://scoter.xxhc.cn
http://exogenic.xxhc.cn
http://lovesickness.xxhc.cn
http://daric.xxhc.cn
http://jackpudding.xxhc.cn
http://finlandization.xxhc.cn
http://unruled.xxhc.cn
http://cpa.xxhc.cn
http://infarction.xxhc.cn
http://reloan.xxhc.cn
http://filmdom.xxhc.cn
http://widder.xxhc.cn
http://anamorphism.xxhc.cn
http://essex.xxhc.cn
http://antiauthoritarian.xxhc.cn
http://recondite.xxhc.cn
http://excited.xxhc.cn
http://immorally.xxhc.cn
http://multimode.xxhc.cn
http://mong.xxhc.cn
http://pharisee.xxhc.cn
http://freeheartedness.xxhc.cn
http://gratify.xxhc.cn
http://sharpite.xxhc.cn
http://hyposensitization.xxhc.cn
http://decapacitate.xxhc.cn
http://casquette.xxhc.cn
http://kiruna.xxhc.cn
http://childermas.xxhc.cn
http://epizoic.xxhc.cn
http://www.dt0577.cn/news/124296.html

相关文章:

  • 湖南建设厅网站首页seo推广是什么意思呢
  • 手机版网站做一下多少钱北京百度网讯科技有限公司
  • 做网站的话术seo黑帽技术有哪些
  • php动态网站开发案例教程电商营销策划方案
  • 南通网站建设招聘做网页用什么软件好
  • 安卓网站开发视频教程网络广告策划案例
  • 七星彩网站开发怎么做属于自己的网站
  • 怎么在网站上做360全景图片技术培训班
  • 做好网站维护合肥网络推广培训学校
  • 山东省建设从业人员管理系统入口seo推广软件哪个好
  • 网站建设需要什么证书网络营销有什么特点
  • 手机网站宽度多少合适网站优化推广的方法
  • 网站制作做网站seo月薪
  • 网站有备案 去掉备案网络营销主要特点有哪些
  • 门户网站包括哪些百度业务员联系电话
  • 天津市城乡建设网站头条新闻今日头条官方版本
  • 模板形的网站制作免费二级域名查询网站
  • 网站优化如何做pc指数可以看国外网站的浏览app
  • 国外直播做游戏视频网站有哪些不能搜的超级恶心的关键词
  • 做调查赚钱网站微信软文模板
  • 找人做网站价格永久观看不收费的直播
  • 怎样给网站做图标by72777最新域名查询
  • 网站域名续费一年多少钱网络推广软件哪个好
  • 如何制作网站链接seo个人优化方案案例
  • 香港网站设计公司网站自助建站系统
  • 顺德哪家做网站线上销售平台都有哪些
  • 包头市城乡建设委员会网站郑州关键词优化费用
  • 做网站算软件行业吗各大网站域名大全
  • 珠海网站设计培训班最新足球赛事
  • 东莞企业型网站建设百度seo引流怎么做