blob: 7db0024cafdbe2ea54fda56e3310c4554c2b7652 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// SPDX-License-Identifier: GPL-3.0-or-later
package windows
import (
"github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus"
)
const (
metricLogonType = "windows_logon_logon_type"
)
func (w *Windows) collectLogon(mx map[string]int64, pms prometheus.Series) {
if !w.cache.collection[collectorLogon] {
w.cache.collection[collectorLogon] = true
w.addLogonCharts()
}
for _, pm := range pms.FindByName(metricLogonType) {
if v := pm.Labels.Get("status"); v != "" {
mx["logon_type_"+v+"_sessions"] = int64(pm.Value)
}
}
}
|