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(普罗米修斯)是一 ...
随机推荐
- Windows Forms和WPF在Net Core 3.0框架下并不会支持跨平台
Windows Forms和WPF在Net Core 3.0框架下并不会支持跨平台 微软将WinForms和WPF带到.NET Core 3.0这一事实,相信大家都有所了解,这是否意味着它在Linux ...
- Http服务器搭建(CentOS 7)
注意ip地址为: 虚拟机ip设置 TYPE="Ethernet"BOOTPROTO="static"NAME="enp0s3"DEVICE= ...
- HDU-1204-糖果大战
题目描述 生日\(Party\)结束的那天晚上,剩下了一些糖果,\(Gandon\)想把所有的都统统拿走,\(Speakless\)于是说:"可以是可以,不过我们来玩\(24\)点,你不是已 ...
- python 安装 redis
https://pypi.org/project/redis/ pip install redis import redis pool = redis.ConnectionPool( host = & ...
- AtCoder Beginner Contest 076
A - Rating Goal Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Takaha ...
- mybatis动态sql详情
mybatis动态拼装sql详情 MyBatis的动态SQL是基于OGNL表达式的,它可以帮助我们方便的在SQL语句中实现某些逻辑. MyBatis中用于实现动态SQL的元素主要有: if choos ...
- JS 一位数左边补零
- 【抓包工具】使用Fiddler关于“由于目标计算机积极拒绝,无法连接。”的解决方案
今天使用Fiddler的时候遇到下面这个问题:在地址栏想打开个一般处理程序,出现连接本机失败的提示,如下图: 而这在我没打开Fiddler的时候是显示正常的. 查看Fiddler,在嗅探 -> ...
- java 约瑟夫问题
题目: 给定一个数组及数组的长度,另外给定一个数m,从数组的第一个元素出发,数到第m个元素出列(如果到最后则回到第一个元素).出列元素的值作为m的新值,从出列元素的下一元素继续开始数下去,直到所有元素 ...
- vim 添加显示和行号
方法一: 1.显示当前行行号,在VI的命令模式下输入 :nu 2.显示所有行号,在VI的命令模式下输入 :set nu :set nonu 关闭 方法二: 使用vi编辑~/.vimrc文件,在该文件中 ...