此处记录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. SSCursor 处理大量数据

    使用游标的好处是不会将查询结果全部都放入内存中,避免了占用大量的内存,会从存储块中读取记录,并且一条一条的返回来 class DbConnection(object): def __init__(se ...

  2. 更新到.netcore3.0后找不到dotnet-ef的解决办法

    在项目根目录下建立global.json文件 { "sdk": { "version": "2.2.402" } } 或使用命令 dotne ...

  3. SpringMVC-JSON数据交换

    在上Springmvc-JSON数据交换的时候,老师提出了两个问题: 1.JSON数据交互两个注解的作用? 2.静态资源访问的几种配置方式,并简述? 老师刚提出这两个问题的时候我一头雾水的.JSON数 ...

  4. vue项目进行时,script标签中,methods事件中函数使用的async/await

    用 async/await 来处理异步 await关键字只能放到async函数里面,通过await得到就是Promise返回的内容:当然也能通过then()去获取,若通过then()获取了则就无Pro ...

  5. 面向新手的Web服务器搭建(一)——IIS的搭建

    很多童鞋说自己是做移动开发的,想挂个简单的Web API,可是服务器又不会搭,这样一来测试就成了问题.看看网上的教程,发现略难懂,而且大多是一个转一个,没价值,所以干脆写几篇文章讲讲简单的Web服务器 ...

  6. 利用sql报错帮助进行sql注入

    我们可以利用sql报错帮助进行sql注入,这里以sql server 为例: sql查询时,若用group by子句时,该子句中的字段必须跟select 条件中的字段(非聚合函数)完全匹配,如果是se ...

  7. Jmeter分布式测试dubbo接口1

    最近工作中接到一个需求,需要对一个Dubbo接口进行压力测试,测试其性能,之前一直使用jmeter做压力测试,在踏了好多坑之后,决定把这些记录下来,顺便也希望能帮助到大家. 开始测试之前,我们需要先知 ...

  8. idea 新手入门配置

    1.配置新建类时,创建者信息 2.配置svn 1. 在idea中不显示无用的内容,配置如下  .hprof;.iml;.pyc;.pyo;.rbc;.yarb;~;.DS_Store;.git;.hg ...

  9. 跨域 (1) jsonp 跨域

    jsonp 的例子 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  10. Kendo UI使用教程:Bower Packages

    [Kendo UI最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support for React和 ...