mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-05 01:56:35 +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:
@@ -66,11 +66,6 @@ var ConfigDefaults = Config{
|
||||
}
|
||||
|
||||
type Collector struct {
|
||||
config Config
|
||||
|
||||
collectorFns []func(ch chan<- prometheus.Metric) error
|
||||
closeFns []func()
|
||||
|
||||
collectorADAccessProcesses
|
||||
collectorActiveSync
|
||||
collectorAutoDiscover
|
||||
@@ -81,6 +76,11 @@ type Collector struct {
|
||||
collectorRpcClientAccess
|
||||
collectorTransportQueues
|
||||
collectorWorkloadManagementWorkloads
|
||||
|
||||
config Config
|
||||
|
||||
collectorFns []func(ch chan<- prometheus.Metric) error
|
||||
closeFns []func()
|
||||
}
|
||||
|
||||
func New(config *Config) *Collector {
|
||||
|
||||
@@ -82,11 +82,13 @@ func (c *Collector) collectActiveSync(ch chan<- prometheus.Metric) error {
|
||||
prometheus.CounterValue,
|
||||
data.RequestsPerSec,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.pingCommandsPending,
|
||||
prometheus.GaugeValue,
|
||||
data.PingCommandsPending,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.syncCommandsPerSec,
|
||||
prometheus.CounterValue,
|
||||
|
||||
@@ -113,24 +113,28 @@ func (c *Collector) collectADAccessProcesses(ch chan<- prometheus.Metric) error
|
||||
utils.MilliSecToSec(data.LdapReadTime),
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapSearchTime,
|
||||
prometheus.CounterValue,
|
||||
utils.MilliSecToSec(data.LdapSearchTime),
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapWriteTime,
|
||||
prometheus.CounterValue,
|
||||
utils.MilliSecToSec(data.LdapWriteTime),
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.ldapTimeoutErrorsPerSec,
|
||||
prometheus.CounterValue,
|
||||
data.LdapTimeoutErrorsPerSec,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.longRunningLDAPOperationsPerMin,
|
||||
prometheus.CounterValue,
|
||||
|
||||
@@ -111,30 +111,35 @@ func (c *Collector) collectHTTPProxy(ch chan<- prometheus.Metric) error {
|
||||
utils.MilliSecToSec(data.MailboxServerLocatorAverageLatency),
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.averageAuthenticationLatency,
|
||||
prometheus.GaugeValue,
|
||||
data.AverageAuthenticationLatency,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.averageCASProcessingLatency,
|
||||
prometheus.GaugeValue,
|
||||
utils.MilliSecToSec(data.AverageCASProcessingLatency),
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.mailboxServerProxyFailureRate,
|
||||
prometheus.GaugeValue,
|
||||
data.MailboxServerProxyFailureRate,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.outstandingProxyRequests,
|
||||
prometheus.GaugeValue,
|
||||
data.OutstandingProxyRequests,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.proxyRequestsPerSec,
|
||||
prometheus.CounterValue,
|
||||
|
||||
@@ -74,6 +74,7 @@ func (c *Collector) collectOWA(ch chan<- prometheus.Metric) error {
|
||||
prometheus.GaugeValue,
|
||||
data.CurrentUniqueUsers,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.owaRequestsPerSec,
|
||||
prometheus.CounterValue,
|
||||
|
||||
@@ -107,26 +107,31 @@ func (c *Collector) collectRpcClientAccess(ch chan<- prometheus.Metric) error {
|
||||
prometheus.GaugeValue,
|
||||
utils.MilliSecToSec(data.RpcAveragedLatency),
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.rpcRequests,
|
||||
prometheus.GaugeValue,
|
||||
data.RpcRequests,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.activeUserCount,
|
||||
prometheus.GaugeValue,
|
||||
data.ActiveUserCount,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.connectionCount,
|
||||
prometheus.GaugeValue,
|
||||
data.ConnectionCount,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.rpcOperationsPerSec,
|
||||
prometheus.CounterValue,
|
||||
data.RpcOperationsPerSec,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.userCount,
|
||||
prometheus.GaugeValue,
|
||||
|
||||
@@ -215,108 +215,126 @@ func (c *Collector) collectTransportQueues(ch chan<- prometheus.Metric) error {
|
||||
data.ExternalActiveRemoteDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.internalActiveRemoteDeliveryQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.InternalActiveRemoteDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.activeMailboxDeliveryQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.ActiveMailboxDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.retryMailboxDeliveryQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.RetryMailboxDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.unreachableQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.UnreachableQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.externalLargestDeliveryQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.ExternalLargestDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.internalLargestDeliveryQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.InternalLargestDeliveryQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.poisonQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.PoisonQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.messagesQueuedForDeliveryTotal,
|
||||
prometheus.CounterValue,
|
||||
data.MessagesQueuedForDeliveryTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.messagesSubmittedTotal,
|
||||
prometheus.CounterValue,
|
||||
data.MessagesSubmittedTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.messagesDelayedTotal,
|
||||
prometheus.CounterValue,
|
||||
data.MessagesDelayedTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.messagesCompletedDeliveryTotal,
|
||||
prometheus.CounterValue,
|
||||
data.MessagesCompletedDeliveryTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.aggregateShadowQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.AggregateShadowQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.submissionQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.SubmissionQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.delayQueueLength,
|
||||
prometheus.GaugeValue,
|
||||
data.DelayQueueLength,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.itemsCompletedDeliveryTotal,
|
||||
prometheus.CounterValue,
|
||||
data.ItemsCompletedDeliveryTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.itemsQueuedForDeliveryExpiredTotal,
|
||||
prometheus.CounterValue,
|
||||
data.ItemsQueuedForDeliveryExpiredTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.itemsQueuedForDeliveryTotal,
|
||||
prometheus.CounterValue,
|
||||
data.ItemsQueuedForDeliveryTotal,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.itemsResubmittedTotal,
|
||||
prometheus.CounterValue,
|
||||
|
||||
@@ -103,24 +103,28 @@ func (c *Collector) collectWorkloadManagementWorkloads(ch chan<- prometheus.Metr
|
||||
data.ActiveTasks,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.completedTasks,
|
||||
prometheus.CounterValue,
|
||||
data.CompletedTasks,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.queuedTasks,
|
||||
prometheus.CounterValue,
|
||||
data.QueuedTasks,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.yieldedTasks,
|
||||
prometheus.CounterValue,
|
||||
data.YieldedTasks,
|
||||
labelName,
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.isActive,
|
||||
prometheus.GaugeValue,
|
||||
|
||||
Reference in New Issue
Block a user