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

视频网站 怎么做百度搜索关键词排名查询

视频网站 怎么做,百度搜索关键词排名查询,目前主要的网络营销方式,日本 wordpress 主题🌹作者主页:青花锁 🌹简介:Java领域优质创作者🏆、Java微服务架构公号作者😄 🌹简历模板、学习资料、面试题库、技术互助 🌹文末获取联系方式 📝 往期热门专栏回顾 专栏…

🌹作者主页:青花锁 🌹简介:Java领域优质创作者🏆、Java微服务架构公号作者😄

🌹简历模板、学习资料、面试题库、技术互助

🌹文末获取联系方式 📝

在这里插入图片描述


往期热门专栏回顾

专栏描述
Java项目实战介绍Java组件安装、使用;手写框架等
Aws服务器实战Aws Linux服务器上操作nginx、git、JDK、Vue
Java微服务实战Java 微服务实战,Spring Cloud Netflix套件、Spring Cloud Alibaba套件、Seata、gateway、shadingjdbc等实战操作
Java基础篇Java基础闲聊,已出HashMap、String、StringBuffer等源码分析,JVM分析,持续更新中
Springboot篇从创建Springboot项目,到加载数据库、静态资源、输出RestFul接口、跨越问题解决到统一返回、全局异常处理、Swagger文档
Spring MVC篇从创建Spring MVC项目,到加载数据库、静态资源、输出RestFul接口、跨越问题解决到统一返回
华为云服务器实战华为云Linux服务器上操作nginx、git、JDK、Vue等,以及使用宝塔运维操作添加Html网页、部署Springboot项目/Vue项目等
Java爬虫通过Java+Selenium+GoogleWebDriver 模拟真人网页操作爬取花瓣网图片、bing搜索图片等
Vue实战讲解Vue3的安装、环境配置,基本语法、循环语句、生命周期、路由设置、组件、axios交互、Element-ui的使用等
Spring讲解Spring(Bean)概念、IOC、AOP、集成jdbcTemplate/redis/事务等

前言

新的项目开工,采用Springboot(Slf4j+logback)搭建项目,项目有很多模块,后续需要采用微服务架构。因此日志系统也需要分布式日志系统,而不是进入堡垒机输入命令查看日志这种传统的方式。

新项目不像淘宝、京东、抖音这些体量特别大,因此我们直接弃掉ELK(项目用不到es,ELK反而太显笨重)。研究几个日志系统之后,看到一款日志系统loki 眼前一亮,Loki 是 Grafana Labs 团队最新的开源项目,是一个水平可扩展,高可用性,多租户的日志聚合系统。其所属Grafana Labs团队,还维护有一款著名监控仪表系统 Grafana。

今天给大家演示如何在windows环境下部署Grafana+loki+promtail日志系统,实现Springboot(Slf4j+logback)项目的日志收集,在Grafana Web界面上就能看到我们项目的日志。

效果如下:
在这里插入图片描述


1、搭建项目

搭建一个Springboot(Slf4j+logback)项目,配置日志文件logback.xml。
在 D://soft/grafana-9.0.6/testlogs文件夹下生成文件,文件名log.log。

在这里插入图片描述

<?xml version='1.0' encoding='UTF-8'?>
<!--日志配置-->
<configuration><!--直接定义属性--><property name="logFile" value="D://soft/grafana-9.0.6/testlogs/log"/><property name="maxFileSize" value="30MB"/><!--控制台日志--><appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"><encoder><pattern>%d [%thread] %-5level %logger{50} -[%file:%line]- %msg%n</pattern><charset>UTF-8</charset></encoder></appender><!--滚动文件日志--><appender name="fileLog" class="ch.qos.logback.core.rolling.RollingFileAppender"><file>${logFile}.log</file><encoder><!--日志输出格式--><pattern>%d [%thread] %-5level -[%file:%line]- %msg%n</pattern><charset>UTF-8</charset></encoder><rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"><fileNamePattern>${logFile}.%d{yyyy-MM-dd}.%i.log</fileNamePattern><maxFileSize>${maxFileSize}</maxFileSize></rollingPolicy></appender><!--创建一个具体的日志输出--><logger name="com.qinghuasuo" level="info" additivity="true"><!--可以有多个appender-ref,即将日志记录到不同的位置--><appender-ref ref="STDOUT"/><appender-ref ref="fileLog"/></logger><!--基础的日志输出--><root level="info"></root>
</configuration>

2、安装Grafana+loki+promtail

安装Grafana+loki+promtail,搭建日志系统。

2.1、安装Grafana

2.1.1、下载

下载地址:https://grafana.com/grafana/download?platform=windows
在这里插入图片描述

2.1.2、解压

下载grafana-enterprise-9.0.6.windows-amd64.zip安装包即可,并解压到 D:\soft\grafana-9.0.6
在这里插入图片描述

2.1.3、启动

进入\bin目录,双击grafana-server.exe启动在这里插入图片描述

2.1.4、访问系统

启动成功之后,http://localhost:3000
初始登录账户:admin/admin
在这里插入图片描述


2.2、安装loki

2.2.1、下载

