In this demo,
I'll show you the Prometheus configuration.
So if you want to have look where
our config file is stored,
can just have look at how our Prometheus is started.
You see config.file/etc/prometheus/prometheus.yml.
So if you wanna make changes we need to
edit this config file.
So, let's have a look what's in there.
This is what I showed you in the slides,
scrape_configs, job_name prometheus.
This is where our Prometheus is running.
So let's have a look at this 9090
which gives us our dashboards
and also have a look at the slash metrics.
What this is going to show us.
So this is our dashboards.
Let's have a look at the targets.
So this is our Prometheus target
that is configured, status up,
and this is labeled "instance local host 9090."
Last scraped eight seconds ago.
So if we have a look at
slash metrics,
these are the metrics that
Prometheus itself exposes.
So you see here it's in the form of
metric name, the labels, and then the value
which is a float 64 value.
So these are all the samples.
So every 15 seconds this gets scraped,
these numbers change, and this is how Prometheus
can build its database of monitoring.
And based on that you can then
do the graphs, do graphs on the graphs,
or set alerts.
So this then how we then can see
in Prometheus these metrics.
'Cause these metrics were scraped
from the slash metrics endpoint.
If we have a look at go_memstats_aloc_bytes,
the one that I showed you in the theory,
and then execute this, this is the value
this is the aloc scraped value,
but then we can see the history of it
in a graph, so this is basically scraped
every 15 seconds, and then we see it's nicely graphed.
From this we can also of course get an in-graph ana.
And this is then the label. So when we add more services,
if they also have the metric name go_memstats_aloc_bytes,
we can then also graph these nicely on
the same plot, and then you will see that
the metric name is the same, but the labels are different.
Also, in status configuration, you can then see
the configuration that is effective at that time.
So that's it for configuration.
In the next couple of lectures, we will edit
this config file, and we'll add some more targets and so on.