blob: a4e14d109b3520e8c74d5aecb5347f2c6c83944f (
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/go.d.plugin/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)
}
}
}
|