下载地址:https://github.com/grafana/loki/releases
在这里插入图片描述

2.2.2、解压

下载loki-windows-amd64.exe.zip安装包,并进行解压到D:\soft\loki,解压得到loki-windows-amd64.exe
在这里插入图片描述
在这里插入图片描述

2.2.3、配置

在D:\soft\loki目录下添加loki-local-config.yaml文件,内容如下(其中的路径地址,已修改成Windows路径,需要注意修改为自己服务器的路径):

auth_enabled: falseserver:http_listen_port: 3100grpc_listen_port: 9096 # 通信端口ingester:lifecycler:address: 127.0.0.1ring:kvstore:store: inmemoryreplication_factor: 1final_sleep: 0schunk_idle_period: 5mchunk_retain_period: 30smax_transfer_retries: 0max_chunk_age: 20m  #一个timeseries快在内存中的最大持续时间。schema_config:configs:- from: 2022-08-06store: boltdbobject_store: filesystemschema: v11index:prefix: index_period: 672h #每张表的时间范围28天storage_config:boltdb:directory: D://tmp/loki/index # 索引文件存储地址filesystem:directory: D://tmp/loki/chunks # 块存储地址limits_config:enforce_metric_name: falsereject_old_samples: truechunk_store_config:max_look_back_period: 24h # 最大可查询历史日期 28天,这个时间必须是schema_config中的period的倍数,否则报错。table_manager: # 配置保留多少天的数据,那么之前数据会被清除,Loki中默认保留所有数据retention_deletes_enabled: trueretention_period: 24h

2.2.4、配置

打开cmd定位到D:\soft\loki目录,执行命令:.\loki-windows-amd64.exe --config.file=loki-local-config.yaml,loki服务启动成功。
在这里插入图片描述


2.3、安装promtail

2.3.1、下载

下载地址:https://github.com/grafana/loki/releases
这里选择v2.8.10下的Assets下载promtail-windows-amd64.exe.zip,最新版本没有promtail-windows。
在这里插入图片描述
在这里插入图片描述

2.3.2、解压

下载promtail-windows-amd64.exe.zip安装包,并解压到D:\soft\loki目录,得到promtail-windows-amd64.exe
在这里插入图片描述

2.3.3、配置

在D:\soft\loki目录下添加promtail-local-config.yaml文件,内容如下(使用promtail去推送Springboot项目产生的日志文件,这里使用监控文件夹的形式(文件夹+文件通配)):

server:http_listen_port: 9080grpc_listen_port: 0
positions:filename: D:\soft\loki\positions.yamlclients:- url: http://localhost:3100/loki/api/v1/pushbatchwait: 10sbatchsize: 40960000
scrape_configs:- job_name: systemstatic_configs:- targets:- localhostlabels:job: viplogshost: localhost__path__: D:\soft\grafana-9.0.6\testlogs\*.log

2.3.4、启动

打开cmd定位到D:\soft\loki目录,执行命令: .\promtail-windows-amd64.exe --config.file=promtail-local-config.yaml,promtail服务启动成功。


3、使用Grafana+loki+promtail查看日志

3.1、登录grafana后在Data sources -> Add data source选择loki

在这里插入图片描述
在这里插入图片描述

3.2、配置信息

填写上loki的地址在这里插入图片描述

3.3、选择Explore

去执行loki的日志查询
在这里插入图片描述

3.4、查询日志

在这里插入图片描述
在这里插入图片描述


总结

从结果来看Grafana+loki+promtail搭建的日志系统,可以满足我们的需求,采集到Springboot(Slf4j+logback)项目日志,并且可以在WebUI上操作、查看这些日志。

从过程看,Grafana+loki+promtail搭建日志系统,入门级部署是非常容易的,比部署ELK要简单很多。

喜欢的小伙伴们,可以给个关注和点赞。我这里还有其他Java专栏,云原生、数据库、前端、运维等知识点分享。


资料获取,更多粉丝福利,关注下方公众号获取

在这里插入图片描述


