prometheus配置简介
参考网页:https://my.oschina.net/wangyunlong/blog/3060776
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets:
rule_files:
- /usr/local/prometheus/rule/node.yml #配置recording rules
- /usr/local/prometheus/rule/alert.yml #配置alert rules
scrape_configs:
- job_name: 'prometheus' #监控prometheus本身
static_configs:
- targets: [""]
- job_name: 'node' #配置target
file_sd_configs: #可自动刷新
- files:
- /usr/loal/prometheus/conf/node.yml
- job_name: 'mysql' #配置target
file_sd_configs: #可自动刷新
- files:
- /usr/loal/prometheus/conf/mysql.yml
###### /usr/loal/prometheus/conf/node.yml配置#############
- targets: ["xxxx"]
labels:
type:
host:
alias:
######## /usr/local/prometheus/rule/alert.yml ###############
groups:
- name: alert
rules:
- alert: cpu_utilization_ratio
expr: 100 - (avg by (instance) (irate(node_cpu_seconds_tital[5m]))*100) >90
for: 10m
labels:
severity: page
annotations:
summary: High request latency
最新文章
- Sublime中Markdown的安装与使用
- Jetty应用服务器的安装详解
- 【bzoj2049】洞穴勘测
- 【转载】Unix Shell中用[-n]判断字符串不为NULL
- iOS开发如何提高(from 唐巧的博客)
- Android之自定义控件入门
- python抓取性感尤物美女图
- HDOJ 1226 超级密码
- 设备\Device\Harddisk1\DR1 有一个不对的区块
- ASP.NET- LinkButton 传递多个参数
- string.Format 日期格式化
- CreateLiveCMSV4.0 漏洞,无需后台Get shell
- mybatis和hibernate对比
- Windows phone 8 学习笔记
- 排序算法门外汉理解-Shell排序
- 主成分分析(Principal components analysis)-最大方差解释
- 如何在container中编译dotnet的eShopOnContainers
- h5开发app之在线生成二维码
- Discuz搜索改为指向帖子
- mybatis源码之MapperMethod
热门文章
- [Codeforces #615 div3]1294E Obtain a Permutation
- LCS(Longest Common Subsequence)最长公共子序列
- 使用onclick报SyntaxError: identifier starts immediately after numeric literal
- spring中的@Transactional注解
- vs2010编译C++ 静态成员函数的引用
- string.xml中的空格
- Ubuntu18.04 LTS 搭建Cassandra集群
- poj 2456 Aggressive cows 贪心+二分
- python --- mysql数据库的操作
- POJ 3916:Duplicate Removal 将相近的重复元素删除