How to read promql in detail

PromQL (Prometheus Query Language) is the query language of Prometheus tsdb. It is a key part of combining grafana for data display and configuration of alarm rules.

Detailed promQL

Prometheus provides a built-in data query language PromQL (full name Prometheus Query Language), which supports users to perform real-time data query and aggregation operations.

Basic introduction to PromQL

Prometheus uniquely defines a time series based on the metrics name and the attached label set:

  • The name of the indicator represents the basic characteristic identification of a certain type of measurable attribute on the monitoring target
  • Tags are multiple measurable dimensions subdivided from this basic feature

Time series data: data that records system and equipment status changes in chronological order, and each data is called a sample:

  • Data collection is performed in a specific time period, so recording these sample data over time will generate a discrete sequence of sample data
  • This sequence is also called a vector (Vector); and placing multiple sequences in the same coordinate system (with time as the horizontal axis and sequence as the vertical axis) will form a matrix composed of data points

Prometheus data model

In Prometheus, each time series is uniquely identified by an indicator name (Metric Name) and a label (Label), in the format "{=, ...}";

Indicator name: usually used to describe a characteristic to be measured on the system;

    <

Guess you like

Origin blog.csdn.net/yetaodiao/article/details/131596652