Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Building a Prometheus Server

Prometheus is a powerful tool for monitoring your infrastructure. Getting started with Prometheus is as easy as setting up a single Prometheus server. There are multiple ways to install Prometheus. In this lab, you will have the opportunity to set up a Prometheus server by installing Prometheus from pre-compiled binaries made available by the Prometheus team.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 13, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Download and Install Prometheus
    1. Create the prometheus user and directories:

      sudo useradd -M -r -s /bin/false prometheus
      
      sudo mkdir /etc/prometheus /var/lib/prometheus
      
    2. Download and extract the pre-compiled binaries:

      wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
      
      tar xzf prometheus-2.16.0.linux-amd64.tar.gz prometheus-2.16.0.linux-amd64/
      
    3. Move the files from the downloaded archive to the appropriate locations, and set ownership on these files and directories to the prometheus user:

      sudo cp prometheus-2.16.0.linux-amd64/{prometheus,promtool} /usr/local/bin/
      
      sudo chown prometheus:prometheus /usr/local/bin/{prometheus,promtool}
      
      sudo cp -r prometheus-2.16.0.linux-amd64/{consoles,console_libraries} /etc/prometheus/
      
      sudo cp prometheus-2.16.0.linux-amd64/prometheus.yml /etc/prometheus/prometheus.yml
      
      sudo chown -R prometheus:prometheus /etc/prometheus
      
      sudo chown prometheus:prometheus /var/lib/prometheus
      
    4. Run Prometheus in the foreground to make sure everything is set up correctly so far:

      prometheus --config.file=/etc/prometheus/prometheus.yml
      
  2. Challenge

    Configure Prometheus as a `systemd` Service
    1. Create a systemd unit file for Prometheus:

      sudo vi /etc/systemd/system/prometheus.service
      
    2. Define the Prometheus service in the unit file:

      [Unit]
      Description=Prometheus Time Series Collection and Processing Server
      Wants=network-online.target
      After=network-online.target
      
      [Service]
      User=prometheus
      Group=prometheus
      Type=simple
      ExecStart=/usr/local/bin/prometheus 
          --config.file /etc/prometheus/prometheus.yml 
          --storage.tsdb.path /var/lib/prometheus/ 
          --web.console.templates=/etc/prometheus/consoles 
          --web.console.libraries=/etc/prometheus/console_libraries
      
      [Install]
      WantedBy=multi-user.target
      
    3. Start and enable the Prometheus service:

      sudo systemctl daemon-reload
      
      sudo systemctl start prometheus
      
      sudo systemctl enable prometheus
      
    4. Verify the Prometheus service is healthy:

      sudo systemctl status prometheus
      
    5. Make an HTTP request to Prometheus to verify it is able to respond:

      curl localhost:9090
      
    6. You can also access Prometheus in a browser using the server's public IP address: http://<PROMETHEUS_SERVER_PUBLIC_IP>:9090.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight