Introduction to System Monitoring
Linux | macOS | Windows
Understanding Prometheus
Prometheus is a popular, open-source tool used to monitor computers, servers, and software applications. It works by collecting data, called "metrics," from your systems at regular times. These metrics can tell you how healthy your system is, like how much memory is being used or if a server is running too slowly. Because it was built to handle a lot of data quickly, it is a favorite choice for many big tech companies.
Unlike some older monitoring tools that wait for systems to send them data, Prometheus actively goes out and pulls the data itself. It connects to special addresses on your servers, grabs the latest health numbers, and stores them in its own fast database. This "pull" method makes it very reliable and easy to set up, especially when you have many different pieces of software running at the same time.
Another great feature of Prometheus is how you can use the data once it is collected. It comes with a smart search language called PromQL, which lets you ask detailed questions about your system's past and present performance. You can use this data to create beautiful charts, spot problems before they cause crashes, and even set up alarms that send you a message if something stops working correctly.
Prerequisites
- A computer or virtual machine running a modern operating system like Linux, macOS, or Windows.
- A basic understanding of using the command-line interface (terminal).
- Internet access to download the required software packages.
- Administrator or root privileges on your machine to extract and run the files.
Step-by-Step Installation and Configuration
Download and Extract Prometheus
tar xvfz prometheus-*.tar.gz cd prometheus-*
Configure Prometheus
prometheus.yml in your current directory and add the following basic configuration code. This tells Prometheus to monitor itself.
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
Start the Prometheus Server
# Start Prometheus. # By default, Prometheus stores its database in ./data (flag --storage.tsdb.path). ./prometheus --config.file=prometheus.yml
Verify the Installation
- Status Page: Go to
http://localhost:9090to see the Prometheus dashboard. - Raw Metrics: Go to
http://localhost:9090/metricsto see the actual raw data Prometheus is collecting about itself.
CTCservers Recommended Tutorials
Web, Network
Step-by-Step Guide: Install AMD ROCm on Ubuntu with RX 6600 GPU
Learn how to quickly and easily set up AMD ROCm on Ubuntu for your RX 6600 GPU, enabling powerful machine learning, AI workloads, and GPU-accelerated computing right on your system.
Web, Network, Linux, Mysql, Ubuntu
LAMP Setup Guide 2026: Ubuntu & Debian | CTCservers
Install a secure LAMP stack on Debian or Ubuntu. Follow our step-by-step guide to configure Linux, Apache, MySQL, and PHP for your web server.
Web, Network, Ubuntu
Deploy Phi-3 with Ollama on Ubuntu GPU | CTCservers
Learn how to easily deploy the Phi-3 LLM on an Ubuntu 24.04 GPU server using Ollama and WebUI. Follow our step-by-step tutorial for seamless AI hosting.
Discover CTCservers Dedicated Server Locations
CTCservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.