Skip to content

Exporters

MoniGo publishes the same runtime metrics through two paths. Prometheus scrapes MoniGo; MoniGo pushes to an OpenTelemetry collector. Both report the same figures under the same names, so a scrape and a push cannot disagree.

The /metrics endpoint is registered automatically — there is nothing to configure. Point a scrape at it:

scrape_configs:
- job_name: my-service
static_configs:
- targets: ['localhost:8080']

Exposed metrics:

MetricType
monigo_cpu_usage_percentgauge
monigo_memory_usage_bytesgauge
monigo_goroutines_countgauge
monigo_disk_read_bytes_totalcounter
monigo_disk_write_bytes_totalcounter
monigoInstance := monigo.NewBuilder().
WithServiceName("my-service").
WithOTelEndpoint("otel-collector:4317").
Build()

Metrics are pushed over OTLP/gRPC every 30 seconds, with the first export running at startup rather than waiting for the first tick.

The dashboard’s Exporters page reports both paths, each in its own terms.

The Exporters page showing Prometheus and OpenTelemetry status

They are deliberately not flattened into one pass/fail, because they do not mean the same thing:

PrometheusOpenTelemetry
Directionpull — it scrapes MoniGopush — MoniGo sends
Reportslast scrape, scrape countlast attempt, last success, consecutive failures, the transport error
Failure countnoneyes

Prometheus carries no failure count because a failed scrape fails at the collector — the server never learns of it. Showing 0 failures there would assert a health signal that does not exist.

A configured exporter that has not run yet is listed as idle rather than omitted: absent from the page is indistinguishable from not configured, which is the one distinction worth having when you are checking whether export works.

StateMeaning
oklast attempt succeeded
retryingfailing now, has succeeded before
failingfailing and has never succeeded — usually a wrong endpoint or no route
idle / not scrapedconfigured, nothing has happened yet
GET /monigo/api/v1/exporters
{
"exporters": [
{ "name": "prometheus", "kind": "pull", "state": "ok", "total": 53,
"last_success": "2026-08-30T14:16:31Z" },
{ "name": "otel-otlp", "kind": "push", "state": "ok", "total": 27,
"failures": 0, "consecutive_failures": 0,
"last_success": "2026-08-30T14:16:14Z",
"last_attempt": "2026-08-30T14:16:14Z" }
]
}

Push-only fields are omitted for pull exporters rather than sent as zeros, and unset timestamps are omitted rather than serialised as a zero time.