Skip to content

Prometheus: Introduction & Getting Started

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. It is widely used for collecting metrics and powering observability in cloud-native environments.

Why Use Prometheus?

  • Collect and store time-series metrics
  • Powerful query language (PromQL)
  • Integrates with Grafana and alerting systems

How Prometheus Works

  • Scrapes metrics from targets via HTTP endpoints
  • Stores data in a time-series database
  • Supports service discovery and dynamic environments

Quick Start Example

  1. Run Prometheus (Docker):
    docker run -d -p 9090:9090 prom/prometheus
    
  2. Access the UI:
  3. Open http://localhost:9090 in your browser
  4. Add a scrape target (edit prometheus.yml):
    scrape_configs:
      - job_name: 'example'
        static_configs:
          - targets: ['localhost:9090']
    
  5. Reload Prometheus config:
  6. Use the UI or send a SIGHUP to the container

Learn More