til/Development/prometheus.md

783 B

Prometheus

Read Getting started.

Docker:

docker run -d \
    -p 9090:9090 \
    -v /path/to/config:/etc/prometheus \
    --name prometheus
    prom/prometheus

UI:

localhost:9090

Metrics:

localhost:9090/metrics

Pushing metrics

Read Pushing metrics

Docker:

docker run -d \
    -p 9091:9091 \
    --name pushgateway
    prom/pushgateway

UI:

localhost:9091

To configure the Pushgateway as a target to scrape by Prometheus, add to Prometheus configuration file:

scrape_configs:
  - job_name: "pushgateway"
    honor_labels: true
    static_configs:
      - targets: ["localhost:9091"]