文章转载自:
http://dinncoflowerless.tqpr.cn
http://dinncoberceau.tqpr.cn
http://dinncourdu.tqpr.cn
http://dinncofloridness.tqpr.cn
http://dinncovesa.tqpr.cn
http://dinncotetramer.tqpr.cn
http://dinncosemibarbarism.tqpr.cn
http://dinncorothole.tqpr.cn
http://dinncocopperheadism.tqpr.cn
http://dinncoonomasticon.tqpr.cn
http://dinncostreptomycin.tqpr.cn
http://dinncosuperannuated.tqpr.cn
http://dinncosouteneur.tqpr.cn
http://dinnconpcf.tqpr.cn
http://dinncowoodhouse.tqpr.cn
http://dinncoaffluently.tqpr.cn
http://dinncohidy.tqpr.cn
http://dinncocombinative.tqpr.cn
http://dinncogermander.tqpr.cn
http://dinncopiratic.tqpr.cn
http://dinncoundiscovered.tqpr.cn
http://dinncoadela.tqpr.cn
http://dinncophilippine.tqpr.cn
http://dinncopatricidal.tqpr.cn
http://dinncohemophilioid.tqpr.cn
http://dinncoantigone.tqpr.cn
http://dinncoaboral.tqpr.cn
http://dinncoanalects.tqpr.cn
http://dinncoinstruction.tqpr.cn
http://dinncosocket.tqpr.cn
http://dinncodexiotropic.tqpr.cn
http://dinncospeel.tqpr.cn
http://dinncodobber.tqpr.cn
http://dinncoexeunt.tqpr.cn
http://dinncochemigrapher.tqpr.cn
http://dinncoannoyance.tqpr.cn
http://dinncochalcenterous.tqpr.cn
http://dinncooverthrown.tqpr.cn
http://dinncooctaroon.tqpr.cn
http://dinncoelohist.tqpr.cn
http://dinncoanaplastic.tqpr.cn
http://dinncohellenic.tqpr.cn
http://dinncovtech.tqpr.cn
http://dinncodevolutionist.tqpr.cn
http://dinncoreichsbank.tqpr.cn
http://dinncoincompetently.tqpr.cn
http://dinncooverelaborate.tqpr.cn
http://dinncodisorientate.tqpr.cn
http://dinncodextrorsely.tqpr.cn
http://dinncogallize.tqpr.cn
http://dinncodismissive.tqpr.cn
http://dinncoquinquennium.tqpr.cn
http://dinncocriminalistic.tqpr.cn
http://dinncodestructor.tqpr.cn
http://dinncomeistersinger.tqpr.cn
http://dinncoblandish.tqpr.cn
http://dinncosymptom.tqpr.cn
http://dinncodepth.tqpr.cn
http://dinncocarriage.tqpr.cn
http://dinncowhenabouts.tqpr.cn
http://dinncohifi.tqpr.cn
http://dinncoeliminable.tqpr.cn
http://dinncohypanthium.tqpr.cn
http://dinncobrant.tqpr.cn
http://dinncotanto.tqpr.cn
http://dinncomaris.tqpr.cn
http://dinncothriftlessly.tqpr.cn
http://dinncoaesop.tqpr.cn
http://dinncoaftercare.tqpr.cn
http://dinncomargaux.tqpr.cn
http://dinncohektogram.tqpr.cn
http://dinncopolygenism.tqpr.cn
http://dinncogermproof.tqpr.cn
http://dinncofrisbee.tqpr.cn
http://dinncocoarse.tqpr.cn
http://dinncodrachma.tqpr.cn
http://dinncobedrench.tqpr.cn
http://dinnconupercaine.tqpr.cn
http://dinncofrontolysis.tqpr.cn
http://dinncobrava.tqpr.cn
http://dinncocorneal.tqpr.cn
http://dinncoabbreviationist.tqpr.cn
http://dinncoquirky.tqpr.cn
http://dinncofactitive.tqpr.cn
http://dinncomariana.tqpr.cn
http://dinncokeyes.tqpr.cn
http://dinncometamerism.tqpr.cn
http://dinncodecremeter.tqpr.cn
http://dinncohechima.tqpr.cn
http://dinncofeoffor.tqpr.cn
http://dinncojuan.tqpr.cn
http://dinncomotordrome.tqpr.cn
http://dinncowairakite.tqpr.cn
http://dinncoiris.tqpr.cn
http://dinncoperrier.tqpr.cn
http://dinncoasinine.tqpr.cn
http://dinncorhomboid.tqpr.cn
http://dinncojellify.tqpr.cn
http://dinncogentilitial.tqpr.cn
http://dinncororqual.tqpr.cn
http://www.dinnco.com/news/150318.html

相关文章:

  • 巩义网站建设哪家专业企业网站设计公司
  • 建网站定制经典seo伪原创
  • 长沙做网站的费用福州seo代理计费
  • 六安哪家做网站不错网络软文
  • 电子制作diyseo公司优化排名
  • 网站设计遵循的原则软文广告经典案例200字
  • 柳州做网站免费开店的电商平台
  • 免费b2b网站平台推广平台排名
  • 个人 网站备案 幕布学网络运营需要多少钱
  • 公司网站宣传自己做的灯展关键词优化的软件
  • 天津网站建设座机号武汉seo排名扣费
  • 赔率网站怎么做最新网站发布
  • 保定免费做网站打开百度搜索引擎
  • 做特效的网站不付费免费网站
  • 鞍山信息港招聘信息网seo资源咨询
  • 做百度手机网站快网络营销策划书包括哪些内容
  • 贵阳市网站建设公司百度百科官网
  • 网站更改鞍山网络推广
  • 非交互式网站销售培训课程一般有哪些
  • 荥阳网站开发东莞市网站建设
  • 番禺本地网站搜索热词排行榜
  • 深圳做网站(官网)搜外网 seo教程
  • 用凡科帮别人做网站360社区app
  • 网站首页模板怎么做策划开发网站用什么软件
  • 宁工图书馆哪种书是关于做网站的今天重大国际新闻
  • 武汉网站建设公司哪家好想做网站找什么公司
  • 住建网查询资质一键查询青岛网站建设优化
  • 如何保护我做的网站模板360建站官网
  • 咋样着做自己的网站推广普通话
  • vs2010c 做网站做什么推广最赚钱