当前位置:网站首页>Rancher 2.6 new monitoring QuickStart
Rancher 2.6 new monitoring QuickStart
2022-06-23 11:14:00 【InfoQ】
General Statement
- PrometheusRules: Define alarm rules
- Alert Managers:Altermanager start-up CRD, be used for Altermanager Boot copy
- Receivers: Configure alarm receiving media CRD
- Routers: Match the alarm rules with the alarm media
- ServiceMonitor: Definition Prometheus Address of the collected monitoring indicators
- Pod Monitor: A more granular pair POD monitor

Configuration and use
Enable monitoring




remoteRead:
- url: http://192.168.0.7:8086/api/v1/prom/read?db=prometheusremoteWrite:
- url: http://192.168.0.7:8086/api/v1/prom/write?db=prometheus
podLabels:
jobLabel: node-exporter
resources:
limits:
cpu: 200m
memory: 150Mi
requests:
cpu: 100m
memory: 30Mi
- Altermanager: Enter the alarm information view page
- Grafana: View the monitoring data icon
- Prometheus Graph:Prometheus Expression execution page
- Prometheus Rules: see Prometheus Configured alarm expression page
- Prometheus Targets: Monitoring and data collection


- cpu usage
- Cluster node load
- Memory usage
- Disk usage
- disk IO
- Network Traffic
- Network IO
- ApiServer Request rate
- Controller-Manager Queue depth
- POD scheduler Scheduling status
- Ingress-Controller The number of connections
- Leader Election status
- Leader The number of elections
- GRPC Client Traffic
- ETCD Data usage capacity
- Active Streams
- RPC rate
- Disk data synchronization time

Configure custom monitoring indicators
- utilize JMX exporter, stay Java Start a small Http server
- To configure Prometheus Grab that Http server Provided metrics
- To configure Grafana Connect Prometheus, To configure Dashboard
mkdir -p /Dockerfile/jmx-exporter/https://github.com/prometheus/jmx_exporter
https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar---
rules:
- pattern: ".*"FROM tomcat
COPY ./jmx_prometheus_javaagent-0.12.0.jar /jmx_prometheus_javaagent-0.12.0.jar
ENV CATALINA_OPTS="-Xms64m -Xmx128m -javaagent:/jmx-exporter/jmx_prometheus_javaagent-0.12.0.jar=6060:/jmx-exporter/simple-config.yml"docker build -t tomcat:v1.0 .
docker run -itd -p 8080:8080 -p 6060:6060 tomcat:v1.0

kubectl label svc tomcat app=tomcatapiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: tomcat-app namespace: defaultspec:
endpoints:
- port: exporter
selector:
matchLabels:
app: tomcat




Configure alarms





- group_by: Used to configure alarm groups , Achieve alarm suppression effect , The same group The alarms of will only be aggregated and sent once . for example host01 The database is running on , Then the corresponding alarm includes host down、mysql down. They are configured in a group Inside , So if host down The corresponding mysql It must be down 了 , Well, because they are configured in a group in , therefore host down and mysql down The alarms will be aggregated and sent out .
- group_wait: New AlterGroup How long to wait before the first alarm is triggered .
- group_interval:AlterGroup Different alarm triggering intervals generated in .
- repeat_interval:AlterGroup If the alarm is the same all the time ,Altermanager In order to avoid long-term interference , Waiting time for alarm de duplication .

Custom alarm

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: podmonitor
namespace: cattle-monitoring-system
spec:
groups:
- name: pod_node_ready
rules:
- alert: pod_not_ready
annotations:
message: '{{ $labels.namespace }}/{{ $labels.pod }} is not ready.'
expr: 'sum by (namespace, pod) (kube_pod_status_phase{phase!~"Running|Succeeded"})
> 0 '
for: 180s
labels:
severity: serious - for: Indicates the duration
- message: Indicates the information in the alarm notification
- label.severity: Indicates the alarm level
- expr: Index get expression



边栏推荐
- 实战监听Eureka client的缓存更新
- Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control
- Google Earth Engine(GEE)——用不同方法计算slope对比案例分析
- PHP reflection class use
- 【ML】QuantileRegressor
- "Internet +" contest topic hot docking | I figure to understand 38 propositions of Baidu
- New technology aesthetics and original biological networking operating system reshape the whole house intelligence
- Simplest DIY steel patriot machine gun controller based on Bluetooth, 51 MCU and steering gear
- Noi OJ 1.3 14: elephant drinking water C language
- 最简单DIY基于C#和51单片机上下位机一体化的PCA9685舵机控制程序
猜你喜欢

L'outil de périphérique deveco aide au développement de périphériques openharmony

社招腾讯高P(高级产品经理)的面试手册

深潜Kotlin协程(十四):共享状态的问题

Win10 无线网络,系统搜索不到WLAN的,解决办法 (以及 VMnet1,8)

力扣 1319. 连通网络的操作次数

Vone新闻 | 旺链科技赋能众享链网自组织管理,打造企业级联盟DAO

“芯”有灵“蜥”,万人在线!龙蜥社区走进 Intel MeetUp 精彩回顾

Deep dive kotlin synergy (XIV): problems of shared state

UWA上新|真人真机测试新增海外机型专区

Esp32-cam high cost performance temperature and humidity monitoring system
随机推荐
JVM easy start-02
Tensorrt筆記(四)推理分割模型
长安LUMIN是否有能力成为微电市场的破局产品
Which securities company has the lowest Commission for opening a mobile account? Is it safe to open an account online now?
Noi OJ 1.2 06: round floating point numbers to zero
【MATLAB 图形用户界面控件使用】
Noi OJ 1.3 13: reverse output of a three digit C language
How to write a literature review? What should I do if I don't have a clue?
flutter系列之:flutter中的Wrap
如何用 Redis 实现一个分布式锁
The simplest DIY serial port Bluetooth hardware implementation scheme
单向链表实现--计数
php 正则表达式
list的深度剖析及模拟实现
Noi OJ 1.3 20: power C language for computing 2
最简单DIY基于51单片机、PCA9685、IIC、云台的舵机集群控制程序
DevEco Device Tool 助力OpenHarmony设备开发
Simplest DIY remote control computer system based on STM32 ① (capacitive touch + key control)
Is it difficult to register stocks and open accounts online? Is it safe to open an account online now?
Similarities and differences between SPI and IIC