How raphaelthomas/meinberg_ltos_exporter works
Meinberg LTOS Exporter fetches device status from the LTOS REST API and exposes Prometheus metrics for scraping. Its main runtime path configures the API client and collector, serves the metrics handler, and on collection fetches one status response before dispatching enabled system, notification, network, storage, clock, receiver, and NTP metric conversions. The graph retains these documented metric domains; sampled source supports the main dispatch and several conversions, while unsampled collector details are represented by their exact paths without inferred internal links.
Main entry points: collector.go Scrape coordinator · models Status models · main.go HTTP exporter · client.go LTOS API client
Components 16
Exporter runtime
- HTTP exporter
main.go - Build information
pkg/buildinfo/buildinfo.go
LTOS API
- LTOS API client
pkg/ltosapi/client.go - Status models
pkg/ltosapi/models
Metric collection
- Scrape coordinator
pkg/collector/collector.go - Collector helpers
pkg/collector/helpers.go
Device metric domains
- System metrics
pkg/collector/system.go - Notification metrics
pkg/collector/notification.go - Network metrics
pkg/collector/network.go - Storage metrics
pkg/collector/storage.go - Clock metrics
pkg/collector/clock.go - GNSS receiver metrics
pkg/collector/receiver_gnss.go - DCF77 metrics
pkg/collector/receiver_dcf77.go - NTP metrics
pkg/collector/ntp.go
Other components
- Prometheus scraper
- Meinberg LTOS device
Connections 27
- Prometheus scraper → HTTP exporter: scrapes
README.md - HTTP exporter → Scrape coordinator: registers
main.go - HTTP exporter → LTOS API client: creates
main.go - HTTP exporter → Build information: reads version
main.go - HTTP exporter → Prometheus scraper: serves metrics
main.go - Scrape coordinator → LTOS API client: fetches status
pkg/collector/collector.go - LTOS API client → Meinberg LTOS device: requests status
pkg/ltosapi/client.go - LTOS API client → Status models: decodes response
pkg/ltosapi/client.go - Scrape coordinator → System metrics: collects
pkg/collector/collector.go - Scrape coordinator → Notification metrics: collects
pkg/collector/collector.go - Scrape coordinator → Network metrics: collects
pkg/collector/collector.go - Scrape coordinator → Storage metrics: collects
pkg/collector/collector.go - Scrape coordinator → NTP metrics: collects
pkg/collector/collector.go - Scrape coordinator → Clock metrics: collects
pkg/collector/collector.go - Scrape coordinator → GNSS receiver metrics: collects
pkg/collector/collector.go - Scrape coordinator → DCF77 metrics: collects
pkg/collector/collector.go - Scrape coordinator → Collector helpers: uses
- System metrics → Status models: reads
pkg/collector/system.go - Notification metrics → Status models: reads
pkg/collector/notification.go - Network metrics → Status models: reads
pkg/collector/network.go - Storage metrics → Status models: reads
pkg/collector/storage.go - NTP metrics → Status models: reads
pkg/collector/ntp.go - Clock metrics → Collector helpers: uses slots
pkg/collector/clock.go - System metrics → Collector helpers: uses CPU slots
pkg/collector/system.go - Clock metrics → Status models: reads
pkg/collector/clock.go - GNSS receiver metrics → Status models: reads
pkg/collector/receiver_gnss.go - DCF77 metrics → Status models: reads
pkg/collector/receiver_dcf77.go