Skip to content

Commit

Permalink
scrape: fix pop_ping_latency_seconds (fix #13) (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuasing authored Dec 15, 2024
1 parent 6d253fe commit db96779
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/exporter/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ func (e *Exporter) scrapeDishStatus(ctx context.Context, ch chan<- prometheus.Me
}
ch <- latencyHist

// starlink_dish_pop_ping_latency_seconds
ch <- prometheus.MustNewConstMetric(
dishPopPingLatencySeconds, prometheus.GaugeValue,
float64(latencyData[len(latencyData)-1]/1000),
)

// starlink_dish_downlink_throughput_histogram
throughputBuckets := []float64{1e6, 5e6, 10e6, 25e6, 50e6, 100e6, 250e6, 500e6}
downlinkData := parseRingBuffer(dishHistory.GetDownlinkThroughputBps(), dishHistory.GetCurrent())
Expand Down Expand Up @@ -226,12 +232,6 @@ func (e *Exporter) scrapeDishStatus(ctx context.Context, ch chan<- prometheus.Me
float64(dishStatus.GetPopPingDropRate()),
)

// starlink_dish_pop_ping_latency_seconds
ch <- prometheus.MustNewConstMetric(
dishPopPingLatencySeconds, prometheus.GaugeValue,
float64(dishStatus.GetPopPingLatencyMs()/1000),
)

// starlink_dish_software_update_state
ch <- prometheus.MustNewConstMetric(
dishSoftwareUpdateState, prometheus.GaugeValue,
Expand Down

0 comments on commit db96779

Please sign in to comment.