performancecounter: Add the possibility to request formatted values (#1830)

This commit is contained in:
Jan-Otto Kröpke
2025-01-14 23:32:44 +01:00
committed by GitHub
parent 4cd9627ebf
commit 86e6d12518
80 changed files with 354 additions and 132 deletions

View File

@@ -98,12 +98,12 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
errs := make([]error, 0, 2)
c.accessPerfDataCollector, err = pdh.NewCollector[perfDataCounterValuesAccess]("NPS Authentication Server", nil)
c.accessPerfDataCollector, err = pdh.NewCollector[perfDataCounterValuesAccess](pdh.CounterTypeRaw, "NPS Authentication Server", nil)
if err != nil {
errs = append(errs, fmt.Errorf("failed to create NPS Authentication Server collector: %w", err))
}
c.accountingPerfDataCollector, err = pdh.NewCollector[perfDataCounterValuesAccounting]("NPS Accounting Server", nil)
c.accountingPerfDataCollector, err = pdh.NewCollector[perfDataCounterValuesAccounting](pdh.CounterTypeRaw, "NPS Accounting Server", nil)
if err != nil {
errs = append(errs, fmt.Errorf("failed to create NPS Accounting Server collector: %w", err))
}