夜莺-Nightingale
夜莺V7
项目介绍 功能概览
部署升级 部署升级
数据接入 数据接入
告警管理 告警管理
数据查看 数据查看
功能介绍 功能介绍
API FAQ
夜莺V6
项目介绍 架构介绍
快速开始 快速开始
黄埔营
安装部署 安装部署
升级
采集器 采集器
使用手册 使用手册
API API
数据库表结构 数据库表结构
FAQ FAQ
开源生态
Prometheus
版权声明
第1章:天降奇兵 第1章:天降奇兵
第2章:探索PromQL 第2章:探索PromQL
第3章:Prometheus告警处理 第3章:Prometheus告警处理
第4章:Exporter详解 第4章:Exporter详解
第5章:数据与可视化 第5章:数据与可视化
第6章:集群与高可用 第6章:集群与高可用
第7章:Prometheus服务发现 第7章:Prometheus服务发现
第8章:监控Kubernetes 第8章:监控Kubernetes
第9章:Prometheus Operator 第9章:Prometheus Operator
参考资料

Select the Prometheus data type and enter the PromQL expression. For example, the following shows how to query the CPU utilization of the server:

prometheus001

Below are several commonly used functions.

Using the rate function, which takes the average per second increment of a counter over the specified time period. The following query shows the change rate of the eth0 network card of the host per minute:

prometheus002

Using the increase function, which is used for counter data types to capture the total increment over a certain period. The following query shows the increment of the eth0 network card of the host over one minute:

prometheus003

Using the topk function, which retrieves the highest values. This function is generally used for instantaneous alerts rather than for observing curve graphs. The following example shows the CPU utilization rate changes per second within one minute, only displaying the top 2 results.

prometheus004

Using the count function, which outputs the cumulative count of values that meet certain conditions. It is often used for monitoring judgments in certain scenarios. For example, in a company with 100 servers, if only 10 servers have a CPU utilization rate above 80%, no alarm is needed. However, if the number exceeds 70, an alarm is necessary. The following expression shows the alarm for the number of hosts with CPU utilization above 20% being greater than 1.

prometheus005

Table View and Graph View

Table View: Used to view raw data, reflecting the original data on the collection reporting frequency. By viewing the Table view data, you can see the raw data results, reporting time, and reporting interval. The Table is generally used to query the raw values of metrics and verify whether the reporting time of the metrics has deviated from expectations (delay). By comparing the reporting data time and the reporting data interval, you can determine whether there are anomalies in the reported data values and states. The following figure illustrates this:

prometheus006

Graph View: Typically used for viewing trends in time series data. An important parameter in the query conditions for the Graph view is the step parameter, which can be automatically calculated (or manually entered). If it is inconsistent with the collection frequency in the configuration file, the values queried by the Graph will not be raw data. The following example illustrates this.

prometheus007

Specifying the step parameter value as 15 seconds will lead to significant differences in the query results compared to the raw data results.

prometheus008

快猫星云 联系方式 快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云 联系方式
快猫星云
OpenSource
开源版
Flashcat
Flashcat