Let's go over some basic concepts.
All data in Prometheus is stored as time series.
Here on the left you have an example of time series.
Every time series is identified by the "metric name"
and a set of key-value pairs, called labels.
Here on the left, the metric is go_memstat_alloc_bytes,
and as you can see, we have two metrics with the same name.
We have two different labels,
so we have one that is instance=localhost:9090
and that is a job=prometheus,
and if you have a look on the left,
we also have an instance=localhost:9100
and a job is node_exporter.
So this was one taken also where the node_exporter,
another program was running and they expose the same metrics
but they have different labels,
so here you can then graph them, they have the same meaning,
but they are from two different pieces of software.
The time series data also consists of the actual data,
called Samples, it can be a float64 value
or a millisecond-precision timestamp.
So here is the same data that I showed you
in the previous slides but then as a Sample,
so again you have the metric name, the labels,
and then the actual value, the Sample.
The notation of time series is often using the following
notation, metric name and then a curly bracket,
label name equals, label value, comma,
then maybe more labels and then a closing curly bracket.
For example, node_boot_time{instance='localhost:9100'
and job=node_exporter"}, so you see that the metric name
can be often generic, can be memory usage,
or node_boot_time, or something that can appear multiple
times and then give it meaning with the labels,
the instance that this software is running on,
or the name of a job equals that.