当前位置:网站首页>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



边栏推荐
- 智慧园区效果不满意?请收下ThingJS这份秘籍
- php 正则表达式
- New technology aesthetics and original biological networking operating system reshape the whole house intelligence
- PHP regular expression
- 从0到1,IDE如何提升端侧研发效率?| DX研发模式
- Groovy之范围
- 最简单DIY基于51单片机、PCA9685、IIC、云台的舵机集群控制程序
- Unity technical manual - shape sub module - Sprite, spriterenderer and velocity over lifetime
- Google Earth Engine(GEE)——GEDI L2A Vector Canopy Top Height (Ver
- 社招腾讯高P(高级产品经理)的面试手册
猜你喜欢

Win10 Microsoft input method (Microsoft Pinyin) does not display the word selection column (unable to select words) solution

Interview Manual of social recruitment Tencent high P (Senior Product Manager)

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

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

New technology aesthetics and original biological networking operating system reshape the whole house intelligence

A child process is created in the program, and then the parent and child processes run independently. The parent process reads lowercase letters on the standard input device and writes them to the pip

Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control

为什么poll/select在open时要使用非阻塞NONBLOCK

Picture storage -- Reference

ESP32-CAM高性价比温湿度监控系统
随机推荐
Not satisfied with the effect of the smart park? Please accept this secret script of thingjs
证券开户网上安全度高吗
Simplest DIY remote control computer system based on STM32 ① (capacitive touch + key control)
5 个关于 NFT 的技术漏洞
Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file
攻防演练合集 | 3个阶段,4大要点,蓝队防守全流程纲要解读
5 login failures, limiting login practice
R and rstudio download and install detailed steps
安卓安全/逆向面试题
UWA new | real person real machine test new overseas model zone
C语言结构体字节对齐问题
单向链表实现--计数
最简单DIY基于C#和51单片机上下位机一体化的PCA9685舵机控制程序
Solve the problem of invalid audio autoplay
Picture storage -- Reference
Noi OJ 1.3 14: elephant drinking water C language
Go zero micro Service Practice Series (VI. cache consistency assurance)
Unity technical manual - shape sub module - Sprite, spriterenderer and velocity over lifetime
运行时应用自我保护(RASP):应用安全的自我修养
Tensorrt笔记(四)推理分割模型