The classic example of promsql of prometheus

1. Multi-dimensional data

 

 

2.Prometheus global monitoring indicators

Only you need to define a global index , and then to meet different business needs by adding a different dimension data container_memory_usage_bytes

The prom SQL template 3.Prometheus use

A statistical amount of memory to use containers of different operating environments webapp: SUM (container_memory_usage_bytes CONTAINER_NAME = ~ { "webapp"}) by (the env)
 2 calculates the average memory usage of webapp2:. Avg (container_memory_usage_bytes {container_name = "webapp2"} )

Reference: https://www.cnblogs.com/CloudMan6/p/7709970.html

 

Guess you like

Origin www.cnblogs.com/hixiaowei/p/11583511.html