Downloading Prometheus
Let's download Prometheus to our Linux machine.
NOTE: If you don't have a Linux machine, you can also run these steps in a cloud-based environment for free using Gitpod, by opening an empty starter workspace:
If you are using Gitpod to follow along, please note that any servers started in the Gitpod environment will not be externally accessible on their usual ports (like
9090
for Prometheus). Instead, Gitpod will automatically detect when the Prometheus server is started and provide a custom URL likehttps://9090-promlabs-gitpodstarter-XXXXXXXXXXX.ws-eu117.gitpod.io/
to access it (note the original port being encoded in the hostname instead). This URL should automatically open in a new browser tab after the server is started. If this does not work, please check whether your browser is blocking popups from Gitpod.
Create a directory for the workshop files:
mkdir workshop
Change to it:
cd workshop
Download Prometheus 2.53.0 for Linux (see the download page for other versions):
wget https://github.com/prometheus/prometheus/releases/download/v2.53.0/prometheus-2.53.0.linux-amd64.tar.gz
Extract the tarball:
tar xvfz prometheus-2.53.0.linux-amd64.tar.gz
Change into the extracted directory:
cd prometheus-2.53.0.linux-amd64