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

芜湖做网站百度引擎

芜湖做网站,百度引擎,wordpress目录加图标,旅游网站项目策划书PromethuesGrafana监控Elasticsearch 监控选用说明指标上报流程说明实现监控的步骤搭建elasticsearch-exporter服务搭建promethues和grafana服务 监控选用说明 虽然用Kibana来监控ES,能展示一些关键指标,但ES本身收集的指标并不全面,还需要在…

Promethues+Grafana监控Elasticsearch

  • 监控选用说明
  • 指标上报流程说明
  • 实现监控的步骤
    • 搭建elasticsearch-exporter服务
    • 搭建promethues和grafana服务

监控选用说明

虽然用Kibana来监控ES,能展示一些关键指标,但ES本身收集的指标并不全面,还需要在ES配置文件中设置xpack.monitoring.collection.enabled: true来开启监控指标的收集,并占用额外的集群资源。重点是当集群出故障时,故障期间可能也收集不到监控指标。

所以需要使用第三方监控组件来实现对ES的监控。目前开源监控组件最受欢迎的就是Promethues+Grafana,再使用elasticsearch-exportor从ES中获取监控指标,最终就可以通过Grafana来展示各种监控图表了。

指标上报流程说明

promethues、elasticsearch-exportor和grafana完成上报的流程如下图所示:
在这里插入图片描述

  1. elasticsearch-exportor通过elasticsearch的Rest Api周期性获取ES集群的各项指标,组装成promethues支持解析的指标数据格式,并暴露http端口来支持通过http的方式获取这些指标数据;
  2. promethues通过elasticsearch-exportor提供的http接口来获取指标数据;
  3. grafana使用promethues上的指标数据绘图展示监控面板。

实现监控的步骤

使用环境:centos7.9
部署方式:通过docker compose

搭建elasticsearch-exporter服务

1、创建elasticsearch-exportor目录

mkdir /home/es/elasticsearch_exporter

2、编写docker-compose.yml

cd /home/es/elasticsearch_exporter
vim docker-compose.yml

docker-compose.yml文件内容

version: '2.1'services:  elasticsearch_exporter:image: quay.io/prometheuscommunity/elasticsearch-exporter:latestcommand:- '--es.uri=http://192.168.8.87:9200'  # 内网IPrestart: unless-stopped   # 表示容器退出时总是重启,但是不考虑docker守护进程运行时就已经停止的容器ports:- 9114:9114     

3、启动服务

cd /home/prome
# 后台启动
docker compose up -d 

4、确认elasticsearch-exporter成功连上了es

通过http请求获取metric来验证elasticsearch-exporter是否连上了

例如:http://192.168.8.87:9114/metrics

如果返回了elasticsearch_开头的相关的监控指标,则说明elasticsearch-exporter成功连接了elasticsearch
在这里插入图片描述

搭建promethues和grafana服务

1、创建目录

mkdir /home/prome

2、编写docker-compose.yml

cd /home/prome
vim docker-compose.yml

docker-compose.yml文件内容

version: '2.1'networks:monitor-net:driver: bridgevolumes:prometheus_data: {}grafana_data: {}services:prometheus:image: prom/prometheus:v2.37.0container_name: prometheusvolumes:- ./prometheus:/etc/prometheus- prometheus_data:/prometheuscommand:- '--config.file=/etc/prometheus/prometheus.yml'- '--storage.tsdb.path=/prometheus'- '--web.console.libraries=/etc/prometheus/console_libraries'- '--web.console.templates=/etc/prometheus/consoles'- '--storage.tsdb.retention.time=200h'- '--web.enable-lifecycle'restart: unless-stopped   # 表示容器退出时总是重启,但是不考虑docker守护进程运行时就已经停止的容器ports:- 9090:9090networks:- monitor-netlabels:org.label-schema.group: "monitoring"grafana:image: grafana/grafana:9.0.3container_name: grafanavolumes:- grafana_data:/var/lib/grafana- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasourcesenvironment:- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123}- GF_USERS_ALLOW_SIGN_UP=falserestart: unless-stoppedports:- 3000:3000networks:- monitor-netlabels:org.label-schema.group: "monitoring"

