From 478eaa91d9e6628cad02431f8baff23deb7f9c50 Mon Sep 17 00:00:00 2001 From: rebortg Date: Thu, 20 Apr 2023 14:52:40 +0200 Subject: [PATCH] delete init() and rename newNPSCollector function Signed-off-by: rebortg --- collector/nps.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/collector/nps.go b/collector/nps.go index 8273eb8c..dfd7e214 100644 --- a/collector/nps.go +++ b/collector/nps.go @@ -6,10 +6,6 @@ import ( "github.com/yusufpapurcu/wmi" ) -func init() { - registerCollector("nps", newnpsCollector) // TODO: Add any perflib dependencies here -} - // A npsCollector is a Prometheus collector for WMI Win32_PerfRawData_IAS_NPSAuthenticationServer and Win32_PerfRawData_IAS_NPSAccountingServer metrics type npsCollector struct { @@ -41,7 +37,7 @@ type npsCollector struct { AccountingUnknownType *prometheus.Desc } -func newnpsCollector() (Collector, error) { +func newNPSCollector() (Collector, error) { const subsystem = "nps" return &npsCollector{ AccessAccepts: prometheus.NewDesc( @@ -213,7 +209,7 @@ func (c *npsCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) } // Win32_PerfRawData_IAS_NPSAuthenticationServer docs: -// - +// at the moment there is no Microsoft documentation type Win32_PerfRawData_IAS_NPSAuthenticationServer struct { Name string