From bd84bb8ad1bc4d14f2ab6cfc8ff90803f0023576 Mon Sep 17 00:00:00 2001 From: dwillcocks Date: Fri, 23 Apr 2021 20:47:00 +0100 Subject: [PATCH] metric name change: starlink_dish_dishDeviceInfo -> starlink_dish_info --- README.md | 4 ++-- internal/exporter/exporter.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e7cbe86..c3cc6d8 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ scrape_configs # TYPE starlink_dish_alert_unexpected_location gauge # HELP starlink_dish_currently_obstructed Status of view of the sky # TYPE starlink_dish_currently_obstructed gauge -# HELP starlink_dish_dishDeviceInfo Running software versions and IDs of hardware -# TYPE starlink_dish_dishDeviceInfo gauge +# HELP starlink_dish_info Running software versions and IDs of hardware +# TYPE starlink_dish_info gauge # HELP starlink_dish_state The Current dishState of the Dish (Unknown, Booting, Searching, Connected). # TYPE starlink_dish_state gauge # HELP starlink_dish_downlink_throughput_bytes Amount of bandwidth in bytes per second download diff --git a/internal/exporter/exporter.go b/internal/exporter/exporter.go index 94462fc..3f4869d 100644 --- a/internal/exporter/exporter.go +++ b/internal/exporter/exporter.go @@ -31,8 +31,8 @@ var ( "Time to scrape metrics from starlink dish", nil, nil, ) - dishDeviceInfo = prometheus.NewDesc( - prometheus.BuildFQName(namespace, "dish", "dishDeviceInfo"), + dishInfo = prometheus.NewDesc( + prometheus.BuildFQName(namespace, "dish", "info"), "Running software versions and IDs of hardware", []string{"device_id", "hardware_version", "software_version", "country_code", "utc_offset"}, nil, ) @@ -165,7 +165,7 @@ func New(address string) (*Exporter, error) { func (e *Exporter) Describe(ch chan<- *prometheus.Desc) { ch <- dishUp ch <- dishScrapeDurationSeconds - ch <- dishDeviceInfo + ch <- dishInfo ch <- dishState ch <- dishUptimeSeconds ch <- dishPopPingDropRatio @@ -228,7 +228,7 @@ func (e *Exporter) collectDish(ch chan<- prometheus.Metric) bool { alerts := dishStatus.GetAlerts() ch <- prometheus.MustNewConstMetric( - dishDeviceInfo, prometheus.GaugeValue, 1.00, + dishInfo, prometheus.GaugeValue, 1.00, deviceInfo.GetId(), deviceInfo.GetHardwareVersion(), deviceInfo.GetSoftwareVersion(),