Let's talk a bit
about the Prometheus configuration file.
The configuration is stored
in the Prometheus configuration file, in yaml format.
The configuration file can be changed and applied
without having to restart Prometheus.
A reload can be done by executing kill
with a SIGHUP signal of the process ID.
That's a command in Linux that you can execute
without having to restart Prometheus,
just reloading new configuration.
You can also pass parameters, flags,
at startup time to Prometheus.
Those parameters cannot be changed
without restarting Prometheus.
At start time, the configuration file is passed
using the flag --config.file.
The default configuration looks like this.
You have global, and then you have global configuration.
There's a scrape interval, which is 15 seconds
so you're going to scrape every 15 seconds.
If you don't specify this then it will be one minute.
And then you have the evaluation interval,
which is also 15 seconds.
So evaluate rules every 15 seconds.
Default is also one minute.
I'll talk later about rules
and then the scrape timeout which is not set.
So it's the default value, 10 seconds.
So again, it depends the period of stripping time.
Then you can configure the alert manager
which we'll cover later and you also can configure rules
which belong in rule files
and those will also be explained later.
Well are we going to explain now is the targets.
So to scrape metrics, you need to add configuration
to the Prometheus config file for example,
to scrape metrics from prometheus itself,
the following code block is added by default.
So this is also part of the default configuration file
and this is to define one of our targets.
So we're going to say scrape configs
and we're going to give it a name.
So the job here, the job name is prometheus.
We are going to scrape from prometheus.
The metric path defaults to slash metrics
and the default scheme is http, which means that
we are going to scrape our target on slash metrics.
So the targets that are configured here, is local host 9090.
So the scraping will happen on local host 9090
slash metrics over the http protocol.
In the next demo, I will show you how it looks like.