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 using the free tier of GitHub Codespaces, by opening an empty starter workspace:
![]()
You can open a terminal in the Codespaces environment using
Ctrl+Shift+`(orCmd+Shift+`on macOS) and selecting the option "Continue Working in GitHub Codespaces" when prompted. When asked to select a virtual machine size, the smallest possible option should be sufficient for the purposes of this training.If you are using Codespaces to follow along, please note that any servers started in the Codespaces environment will not be externally accessible on their usual TCP ports (like
9090for the Prometheus server). Instead, Codespaces will automatically detect when a server is started and will open a dialog providing a custom URL likehttps://<workspace>-9090.app.github.dev/to access it (note the original port9090being encoded in the hostname instead).
Create a directory for this training files:
mkdir prometheus-trainingChange to it:
cd prometheus-trainingDownload Prometheus 3.2.0 for Linux (see the download page for other versions and architectures):
wget https://github.com/prometheus/prometheus/releases/download/v3.2.0/prometheus-3.2.0.linux-amd64.tar.gzExtract the tarball:
tar xvfz prometheus-3.2.0.linux-amd64.tar.gzChange into the extracted directory:
cd prometheus-3.2.0.linux-amd64