Prometheus Installation

Quick Install

# Arch Linux
sudo pacman -S prometheus prometheus-node-exporter

# Enable services
sudo systemctl enable --now prometheus
sudo systemctl enable --now prometheus-node-exporter

# Verify
curl localhost:{prometheus-port}/targets
curl localhost:{node-exporter-port}/metrics | head

Podman/Docker

# Run Prometheus
podman run -d --name prometheus \
    -p {prometheus-port}:{prometheus-port} \
    -v ./prometheus.yml:/etc/prometheus/prometheus.yml:ro \
    prom/prometheus

# Run Node Exporter
podman run -d --name node-exporter \
    -p {node-exporter-port}:{node-exporter-port} \
    --pid=host \
    -v /:/host:ro,rslave \
    prom/node-exporter --path.rootfs=/host

Configuration

TODO: prometheus.yml, scrape configs, targets