mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-02 08:36:36 +00:00
chore(deps): update dependency golangci/golangci-lint to v2.2.1 (#2110)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -57,14 +57,14 @@ var ConfigDefaults = Config{
|
||||
|
||||
// A Collector is a Prometheus Collector for WMI MSCluster_Cluster metrics.
|
||||
type Collector struct {
|
||||
config Config
|
||||
miSession *mi.Session
|
||||
|
||||
collectorCluster
|
||||
collectorNetwork
|
||||
collectorNode
|
||||
collectorResource
|
||||
collectorResourceGroup
|
||||
|
||||
config Config
|
||||
miSession *mi.Session
|
||||
}
|
||||
|
||||
func New(config *Config) *Collector {
|
||||
|
||||
@@ -265,6 +265,7 @@ func (c *Collector) collectResource(ch chan<- prometheus.Metric, nodeNames []str
|
||||
if v.OwnerNode == nodeName {
|
||||
isCurrentState = 1.0
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.resourceOwnerNode,
|
||||
prometheus.GaugeValue,
|
||||
|
||||
@@ -260,6 +260,7 @@ func (c *Collector) collectResourceGroup(ch chan<- prometheus.Metric, nodeNames
|
||||
if v.OwnerNode == nodeName {
|
||||
isCurrentState = 1.0
|
||||
}
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.resourceGroupOwnerNode,
|
||||
prometheus.GaugeValue,
|
||||
|
||||
Reference in New Issue
Block a user