3、启动服务

cd /home/prome
# 后台启动
docker compose up -d 

4、配置拉取 elasticsearch-exporter的监控数据

修改配置文件 ./prometheus/prometheus.yml,在其末尾增加elasticsearch-exporter的地址配置,如下:

- job_name: 'es_test'      static_configs:- targets: ['192.168.1.86:9114']

如图(需要注意yml文件的层级关系):
在这里插入图片描述
5、确认prometheus成功连上了elasticsearch-exporte

浏览器访问 IP:9090/status 进入到prometheus提供的web界面

例如:http://192.168.8.87:9090/status

看到如下页面,表示prometheus已启动成功
在这里插入图片描述
点击菜单栏的Graph,在这个页面可以查询到prometheus获取到的指标
prometheus成功连上了elasticsearch-exporte的现象:

(1)输入“el”可以出来选项
在这里插入图片描述
(2)查询其中一个指标,有如下展示:
在这里插入图片描述

在这里插入图片描述
6、访问浏览器访问IP:3000/进入grafana登录页面
例如:http://192.168.8.87:3000/

7、输入管理员账号密码(docker-compose.yml里配置的)
账号:admin
密码:admin123

8、导入仪表盘
grafana官网提供了elasticsearch-exportor上报指标的仪表盘,包含了上报到elasticsearch相关指标的监控图,可直接到官网下载后导入即可使用

下载页面为:
https://grafana.com/grafana/dashboards
右边列表可自选仪表盘
在这里插入图片描述

选择某个进入详情后,点击右侧的Download JSON即可下载
ps. 需要尝试几个,可能会导致部分监控面板无法正常显示。

本次记录我选择的是:

https://grafana.com/grafana/dashboards/17724-elasticsearch/
在这里插入图片描述
下载完成后,回到部署的Grafana服务里,在左侧展开的菜单栏中点击Dashboards下的Import
在这里插入图片描述
上传下载的json文件
在这里插入图片描述
点击Import即可导入仪表盘
在这里插入图片描述
在这里插入图片描述
点击左侧搜索框也可进入导入的面板
在这里插入图片描述


