当前位置:网站首页>Consumption monitoring of Prometheus monitoring [consult exporter]
Consumption monitoring of Prometheus monitoring [consult exporter]
2022-06-22 16:26:00 【IChen.】
1. brief introduction
Consul There are multiple components , But overall , It is a service discovery and configuration tool in the infrastructure . It provides several key functions :
Service discovery :Consul client Can provide services , for example api or mysql, You can also use Consul client To discover the provider of the specified service . Use DNS or HTTP, Applications can easily find the services they depend on .
health examination :Consul client Any number of health checks can be provided , Or with a given service (“Web Whether the server returns 200 OK”), Or with local nodes (“ Whether the memory utilization is lower than 90%”) Related to . You can use this information to monitor cluster health , The service discovery component uses this information to remove traffic from the host in question .
KV Store: Applications can use Consul Hierarchical key / Value store , Including dynamic configuration , Functional markers , Coordinate ,leader Elections and so on . ordinary HTTP API Make it easy to use .
Multi-data center :Consul Support multiple data centers . It means Consul Users of don't have to worry about building additional abstraction layers to extend to multiple areas
2. Deploy
docker run -tid --restart=always -p 9107:9107 --name consul-expoter prom/consul-exporter:latest --consul.server=172.19.209.51:8500
The dynamic log is as follows :
level=info caller=consul_exporter.go:486 msg=“Starting consul_exporter” version=“(version=0.7.1, branch=HEAD, revision=ae46e2ea980ecf1c961bf332b71160be707b5e98)”
zevel=info caller=consul_exporter.go:487 build_context=“(go=go1.14.6, [email protected], date=20200721-15:34:41)”
level=info caller=consul_exporter.go:538 msg=“Listening on address” address=:9107
Default listening 9107 port , visit http://localhost:9107 You can see :
3.Prometheus Grab metrics
- job_name: consul-exporter
static_configs:
- targets: ['172.19.209.51:9107']
4. Import Dashboard
recommend :Consul Exporter Dashboard
ID yes 12049.
Displays the total number of services ,Consul Peer Quantity and sum Leader Number 、 Unhealthy Consul service 、Consul Service and service detection information .

5. Configure alarm rules
Consul whether Down
The configuration file consul_exporter_alerting_rules.yml as follows :
groups:
- name: consul
rules:
- alert: ConsulDown
annotations:
description: |-
Consul instance is down
VALUE = {
{
$value }}
LABELS: {
{
$labels }}
summary: Consul down (instance {
{
$labels.instance }})
expr: consul_up == 0
for: 5m
labels:
severity: critical
prometheus.yml The configuration is as follows :
rule_files:
- “consul_exporter_alerting_rules.yml”
Stop Consul, You can see the following alarms :

start-up Consul, The alarm disappears .

边栏推荐
- [leetcode] 9. Palindromes
- Navicat premium connecting to Oracle database (Graphic tutorial)
- 【山大会议】项目引入 Redux
- 【小程序项目开发-- 京东商城】uni-app开发之配置tabBar & 窗口样式
- [Huawei cloud to Jian Zhiyuan] the winning list of essay solicitation is released!
- Dear students, don't read the textbooks any more. Just read this one for the complexity of time
- 期货怎么开户?网上期货开户安全吗?
- School enterprise alliance is on the way! Huawei cloud gaussdb has come to universities again
- 3. Classe abstraite (forme)
- odoo部署到服务器并配置为服务
猜你喜欢

ArcGIS JS之 4.23之IIS本地部署与问题解决

Lecture 6 of slam Lecture 14 -- nonlinear optimization

SAP ABAP dialog programming tutorial: module pool in -09

Navicat premium connecting to Oracle database (Graphic tutorial)

Make the text template in pycharm project support jinjia2 syntax

过气剧本杀,被露营“复活”

什么是 SAP ABAP? 类型、ABAP 完整形式和含义

买网红雪糕的我,成了大冤种

B树和B+树

How to embody the value of knowledge management in business
随机推荐
SAP ABAP 中的用户出口和客户出口-015
【山大会议】软件性能优化及bug修复
[VTK] model rotation and Translation
odoo本地文档功能开发记录
Simulation Implementation of string
Make the text template in pycharm project support jinjia2 syntax
畅享高性能计算!天翼云HPC解决方案来了
【山大会议】应用设置模块
音视频基础知识|ANS 噪声抑制原理解析
直播无顶流:董宇辉这么火,还有人看刘畊宏吗?
【小程序项目开发-- 京东商城】uni-app开发之分包配置
执行逻辑大同小异的实现类使用模板模式
十九、Xv6上下文切换(上下文切换的实现;状态机的封装与恢复)
C语言贪吃蛇
知识管理在业务中的价值如何体现
[Shanda conference] software performance optimization and bug repair
The odoo system sets priorities for the views independently developed by the original model
Unity游戏优化(第2版)学习记录8
CMake教程系列-00-简介
[Shanda conference] acquisition of user media based on webrtc