You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Citoid/Prometheus

From Wikitech-static
< Citoid
Revision as of 13:54, 6 January 2022 by imported>Mvolz (→‎For citoid)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can test citoid locally with Promethesus.

Local config

For citoid

In your config.dev.yaml

# Metrics reporters
metrics:
  - type: prometheus
    port: 9100

For Prometheus

# 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=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['localhost:9100']
  - job_name: 'citoid'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['localhost:9102']

Then run both citoid and prometheus

./prometheus --config.file=prometheus.yml