Prommetheus 插件监控 ES

摘要:
https:#-“first.rules”#-“second.rules“#-“prometheus.rules”#Ascrap配置包含要删除的唯一正确点:#Hereit'sPrometheuself.scrape_configs:#esmotitor-job_name:
转载自:https://blog.csdn.net/u010453363/article/details/76689435/
用prometheus主要是监控elk中的elasticsearch和logstash
prometheus的clicent收集数据,并提供http服务,由prometheus server主动pull数据。
 
1.1 elasticsearch数据由es插件
实现: https://github.com/vvanholl/elasticsearch-prometheus-exporter
 
1.1.1 插件下载
目前试用的是es5.4,https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases 下载对应版本的插件
 
1.1.2 安装插件
sh ./bin/elasticsearch-plugin install file:///home/elk/elasticsearch-prometheus-exporter-5.4.0.0.zip ,重启es。
默认指标目录:http://192.168.x.x:9200/_prometheus/metrics
http://192.168.x.x:9200/_prometheus/metrics能够看到es的prometheus指标,说明插件安装成功。
 

1.2配置prometheus server 来pull es数据
# my global config
global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).
  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
      monitor: 'codelab-monitor'
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first.rules"
  # - "second.rules"
  #  - "prometheus.rules"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # es motitor
  - job_name: elasticsearch
    scrape_interval: 10s
    metrics_path: "/_prometheus/metrics"
    static_configs:
      - targets: ['192.168.x.x:9200']
 
ps:es指标的路径必须为/_prometheus/metrics ,否则prometheus server拉取不到es的指标数据。

到此 prometheus能够正常展示es指标。

免责声明:文章转载自《Prommetheus 插件监控 ES》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇vue从一个页面跳转到另一个页面并携带参数以代码的形式实现flyway的迁移下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

阿里云重磅发布DMS数据库实验室 免费体验数据库引擎

2月27日,阿里云数据管理DMS发布年度巨献——数据库实验室,用户可在该实验室环境下免费体验数据库引擎、以及DMS各项产品功能。数据库实验室是DMS所提供的体验空间,免费赠送数据库引擎资源。 用户只需要登录阿里云账号,即可开通使用各个已支持数据库引擎的全部产品功能,同时还将拥有如下权益: 免费256MB数据空间 免费体验DMS所有功能 未来将享有其他类型...

互联网产品怎么做数据埋点

在互联网产品上线之后,产品和运营人员需要即时了解产品的使用情况,有多少用户,用户使用了哪些功能,停留时长,使用路径。。。等。要回答这些问题,需要有数据,不能拍脑袋想当然。数据怎么得到呢?埋点就是采集数据的重要途径。 数据埋点不是新名词,在电脑网站出来之后就有统计工具,站长们很熟悉的谷歌、百度统计等工具,通过在HTML页面中嵌入它们提供的js代码实现数据采集...

金融系列7《动态数据认证》

1)  标准的动态数据认证,卡片行为分析前执行. 2)  复合动态数据认证/应用密文生成,在GENERATEAC命令发出后执行。 3)  由终端恢复认证中心公钥。 4)  由终端恢复发卡行公钥。 5)  由终端恢复IC卡公钥。 6)  RSA A.   N=P*Q//N公开,的模数,IC卡公钥 B.   Φ(N)=(P-1)* (Q-1) //欧拉函...

使用grok exporter 做为log 与prometheus 的桥

grok 是一个工具,可以用来解析非结构化的日志文件,可以使其结构化,同时方便查询,grok 被logstash 大量依赖 同时社区也提供了一个prometheus 的exporter 可以方便的进行log 指标,暴露为promethesu 的标准数据格式,当 然谷歌的mtail 也是一个不错的选择,同时性能很不错,扩展也很方便(提供了自己的处理语言)...

【串口通信】labview实现串口通信

labview实现串口通信 学习labview有一段时间了,发现了其中功能的强大和编程的简洁性,高效性 现在初步实现了串口的通信,把其中的体会和实现过程写出来,权当抛砖引玉 其中的串口采用的是Rs-232,D型口,共九跟针,其中能用的就是三跟针脚,2,3,5,一个是发送一个是接受,一个是接地,如果做一个串口线延长线的话,只需连接这三根针脚即可,就是2...

实用干货丨如何使用Prometheus配置自定义告警规则

前 言 Prometheus是一个用于监控和告警的开源系统。一开始由Soundcloud开发,后来在2016年,它迁移到CNCF并且称为Kubernetes之后最流行的项目之一。从整个Linux服务器到stand-alone web服务器、数据库服务或一个单独的进程,它都能监控。在Prometheus术语中,它所监控的事物称为目标(Target)。每个目标...