prometheus 监控项
此处记录prometheus监控项,exporter为 node_exporter
vim rules.yml
groups:
- name: node
rules:
- alert: server_status
expr: up{job="node"} == 0
for: 15s
labels:
severity: 'critical'
annotations:
summary: " node_exporter is down"
- name: cluster
rules:
- alert: CPU
expr: (1-rate(node_cpu_seconds_total{mode="idle"}[1m]))*100 > 90
for: 5s
labels:
severity: 'warning'
annotations:
summary: " cpu利用率超过 90%,{{ .Labels.name }}当前值: {{ $value }}%"
# - alert: LOAD1
# expr: node_load5 > Logical_CPU_core_total*0.3 or node_load1 > Logical_CPU_core_total*0.4 or node_load15 > Logical_CPU_core_total*0.2
# for: 5s
# labels:
# severity: 'critical'
# annotations:
# summary: " load过高 当前值为 {{ $value }}"
- alert: LOAD1
expr: node_load1 > Logical_CPU_core_total*3
for: 5s
labels:
severity: 'warning'
annotations:
summary: " load1>cpu*3 当前值为 {{ $value }}"
- alert: LOAD5
expr: node_load5 > Logical_CPU_core_total*2
for: 5s
labels:
severity: 'warning'
annotations:
summary: " load5>cpu*2 当前值为 {{ $value }}"
- alert: LOAD15
expr: node_load15 > Logical_CPU_core_total*2
for: 5s
labels:
severity: 'warning'
annotations:
summary: " load15>cpu*2 当前值为 {{ $value }}"
- alert: space_root
expr: (1-node_filesystem_avail_bytes{fstype=~"xfs|ext4",mountpoint="/"}/node_filesystem_size_bytes{fstype=~"xfs|ext4",mountpoint="/"})*100 > 80
for: 5s
labels:
severity: 'critical'
annotations:
summary: " /下空间使用率大于80% 当前值为{{ $value }}% "
- alert: space_data
expr: (1-node_filesystem_avail_bytes{fstype=~"xfs|ext4",mountpoint="/data"}/node_filesystem_size_bytes{fstype=~"xfs|ext4",mountpoint="/data"})*100 > 80
for: 5s
labels:
severity: 'critical'
annotations:
summary: " /data空间使用率大于80% 当前值为{{ $value }}% "
- alert: upload_rate
expr: rate(node_network_transmit_bytes_total{device="eth0"}[1m])/1048576 > 10
for: 5s
labels:
severity: 'warning'
annotations:
summary: " 上传速率大于10M 当前值为{{ $value }}M"
- alert: download_rate
expr: rate(node_network_receive_bytes_total{device="eth0"}[1m])/1048576 > 10
for: 5s
labels:
severity: 'warning'
annotations:
summary: " 下载速率大于10M 当前值为{{ $value }}M "
- alert: inode_size
expr: (1-node_filesystem_files_free{fstype=~"xfs|ext4",mountpoint="/"}/node_filesystem_files{fstype=~"xfs|ext4",mountpoint="/"})*100 > 50
for: 5s
labels:
severity: 'critical'
annotations:
summary: " /下inode使用率大于50% 当前值为{{ $value }}% "
- alert: Memory_usage
expr: (1-(node_memory_MemAvailable_bytes)/node_memory_MemTotal_bytes)*100 > 80
for: 5s
labels:
severity: 'warning'
annotations:
summary: "内存使用率大于80% 当前值为{{ $value }}% "
- alert: iowait
expr: (avg by (instance) (rate(node_cpu_seconds_total{mode="iowait"}[5m])) * 100) > 50
for: 5s
labels:
severity: 'critical'
annotations:
summary: "cpu iowait大于50% 当前值为{{ $value }}% "
- alert: procs_zombie
expr: procs_zombie > 20
for: 5s
labels:
severity: 'critical'
annotations:
summary: " procs_zombie 大于20 当前值为{{ $value }} "
- alert: logined_users
expr: logined_users_total > 25
for: 5s
labels:
severity: 'critical'
annotations:
summary: "logined_users 大于25 当前值为{{ $value }} "
prometheus 监控项的更多相关文章
- prometheus 监控ElasticSearch核心指标
ES监控方案 本文主要讲述使用 Prometheus监控ES,梳理核心监控指标并构建 Dashboard ,当集群有异常或者节点发生故障时,可以根据性能图表以高效率的方式进行问题诊断,再对核心指标筛选 ...
- Prometheus Operator自定义监控项
Prometheus Operator默认的监控指标并不能完全满足实际的监控需求,这时候就需要我们自己根据业务添加自定义监控.添加一个自定义监控的步骤如下: 1.创建一个ServiceMonitor对 ...
- prometheus node-exporter增加新的自定义监控项
项目中collector中新增加自己所需监控项即可 定义启动node-exporter是传入的参数 var ( phpEndPoint = kingpin.Flag("collector.p ...
- prometheus监控系统
关于Prometheus Prometheus是一套开源的监控系统,它将所有信息都存储为时间序列数据:因此实现一种Profiling监控方式,实时分析系统运行的状态.执行时间.调用次数等,以找到系统的 ...
- Prometheus监控⼊⻔简介
文档目录: • prometheus是什么?• prometheus能为我们带来些什么• prometheus对于运维的要求• prometheus多图效果展示 1) Prometheus是什么pro ...
- Prometheus监控学习笔记之Prometheus不完全避坑指南
0x00 概述 Prometheus 是一个开源监控系统,它本身已经成为了云原生中指标监控的事实标准,几乎所有 k8s 的核心组件以及其它云原生系统都以 Prometheus 的指标格式输出自己的运行 ...
- Prometheus监控学习笔记之360基于Prometheus的在线服务监控实践
0x00 初衷 最近参与的几个项目,无一例外对监控都有极强的要求,需要对项目中各组件进行详细监控,如服务端API的请求次数.响应时间.到达率.接口错误率.分布式存储中的集群IOPS.节点在线情况.偏移 ...
- Grafana+Zabbix+Prometheus 监控系统
环境说明 软件 版本 操作系统 IP地址 Grafana 5.4.3-1 Centos7.5 192.168.18.231 Prometheus 2.6.1 Centos7.5 192.168.18. ...
- Kubernetes容器集群管理环境 - Prometheus监控篇
一.Prometheus介绍之前已经详细介绍了Kubernetes集群部署篇,今天这里重点说下Kubernetes监控方案-Prometheus+Grafana.Prometheus(普罗米修斯)是一 ...
随机推荐
- 配置Bean的作用域
一.Spring中Bean的5个作用域 在Spring 2.0及之后的版本中,Bean的作用域被划分为5种.如下 singleton 默认值.以单例模式创建Bean的实例,即容器中该Bean的实例只 ...
- laravel框架之批刪&全選&全不選&反選
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- python3 修改大数据量excel内容
最好使用python3 64位 对excel的修改操作: from openpyxl import load_workbook import time #打开一个excel表格.xlsx wb = l ...
- 使用RSA算法对接口参数签名及验签
在不同的服务器或系统之间通过API接口进行交互时,两个系统之间必须进行身份的验证,以满足安全上的防抵赖和防篡改. 通常情况下为了达到以上所描述的目的,我们首先会想到使用非对称加密算法对传输的数据进行签 ...
- datetime的timedelta对象
datetime.timedelta对象代表两个时间之间的时间差,两个date或datetime对象相减就可以返回一个timedelta对象. 如果有人问你昨天是几号,这个很容易就回答出来了.但是如果 ...
- Jinja2 中文手册
欢迎来到 Jinja2 Jinja2 是一个现代的,设计者友好的,仿照 Django 模板的 Python 模板语言. 它速度快,被广泛使用,并且提供了可选的沙箱模板执行环境保证安全: <tit ...
- 高效开发之使用Cmder替换cmd
一.为什么要更换为cmder 在做项目时,有些时候我想复制控制台上面的代码时,cmd有的时候复制粘贴很麻烦,Cmder则不会,并且Cmder可以分屏多开窗口,可以设置窗口颜色,字体大小,并且很多快捷键 ...
- css3之新增伪类
css3新增了许多伪类,但是IE8以及更低版本的IE浏览器不支持css3伪类,所以在使用时要是涉及到布局等意象全局的样式,应该多考虑一下. 1.elem:nth-child(n) 这个伪类选中父元素下 ...
- python之kafka消费
使用python3第三方工具,实现kafka消费 # -*- coding: utf-8 -*- import uuid import json from kafka import KafkaCons ...
- mariadb增删改查
数据库用户的操作 登录前需先启动3306端口. 首次启动需初始化数据库 mysql_secure_installation 增/改: 创建用户及赋予用户指定权限 grant 权限(分为create[创 ...