此处记录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 监控项的更多相关文章

  1. prometheus 监控ElasticSearch核心指标

    ES监控方案 本文主要讲述使用 Prometheus监控ES,梳理核心监控指标并构建 Dashboard ,当集群有异常或者节点发生故障时,可以根据性能图表以高效率的方式进行问题诊断,再对核心指标筛选 ...

  2. Prometheus Operator自定义监控项

    Prometheus Operator默认的监控指标并不能完全满足实际的监控需求,这时候就需要我们自己根据业务添加自定义监控.添加一个自定义监控的步骤如下: 1.创建一个ServiceMonitor对 ...

  3. prometheus node-exporter增加新的自定义监控项

    项目中collector中新增加自己所需监控项即可 定义启动node-exporter是传入的参数 var ( phpEndPoint = kingpin.Flag("collector.p ...

  4. prometheus监控系统

    关于Prometheus Prometheus是一套开源的监控系统,它将所有信息都存储为时间序列数据:因此实现一种Profiling监控方式,实时分析系统运行的状态.执行时间.调用次数等,以找到系统的 ...

  5. Prometheus监控⼊⻔简介

    文档目录: • prometheus是什么?• prometheus能为我们带来些什么• prometheus对于运维的要求• prometheus多图效果展示 1) Prometheus是什么pro ...

  6. Prometheus监控学习笔记之Prometheus不完全避坑指南

    0x00 概述 Prometheus 是一个开源监控系统,它本身已经成为了云原生中指标监控的事实标准,几乎所有 k8s 的核心组件以及其它云原生系统都以 Prometheus 的指标格式输出自己的运行 ...

  7. Prometheus监控学习笔记之360基于Prometheus的在线服务监控实践

    0x00 初衷 最近参与的几个项目,无一例外对监控都有极强的要求,需要对项目中各组件进行详细监控,如服务端API的请求次数.响应时间.到达率.接口错误率.分布式存储中的集群IOPS.节点在线情况.偏移 ...

  8. Grafana+Zabbix+Prometheus 监控系统

    环境说明 软件 版本 操作系统 IP地址 Grafana 5.4.3-1 Centos7.5 192.168.18.231 Prometheus 2.6.1 Centos7.5 192.168.18. ...

  9. Kubernetes容器集群管理环境 - Prometheus监控篇

    一.Prometheus介绍之前已经详细介绍了Kubernetes集群部署篇,今天这里重点说下Kubernetes监控方案-Prometheus+Grafana.Prometheus(普罗米修斯)是一 ...

随机推荐

  1. [转帖]紫光与群联联盟,长江存储NAND+群联主控+紫光品牌SSD可期

    紫光与群联联盟,长江存储NAND+群联主控+紫光品牌SSD可期 全国产的 SSD https://baijiahao.baidu.com/s?id=1620789429952097018&wf ...

  2. MySQL -2- 体系结构--随笔小记

    简介与安装NoSQLRDBMS版本安装方式二进制安装,源码安装体系结构CS模型TCP/IPsocketmysql master thread 实例mysqld 的程序构成连接层 协议.验证.链接线程S ...

  3. PhpStorm配置Xdebug调试

    安装xdebug 去官网下载对应版本的xdebug扩展 XDEBUG EXTENSION FOR PHP | DOWNLOADS 如何选择正确版本 输出phpinfo()函数的内容 查看输出页面的网页 ...

  4. 使用elasticsearch7.3版本在一台主机上部署多个实例组建集群

    系统:centos 7.4 x64 主机ip:192.168.0.160 软件包:elasticsearch-7.3.0-linux-x86_64.tar.gz 配置步骤 vim /etc/secur ...

  5. Property 'showModal' does no t exist on type 'JQuery<HTMLElement>'

    在 TS 代码中使用 jQuery 等库时配合插件使用,但是插件的开发人员并没有为其扩展 jQuery 的类型定义,这是使用插件的方法必然会报 TS 的类型错误,这时候要快速选择忽略该报错的最直接的方 ...

  6. CDH部署StreamSets

    StreamSets是一个大数据采集工具,数据源支持包括结构化和半/非结构化,目标源支持HDFS,HBase,Hive,Kudu,Cloudera Search, ElasticSearch等.它包括 ...

  7. vue学习【番外篇】vue-cli脚手架的安装

    大家好,我是一叶,今天和大家分享的是vue-cli脚手架的安装,关于vue-cli的优点,我就不赘述了. 一.检查安装node 安装vue-cli之前,先检查node是否安装.win+R,输入cmd打 ...

  8. xml发post请求

    # python3字符串换行,在右边加个反斜杠 body = '<?xml version="1.0" encoding = "UTF-8"?>' ...

  9. Win7 Linux双系统,恢复Linux启动项

    在一台电脑上安装Win7 Centos双系统,先安装Win,再安装Centos7.装完后,丢失Linux启动项. 恢复步骤,下载EasyBCD,添加新条目,操作系统选择Linux/BSD,类型选择GR ...

  10. AIX中的网络管理

    1.AIX中网络配置 AIX支持的适配器: #lsdev  -Cc   adapter   查看网络适配器: #lsdev  -Cc  if   修改网卡属性 #smitty    chgenet   ...