Skip to main content

Metrics Exporter

The Metrics Exporter is IntelliAsk's Prometheus exporter — it scrapes the MongoDB database and exposes usage, token, user, model, rating, tool, and file metrics for Prometheus and Grafana. This is the complete reference for its configuration and metrics catalog.

The Metrics Exporter reads IntelliAsk's MongoDB database and exposes Prometheus metrics — messages, tokens, users, models, ratings, tools, and files — on a /metrics endpoint (container port 8000, published on host port 9100 in the stack). Prometheus scrapes it; Grafana visualizes it.

It exposes all metrics under the intelliask_* prefix.

Looking to just run it?

To wire the exporter into the Compose stack (image tag, resource limits, the EXPORTER_* keys, and proxy exposure), see Deploy → Components → Exporter. For the app-side metrics endpoint, see Configuration → Metrics.

What's in this section

At a glance

StackPython 3.14
Container port8000 (published on host 9100 in the stack)
EndpointGET /metrics (also GET /)
Metric prefixintelliask_
Data sourceIntelliAsk's MongoDB (read-only)

How it works

  • A background thread queries MongoDB on an interval and caches the computed metrics (METRICS_CACHE_ENABLED / METRICS_CACHE_TTL), so Prometheus scrapes are cheap and don't hammer the database.
  • Each metric group (basic, token, user, model, time-window, rating, tool, file) can be toggled independently — turn off the expensive ones on very large databases.
  • If INTELLIASK_URL is set, it also probes the web UI and exposes its HTTP status as intelliask_status_code.

All metrics use the intelliask_ prefix

Every metric this exporter exposes is named intelliask_*. Make sure any Prometheus alert/recording rules or Grafana dashboards reference the intelliask_* names.

Scraping it

# prometheus.yml
scrape_configs:
  - job_name: intelliask-exporter
    static_configs:
      - targets: ['<vm-host>:9100']
    scrape_interval: 60s   # >= METRICS_CACHE_TTL
    scrape_timeout: 30s

Last updated on