PromQL: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Prometheus Concepts =Organizatorium= Vectors. Instant vectors. Time ranged vectors.")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://prometheus.io/docs/prometheus/latest/querying/basics/
* https://prometheus.io/docs/prometheus/latest/querying/examples/
* https://prometheus.io/docs/prometheus/latest/querying/operators/
* https://prometheus.io/docs/prometheus/latest/querying/functions/
* https://prometheus.io/docs/prometheus/latest/querying/api/
* https://promlabs.com/promql-cheat-sheet/
=Internal=
=Internal=
* [[Prometheus_Concepts#PromQL|Prometheus Concepts]]
* [[Prometheus_Concepts#PromQL|Prometheus Concepts]]
=Data Types=
==Instant Vector==
A set of time series containing a simple [[#Sample|sample]] for each time series, all sharing the same timestamp.
==Range Vector==
A range vector is a set of time series containing a range of data points over time for each series. It is also known as "time ranged vector".
==Scalar==
A simple numeric floating point value.
==String==
A simple string value.
=Organizatorium=
=Organizatorium=
Vectors. Instant vectors. Time ranged vectors.
Vectors. Instant vectors. Time ranged vectors.
Query for all [[Prometheus_Concepts#Series|series]] that are associated with a certain label:
<syntaxhighlight lang='text'>
some_metric{some_label!=""}
</syntaxhighlight>
Query for all [[Prometheus_Concepts#Series|series]] that are associated with two labels:
<syntaxhighlight lang='text'>
some_metric{some_label!="",some_other_label!=""}
</syntaxhighlight>

Latest revision as of 21:45, 8 April 2024

External

Internal

Data Types

Instant Vector

A set of time series containing a simple sample for each time series, all sharing the same timestamp.

Range Vector

A range vector is a set of time series containing a range of data points over time for each series. It is also known as "time ranged vector".

Scalar

A simple numeric floating point value.

String

A simple string value.

Organizatorium

Vectors. Instant vectors. Time ranged vectors.

Query for all series that are associated with a certain label:

some_metric{some_label!=""}

Query for all series that are associated with two labels:

some_metric{some_label!="",some_other_label!=""}