PromQL 从入门到精通
才能获取历史数据呢?可以使用 offset 关键字。 offset 后面跟一个时间段,比如 5m、1d、7d、1w,offset 要紧跟查询选择器,比如: sum(http_requests_total{method="GET"} offset 1d) 运算符 PromQL 支持基本的算术运算符和比较运算符,可以对不同的即时向量做运算,这为监控系统 带来了巨大的进步,算术运算符让很多计算不需要在采集端做了,可以轻易挪到服务端,而比较 文档中的例子来说明: ## example series method_code:http_errors:rate5m{method="get", code="500"} 24 method_code:http_errors:rate5m{method="get", code="404"} 30 method_code:http_errors:rate5m{method="put", code="501"} method_code:http_errors:rate5m{method="post", code="404"} 21 method:http_requests:rate5m{method="get"} 600 method:http_requests:rate5m{method="del"} 34 method:http_requests:rate5m{method="post"} 1200 码力 | 16 页 | 2.77 MB | 1 年前3OpenMetrics - Standing on the shoulders of Titans
Outro Plans Beyond cloud OpenMetrics is intended to go beyond ”just” cloud-native fields Want to get more traditional projects and vendors on board Arista already on board Vertiv very interested Richard http_requests_total{env=" prod" ,method=" post" ,code=" 500" } 12 http_requests_total{env=" prod" ,method=" get" ,code=" 200" } 20 http_requests_total{env=" test" ,method=" post" ,code=" 200" } 372 http_requests_total{env=" http_requests_total{env=" prod" ,method=" post" ,code=" 500" } 12 http_requests_total{env=" prod" ,method=" get" ,code=" 200" } 20 http_requests_total{env=" test" ,method=" post" ,code=" 200" } 372 http_requests_total{env="0 码力 | 21 页 | 84.83 KB | 1 年前3Intro to Prometheus - With a dash of operations & observability
http_requests_total{env=" prod" ,method=" post" ,code=" 500" } 12 http_requests_total{env=" prod" ,method=" get" ,code=" 200" } 20 http_requests_total{env=" test" ,method=" post" ,code=" 200" } 372 http_requests_total{env="0 码力 | 19 页 | 63.73 KB | 1 年前3Prometheus Deep Dive - Monitoring. At scale.
put in more checks and balances to ensure cleaner releases going forward If there are bugs we can’t get rid of, we go into feature moratorium 2.3.2 is the first fully stable release in the 2.x train Richard0 码力 | 34 页 | 370.20 KB | 1 年前3
共 4 条
- 1