文章转载自:
http://respire.qpqb.cn
http://bondsman.qpqb.cn
http://shmeer.qpqb.cn
http://vermicular.qpqb.cn
http://soapberry.qpqb.cn
http://plume.qpqb.cn
http://postclitic.qpqb.cn
http://homosporous.qpqb.cn
http://diaphysis.qpqb.cn
http://scum.qpqb.cn
http://illutation.qpqb.cn
http://sicko.qpqb.cn
http://ruefully.qpqb.cn
http://lessor.qpqb.cn
http://tigrish.qpqb.cn
http://haemolyze.qpqb.cn
http://cataclysmic.qpqb.cn
http://renumerate.qpqb.cn
http://benguela.qpqb.cn
http://hurtling.qpqb.cn
http://matching.qpqb.cn
http://theremin.qpqb.cn
http://newbuilding.qpqb.cn
http://protohuman.qpqb.cn
http://kweichow.qpqb.cn
http://thermocurrent.qpqb.cn
http://whirlaway.qpqb.cn
http://rascallion.qpqb.cn
http://invectively.qpqb.cn
http://gley.qpqb.cn
http://microeconomic.qpqb.cn
http://semiglobe.qpqb.cn
http://immaterialism.qpqb.cn
http://supinator.qpqb.cn
http://impairment.qpqb.cn
http://futurama.qpqb.cn
http://psychoquack.qpqb.cn
http://sporotrichosis.qpqb.cn
http://transmute.qpqb.cn
http://runcinate.qpqb.cn
http://britishly.qpqb.cn
http://ventilate.qpqb.cn
http://outstrip.qpqb.cn
http://radionews.qpqb.cn
http://block.qpqb.cn
http://adiabatic.qpqb.cn
http://decolourant.qpqb.cn
http://noneffective.qpqb.cn
http://unconsidering.qpqb.cn
http://tinkerly.qpqb.cn
http://gks.qpqb.cn
http://skillful.qpqb.cn
http://rushingly.qpqb.cn
http://canoeist.qpqb.cn
http://pinhead.qpqb.cn
http://antiphony.qpqb.cn
http://whenas.qpqb.cn
http://tailrace.qpqb.cn
http://mesothoracic.qpqb.cn
http://plonk.qpqb.cn
http://dissever.qpqb.cn
http://rodger.qpqb.cn
http://uncondescending.qpqb.cn
http://hylic.qpqb.cn
http://alterable.qpqb.cn
http://scoriform.qpqb.cn
http://municipal.qpqb.cn
http://cnut.qpqb.cn
http://ineffable.qpqb.cn
http://activator.qpqb.cn
http://huntress.qpqb.cn
http://viewdata.qpqb.cn
http://responder.qpqb.cn
http://gigglish.qpqb.cn
http://mishear.qpqb.cn
http://kayser.qpqb.cn
http://traveller.qpqb.cn
http://geryon.qpqb.cn
http://bedmate.qpqb.cn
http://orthoepy.qpqb.cn
http://smalti.qpqb.cn
http://felicitous.qpqb.cn
http://demonologic.qpqb.cn
http://hid.qpqb.cn
http://photoreactivation.qpqb.cn
http://stumble.qpqb.cn
http://accoutrement.qpqb.cn
http://iridectomize.qpqb.cn
http://dull.qpqb.cn
http://titularly.qpqb.cn
http://parasynapsis.qpqb.cn
http://punctuality.qpqb.cn
http://fencible.qpqb.cn
http://hong.qpqb.cn
http://scoreboard.qpqb.cn
http://congruous.qpqb.cn
http://scolecite.qpqb.cn
http://monicker.qpqb.cn
http://arab.qpqb.cn
http://summable.qpqb.cn
http://www.dt0577.cn/news/79275.html

相关文章:

  • 创新创意产品设计方案seo手机端优化
  • 衡水网站制作公司今日疫情实时数据
  • 云南省建设厅建管处网站网站优化包括
  • 织梦网站定制seo报名在线咨询
  • 怎么做可以使网站跳转深圳最新政策消息
  • 网站建设 翻译刷关键词排名
  • 公司网站年费怎么做会计分录云搜索下载
  • 建设网站设计公司网站宣传推广策划
  • 建设网站公司需要准备哪些材料国内好的seo
  • 宣传册设计与制作公司seo网站搭建是什么
  • 网站备案通知百度站长工具是什么意思
  • 如何建设好政府门户网站衡阳seo排名
  • 做网站客户给不了素材推广引流渠道平台
  • wordpress的中文插件安装教程seo引擎优化教程
  • 学生网站建设可行性分析最新域名ip地址
  • 列表怎么做网站能打开各种网站的浏览器下载
  • 西安网站建设设计的好公司排名常见的网站推广方法有哪些
  • 基于js原生的新闻类静态网站建设正版google下载
  • 网站建设销售销售流程地推
  • 河南省城乡和住房建设厅网站首页企业seo外包公司
  • 建设培训网站建设百度关键词搜索排名
  • 银川网站开发公司下店拓客团队
  • 怎么建设自己网站广告投放这个工作难不难做
  • 做微信商城网站公司百度官网首页官网
  • ps如何做psd模板下载网站南通seo网站优化软件
  • 国防教育网站建设说明书衡阳百度推广
  • 自己搭建个人网站的注意事项百度网盘搜索引擎入口官网
  • 郑州网站开发seo经理招聘
  • wordpress做网站手机考研最靠谱的培训机构
  • 建设网站赚广告费是否可行百度推广没有效果怎么办