From 0ada09ee3ce71f7d64296e71387fa01e78616a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 5 Aug 2024 23:40:32 +0200 Subject: [PATCH] *: Collector API cleanup 2 (#1552) --- pkg/collector/cs/cs.go | 12 +- pkg/collector/dhcp/dhcp.go | 150 +- pkg/collector/diskdrive/diskdrive.go | 34 +- pkg/collector/dns/dns.go | 168 +- pkg/collector/exchange/exchange.go | 228 +- pkg/collector/fsrmquota/fsrmquota.go | 53 +- pkg/collector/hyperv/hyperv.go | 538 ++--- pkg/collector/license/license.go | 6 +- pkg/collector/logical_disk/logical_disk.go | 113 +- pkg/collector/logon/logon.go | 30 +- pkg/collector/memory/memory.go | 192 +- .../mscluster_cluster/mscluster_cluster.go | 462 ++-- .../mscluster_network/mscluster_network.go | 32 +- .../mscluster_node/mscluster_node.go | 84 +- .../mscluster_resource/mscluster_resource.go | 104 +- .../mscluster_resourcegroup.go | 88 +- pkg/collector/msmq/msmq.go | 24 +- pkg/collector/mssql/mssql.go | 1912 ++++++++--------- pkg/collector/net/net.go | 79 +- 19 files changed, 2153 insertions(+), 2156 deletions(-) diff --git a/pkg/collector/cs/cs.go b/pkg/collector/cs/cs.go index ca460e22..249af926 100644 --- a/pkg/collector/cs/cs.go +++ b/pkg/collector/cs/cs.go @@ -21,8 +21,8 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - PhysicalMemoryBytes *prometheus.Desc - LogicalProcessors *prometheus.Desc + physicalMemoryBytes *prometheus.Desc + logicalProcessors *prometheus.Desc hostname *prometheus.Desc } @@ -54,13 +54,13 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.LogicalProcessors = prometheus.NewDesc( + c.logicalProcessors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "logical_processors"), "ComputerSystem.NumberOfLogicalProcessors", nil, nil, ) - c.PhysicalMemoryBytes = prometheus.NewDesc( + c.physicalMemoryBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "physical_memory_bytes"), "ComputerSystem.TotalPhysicalMemory", nil, @@ -100,13 +100,13 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.LogicalProcessors, + c.logicalProcessors, prometheus.GaugeValue, float64(systemInfo.NumberOfProcessors), ) ch <- prometheus.MustNewConstMetric( - c.PhysicalMemoryBytes, + c.physicalMemoryBytes, prometheus.GaugeValue, float64(mem.TotalPhys), ) diff --git a/pkg/collector/dhcp/dhcp.go b/pkg/collector/dhcp/dhcp.go index 4a21d1e7..ceaf7685 100644 --- a/pkg/collector/dhcp/dhcp.go +++ b/pkg/collector/dhcp/dhcp.go @@ -20,31 +20,31 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - PacketsReceivedTotal *prometheus.Desc - DuplicatesDroppedTotal *prometheus.Desc - PacketsExpiredTotal *prometheus.Desc - ActiveQueueLength *prometheus.Desc - ConflictCheckQueueLength *prometheus.Desc - DiscoversTotal *prometheus.Desc - OffersTotal *prometheus.Desc - RequestsTotal *prometheus.Desc - InformsTotal *prometheus.Desc - AcksTotal *prometheus.Desc - NacksTotal *prometheus.Desc - DeclinesTotal *prometheus.Desc - ReleasesTotal *prometheus.Desc - OfferQueueLength *prometheus.Desc - DeniedDueToMatch *prometheus.Desc - DeniedDueToNonMatch *prometheus.Desc - FailoverBndupdSentTotal *prometheus.Desc - FailoverBndupdReceivedTotal *prometheus.Desc - FailoverBndackSentTotal *prometheus.Desc - FailoverBndackReceivedTotal *prometheus.Desc - FailoverBndupdPendingOutboundQueue *prometheus.Desc - FailoverTransitionsCommunicationinterruptedState *prometheus.Desc - FailoverTransitionsPartnerdownState *prometheus.Desc - FailoverTransitionsRecoverState *prometheus.Desc - FailoverBndupdDropped *prometheus.Desc + acksTotal *prometheus.Desc + activeQueueLength *prometheus.Desc + conflictCheckQueueLength *prometheus.Desc + declinesTotal *prometheus.Desc + deniedDueToMatch *prometheus.Desc + deniedDueToNonMatch *prometheus.Desc + discoversTotal *prometheus.Desc + duplicatesDroppedTotal *prometheus.Desc + failoverBndackReceivedTotal *prometheus.Desc + failoverBndackSentTotal *prometheus.Desc + failoverBndupdDropped *prometheus.Desc + failoverBndupdPendingOutboundQueue *prometheus.Desc + failoverBndupdReceivedTotal *prometheus.Desc + failoverBndupdSentTotal *prometheus.Desc + failoverTransitionsCommunicationInterruptedState *prometheus.Desc + failoverTransitionsPartnerDownState *prometheus.Desc + failoverTransitionsRecoverState *prometheus.Desc + informsTotal *prometheus.Desc + nACKsTotal *prometheus.Desc + offerQueueLength *prometheus.Desc + offersTotal *prometheus.Desc + packetsExpiredTotal *prometheus.Desc + packetsReceivedTotal *prometheus.Desc + releasesTotal *prometheus.Desc + requestsTotal *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -75,151 +75,151 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.PacketsReceivedTotal = prometheus.NewDesc( + c.packetsReceivedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_received_total"), "Total number of packets received by the DHCP server (PacketsReceivedTotal)", nil, nil, ) - c.DuplicatesDroppedTotal = prometheus.NewDesc( + c.duplicatesDroppedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "duplicates_dropped_total"), "Total number of duplicate packets received by the DHCP server (DuplicatesDroppedTotal)", nil, nil, ) - c.PacketsExpiredTotal = prometheus.NewDesc( + c.packetsExpiredTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_expired_total"), "Total number of packets expired in the DHCP server message queue (PacketsExpiredTotal)", nil, nil, ) - c.ActiveQueueLength = prometheus.NewDesc( + c.activeQueueLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "active_queue_length"), "Number of packets in the processing queue of the DHCP server (ActiveQueueLength)", nil, nil, ) - c.ConflictCheckQueueLength = prometheus.NewDesc( + c.conflictCheckQueueLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "conflict_check_queue_length"), "Number of packets in the DHCP server queue waiting on conflict detection (ping). (ConflictCheckQueueLength)", nil, nil, ) - c.DiscoversTotal = prometheus.NewDesc( + c.discoversTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "discovers_total"), "Total DHCP Discovers received by the DHCP server (DiscoversTotal)", nil, nil, ) - c.OffersTotal = prometheus.NewDesc( + c.offersTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "offers_total"), "Total DHCP Offers sent by the DHCP server (OffersTotal)", nil, nil, ) - c.RequestsTotal = prometheus.NewDesc( + c.requestsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "requests_total"), "Total DHCP Requests received by the DHCP server (RequestsTotal)", nil, nil, ) - c.InformsTotal = prometheus.NewDesc( + c.informsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "informs_total"), "Total DHCP Informs received by the DHCP server (InformsTotal)", nil, nil, ) - c.AcksTotal = prometheus.NewDesc( + c.acksTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "acks_total"), "Total DHCP Acks sent by the DHCP server (AcksTotal)", nil, nil, ) - c.NacksTotal = prometheus.NewDesc( + c.nACKsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "nacks_total"), "Total DHCP Nacks sent by the DHCP server (NacksTotal)", nil, nil, ) - c.DeclinesTotal = prometheus.NewDesc( + c.declinesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "declines_total"), "Total DHCP Declines received by the DHCP server (DeclinesTotal)", nil, nil, ) - c.ReleasesTotal = prometheus.NewDesc( + c.releasesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "releases_total"), "Total DHCP Releases received by the DHCP server (ReleasesTotal)", nil, nil, ) - c.OfferQueueLength = prometheus.NewDesc( + c.offerQueueLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "offer_queue_length"), "Number of packets in the offer queue of the DHCP server (OfferQueueLength)", nil, nil, ) - c.DeniedDueToMatch = prometheus.NewDesc( + c.deniedDueToMatch = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "denied_due_to_match_total"), "Total number of DHCP requests denied, based on matches from the Deny list (DeniedDueToMatch)", nil, nil, ) - c.DeniedDueToNonMatch = prometheus.NewDesc( + c.deniedDueToNonMatch = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "denied_due_to_nonmatch_total"), "Total number of DHCP requests denied, based on non-matches from the Allow list (DeniedDueToNonMatch)", nil, nil, ) - c.FailoverBndupdSentTotal = prometheus.NewDesc( + c.failoverBndupdSentTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndupd_sent_total"), "Number of DHCP fail over Binding Update messages sent (FailoverBndupdSentTotal)", nil, nil, ) - c.FailoverBndupdReceivedTotal = prometheus.NewDesc( + c.failoverBndupdReceivedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndupd_received_total"), "Number of DHCP fail over Binding Update messages received (FailoverBndupdReceivedTotal)", nil, nil, ) - c.FailoverBndackSentTotal = prometheus.NewDesc( + c.failoverBndackSentTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndack_sent_total"), "Number of DHCP fail over Binding Ack messages sent (FailoverBndackSentTotal)", nil, nil, ) - c.FailoverBndackReceivedTotal = prometheus.NewDesc( + c.failoverBndackReceivedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndack_received_total"), "Number of DHCP fail over Binding Ack messages received (FailoverBndackReceivedTotal)", nil, nil, ) - c.FailoverBndupdPendingOutboundQueue = prometheus.NewDesc( + c.failoverBndupdPendingOutboundQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndupd_pending_in_outbound_queue"), "Number of pending outbound DHCP fail over Binding Update messages (FailoverBndupdPendingOutboundQueue)", nil, nil, ) - c.FailoverTransitionsCommunicationinterruptedState = prometheus.NewDesc( + c.failoverTransitionsCommunicationInterruptedState = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_transitions_communicationinterrupted_state_total"), "Total number of transitions into COMMUNICATION INTERRUPTED state (FailoverTransitionsCommunicationinterruptedState)", nil, nil, ) - c.FailoverTransitionsPartnerdownState = prometheus.NewDesc( + c.failoverTransitionsPartnerDownState = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_transitions_partnerdown_state_total"), "Total number of transitions into PARTNER DOWN state (FailoverTransitionsPartnerdownState)", nil, nil, ) - c.FailoverTransitionsRecoverState = prometheus.NewDesc( + c.failoverTransitionsRecoverState = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_transitions_recover_total"), "Total number of transitions into RECOVER state (FailoverTransitionsRecoverState)", nil, nil, ) - c.FailoverBndupdDropped = prometheus.NewDesc( + c.failoverBndupdDropped = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_bndupd_dropped_total"), "Total number of DHCP fail over Binding Updates dropped (FailoverBndupdDropped)", nil, @@ -266,151 +266,151 @@ func (c *Collector) Collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri } ch <- prometheus.MustNewConstMetric( - c.PacketsReceivedTotal, + c.packetsReceivedTotal, prometheus.CounterValue, dhcpPerfs[0].PacketsReceivedTotal, ) ch <- prometheus.MustNewConstMetric( - c.DuplicatesDroppedTotal, + c.duplicatesDroppedTotal, prometheus.CounterValue, dhcpPerfs[0].DuplicatesDroppedTotal, ) ch <- prometheus.MustNewConstMetric( - c.PacketsExpiredTotal, + c.packetsExpiredTotal, prometheus.CounterValue, dhcpPerfs[0].PacketsExpiredTotal, ) ch <- prometheus.MustNewConstMetric( - c.ActiveQueueLength, + c.activeQueueLength, prometheus.GaugeValue, dhcpPerfs[0].ActiveQueueLength, ) ch <- prometheus.MustNewConstMetric( - c.ConflictCheckQueueLength, + c.conflictCheckQueueLength, prometheus.GaugeValue, dhcpPerfs[0].ConflictCheckQueueLength, ) ch <- prometheus.MustNewConstMetric( - c.DiscoversTotal, + c.discoversTotal, prometheus.CounterValue, dhcpPerfs[0].DiscoversTotal, ) ch <- prometheus.MustNewConstMetric( - c.OffersTotal, + c.offersTotal, prometheus.CounterValue, dhcpPerfs[0].OffersTotal, ) ch <- prometheus.MustNewConstMetric( - c.RequestsTotal, + c.requestsTotal, prometheus.CounterValue, dhcpPerfs[0].RequestsTotal, ) ch <- prometheus.MustNewConstMetric( - c.InformsTotal, + c.informsTotal, prometheus.CounterValue, dhcpPerfs[0].InformsTotal, ) ch <- prometheus.MustNewConstMetric( - c.AcksTotal, + c.acksTotal, prometheus.CounterValue, dhcpPerfs[0].AcksTotal, ) ch <- prometheus.MustNewConstMetric( - c.NacksTotal, + c.nACKsTotal, prometheus.CounterValue, dhcpPerfs[0].NacksTotal, ) ch <- prometheus.MustNewConstMetric( - c.DeclinesTotal, + c.declinesTotal, prometheus.CounterValue, dhcpPerfs[0].DeclinesTotal, ) ch <- prometheus.MustNewConstMetric( - c.ReleasesTotal, + c.releasesTotal, prometheus.CounterValue, dhcpPerfs[0].ReleasesTotal, ) ch <- prometheus.MustNewConstMetric( - c.OfferQueueLength, + c.offerQueueLength, prometheus.GaugeValue, dhcpPerfs[0].OfferQueueLength, ) ch <- prometheus.MustNewConstMetric( - c.DeniedDueToMatch, + c.deniedDueToMatch, prometheus.CounterValue, dhcpPerfs[0].DeniedDueToMatch, ) ch <- prometheus.MustNewConstMetric( - c.DeniedDueToNonMatch, + c.deniedDueToNonMatch, prometheus.CounterValue, dhcpPerfs[0].DeniedDueToNonMatch, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndupdSentTotal, + c.failoverBndupdSentTotal, prometheus.CounterValue, dhcpPerfs[0].FailoverBndupdSentTotal, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndupdReceivedTotal, + c.failoverBndupdReceivedTotal, prometheus.CounterValue, dhcpPerfs[0].FailoverBndupdReceivedTotal, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndackSentTotal, + c.failoverBndackSentTotal, prometheus.CounterValue, dhcpPerfs[0].FailoverBndackSentTotal, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndackReceivedTotal, + c.failoverBndackReceivedTotal, prometheus.CounterValue, dhcpPerfs[0].FailoverBndackReceivedTotal, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndupdPendingOutboundQueue, + c.failoverBndupdPendingOutboundQueue, prometheus.GaugeValue, dhcpPerfs[0].FailoverBndupdPendingOutboundQueue, ) ch <- prometheus.MustNewConstMetric( - c.FailoverTransitionsCommunicationinterruptedState, + c.failoverTransitionsCommunicationInterruptedState, prometheus.CounterValue, dhcpPerfs[0].FailoverTransitionsCommunicationinterruptedState, ) ch <- prometheus.MustNewConstMetric( - c.FailoverTransitionsPartnerdownState, + c.failoverTransitionsPartnerDownState, prometheus.CounterValue, dhcpPerfs[0].FailoverTransitionsPartnerdownState, ) ch <- prometheus.MustNewConstMetric( - c.FailoverTransitionsRecoverState, + c.failoverTransitionsRecoverState, prometheus.CounterValue, dhcpPerfs[0].FailoverTransitionsRecoverState, ) ch <- prometheus.MustNewConstMetric( - c.FailoverBndupdDropped, + c.failoverBndupdDropped, prometheus.CounterValue, dhcpPerfs[0].FailoverBndupdDropped, ) diff --git a/pkg/collector/diskdrive/diskdrive.go b/pkg/collector/diskdrive/diskdrive.go index c2b3020c..dd439516 100644 --- a/pkg/collector/diskdrive/diskdrive.go +++ b/pkg/collector/diskdrive/diskdrive.go @@ -27,11 +27,11 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - DiskInfo *prometheus.Desc - Status *prometheus.Desc - Size *prometheus.Desc - Partitions *prometheus.Desc - Availability *prometheus.Desc + availability *prometheus.Desc + diskInfo *prometheus.Desc + partitions *prometheus.Desc + size *prometheus.Desc + status *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -62,7 +62,7 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.DiskInfo = prometheus.NewDesc( + c.diskInfo = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "info"), "General drive information", []string{ @@ -73,25 +73,25 @@ func (c *Collector) Build() error { }, nil, ) - c.Status = prometheus.NewDesc( + c.status = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "status"), "Status of the drive", []string{"name", "status"}, nil, ) - c.Size = prometheus.NewDesc( + c.size = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "size"), "Size of the disk drive. It is calculated by multiplying the total number of cylinders, tracks in each cylinder, sectors in each track, and bytes in each sector.", []string{"name"}, nil, ) - c.Partitions = prometheus.NewDesc( + c.partitions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "partitions"), "Number of partitions", []string{"name"}, nil, ) - c.Availability = prometheus.NewDesc( + c.availability = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availability"), "Availability Status", []string{"name", "availability"}, @@ -101,7 +101,7 @@ func (c *Collector) Build() error { return nil } -type Win32_DiskDrive struct { +type win32_DiskDrive struct { DeviceID string Model string Size uint64 @@ -163,7 +163,7 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) } func (c *Collector) collect(ch chan<- prometheus.Metric) error { - var dst []Win32_DiskDrive + var dst []win32_DiskDrive if err := wmi.Query(win32DiskQuery, &dst); err != nil { return err @@ -174,7 +174,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { for _, disk := range dst { ch <- prometheus.MustNewConstMetric( - c.DiskInfo, + c.diskInfo, prometheus.GaugeValue, 1.0, strings.Trim(disk.DeviceID, "\\.\\"), @@ -190,7 +190,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.Status, + c.status, prometheus.GaugeValue, isCurrentState, strings.Trim(disk.Name, "\\.\\"), @@ -199,14 +199,14 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.Size, + c.size, prometheus.GaugeValue, float64(disk.Size), strings.Trim(disk.Name, "\\.\\"), ) ch <- prometheus.MustNewConstMetric( - c.Partitions, + c.partitions, prometheus.GaugeValue, float64(disk.Partitions), strings.Trim(disk.Name, "\\.\\"), @@ -218,7 +218,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { isCurrentState = 1.0 } ch <- prometheus.MustNewConstMetric( - c.Availability, + c.availability, prometheus.GaugeValue, isCurrentState, strings.Trim(disk.Name, "\\.\\"), diff --git a/pkg/collector/dns/dns.go b/pkg/collector/dns/dns.go index 14f8d8c9..9e680f9f 100644 --- a/pkg/collector/dns/dns.go +++ b/pkg/collector/dns/dns.go @@ -23,28 +23,28 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - ZoneTransferRequestsReceived *prometheus.Desc - ZoneTransferRequestsSent *prometheus.Desc - ZoneTransferResponsesReceived *prometheus.Desc - ZoneTransferSuccessReceived *prometheus.Desc - ZoneTransferSuccessSent *prometheus.Desc - ZoneTransferFailures *prometheus.Desc - MemoryUsedBytes *prometheus.Desc - DynamicUpdatesQueued *prometheus.Desc - DynamicUpdatesReceived *prometheus.Desc - DynamicUpdatesFailures *prometheus.Desc - NotifyReceived *prometheus.Desc - NotifySent *prometheus.Desc - SecureUpdateFailures *prometheus.Desc - SecureUpdateReceived *prometheus.Desc - Queries *prometheus.Desc - Responses *prometheus.Desc - RecursiveQueries *prometheus.Desc - RecursiveQueryFailures *prometheus.Desc - RecursiveQuerySendTimeouts *prometheus.Desc - WinsQueries *prometheus.Desc - WinsResponses *prometheus.Desc - UnmatchedResponsesReceived *prometheus.Desc + dynamicUpdatesFailures *prometheus.Desc + dynamicUpdatesQueued *prometheus.Desc + dynamicUpdatesReceived *prometheus.Desc + memoryUsedBytes *prometheus.Desc + notifyReceived *prometheus.Desc + notifySent *prometheus.Desc + queries *prometheus.Desc + recursiveQueries *prometheus.Desc + recursiveQueryFailures *prometheus.Desc + recursiveQuerySendTimeouts *prometheus.Desc + responses *prometheus.Desc + secureUpdateFailures *prometheus.Desc + secureUpdateReceived *prometheus.Desc + unmatchedResponsesReceived *prometheus.Desc + winsQueries *prometheus.Desc + winsResponses *prometheus.Desc + zoneTransferFailures *prometheus.Desc + zoneTransferRequestsReceived *prometheus.Desc + zoneTransferRequestsSent *prometheus.Desc + zoneTransferResponsesReceived *prometheus.Desc + zoneTransferSuccessReceived *prometheus.Desc + zoneTransferSuccessSent *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -75,133 +75,133 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.ZoneTransferRequestsReceived = prometheus.NewDesc( + c.zoneTransferRequestsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_requests_received_total"), "Number of zone transfer requests (AXFR/IXFR) received by the master DNS server", []string{"qtype"}, nil, ) - c.ZoneTransferRequestsSent = prometheus.NewDesc( + c.zoneTransferRequestsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_requests_sent_total"), "Number of zone transfer requests (AXFR/IXFR) sent by the secondary DNS server", []string{"qtype"}, nil, ) - c.ZoneTransferResponsesReceived = prometheus.NewDesc( + c.zoneTransferResponsesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_response_received_total"), "Number of zone transfer responses (AXFR/IXFR) received by the secondary DNS server", []string{"qtype"}, nil, ) - c.ZoneTransferSuccessReceived = prometheus.NewDesc( + c.zoneTransferSuccessReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_success_received_total"), "Number of successful zone transfers (AXFR/IXFR) received by the secondary DNS server", []string{"qtype", "protocol"}, nil, ) - c.ZoneTransferSuccessSent = prometheus.NewDesc( + c.zoneTransferSuccessSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_success_sent_total"), "Number of successful zone transfers (AXFR/IXFR) of the master DNS server", []string{"qtype"}, nil, ) - c.ZoneTransferFailures = prometheus.NewDesc( + c.zoneTransferFailures = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "zone_transfer_failures_total"), "Number of failed zone transfers of the master DNS server", nil, nil, ) - c.MemoryUsedBytes = prometheus.NewDesc( + c.memoryUsedBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memory_used_bytes"), "Current memory used by DNS server", []string{"area"}, nil, ) - c.DynamicUpdatesQueued = prometheus.NewDesc( + c.dynamicUpdatesQueued = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dynamic_updates_queued"), "Number of dynamic updates queued by the DNS server", nil, nil, ) - c.DynamicUpdatesReceived = prometheus.NewDesc( + c.dynamicUpdatesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dynamic_updates_received_total"), "Number of secure update requests received by the DNS server", []string{"operation"}, nil, ) - c.DynamicUpdatesFailures = prometheus.NewDesc( + c.dynamicUpdatesFailures = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dynamic_updates_failures_total"), "Number of dynamic updates which timed out or were rejected by the DNS server", []string{"reason"}, nil, ) - c.NotifyReceived = prometheus.NewDesc( + c.notifyReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "notify_received_total"), "Number of notifies received by the secondary DNS server", nil, nil, ) - c.NotifySent = prometheus.NewDesc( + c.notifySent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "notify_sent_total"), "Number of notifies sent by the master DNS server", nil, nil, ) - c.SecureUpdateFailures = prometheus.NewDesc( + c.secureUpdateFailures = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "secure_update_failures_total"), "Number of secure updates that failed on the DNS server", nil, nil, ) - c.SecureUpdateReceived = prometheus.NewDesc( + c.secureUpdateReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "secure_update_received_total"), "Number of secure update requests received by the DNS server", nil, nil, ) - c.Queries = prometheus.NewDesc( + c.queries = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "queries_total"), "Number of queries received by DNS server", []string{"protocol"}, nil, ) - c.Responses = prometheus.NewDesc( + c.responses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "responses_total"), "Number of responses sent by DNS server", []string{"protocol"}, nil, ) - c.RecursiveQueries = prometheus.NewDesc( + c.recursiveQueries = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "recursive_queries_total"), "Number of recursive queries received by DNS server", nil, nil, ) - c.RecursiveQueryFailures = prometheus.NewDesc( + c.recursiveQueryFailures = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "recursive_query_failures_total"), "Number of recursive query failures", nil, nil, ) - c.RecursiveQuerySendTimeouts = prometheus.NewDesc( + c.recursiveQuerySendTimeouts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "recursive_query_send_timeouts_total"), "Number of recursive query sending timeouts", nil, nil, ) - c.WinsQueries = prometheus.NewDesc( + c.winsQueries = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "wins_queries_total"), "Number of WINS lookup requests received by the server", []string{"direction"}, nil, ) - c.WinsResponses = prometheus.NewDesc( + c.winsResponses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "wins_responses_total"), "Number of WINS lookup responses sent by the server", []string{"direction"}, nil, ) - c.UnmatchedResponsesReceived = prometheus.NewDesc( + c.unmatchedResponsesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "unmatched_responses_total"), "Number of response packets received by the DNS server that do not match any outstanding remote query", nil, @@ -277,66 +277,66 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.ZoneTransferRequestsReceived, + c.zoneTransferRequestsReceived, prometheus.CounterValue, float64(dst[0].AXFRRequestReceived), "full", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferRequestsReceived, + c.zoneTransferRequestsReceived, prometheus.CounterValue, float64(dst[0].IXFRRequestReceived), "incremental", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferRequestsSent, + c.zoneTransferRequestsSent, prometheus.CounterValue, float64(dst[0].AXFRRequestSent), "full", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferRequestsSent, + c.zoneTransferRequestsSent, prometheus.CounterValue, float64(dst[0].IXFRRequestSent), "incremental", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferRequestsSent, + c.zoneTransferRequestsSent, prometheus.CounterValue, float64(dst[0].ZoneTransferSOARequestSent), "soa", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferResponsesReceived, + c.zoneTransferResponsesReceived, prometheus.CounterValue, float64(dst[0].AXFRResponseReceived), "full", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferResponsesReceived, + c.zoneTransferResponsesReceived, prometheus.CounterValue, float64(dst[0].IXFRResponseReceived), "incremental", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferSuccessReceived, + c.zoneTransferSuccessReceived, prometheus.CounterValue, float64(dst[0].AXFRSuccessReceived), "full", "tcp", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferSuccessReceived, + c.zoneTransferSuccessReceived, prometheus.CounterValue, float64(dst[0].IXFRTCPSuccessReceived), "incremental", "tcp", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferSuccessReceived, + c.zoneTransferSuccessReceived, prometheus.CounterValue, float64(dst[0].IXFRTCPSuccessReceived), "incremental", @@ -344,183 +344,183 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferSuccessSent, + c.zoneTransferSuccessSent, prometheus.CounterValue, float64(dst[0].AXFRSuccessSent), "full", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferSuccessSent, + c.zoneTransferSuccessSent, prometheus.CounterValue, float64(dst[0].IXFRSuccessSent), "incremental", ) ch <- prometheus.MustNewConstMetric( - c.ZoneTransferFailures, + c.zoneTransferFailures, prometheus.CounterValue, float64(dst[0].ZoneTransferFailure), ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].CachingMemory), "caching", ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].DatabaseNodeMemory), "database_node", ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].NbstatMemory), "nbstat", ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].RecordFlowMemory), "record_flow", ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].TCPMessageMemory), "tcp_message", ) ch <- prometheus.MustNewConstMetric( - c.MemoryUsedBytes, + c.memoryUsedBytes, prometheus.GaugeValue, float64(dst[0].UDPMessageMemory), "udp_message", ) ch <- prometheus.MustNewConstMetric( - c.DynamicUpdatesReceived, + c.dynamicUpdatesReceived, prometheus.CounterValue, float64(dst[0].DynamicUpdateNoOperation), "noop", ) ch <- prometheus.MustNewConstMetric( - c.DynamicUpdatesReceived, + c.dynamicUpdatesReceived, prometheus.CounterValue, float64(dst[0].DynamicUpdateWrittentoDatabase), "written", ) ch <- prometheus.MustNewConstMetric( - c.DynamicUpdatesQueued, + c.dynamicUpdatesQueued, prometheus.GaugeValue, float64(dst[0].DynamicUpdateQueued), ) ch <- prometheus.MustNewConstMetric( - c.DynamicUpdatesFailures, + c.dynamicUpdatesFailures, prometheus.CounterValue, float64(dst[0].DynamicUpdateRejected), "rejected", ) ch <- prometheus.MustNewConstMetric( - c.DynamicUpdatesFailures, + c.dynamicUpdatesFailures, prometheus.CounterValue, float64(dst[0].DynamicUpdateTimeOuts), "timeout", ) ch <- prometheus.MustNewConstMetric( - c.NotifyReceived, + c.notifyReceived, prometheus.CounterValue, float64(dst[0].NotifyReceived), ) ch <- prometheus.MustNewConstMetric( - c.NotifySent, + c.notifySent, prometheus.CounterValue, float64(dst[0].NotifySent), ) ch <- prometheus.MustNewConstMetric( - c.RecursiveQueries, + c.recursiveQueries, prometheus.CounterValue, float64(dst[0].RecursiveQueries), ) ch <- prometheus.MustNewConstMetric( - c.RecursiveQueryFailures, + c.recursiveQueryFailures, prometheus.CounterValue, float64(dst[0].RecursiveQueryFailure), ) ch <- prometheus.MustNewConstMetric( - c.RecursiveQuerySendTimeouts, + c.recursiveQuerySendTimeouts, prometheus.CounterValue, float64(dst[0].RecursiveSendTimeOuts), ) ch <- prometheus.MustNewConstMetric( - c.Queries, + c.queries, prometheus.CounterValue, float64(dst[0].TCPQueryReceived), "tcp", ) ch <- prometheus.MustNewConstMetric( - c.Queries, + c.queries, prometheus.CounterValue, float64(dst[0].UDPQueryReceived), "udp", ) ch <- prometheus.MustNewConstMetric( - c.Responses, + c.responses, prometheus.CounterValue, float64(dst[0].TCPResponseSent), "tcp", ) ch <- prometheus.MustNewConstMetric( - c.Responses, + c.responses, prometheus.CounterValue, float64(dst[0].UDPResponseSent), "udp", ) ch <- prometheus.MustNewConstMetric( - c.UnmatchedResponsesReceived, + c.unmatchedResponsesReceived, prometheus.CounterValue, float64(dst[0].UnmatchedResponsesReceived), ) ch <- prometheus.MustNewConstMetric( - c.WinsQueries, + c.winsQueries, prometheus.CounterValue, float64(dst[0].WINSLookupReceived), "forward", ) ch <- prometheus.MustNewConstMetric( - c.WinsQueries, + c.winsQueries, prometheus.CounterValue, float64(dst[0].WINSReverseLookupReceived), "reverse", ) ch <- prometheus.MustNewConstMetric( - c.WinsResponses, + c.winsResponses, prometheus.CounterValue, float64(dst[0].WINSResponseSent), "forward", ) ch <- prometheus.MustNewConstMetric( - c.WinsResponses, + c.winsResponses, prometheus.CounterValue, float64(dst[0].WINSReverseResponseSent), "reverse", ) ch <- prometheus.MustNewConstMetric( - c.SecureUpdateFailures, + c.secureUpdateFailures, prometheus.CounterValue, float64(dst[0].SecureUpdateFailure), ) ch <- prometheus.MustNewConstMetric( - c.SecureUpdateReceived, + c.secureUpdateReceived, prometheus.CounterValue, float64(dst[0].SecureUpdateReceived), ) diff --git a/pkg/collector/exchange/exchange.go b/pkg/collector/exchange/exchange.go index 2f925d73..6acc6e60 100644 --- a/pkg/collector/exchange/exchange.go +++ b/pkg/collector/exchange/exchange.go @@ -33,44 +33,44 @@ type Collector struct { exchangeListAllCollectors *bool exchangeCollectorsEnabled *string - LDAPReadTime *prometheus.Desc - LDAPSearchTime *prometheus.Desc - LDAPWriteTime *prometheus.Desc - LDAPTimeoutErrorsPerSec *prometheus.Desc - LongRunningLDAPOperationsPerMin *prometheus.Desc - ExternalActiveRemoteDeliveryQueueLength *prometheus.Desc - InternalActiveRemoteDeliveryQueueLength *prometheus.Desc - ActiveMailboxDeliveryQueueLength *prometheus.Desc - RetryMailboxDeliveryQueueLength *prometheus.Desc - UnreachableQueueLength *prometheus.Desc - ExternalLargestDeliveryQueueLength *prometheus.Desc - InternalLargestDeliveryQueueLength *prometheus.Desc - PoisonQueueLength *prometheus.Desc - MailboxServerLocatorAverageLatency *prometheus.Desc - AverageAuthenticationLatency *prometheus.Desc - AverageCASProcessingLatency *prometheus.Desc - MailboxServerProxyFailureRate *prometheus.Desc - OutstandingProxyRequests *prometheus.Desc - ProxyRequestsPerSec *prometheus.Desc - ActiveSyncRequestsPerSec *prometheus.Desc - PingCommandsPending *prometheus.Desc - SyncCommandsPerSec *prometheus.Desc - AvailabilityRequestsSec *prometheus.Desc - CurrentUniqueUsers *prometheus.Desc - OWARequestsPerSec *prometheus.Desc - AutodiscoverRequestsPerSec *prometheus.Desc - ActiveTasks *prometheus.Desc - CompletedTasks *prometheus.Desc - QueuedTasks *prometheus.Desc - YieldedTasks *prometheus.Desc - IsActive *prometheus.Desc - RPCAveragedLatency *prometheus.Desc - RPCRequests *prometheus.Desc - ActiveUserCount *prometheus.Desc - ConnectionCount *prometheus.Desc - RPCOperationsPerSec *prometheus.Desc - UserCount *prometheus.Desc - ActiveUserCountMapiHttpEmsmdb *prometheus.Desc + activeMailboxDeliveryQueueLength *prometheus.Desc + activeSyncRequestsPerSec *prometheus.Desc + activeTasks *prometheus.Desc + activeUserCount *prometheus.Desc + activeUserCountMapiHttpEmsMDB *prometheus.Desc + autoDiscoverRequestsPerSec *prometheus.Desc + availabilityRequestsSec *prometheus.Desc + averageAuthenticationLatency *prometheus.Desc + averageCASProcessingLatency *prometheus.Desc + completedTasks *prometheus.Desc + connectionCount *prometheus.Desc + currentUniqueUsers *prometheus.Desc + externalActiveRemoteDeliveryQueueLength *prometheus.Desc + externalLargestDeliveryQueueLength *prometheus.Desc + internalActiveRemoteDeliveryQueueLength *prometheus.Desc + internalLargestDeliveryQueueLength *prometheus.Desc + isActive *prometheus.Desc + ldapReadTime *prometheus.Desc + ldapSearchTime *prometheus.Desc + ldapTimeoutErrorsPerSec *prometheus.Desc + ldapWriteTime *prometheus.Desc + longRunningLDAPOperationsPerMin *prometheus.Desc + mailboxServerLocatorAverageLatency *prometheus.Desc + mailboxServerProxyFailureRate *prometheus.Desc + outstandingProxyRequests *prometheus.Desc + owaRequestsPerSec *prometheus.Desc + pingCommandsPending *prometheus.Desc + poisonQueueLength *prometheus.Desc + proxyRequestsPerSec *prometheus.Desc + queuedTasks *prometheus.Desc + retryMailboxDeliveryQueueLength *prometheus.Desc + rpcAveragedLatency *prometheus.Desc + rpcOperationsPerSec *prometheus.Desc + rpcRequests *prometheus.Desc + syncCommandsPerSec *prometheus.Desc + unreachableQueueLength *prometheus.Desc + userCount *prometheus.Desc + yieldedTasks *prometheus.Desc enabledCollectors []string } @@ -156,44 +156,44 @@ func (c *Collector) Build() error { ) } - c.RPCAveragedLatency = desc("rpc_avg_latency_sec", "The latency (sec) averaged for the past 1024 packets") - c.RPCRequests = desc("rpc_requests", "Number of client requests currently being processed by the RPC Client Access service") - c.ActiveUserCount = desc("rpc_active_user_count", "Number of unique users that have shown some kind of activity in the last 2 minutes") - c.ConnectionCount = desc("rpc_connection_count", "Total number of client connections maintained") - c.RPCOperationsPerSec = desc("rpc_operations_total", "The rate at which RPC operations occur") - c.UserCount = desc("rpc_user_count", "Number of users") - c.LDAPReadTime = desc("ldap_read_time_sec", "Time (sec) to send an LDAP read request and receive a response", "name") - c.LDAPSearchTime = desc("ldap_search_time_sec", "Time (sec) to send an LDAP search request and receive a response", "name") - c.LDAPWriteTime = desc("ldap_write_time_sec", "Time (sec) to send an LDAP Add/Modify/Delete request and receive a response", "name") - c.LDAPTimeoutErrorsPerSec = desc("ldap_timeout_errors_total", "Total number of LDAP timeout errors", "name") - c.LongRunningLDAPOperationsPerMin = desc("ldap_long_running_ops_per_sec", "Long Running LDAP operations per second", "name") - c.ExternalActiveRemoteDeliveryQueueLength = desc("transport_queues_external_active_remote_delivery", "External Active Remote Delivery Queue length", "name") - c.InternalActiveRemoteDeliveryQueueLength = desc("transport_queues_internal_active_remote_delivery", "Internal Active Remote Delivery Queue length", "name") - c.ActiveMailboxDeliveryQueueLength = desc("transport_queues_active_mailbox_delivery", "Active Mailbox Delivery Queue length", "name") - c.RetryMailboxDeliveryQueueLength = desc("transport_queues_retry_mailbox_delivery", "Retry Mailbox Delivery Queue length", "name") - c.UnreachableQueueLength = desc("transport_queues_unreachable", "Unreachable Queue length", "name") - c.ExternalLargestDeliveryQueueLength = desc("transport_queues_external_largest_delivery", "External Largest Delivery Queue length", "name") - c.InternalLargestDeliveryQueueLength = desc("transport_queues_internal_largest_delivery", "Internal Largest Delivery Queue length", "name") - c.PoisonQueueLength = desc("transport_queues_poison", "Poison Queue length", "name") - c.MailboxServerLocatorAverageLatency = desc("http_proxy_mailbox_server_locator_avg_latency_sec", "Average latency (sec) of MailboxServerLocator web service calls", "name") - c.AverageAuthenticationLatency = desc("http_proxy_avg_auth_latency", "Average time spent authenticating CAS requests over the last 200 samples", "name") - c.OutstandingProxyRequests = desc("http_proxy_outstanding_proxy_requests", "Number of concurrent outstanding proxy requests", "name") - c.ProxyRequestsPerSec = desc("http_proxy_requests_total", "Number of proxy requests processed each second", "name") - c.AvailabilityRequestsSec = desc("avail_service_requests_per_sec", "Number of requests serviced per second") - c.CurrentUniqueUsers = desc("owa_current_unique_users", "Number of unique users currently logged on to Outlook Web App") - c.OWARequestsPerSec = desc("owa_requests_total", "Number of requests handled by Outlook Web App per second") - c.AutodiscoverRequestsPerSec = desc("autodiscover_requests_total", "Number of autodiscover service requests processed each second") - c.ActiveTasks = desc("workload_active_tasks", "Number of active tasks currently running in the background for workload management", "name") - c.CompletedTasks = desc("workload_completed_tasks", "Number of workload management tasks that have been completed", "name") - c.QueuedTasks = desc("workload_queued_tasks", "Number of workload management tasks that are currently queued up waiting to be processed", "name") - c.YieldedTasks = desc("workload_yielded_tasks", "The total number of tasks that have been yielded by a workload", "name") - c.IsActive = desc("workload_is_active", "Active indicates whether the workload is in an active (1) or paused (0) state", "name") - c.ActiveSyncRequestsPerSec = desc("activesync_requests_total", "Num HTTP requests received from the client via ASP.NET per sec. Shows Current user load") - c.AverageCASProcessingLatency = desc("http_proxy_avg_cas_proccessing_latency_sec", "Average latency (sec) of CAS processing time over the last 200 reqs", "name") - c.MailboxServerProxyFailureRate = desc("http_proxy_mailbox_proxy_failure_rate", "% of failures between this CAS and MBX servers over the last 200 samples", "name") - c.PingCommandsPending = desc("activesync_ping_cmds_pending", "Number of ping commands currently pending in the queue") - c.SyncCommandsPerSec = desc("activesync_sync_cmds_total", "Number of sync commands processed per second. Clients use this command to synchronize items within a folder") - c.ActiveUserCountMapiHttpEmsmdb = desc("mapihttp_emsmdb_active_user_count", "Number of unique outlook users that have shown some kind of activity in the last 2 minutes") + c.rpcAveragedLatency = desc("rpc_avg_latency_sec", "The latency (sec) averaged for the past 1024 packets") + c.rpcRequests = desc("rpc_requests", "Number of client requests currently being processed by the RPC Client Access service") + c.activeUserCount = desc("rpc_active_user_count", "Number of unique users that have shown some kind of activity in the last 2 minutes") + c.connectionCount = desc("rpc_connection_count", "Total number of client connections maintained") + c.rpcOperationsPerSec = desc("rpc_operations_total", "The rate at which RPC operations occur") + c.userCount = desc("rpc_user_count", "Number of users") + c.ldapReadTime = desc("ldap_read_time_sec", "Time (sec) to send an LDAP read request and receive a response", "name") + c.ldapSearchTime = desc("ldap_search_time_sec", "Time (sec) to send an LDAP search request and receive a response", "name") + c.ldapWriteTime = desc("ldap_write_time_sec", "Time (sec) to send an LDAP Add/Modify/Delete request and receive a response", "name") + c.ldapTimeoutErrorsPerSec = desc("ldap_timeout_errors_total", "Total number of LDAP timeout errors", "name") + c.longRunningLDAPOperationsPerMin = desc("ldap_long_running_ops_per_sec", "Long Running LDAP operations per second", "name") + c.externalActiveRemoteDeliveryQueueLength = desc("transport_queues_external_active_remote_delivery", "External Active Remote Delivery Queue length", "name") + c.internalActiveRemoteDeliveryQueueLength = desc("transport_queues_internal_active_remote_delivery", "Internal Active Remote Delivery Queue length", "name") + c.activeMailboxDeliveryQueueLength = desc("transport_queues_active_mailbox_delivery", "Active Mailbox Delivery Queue length", "name") + c.retryMailboxDeliveryQueueLength = desc("transport_queues_retry_mailbox_delivery", "Retry Mailbox Delivery Queue length", "name") + c.unreachableQueueLength = desc("transport_queues_unreachable", "Unreachable Queue length", "name") + c.externalLargestDeliveryQueueLength = desc("transport_queues_external_largest_delivery", "External Largest Delivery Queue length", "name") + c.internalLargestDeliveryQueueLength = desc("transport_queues_internal_largest_delivery", "Internal Largest Delivery Queue length", "name") + c.poisonQueueLength = desc("transport_queues_poison", "Poison Queue length", "name") + c.mailboxServerLocatorAverageLatency = desc("http_proxy_mailbox_server_locator_avg_latency_sec", "Average latency (sec) of MailboxServerLocator web service calls", "name") + c.averageAuthenticationLatency = desc("http_proxy_avg_auth_latency", "Average time spent authenticating CAS requests over the last 200 samples", "name") + c.outstandingProxyRequests = desc("http_proxy_outstanding_proxy_requests", "Number of concurrent outstanding proxy requests", "name") + c.proxyRequestsPerSec = desc("http_proxy_requests_total", "Number of proxy requests processed each second", "name") + c.availabilityRequestsSec = desc("avail_service_requests_per_sec", "Number of requests serviced per second") + c.currentUniqueUsers = desc("owa_current_unique_users", "Number of unique users currently logged on to Outlook Web App") + c.owaRequestsPerSec = desc("owa_requests_total", "Number of requests handled by Outlook Web App per second") + c.autoDiscoverRequestsPerSec = desc("autodiscover_requests_total", "Number of autodiscover service requests processed each second") + c.activeTasks = desc("workload_active_tasks", "Number of active tasks currently running in the background for workload management", "name") + c.completedTasks = desc("workload_completed_tasks", "Number of workload management tasks that have been completed", "name") + c.queuedTasks = desc("workload_queued_tasks", "Number of workload management tasks that are currently queued up waiting to be processed", "name") + c.yieldedTasks = desc("workload_yielded_tasks", "The total number of tasks that have been yielded by a workload", "name") + c.isActive = desc("workload_is_active", "Active indicates whether the workload is in an active (1) or paused (0) state", "name") + c.activeSyncRequestsPerSec = desc("activesync_requests_total", "Num HTTP requests received from the client via ASP.NET per sec. Shows Current user load") + c.averageCASProcessingLatency = desc("http_proxy_avg_cas_proccessing_latency_sec", "Average latency (sec) of CAS processing time over the last 200 reqs", "name") + c.mailboxServerProxyFailureRate = desc("http_proxy_mailbox_proxy_failure_rate", "% of failures between this CAS and MBX servers over the last 200 samples", "name") + c.pingCommandsPending = desc("activesync_ping_cmds_pending", "Number of ping commands currently pending in the queue") + c.syncCommandsPerSec = desc("activesync_sync_cmds_total", "Number of sync commands processed per second. Clients use this command to synchronize items within a folder") + c.activeUserCountMapiHttpEmsMDB = desc("mapihttp_emsmdb_active_user_count", "Number of unique outlook users that have shown some kind of activity in the last 2 minutes") c.enabledCollectors = make([]string, 0, len(exchangeAllCollectorNames)) @@ -291,31 +291,31 @@ func (c *Collector) collectADAccessProcesses(ctx *types.ScrapeContext, ch chan<- labelName = fmt.Sprintf("%s_%d", labelName, labelUseCount[labelName]) } ch <- prometheus.MustNewConstMetric( - c.LDAPReadTime, + c.ldapReadTime, prometheus.CounterValue, c.msToSec(proc.LDAPReadTime), labelName, ) ch <- prometheus.MustNewConstMetric( - c.LDAPSearchTime, + c.ldapSearchTime, prometheus.CounterValue, c.msToSec(proc.LDAPSearchTime), labelName, ) ch <- prometheus.MustNewConstMetric( - c.LDAPWriteTime, + c.ldapWriteTime, prometheus.CounterValue, c.msToSec(proc.LDAPWriteTime), labelName, ) ch <- prometheus.MustNewConstMetric( - c.LDAPTimeoutErrorsPerSec, + c.ldapTimeoutErrorsPerSec, prometheus.CounterValue, proc.LDAPTimeoutErrorsPerSec, labelName, ) ch <- prometheus.MustNewConstMetric( - c.LongRunningLDAPOperationsPerMin, + c.longRunningLDAPOperationsPerMin, prometheus.CounterValue, proc.LongRunningLDAPOperationsPerMin*60, labelName, @@ -337,7 +337,7 @@ func (c *Collector) collectAvailabilityService(ctx *types.ScrapeContext, ch chan for _, availservice := range data { ch <- prometheus.MustNewConstMetric( - c.AvailabilityRequestsSec, + c.availabilityRequestsSec, prometheus.CounterValue, availservice.RequestsSec, ) @@ -366,37 +366,37 @@ func (c *Collector) collectHTTPProxy(ctx *types.ScrapeContext, ch chan<- prometh for _, instance := range data { labelName := c.toLabelName(instance.Name) ch <- prometheus.MustNewConstMetric( - c.MailboxServerLocatorAverageLatency, + c.mailboxServerLocatorAverageLatency, prometheus.GaugeValue, c.msToSec(instance.MailboxServerLocatorAverageLatency), labelName, ) ch <- prometheus.MustNewConstMetric( - c.AverageAuthenticationLatency, + c.averageAuthenticationLatency, prometheus.GaugeValue, instance.AverageAuthenticationLatency, labelName, ) ch <- prometheus.MustNewConstMetric( - c.AverageCASProcessingLatency, + c.averageCASProcessingLatency, prometheus.GaugeValue, c.msToSec(instance.AverageCASProcessingLatency), labelName, ) ch <- prometheus.MustNewConstMetric( - c.MailboxServerProxyFailureRate, + c.mailboxServerProxyFailureRate, prometheus.GaugeValue, instance.MailboxServerProxyFailureRate, labelName, ) ch <- prometheus.MustNewConstMetric( - c.OutstandingProxyRequests, + c.outstandingProxyRequests, prometheus.GaugeValue, instance.OutstandingProxyRequests, labelName, ) ch <- prometheus.MustNewConstMetric( - c.ProxyRequestsPerSec, + c.proxyRequestsPerSec, prometheus.CounterValue, instance.ProxyRequestsPerSec, labelName, @@ -419,12 +419,12 @@ func (c *Collector) collectOWA(ctx *types.ScrapeContext, ch chan<- prometheus.Me for _, owa := range data { ch <- prometheus.MustNewConstMetric( - c.CurrentUniqueUsers, + c.currentUniqueUsers, prometheus.GaugeValue, owa.CurrentUniqueUsers, ) ch <- prometheus.MustNewConstMetric( - c.OWARequestsPerSec, + c.owaRequestsPerSec, prometheus.CounterValue, owa.RequestsPerSec, ) @@ -447,17 +447,17 @@ func (c *Collector) collectActiveSync(ctx *types.ScrapeContext, ch chan<- promet for _, instance := range data { ch <- prometheus.MustNewConstMetric( - c.ActiveSyncRequestsPerSec, + c.activeSyncRequestsPerSec, prometheus.CounterValue, instance.RequestsPerSec, ) ch <- prometheus.MustNewConstMetric( - c.PingCommandsPending, + c.pingCommandsPending, prometheus.GaugeValue, instance.PingCommandsPending, ) ch <- prometheus.MustNewConstMetric( - c.SyncCommandsPerSec, + c.syncCommandsPerSec, prometheus.CounterValue, instance.SyncCommandsPerSec, ) @@ -483,32 +483,32 @@ func (c *Collector) collectRPC(ctx *types.ScrapeContext, ch chan<- prometheus.Me for _, rpc := range data { ch <- prometheus.MustNewConstMetric( - c.RPCAveragedLatency, + c.rpcAveragedLatency, prometheus.GaugeValue, c.msToSec(rpc.RPCAveragedLatency), ) ch <- prometheus.MustNewConstMetric( - c.RPCRequests, + c.rpcRequests, prometheus.GaugeValue, rpc.RPCRequests, ) ch <- prometheus.MustNewConstMetric( - c.ActiveUserCount, + c.activeUserCount, prometheus.GaugeValue, rpc.ActiveUserCount, ) ch <- prometheus.MustNewConstMetric( - c.ConnectionCount, + c.connectionCount, prometheus.GaugeValue, rpc.ConnectionCount, ) ch <- prometheus.MustNewConstMetric( - c.RPCOperationsPerSec, + c.rpcOperationsPerSec, prometheus.CounterValue, rpc.RPCOperationsPerSec, ) ch <- prometheus.MustNewConstMetric( - c.UserCount, + c.userCount, prometheus.GaugeValue, rpc.UserCount, ) @@ -543,49 +543,49 @@ func (c *Collector) collectTransportQueues(ctx *types.ScrapeContext, ch chan<- p continue } ch <- prometheus.MustNewConstMetric( - c.ExternalActiveRemoteDeliveryQueueLength, + c.externalActiveRemoteDeliveryQueueLength, prometheus.GaugeValue, queue.ExternalActiveRemoteDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.InternalActiveRemoteDeliveryQueueLength, + c.internalActiveRemoteDeliveryQueueLength, prometheus.GaugeValue, queue.InternalActiveRemoteDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.ActiveMailboxDeliveryQueueLength, + c.activeMailboxDeliveryQueueLength, prometheus.GaugeValue, queue.ActiveMailboxDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.RetryMailboxDeliveryQueueLength, + c.retryMailboxDeliveryQueueLength, prometheus.GaugeValue, queue.RetryMailboxDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.UnreachableQueueLength, + c.unreachableQueueLength, prometheus.GaugeValue, queue.UnreachableQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.ExternalLargestDeliveryQueueLength, + c.externalLargestDeliveryQueueLength, prometheus.GaugeValue, queue.ExternalLargestDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.InternalLargestDeliveryQueueLength, + c.internalLargestDeliveryQueueLength, prometheus.GaugeValue, queue.InternalLargestDeliveryQueueLength, labelName, ) ch <- prometheus.MustNewConstMetric( - c.PoisonQueueLength, + c.poisonQueueLength, prometheus.GaugeValue, queue.PoisonQueueLength, labelName, @@ -617,31 +617,31 @@ func (c *Collector) collectWorkloadManagementWorkloads(ctx *types.ScrapeContext, continue } ch <- prometheus.MustNewConstMetric( - c.ActiveTasks, + c.activeTasks, prometheus.GaugeValue, instance.ActiveTasks, labelName, ) ch <- prometheus.MustNewConstMetric( - c.CompletedTasks, + c.completedTasks, prometheus.CounterValue, instance.CompletedTasks, labelName, ) ch <- prometheus.MustNewConstMetric( - c.QueuedTasks, + c.queuedTasks, prometheus.CounterValue, instance.QueuedTasks, labelName, ) ch <- prometheus.MustNewConstMetric( - c.YieldedTasks, + c.yieldedTasks, prometheus.CounterValue, instance.YieldedTasks, labelName, ) ch <- prometheus.MustNewConstMetric( - c.IsActive, + c.isActive, prometheus.GaugeValue, instance.IsActive, labelName, @@ -663,7 +663,7 @@ func (c *Collector) collectAutoDiscover(ctx *types.ScrapeContext, ch chan<- prom } for _, autodisc := range data { ch <- prometheus.MustNewConstMetric( - c.AutodiscoverRequestsPerSec, + c.autoDiscoverRequestsPerSec, prometheus.CounterValue, autodisc.RequestsPerSec, ) @@ -684,7 +684,7 @@ func (c *Collector) collectMapiHttpEmsmdb(ctx *types.ScrapeContext, ch chan<- pr for _, mapihttp := range data { ch <- prometheus.MustNewConstMetric( - c.ActiveUserCountMapiHttpEmsmdb, + c.activeUserCountMapiHttpEmsMDB, prometheus.GaugeValue, mapihttp.ActiveUserCount, ) diff --git a/pkg/collector/fsrmquota/fsrmquota.go b/pkg/collector/fsrmquota/fsrmquota.go index 9d8f73fb..2b7d634e 100644 --- a/pkg/collector/fsrmquota/fsrmquota.go +++ b/pkg/collector/fsrmquota/fsrmquota.go @@ -21,17 +21,16 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - QuotasCount *prometheus.Desc - Path *prometheus.Desc - PeakUsage *prometheus.Desc - Size *prometheus.Desc - Usage *prometheus.Desc + quotasCount *prometheus.Desc + peakUsage *prometheus.Desc + size *prometheus.Desc + usage *prometheus.Desc - Description *prometheus.Desc - Disabled *prometheus.Desc - MatchesTemplate *prometheus.Desc - SoftLimit *prometheus.Desc - Template *prometheus.Desc + description *prometheus.Desc + disabled *prometheus.Desc + matchesTemplate *prometheus.Desc + softLimit *prometheus.Desc + template *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -62,55 +61,55 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.QuotasCount = prometheus.NewDesc( + c.quotasCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "count"), "Number of Quotas", nil, nil, ) - c.PeakUsage = prometheus.NewDesc( + c.peakUsage = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "peak_usage_bytes"), "The highest amount of disk space usage charged to this quota. (PeakUsage)", []string{"path", "template"}, nil, ) - c.Size = prometheus.NewDesc( + c.size = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "size_bytes"), "The size of the quota. (Size)", []string{"path", "template"}, nil, ) - c.Usage = prometheus.NewDesc( + c.usage = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "usage_bytes"), "The current amount of disk space usage charged to this quota. (Usage)", []string{"path", "template"}, nil, ) - c.Description = prometheus.NewDesc( + c.description = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "description"), "Description of the quota (Description)", []string{"path", "template", "description"}, nil, ) - c.Disabled = prometheus.NewDesc( + c.disabled = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "disabled"), "If 1, the quota is disabled. The default value is 0. (Disabled)", []string{"path", "template"}, nil, ) - c.SoftLimit = prometheus.NewDesc( + c.softLimit = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "softlimit"), "If 1, the quota is a soft limit. If 0, the quota is a hard limit. The default value is 0. Optional (SoftLimit)", []string{"path", "template"}, nil, ) - c.Template = prometheus.NewDesc( + c.template = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "template"), "Quota template name. (Template)", []string{"path", "template"}, nil, ) - c.MatchesTemplate = prometheus.NewDesc( + c.matchesTemplate = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "matchestemplate"), "If 1, the property values of this quota match those values of the template from which it was derived. (MatchesTemplate)", []string{"path", "template"}, @@ -163,48 +162,48 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { Description := quota.Description ch <- prometheus.MustNewConstMetric( - c.PeakUsage, + c.peakUsage, prometheus.GaugeValue, float64(quota.PeakUsage), path, template, ) ch <- prometheus.MustNewConstMetric( - c.Size, + c.size, prometheus.GaugeValue, float64(quota.Size), path, template, ) ch <- prometheus.MustNewConstMetric( - c.Usage, + c.usage, prometheus.GaugeValue, float64(quota.Usage), path, template, ) ch <- prometheus.MustNewConstMetric( - c.Description, + c.description, prometheus.GaugeValue, 1.0, path, template, Description, ) ch <- prometheus.MustNewConstMetric( - c.Disabled, + c.disabled, prometheus.GaugeValue, utils.BoolToFloat(quota.Disabled), path, template, ) ch <- prometheus.MustNewConstMetric( - c.MatchesTemplate, + c.matchesTemplate, prometheus.GaugeValue, utils.BoolToFloat(quota.MatchesTemplate), path, template, ) ch <- prometheus.MustNewConstMetric( - c.SoftLimit, + c.softLimit, prometheus.GaugeValue, utils.BoolToFloat(quota.SoftLimit), path, @@ -213,7 +212,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.QuotasCount, + c.quotasCount, prometheus.GaugeValue, float64(count), ) diff --git a/pkg/collector/hyperv/hyperv.go b/pkg/collector/hyperv/hyperv.go index 4aca7c85..47ec0e7c 100644 --- a/pkg/collector/hyperv/hyperv.go +++ b/pkg/collector/hyperv/hyperv.go @@ -25,118 +25,118 @@ type Collector struct { logger log.Logger // Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary - HealthCritical *prometheus.Desc - HealthOk *prometheus.Desc + healthCritical *prometheus.Desc + healthOk *prometheus.Desc // Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition - PhysicalPagesAllocated *prometheus.Desc - PreferredNUMANodeIndex *prometheus.Desc - RemotePhysicalPages *prometheus.Desc + physicalPagesAllocated *prometheus.Desc + preferredNUMANodeIndex *prometheus.Desc + remotePhysicalPages *prometheus.Desc // Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition - AddressSpaces *prometheus.Desc - AttachedDevices *prometheus.Desc - DepositedPages *prometheus.Desc - DeviceDMAErrors *prometheus.Desc - DeviceInterruptErrors *prometheus.Desc - DeviceInterruptMappings *prometheus.Desc - DeviceInterruptThrottleEvents *prometheus.Desc - GPAPages *prometheus.Desc - GPASpaceModifications *prometheus.Desc - IOTLBFlushCost *prometheus.Desc - IOTLBFlushes *prometheus.Desc - RecommendedVirtualTLBSize *prometheus.Desc - SkippedTimerTicks *prometheus.Desc - Value1Gdevicepages *prometheus.Desc - Value1GGPApages *prometheus.Desc - Value2Mdevicepages *prometheus.Desc - Value2MGPApages *prometheus.Desc - Value4Kdevicepages *prometheus.Desc - Value4KGPApages *prometheus.Desc - VirtualTLBFlushEntires *prometheus.Desc - VirtualTLBPages *prometheus.Desc + addressSpaces *prometheus.Desc + attachedDevices *prometheus.Desc + depositedPages *prometheus.Desc + deviceDMAErrors *prometheus.Desc + deviceInterruptErrors *prometheus.Desc + deviceInterruptMappings *prometheus.Desc + deviceInterruptThrottleEvents *prometheus.Desc + gpaPages *prometheus.Desc + gpaSpaceModifications *prometheus.Desc + ioTLBFlushCost *prometheus.Desc + ioTLBFlushes *prometheus.Desc + recommendedVirtualTLBSize *prometheus.Desc + skippedTimerTicks *prometheus.Desc + value1Gdevicepages *prometheus.Desc + value1GGPApages *prometheus.Desc + value2Mdevicepages *prometheus.Desc + value2MGPApages *prometheus.Desc + value4Kdevicepages *prometheus.Desc + value4KGPApages *prometheus.Desc + virtualTLBFlushEntires *prometheus.Desc + virtualTLBPages *prometheus.Desc // Win32_PerfRawData_HvStats_HyperVHypervisor - LogicalProcessors *prometheus.Desc - VirtualProcessors *prometheus.Desc + logicalProcessors *prometheus.Desc + virtualProcessors *prometheus.Desc // Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor - HostLPGuestRunTimePercent *prometheus.Desc - HostLPHypervisorRunTimePercent *prometheus.Desc - HostLPTotalRunTimePercent *prometheus.Desc + hostLPGuestRunTimePercent *prometheus.Desc + hostLPHypervisorRunTimePercent *prometheus.Desc + hostLPTotalRunTimePercent *prometheus.Desc // Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor - HostGuestRunTime *prometheus.Desc - HostHypervisorRunTime *prometheus.Desc - HostRemoteRunTime *prometheus.Desc - HostTotalRunTime *prometheus.Desc - HostCPUWaitTimePerDispatch *prometheus.Desc + hostGuestRunTime *prometheus.Desc + hostHypervisorRunTime *prometheus.Desc + hostRemoteRunTime *prometheus.Desc + hostTotalRunTime *prometheus.Desc + hostCPUWaitTimePerDispatch *prometheus.Desc // Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor - VMGuestRunTime *prometheus.Desc - VMHypervisorRunTime *prometheus.Desc - VMRemoteRunTime *prometheus.Desc - VMTotalRunTime *prometheus.Desc - VMCPUWaitTimePerDispatch *prometheus.Desc + vmGuestRunTime *prometheus.Desc + vmHypervisorRunTime *prometheus.Desc + vmRemoteRunTime *prometheus.Desc + vmTotalRunTime *prometheus.Desc + vmCPUWaitTimePerDispatch *prometheus.Desc // Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch - BroadcastPacketsReceived *prometheus.Desc - BroadcastPacketsSent *prometheus.Desc - Bytes *prometheus.Desc - BytesReceived *prometheus.Desc - BytesSent *prometheus.Desc - DirectedPacketsReceived *prometheus.Desc - DirectedPacketsSent *prometheus.Desc - DroppedPacketsIncoming *prometheus.Desc - DroppedPacketsOutgoing *prometheus.Desc - ExtensionsDroppedPacketsIncoming *prometheus.Desc - ExtensionsDroppedPacketsOutgoing *prometheus.Desc - LearnedMacAddresses *prometheus.Desc - MulticastPacketsReceived *prometheus.Desc - MulticastPacketsSent *prometheus.Desc - NumberofSendChannelMoves *prometheus.Desc - NumberofVMQMoves *prometheus.Desc - PacketsFlooded *prometheus.Desc - Packets *prometheus.Desc - PacketsReceived *prometheus.Desc - PacketsSent *prometheus.Desc - PurgedMacAddresses *prometheus.Desc + broadcastPacketsReceived *prometheus.Desc + broadcastPacketsSent *prometheus.Desc + bytes *prometheus.Desc + bytesReceived *prometheus.Desc + bytesSent *prometheus.Desc + directedPacketsReceived *prometheus.Desc + directedPacketsSent *prometheus.Desc + droppedPacketsIncoming *prometheus.Desc + droppedPacketsOutgoing *prometheus.Desc + extensionsDroppedPacketsIncoming *prometheus.Desc + extensionsDroppedPacketsOutgoing *prometheus.Desc + learnedMacAddresses *prometheus.Desc + multicastPacketsReceived *prometheus.Desc + multicastPacketsSent *prometheus.Desc + numberOfSendChannelMoves *prometheus.Desc + numberOfVMQMoves *prometheus.Desc + packetsFlooded *prometheus.Desc + packets *prometheus.Desc + packetsReceived *prometheus.Desc + packetsSent *prometheus.Desc + purgedMacAddresses *prometheus.Desc // Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter - AdapterBytesDropped *prometheus.Desc - AdapterBytesReceived *prometheus.Desc - AdapterBytesSent *prometheus.Desc - AdapterFramesDropped *prometheus.Desc - AdapterFramesReceived *prometheus.Desc - AdapterFramesSent *prometheus.Desc + adapterBytesDropped *prometheus.Desc + adapterBytesReceived *prometheus.Desc + adapterBytesSent *prometheus.Desc + adapterFramesDropped *prometheus.Desc + adapterFramesReceived *prometheus.Desc + adapterFramesSent *prometheus.Desc // Win32_PerfRawData_Counters_HyperVVirtualStorageDevice - VMStorageErrorCount *prometheus.Desc - VMStorageQueueLength *prometheus.Desc - VMStorageReadBytes *prometheus.Desc - VMStorageReadOperations *prometheus.Desc - VMStorageWriteBytes *prometheus.Desc - VMStorageWriteOperations *prometheus.Desc + vmStorageErrorCount *prometheus.Desc + vmStorageQueueLength *prometheus.Desc + vmStorageReadBytes *prometheus.Desc + vmStorageReadOperations *prometheus.Desc + vmStorageWriteBytes *prometheus.Desc + vmStorageWriteOperations *prometheus.Desc // Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter - VMNetworkBytesReceived *prometheus.Desc - VMNetworkBytesSent *prometheus.Desc - VMNetworkDroppedPacketsIncoming *prometheus.Desc - VMNetworkDroppedPacketsOutgoing *prometheus.Desc - VMNetworkPacketsReceived *prometheus.Desc - VMNetworkPacketsSent *prometheus.Desc + vmStorageBytesReceived *prometheus.Desc + vmStorageBytesSent *prometheus.Desc + vmStorageDroppedPacketsIncoming *prometheus.Desc + vmStorageDroppedPacketsOutgoing *prometheus.Desc + vmStoragePacketsReceived *prometheus.Desc + vmStoragePacketsSent *prometheus.Desc // Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM - VMMemoryAddedMemory *prometheus.Desc - VMMemoryAveragePressure *prometheus.Desc - VMMemoryCurrentPressure *prometheus.Desc - VMMemoryGuestVisiblePhysicalMemory *prometheus.Desc - VMMemoryMaximumPressure *prometheus.Desc - VMMemoryMemoryAddOperations *prometheus.Desc - VMMemoryMemoryRemoveOperations *prometheus.Desc - VMMemoryMinimumPressure *prometheus.Desc - VMMemoryPhysicalMemory *prometheus.Desc - VMMemoryRemovedMemory *prometheus.Desc + vmMemoryAddedMemory *prometheus.Desc + vmMemoryAveragePressure *prometheus.Desc + vmMemoryCurrentPressure *prometheus.Desc + vmMemoryGuestVisiblePhysicalMemory *prometheus.Desc + vmMemoryMaximumPressure *prometheus.Desc + vmMemoryMemoryAddOperations *prometheus.Desc + vmMemoryMemoryRemoveOperations *prometheus.Desc + vmMemoryMinimumPressure *prometheus.Desc + vmMemoryPhysicalMemory *prometheus.Desc + vmMemoryRemovedMemory *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -169,13 +169,13 @@ func (c *Collector) Close() error { func (c *Collector) Build() error { buildSubsystemName := func(component string) string { return "hyperv_" + component } - c.HealthCritical = prometheus.NewDesc( + c.healthCritical = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("health"), "critical"), "This counter represents the number of virtual machines with critical health", nil, nil, ) - c.HealthOk = prometheus.NewDesc( + c.healthOk = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("health"), "ok"), "This counter represents the number of virtual machines with ok health", nil, @@ -184,19 +184,19 @@ func (c *Collector) Build() error { // - c.PhysicalPagesAllocated = prometheus.NewDesc( + c.physicalPagesAllocated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vid"), "physical_pages_allocated"), "The number of physical pages allocated", []string{"vm"}, nil, ) - c.PreferredNUMANodeIndex = prometheus.NewDesc( + c.preferredNUMANodeIndex = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vid"), "preferred_numa_node_index"), "The preferred NUMA node index associated with this partition", []string{"vm"}, nil, ) - c.RemotePhysicalPages = prometheus.NewDesc( + c.remotePhysicalPages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vid"), "remote_physical_pages"), "The number of physical pages not allocated from the preferred NUMA node", []string{"vm"}, @@ -205,127 +205,127 @@ func (c *Collector) Build() error { // - c.AddressSpaces = prometheus.NewDesc( + c.addressSpaces = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "address_spaces"), "The number of address spaces in the virtual TLB of the partition", nil, nil, ) - c.AttachedDevices = prometheus.NewDesc( + c.attachedDevices = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "attached_devices"), "The number of devices attached to the partition", nil, nil, ) - c.DepositedPages = prometheus.NewDesc( + c.depositedPages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "deposited_pages"), "The number of pages deposited into the partition", nil, nil, ) - c.DeviceDMAErrors = prometheus.NewDesc( + c.deviceDMAErrors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "device_dma_errors"), "An indicator of illegal DMA requests generated by all devices assigned to the partition", nil, nil, ) - c.DeviceInterruptErrors = prometheus.NewDesc( + c.deviceInterruptErrors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "device_interrupt_errors"), "An indicator of illegal interrupt requests generated by all devices assigned to the partition", nil, nil, ) - c.DeviceInterruptMappings = prometheus.NewDesc( + c.deviceInterruptMappings = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "device_interrupt_mappings"), "The number of device interrupt mappings used by the partition", nil, nil, ) - c.DeviceInterruptThrottleEvents = prometheus.NewDesc( + c.deviceInterruptThrottleEvents = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "device_interrupt_throttle_events"), "The number of times an interrupt from a device assigned to the partition was temporarily throttled because the device was generating too many interrupts", nil, nil, ) - c.GPAPages = prometheus.NewDesc( + c.gpaPages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "preferred_numa_node_index"), "The number of pages present in the GPA space of the partition (zero for root partition)", nil, nil, ) - c.GPASpaceModifications = prometheus.NewDesc( + c.gpaSpaceModifications = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "gpa_space_modifications"), "The rate of modifications to the GPA space of the partition", nil, nil, ) - c.IOTLBFlushCost = prometheus.NewDesc( + c.ioTLBFlushCost = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "io_tlb_flush_cost"), "The average time (in nanoseconds) spent processing an I/O TLB flush", nil, nil, ) - c.IOTLBFlushes = prometheus.NewDesc( + c.ioTLBFlushes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "io_tlb_flush"), "The rate of flushes of I/O TLBs of the partition", nil, nil, ) - c.RecommendedVirtualTLBSize = prometheus.NewDesc( + c.recommendedVirtualTLBSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "recommended_virtual_tlb_size"), "The recommended number of pages to be deposited for the virtual TLB", nil, nil, ) - c.SkippedTimerTicks = prometheus.NewDesc( + c.skippedTimerTicks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "physical_pages_allocated"), "The number of timer interrupts skipped for the partition", nil, nil, ) - c.Value1Gdevicepages = prometheus.NewDesc( + c.value1Gdevicepages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "1G_device_pages"), "The number of 1G pages present in the device space of the partition", nil, nil, ) - c.Value1GGPApages = prometheus.NewDesc( + c.value1GGPApages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "1G_gpa_pages"), "The number of 1G pages present in the GPA space of the partition", nil, nil, ) - c.Value2Mdevicepages = prometheus.NewDesc( + c.value2Mdevicepages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "2M_device_pages"), "The number of 2M pages present in the device space of the partition", nil, nil, ) - c.Value2MGPApages = prometheus.NewDesc( + c.value2MGPApages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "2M_gpa_pages"), "The number of 2M pages present in the GPA space of the partition", nil, nil, ) - c.Value4Kdevicepages = prometheus.NewDesc( + c.value4Kdevicepages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "4K_device_pages"), "The number of 4K pages present in the device space of the partition", nil, nil, ) - c.Value4KGPApages = prometheus.NewDesc( + c.value4KGPApages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "4K_gpa_pages"), "The number of 4K pages present in the GPA space of the partition", nil, nil, ) - c.VirtualTLBFlushEntires = prometheus.NewDesc( + c.virtualTLBFlushEntires = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "virtual_tlb_flush_entires"), "The rate of flushes of the entire virtual TLB", nil, nil, ) - c.VirtualTLBPages = prometheus.NewDesc( + c.virtualTLBPages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("root_partition"), "virtual_tlb_pages"), "The number of pages used by the virtual TLB of the partition", nil, @@ -334,13 +334,13 @@ func (c *Collector) Build() error { // - c.VirtualProcessors = prometheus.NewDesc( + c.virtualProcessors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("hypervisor"), "virtual_processors"), "The number of virtual processors present in the system", nil, nil, ) - c.LogicalProcessors = prometheus.NewDesc( + c.logicalProcessors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("hypervisor"), "logical_processors"), "The number of logical processors present in the system", nil, @@ -349,19 +349,19 @@ func (c *Collector) Build() error { // - c.HostLPGuestRunTimePercent = prometheus.NewDesc( + c.hostLPGuestRunTimePercent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_lp"), "guest_run_time_percent"), "The percentage of time spent by the processor in guest code", []string{"core"}, nil, ) - c.HostLPHypervisorRunTimePercent = prometheus.NewDesc( + c.hostLPHypervisorRunTimePercent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_lp"), "hypervisor_run_time_percent"), "The percentage of time spent by the processor in hypervisor code", []string{"core"}, nil, ) - c.HostLPTotalRunTimePercent = prometheus.NewDesc( + c.hostLPTotalRunTimePercent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_lp"), "total_run_time_percent"), "The percentage of time spent by the processor in guest and hypervisor code", []string{"core"}, @@ -370,31 +370,31 @@ func (c *Collector) Build() error { // - c.HostGuestRunTime = prometheus.NewDesc( + c.hostGuestRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_cpu"), "guest_run_time"), "The time spent by the virtual processor in guest code", []string{"core"}, nil, ) - c.HostHypervisorRunTime = prometheus.NewDesc( + c.hostHypervisorRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_cpu"), "hypervisor_run_time"), "The time spent by the virtual processor in hypervisor code", []string{"core"}, nil, ) - c.HostRemoteRunTime = prometheus.NewDesc( + c.hostRemoteRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_cpu"), "remote_run_time"), "The time spent by the virtual processor running on a remote node", []string{"core"}, nil, ) - c.HostTotalRunTime = prometheus.NewDesc( + c.hostTotalRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_cpu"), "total_run_time"), "The time spent by the virtual processor in guest and hypervisor code", []string{"core"}, nil, ) - c.HostCPUWaitTimePerDispatch = prometheus.NewDesc( + c.hostCPUWaitTimePerDispatch = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("host_cpu"), "wait_time_per_dispatch_total"), "Time in nanoseconds waiting for a virtual processor to be dispatched onto a logical processor", []string{"core"}, @@ -403,31 +403,31 @@ func (c *Collector) Build() error { // - c.VMGuestRunTime = prometheus.NewDesc( + c.vmGuestRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_cpu"), "guest_run_time"), "The time spent by the virtual processor in guest code", []string{"vm", "core"}, nil, ) - c.VMHypervisorRunTime = prometheus.NewDesc( + c.vmHypervisorRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_cpu"), "hypervisor_run_time"), "The time spent by the virtual processor in hypervisor code", []string{"vm", "core"}, nil, ) - c.VMRemoteRunTime = prometheus.NewDesc( + c.vmRemoteRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_cpu"), "remote_run_time"), "The time spent by the virtual processor running on a remote node", []string{"vm", "core"}, nil, ) - c.VMTotalRunTime = prometheus.NewDesc( + c.vmTotalRunTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_cpu"), "total_run_time"), "The time spent by the virtual processor in guest and hypervisor code", []string{"vm", "core"}, nil, ) - c.VMCPUWaitTimePerDispatch = prometheus.NewDesc( + c.vmCPUWaitTimePerDispatch = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_cpu"), "wait_time_per_dispatch_total"), "Time in nanoseconds waiting for a virtual processor to be dispatched onto a logical processor", []string{"vm", "core"}, @@ -435,127 +435,127 @@ func (c *Collector) Build() error { ) // - c.BroadcastPacketsReceived = prometheus.NewDesc( + c.broadcastPacketsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "broadcast_packets_received_total"), "This represents the total number of broadcast packets received per second by the virtual switch", []string{"vswitch"}, nil, ) - c.BroadcastPacketsSent = prometheus.NewDesc( + c.broadcastPacketsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "broadcast_packets_sent_total"), "This represents the total number of broadcast packets sent per second by the virtual switch", []string{"vswitch"}, nil, ) - c.Bytes = prometheus.NewDesc( + c.bytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "bytes_total"), "This represents the total number of bytes per second traversing the virtual switch", []string{"vswitch"}, nil, ) - c.BytesReceived = prometheus.NewDesc( + c.bytesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "bytes_received_total"), "This represents the total number of bytes received per second by the virtual switch", []string{"vswitch"}, nil, ) - c.BytesSent = prometheus.NewDesc( + c.bytesSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "bytes_sent_total"), "This represents the total number of bytes sent per second by the virtual switch", []string{"vswitch"}, nil, ) - c.DirectedPacketsReceived = prometheus.NewDesc( + c.directedPacketsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "directed_packets_received_total"), "This represents the total number of directed packets received per second by the virtual switch", []string{"vswitch"}, nil, ) - c.DirectedPacketsSent = prometheus.NewDesc( + c.directedPacketsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "directed_packets_send_total"), "This represents the total number of directed packets sent per second by the virtual switch", []string{"vswitch"}, nil, ) - c.DroppedPacketsIncoming = prometheus.NewDesc( + c.droppedPacketsIncoming = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "dropped_packets_incoming_total"), "This represents the total number of packet dropped per second by the virtual switch in the incoming direction", []string{"vswitch"}, nil, ) - c.DroppedPacketsOutgoing = prometheus.NewDesc( + c.droppedPacketsOutgoing = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "dropped_packets_outcoming_total"), "This represents the total number of packet dropped per second by the virtual switch in the outgoing direction", []string{"vswitch"}, nil, ) - c.ExtensionsDroppedPacketsIncoming = prometheus.NewDesc( + c.extensionsDroppedPacketsIncoming = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "extensions_dropped_packets_incoming_total"), "This represents the total number of packet dropped per second by the virtual switch extensions in the incoming direction", []string{"vswitch"}, nil, ) - c.ExtensionsDroppedPacketsOutgoing = prometheus.NewDesc( + c.extensionsDroppedPacketsOutgoing = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "extensions_dropped_packets_outcoming_total"), "This represents the total number of packet dropped per second by the virtual switch extensions in the outgoing direction", []string{"vswitch"}, nil, ) - c.LearnedMacAddresses = prometheus.NewDesc( + c.learnedMacAddresses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "learned_mac_addresses_total"), "This counter represents the total number of learned MAC addresses of the virtual switch", []string{"vswitch"}, nil, ) - c.MulticastPacketsReceived = prometheus.NewDesc( + c.multicastPacketsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "multicast_packets_received_total"), "This represents the total number of multicast packets received per second by the virtual switch", []string{"vswitch"}, nil, ) - c.MulticastPacketsSent = prometheus.NewDesc( + c.multicastPacketsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "multicast_packets_sent_total"), "This represents the total number of multicast packets sent per second by the virtual switch", []string{"vswitch"}, nil, ) - c.NumberofSendChannelMoves = prometheus.NewDesc( + c.numberOfSendChannelMoves = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "number_of_send_channel_moves_total"), "This represents the total number of send channel moves per second on this virtual switch", []string{"vswitch"}, nil, ) - c.NumberofVMQMoves = prometheus.NewDesc( + c.numberOfVMQMoves = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "number_of_vmq_moves_total"), "This represents the total number of VMQ moves per second on this virtual switch", []string{"vswitch"}, nil, ) - c.PacketsFlooded = prometheus.NewDesc( + c.packetsFlooded = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "packets_flooded_total"), "This counter represents the total number of packets flooded by the virtual switch", []string{"vswitch"}, nil, ) - c.Packets = prometheus.NewDesc( + c.packets = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "packets_total"), "This represents the total number of packets per second traversing the virtual switch", []string{"vswitch"}, nil, ) - c.PacketsReceived = prometheus.NewDesc( + c.packetsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "packets_received_total"), "This represents the total number of packets received per second by the virtual switch", []string{"vswitch"}, nil, ) - c.PacketsSent = prometheus.NewDesc( + c.packetsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "packets_sent_total"), "This represents the total number of packets send per second by the virtual switch", []string{"vswitch"}, nil, ) - c.PurgedMacAddresses = prometheus.NewDesc( + c.purgedMacAddresses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vswitch"), "purged_mac_addresses_total"), "This counter represents the total number of purged MAC addresses of the virtual switch", []string{"vswitch"}, @@ -564,37 +564,37 @@ func (c *Collector) Build() error { // - c.AdapterBytesDropped = prometheus.NewDesc( + c.adapterBytesDropped = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "bytes_dropped"), "Bytes Dropped is the number of bytes dropped on the network adapter", []string{"adapter"}, nil, ) - c.AdapterBytesReceived = prometheus.NewDesc( + c.adapterBytesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "bytes_received"), "Bytes received is the number of bytes received on the network adapter", []string{"adapter"}, nil, ) - c.AdapterBytesSent = prometheus.NewDesc( + c.adapterBytesSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "bytes_sent"), "Bytes sent is the number of bytes sent over the network adapter", []string{"adapter"}, nil, ) - c.AdapterFramesDropped = prometheus.NewDesc( + c.adapterFramesDropped = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "frames_dropped"), "Frames Dropped is the number of frames dropped on the network adapter", []string{"adapter"}, nil, ) - c.AdapterFramesReceived = prometheus.NewDesc( + c.adapterFramesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "frames_received"), "Frames received is the number of frames received on the network adapter", []string{"adapter"}, nil, ) - c.AdapterFramesSent = prometheus.NewDesc( + c.adapterFramesSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("ethernet"), "frames_sent"), "Frames sent is the number of frames sent over the network adapter", []string{"adapter"}, @@ -603,37 +603,37 @@ func (c *Collector) Build() error { // - c.VMStorageErrorCount = prometheus.NewDesc( + c.vmStorageErrorCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "error_count"), "This counter represents the total number of errors that have occurred on this virtual device", []string{"vm_device"}, nil, ) - c.VMStorageQueueLength = prometheus.NewDesc( + c.vmStorageQueueLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "queue_length"), "This counter represents the current queue length on this virtual device", []string{"vm_device"}, nil, ) - c.VMStorageReadBytes = prometheus.NewDesc( + c.vmStorageReadBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "bytes_read"), "This counter represents the total number of bytes that have been read per second on this virtual device", []string{"vm_device"}, nil, ) - c.VMStorageReadOperations = prometheus.NewDesc( + c.vmStorageReadOperations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "operations_read"), "This counter represents the number of read operations that have occurred per second on this virtual device", []string{"vm_device"}, nil, ) - c.VMStorageWriteBytes = prometheus.NewDesc( + c.vmStorageWriteBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "bytes_written"), "This counter represents the total number of bytes that have been written per second on this virtual device", []string{"vm_device"}, nil, ) - c.VMStorageWriteOperations = prometheus.NewDesc( + c.vmStorageWriteOperations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_device"), "operations_written"), "This counter represents the number of write operations that have occurred per second on this virtual device", []string{"vm_device"}, @@ -642,37 +642,37 @@ func (c *Collector) Build() error { // - c.VMNetworkBytesReceived = prometheus.NewDesc( + c.vmStorageBytesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "bytes_received"), "This counter represents the total number of bytes received per second by the network adapter", []string{"vm_interface"}, nil, ) - c.VMNetworkBytesSent = prometheus.NewDesc( + c.vmStorageBytesSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "bytes_sent"), "This counter represents the total number of bytes sent per second by the network adapter", []string{"vm_interface"}, nil, ) - c.VMNetworkDroppedPacketsIncoming = prometheus.NewDesc( + c.vmStorageDroppedPacketsIncoming = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "packets_incoming_dropped"), "This counter represents the total number of dropped packets per second in the incoming direction of the network adapter", []string{"vm_interface"}, nil, ) - c.VMNetworkDroppedPacketsOutgoing = prometheus.NewDesc( + c.vmStorageDroppedPacketsOutgoing = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "packets_outgoing_dropped"), "This counter represents the total number of dropped packets per second in the outgoing direction of the network adapter", []string{"vm_interface"}, nil, ) - c.VMNetworkPacketsReceived = prometheus.NewDesc( + c.vmStoragePacketsReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "packets_received"), "This counter represents the total number of packets received per second by the network adapter", []string{"vm_interface"}, nil, ) - c.VMNetworkPacketsSent = prometheus.NewDesc( + c.vmStoragePacketsSent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_interface"), "packets_sent"), "This counter represents the total number of packets sent per second by the network adapter", []string{"vm_interface"}, @@ -681,61 +681,61 @@ func (c *Collector) Build() error { // - c.VMMemoryAddedMemory = prometheus.NewDesc( + c.vmMemoryAddedMemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "added_total"), "This counter represents memory in MB added to the VM", []string{"vm"}, nil, ) - c.VMMemoryAveragePressure = prometheus.NewDesc( + c.vmMemoryAveragePressure = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "pressure_average"), "This gauge represents the average pressure in the VM.", []string{"vm"}, nil, ) - c.VMMemoryCurrentPressure = prometheus.NewDesc( + c.vmMemoryCurrentPressure = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "pressure_current"), "This gauge represents the current pressure in the VM.", []string{"vm"}, nil, ) - c.VMMemoryGuestVisiblePhysicalMemory = prometheus.NewDesc( + c.vmMemoryGuestVisiblePhysicalMemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "physical_guest_visible"), "'This gauge represents the amount of memory in MB visible to the VM guest.'", []string{"vm"}, nil, ) - c.VMMemoryMaximumPressure = prometheus.NewDesc( + c.vmMemoryMaximumPressure = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "pressure_maximum"), "This gauge represents the maximum pressure band in the VM.", []string{"vm"}, nil, ) - c.VMMemoryMemoryAddOperations = prometheus.NewDesc( + c.vmMemoryMemoryAddOperations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "add_operations_total"), "This counter represents the number of operations adding memory to the VM.", []string{"vm"}, nil, ) - c.VMMemoryMemoryRemoveOperations = prometheus.NewDesc( + c.vmMemoryMemoryRemoveOperations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "remove_operations_total"), "This counter represents the number of operations removing memory from the VM.", []string{"vm"}, nil, ) - c.VMMemoryMinimumPressure = prometheus.NewDesc( + c.vmMemoryMinimumPressure = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "pressure_minimum"), "This gauge represents the minimum pressure band in the VM.", []string{"vm"}, nil, ) - c.VMMemoryPhysicalMemory = prometheus.NewDesc( + c.vmMemoryPhysicalMemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "physical"), "This gauge represents the current amount of memory in MB assigned to the VM.", []string{"vm"}, nil, ) - c.VMMemoryRemovedMemory = prometheus.NewDesc( + c.vmMemoryRemovedMemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, buildSubsystemName("vm_memory"), "removed_total"), "This counter represents memory in MB removed from the VM", []string{"vm"}, @@ -825,13 +825,13 @@ func (c *Collector) collectVmHealth(ch chan<- prometheus.Metric) error { for _, health := range dst { ch <- prometheus.MustNewConstMetric( - c.HealthCritical, + c.healthCritical, prometheus.GaugeValue, float64(health.HealthCritical), ) ch <- prometheus.MustNewConstMetric( - c.HealthOk, + c.healthOk, prometheus.GaugeValue, float64(health.HealthOk), ) @@ -861,21 +861,21 @@ func (c *Collector) collectVmVid(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.PhysicalPagesAllocated, + c.physicalPagesAllocated, prometheus.GaugeValue, float64(page.PhysicalPagesAllocated), page.Name, ) ch <- prometheus.MustNewConstMetric( - c.PreferredNUMANodeIndex, + c.preferredNUMANodeIndex, prometheus.GaugeValue, float64(page.PreferredNUMANodeIndex), page.Name, ) ch <- prometheus.MustNewConstMetric( - c.RemotePhysicalPages, + c.remotePhysicalPages, prometheus.GaugeValue, float64(page.RemotePhysicalPages), page.Name, @@ -924,116 +924,116 @@ func (c *Collector) collectVmHv(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.AddressSpaces, + c.addressSpaces, prometheus.GaugeValue, float64(obj.AddressSpaces), ) ch <- prometheus.MustNewConstMetric( - c.AttachedDevices, + c.attachedDevices, prometheus.GaugeValue, float64(obj.AttachedDevices), ) ch <- prometheus.MustNewConstMetric( - c.DepositedPages, + c.depositedPages, prometheus.GaugeValue, float64(obj.DepositedPages), ) ch <- prometheus.MustNewConstMetric( - c.DeviceDMAErrors, + c.deviceDMAErrors, prometheus.GaugeValue, float64(obj.DeviceDMAErrors), ) ch <- prometheus.MustNewConstMetric( - c.DeviceInterruptErrors, + c.deviceInterruptErrors, prometheus.GaugeValue, float64(obj.DeviceInterruptErrors), ) ch <- prometheus.MustNewConstMetric( - c.DeviceInterruptThrottleEvents, + c.deviceInterruptThrottleEvents, prometheus.GaugeValue, float64(obj.DeviceInterruptThrottleEvents), ) ch <- prometheus.MustNewConstMetric( - c.GPAPages, + c.gpaPages, prometheus.GaugeValue, float64(obj.GPAPages), ) ch <- prometheus.MustNewConstMetric( - c.GPASpaceModifications, + c.gpaSpaceModifications, prometheus.CounterValue, float64(obj.GPASpaceModificationsPersec), ) ch <- prometheus.MustNewConstMetric( - c.IOTLBFlushCost, + c.ioTLBFlushCost, prometheus.GaugeValue, float64(obj.IOTLBFlushCost), ) ch <- prometheus.MustNewConstMetric( - c.IOTLBFlushes, + c.ioTLBFlushes, prometheus.CounterValue, float64(obj.IOTLBFlushesPersec), ) ch <- prometheus.MustNewConstMetric( - c.RecommendedVirtualTLBSize, + c.recommendedVirtualTLBSize, prometheus.GaugeValue, float64(obj.RecommendedVirtualTLBSize), ) ch <- prometheus.MustNewConstMetric( - c.SkippedTimerTicks, + c.skippedTimerTicks, prometheus.GaugeValue, float64(obj.SkippedTimerTicks), ) ch <- prometheus.MustNewConstMetric( - c.Value1Gdevicepages, + c.value1Gdevicepages, prometheus.GaugeValue, float64(obj.Value1Gdevicepages), ) ch <- prometheus.MustNewConstMetric( - c.Value1GGPApages, + c.value1GGPApages, prometheus.GaugeValue, float64(obj.Value1GGPApages), ) ch <- prometheus.MustNewConstMetric( - c.Value2Mdevicepages, + c.value2Mdevicepages, prometheus.GaugeValue, float64(obj.Value2Mdevicepages), ) ch <- prometheus.MustNewConstMetric( - c.Value2MGPApages, + c.value2MGPApages, prometheus.GaugeValue, float64(obj.Value2MGPApages), ) ch <- prometheus.MustNewConstMetric( - c.Value4Kdevicepages, + c.value4Kdevicepages, prometheus.GaugeValue, float64(obj.Value4Kdevicepages), ) ch <- prometheus.MustNewConstMetric( - c.Value4KGPApages, + c.value4KGPApages, prometheus.GaugeValue, float64(obj.Value4KGPApages), ) ch <- prometheus.MustNewConstMetric( - c.VirtualTLBFlushEntires, + c.virtualTLBFlushEntires, prometheus.CounterValue, float64(obj.VirtualTLBFlushEntiresPersec), ) ch <- prometheus.MustNewConstMetric( - c.VirtualTLBPages, + c.virtualTLBPages, prometheus.GaugeValue, float64(obj.VirtualTLBPages), ) @@ -1057,13 +1057,13 @@ func (c *Collector) collectVmProcessor(ch chan<- prometheus.Metric) error { for _, obj := range dst { ch <- prometheus.MustNewConstMetric( - c.LogicalProcessors, + c.logicalProcessors, prometheus.GaugeValue, float64(obj.LogicalProcessors), ) ch <- prometheus.MustNewConstMetric( - c.VirtualProcessors, + c.virtualProcessors, prometheus.GaugeValue, float64(obj.VirtualProcessors), ) @@ -1100,21 +1100,21 @@ func (c *Collector) collectHostLPUsage(ch chan<- prometheus.Metric) error { coreId := parts[2] ch <- prometheus.MustNewConstMetric( - c.HostLPGuestRunTimePercent, + c.hostLPGuestRunTimePercent, prometheus.GaugeValue, float64(obj.PercentGuestRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostLPHypervisorRunTimePercent, + c.hostLPHypervisorRunTimePercent, prometheus.GaugeValue, float64(obj.PercentHypervisorRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostLPTotalRunTimePercent, + c.hostLPTotalRunTimePercent, prometheus.GaugeValue, float64(obj.PercentTotalRunTime), coreId, @@ -1154,35 +1154,35 @@ func (c *Collector) collectHostCpuUsage(ch chan<- prometheus.Metric) error { coreId := parts[2] ch <- prometheus.MustNewConstMetric( - c.HostGuestRunTime, + c.hostGuestRunTime, prometheus.GaugeValue, float64(obj.PercentGuestRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostHypervisorRunTime, + c.hostHypervisorRunTime, prometheus.GaugeValue, float64(obj.PercentHypervisorRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostRemoteRunTime, + c.hostRemoteRunTime, prometheus.GaugeValue, float64(obj.PercentRemoteRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostTotalRunTime, + c.hostTotalRunTime, prometheus.GaugeValue, float64(obj.PercentTotalRunTime), coreId, ) ch <- prometheus.MustNewConstMetric( - c.HostCPUWaitTimePerDispatch, + c.hostCPUWaitTimePerDispatch, prometheus.CounterValue, float64(obj.CPUWaitTimePerDispatch), coreId, @@ -1228,35 +1228,35 @@ func (c *Collector) collectVmCpuUsage(ch chan<- prometheus.Metric) error { coreId := coreParts[2] ch <- prometheus.MustNewConstMetric( - c.VMGuestRunTime, + c.vmGuestRunTime, prometheus.GaugeValue, float64(obj.PercentGuestRunTime), vmName, coreId, ) ch <- prometheus.MustNewConstMetric( - c.VMHypervisorRunTime, + c.vmHypervisorRunTime, prometheus.GaugeValue, float64(obj.PercentHypervisorRunTime), vmName, coreId, ) ch <- prometheus.MustNewConstMetric( - c.VMRemoteRunTime, + c.vmRemoteRunTime, prometheus.GaugeValue, float64(obj.PercentRemoteRunTime), vmName, coreId, ) ch <- prometheus.MustNewConstMetric( - c.VMTotalRunTime, + c.vmTotalRunTime, prometheus.GaugeValue, float64(obj.PercentTotalRunTime), vmName, coreId, ) ch <- prometheus.MustNewConstMetric( - c.VMCPUWaitTimePerDispatch, + c.vmCPUWaitTimePerDispatch, prometheus.CounterValue, float64(obj.CPUWaitTimePerDispatch), vmName, coreId, @@ -1308,104 +1308,104 @@ func (c *Collector) collectVmSwitch(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.BroadcastPacketsReceived, + c.broadcastPacketsReceived, prometheus.CounterValue, float64(obj.BroadcastPacketsReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.BroadcastPacketsSent, + c.broadcastPacketsSent, prometheus.CounterValue, float64(obj.BroadcastPacketsSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.Bytes, + c.bytes, prometheus.CounterValue, float64(obj.BytesPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.BytesReceived, + c.bytesReceived, prometheus.CounterValue, float64(obj.BytesReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.BytesSent, + c.bytesSent, prometheus.CounterValue, float64(obj.BytesSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.DirectedPacketsReceived, + c.directedPacketsReceived, prometheus.CounterValue, float64(obj.DirectedPacketsReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.DirectedPacketsSent, + c.directedPacketsSent, prometheus.CounterValue, float64(obj.DirectedPacketsSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.DroppedPacketsIncoming, + c.droppedPacketsIncoming, prometheus.CounterValue, float64(obj.DroppedPacketsIncomingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.DroppedPacketsOutgoing, + c.droppedPacketsOutgoing, prometheus.CounterValue, float64(obj.DroppedPacketsOutgoingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.ExtensionsDroppedPacketsIncoming, + c.extensionsDroppedPacketsIncoming, prometheus.CounterValue, float64(obj.ExtensionsDroppedPacketsIncomingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.ExtensionsDroppedPacketsOutgoing, + c.extensionsDroppedPacketsOutgoing, prometheus.CounterValue, float64(obj.ExtensionsDroppedPacketsOutgoingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.LearnedMacAddresses, + c.learnedMacAddresses, prometheus.CounterValue, float64(obj.LearnedMacAddresses), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.MulticastPacketsReceived, + c.multicastPacketsReceived, prometheus.CounterValue, float64(obj.MulticastPacketsReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.MulticastPacketsSent, + c.multicastPacketsSent, prometheus.CounterValue, float64(obj.MulticastPacketsSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.NumberofSendChannelMoves, + c.numberOfSendChannelMoves, prometheus.CounterValue, float64(obj.NumberofSendChannelMovesPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.NumberofVMQMoves, + c.numberOfVMQMoves, prometheus.CounterValue, float64(obj.NumberofVMQMovesPersec), obj.Name, @@ -1413,33 +1413,33 @@ func (c *Collector) collectVmSwitch(ch chan<- prometheus.Metric) error { // ... ch <- prometheus.MustNewConstMetric( - c.PacketsFlooded, + c.packetsFlooded, prometheus.CounterValue, float64(obj.PacketsFlooded), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.Packets, + c.packets, prometheus.CounterValue, float64(obj.PacketsPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsReceived, + c.packetsReceived, prometheus.CounterValue, float64(obj.PacketsReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsSent, + c.packetsSent, prometheus.CounterValue, float64(obj.PacketsSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.PurgedMacAddresses, + c.purgedMacAddresses, prometheus.CounterValue, float64(obj.PurgedMacAddresses), obj.Name, @@ -1473,42 +1473,42 @@ func (c *Collector) collectVmEthernet(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.AdapterBytesDropped, + c.adapterBytesDropped, prometheus.GaugeValue, float64(obj.BytesDropped), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdapterBytesReceived, + c.adapterBytesReceived, prometheus.CounterValue, float64(obj.BytesReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdapterBytesSent, + c.adapterBytesSent, prometheus.CounterValue, float64(obj.BytesSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdapterFramesReceived, + c.adapterFramesReceived, prometheus.CounterValue, float64(obj.FramesReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdapterFramesDropped, + c.adapterFramesDropped, prometheus.CounterValue, float64(obj.FramesDropped), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdapterFramesSent, + c.adapterFramesSent, prometheus.CounterValue, float64(obj.FramesSentPersec), obj.Name, @@ -1542,42 +1542,42 @@ func (c *Collector) collectVmStorage(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.VMStorageErrorCount, + c.vmStorageErrorCount, prometheus.CounterValue, float64(obj.ErrorCount), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMStorageQueueLength, + c.vmStorageQueueLength, prometheus.CounterValue, float64(obj.QueueLength), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMStorageReadBytes, + c.vmStorageReadBytes, prometheus.CounterValue, float64(obj.ReadBytesPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMStorageReadOperations, + c.vmStorageReadOperations, prometheus.CounterValue, float64(obj.ReadOperationsPerSec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMStorageWriteBytes, + c.vmStorageWriteBytes, prometheus.CounterValue, float64(obj.WriteBytesPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMStorageWriteOperations, + c.vmStorageWriteOperations, prometheus.CounterValue, float64(obj.WriteOperationsPerSec), obj.Name, @@ -1611,42 +1611,42 @@ func (c *Collector) collectVmNetwork(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.VMNetworkBytesReceived, + c.vmStorageBytesReceived, prometheus.CounterValue, float64(obj.BytesReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMNetworkBytesSent, + c.vmStorageBytesSent, prometheus.CounterValue, float64(obj.BytesSentPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMNetworkDroppedPacketsIncoming, + c.vmStorageDroppedPacketsIncoming, prometheus.CounterValue, float64(obj.DroppedPacketsIncomingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMNetworkDroppedPacketsOutgoing, + c.vmStorageDroppedPacketsOutgoing, prometheus.CounterValue, float64(obj.DroppedPacketsOutgoingPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMNetworkPacketsReceived, + c.vmStoragePacketsReceived, prometheus.CounterValue, float64(obj.PacketsReceivedPersec), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMNetworkPacketsSent, + c.vmStoragePacketsSent, prometheus.CounterValue, float64(obj.PacketsSentPersec), obj.Name, @@ -1684,70 +1684,70 @@ func (c *Collector) collectVmMemory(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.VMMemoryAddedMemory, + c.vmMemoryAddedMemory, prometheus.CounterValue, float64(obj.AddedMemory), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryAveragePressure, + c.vmMemoryAveragePressure, prometheus.GaugeValue, float64(obj.AveragePressure), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryCurrentPressure, + c.vmMemoryCurrentPressure, prometheus.GaugeValue, float64(obj.CurrentPressure), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryGuestVisiblePhysicalMemory, + c.vmMemoryGuestVisiblePhysicalMemory, prometheus.GaugeValue, float64(obj.GuestVisiblePhysicalMemory), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryMaximumPressure, + c.vmMemoryMaximumPressure, prometheus.GaugeValue, float64(obj.MaximumPressure), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryMemoryAddOperations, + c.vmMemoryMemoryAddOperations, prometheus.CounterValue, float64(obj.MemoryAddOperations), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryMemoryRemoveOperations, + c.vmMemoryMemoryRemoveOperations, prometheus.CounterValue, float64(obj.MemoryRemoveOperations), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryMinimumPressure, + c.vmMemoryMinimumPressure, prometheus.GaugeValue, float64(obj.MinimumPressure), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryPhysicalMemory, + c.vmMemoryPhysicalMemory, prometheus.GaugeValue, float64(obj.PhysicalMemory), obj.Name, ) ch <- prometheus.MustNewConstMetric( - c.VMMemoryRemovedMemory, + c.vmMemoryRemovedMemory, prometheus.CounterValue, float64(obj.RemovedMemory), obj.Name, diff --git a/pkg/collector/license/license.go b/pkg/collector/license/license.go index addc21e1..2a1de80a 100644 --- a/pkg/collector/license/license.go +++ b/pkg/collector/license/license.go @@ -29,7 +29,7 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - LicenseStatus *prometheus.Desc + licenseStatus *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -60,7 +60,7 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.LicenseStatus = prometheus.NewDesc( + c.licenseStatus = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "status"), "Status of windows license", []string{"state"}, @@ -92,7 +92,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { val = 1.0 } - ch <- prometheus.MustNewConstMetric(c.LicenseStatus, prometheus.GaugeValue, val, v) + ch <- prometheus.MustNewConstMetric(c.licenseStatus, prometheus.GaugeValue, val, v) } return nil diff --git a/pkg/collector/logical_disk/logical_disk.go b/pkg/collector/logical_disk/logical_disk.go index c370bf95..45920126 100644 --- a/pkg/collector/logical_disk/logical_disk.go +++ b/pkg/collector/logical_disk/logical_disk.go @@ -35,30 +35,29 @@ var ConfigDefaults = Config{ type Collector struct { logger log.Logger - volumeInclude *string - volumeExclude *string - - Information *prometheus.Desc - ReadOnly *prometheus.Desc - RequestsQueued *prometheus.Desc - AvgReadQueue *prometheus.Desc - AvgWriteQueue *prometheus.Desc - ReadBytesTotal *prometheus.Desc - ReadsTotal *prometheus.Desc - WriteBytesTotal *prometheus.Desc - WritesTotal *prometheus.Desc - ReadTime *prometheus.Desc - WriteTime *prometheus.Desc - TotalSpace *prometheus.Desc - FreeSpace *prometheus.Desc - IdleTime *prometheus.Desc - SplitIOs *prometheus.Desc - ReadLatency *prometheus.Desc - WriteLatency *prometheus.Desc - ReadWriteLatency *prometheus.Desc - + volumeInclude *string + volumeExclude *string volumeIncludePattern *regexp.Regexp volumeExcludePattern *regexp.Regexp + + avgReadQueue *prometheus.Desc + avgWriteQueue *prometheus.Desc + freeSpace *prometheus.Desc + idleTime *prometheus.Desc + information *prometheus.Desc + readBytesTotal *prometheus.Desc + readLatency *prometheus.Desc + readOnly *prometheus.Desc + readsTotal *prometheus.Desc + readTime *prometheus.Desc + readWriteLatency *prometheus.Desc + requestsQueued *prometheus.Desc + splitIOs *prometheus.Desc + totalSpace *prometheus.Desc + writeBytesTotal *prometheus.Desc + writeLatency *prometheus.Desc + writesTotal *prometheus.Desc + writeTime *prometheus.Desc } type volumeInfo struct { @@ -115,124 +114,124 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.Information = prometheus.NewDesc( + c.information = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "info"), "A metric with a constant '1' value labeled with logical disk information", []string{"disk", "type", "volume", "volume_name", "filesystem", "serial_number"}, nil, ) - c.ReadOnly = prometheus.NewDesc( + c.readOnly = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "readonly"), "Whether the logical disk is read-only", []string{"volume"}, nil, ) - c.RequestsQueued = prometheus.NewDesc( + c.requestsQueued = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "requests_queued"), "The number of requests queued to the disk (LogicalDisk.CurrentDiskQueueLength)", []string{"volume"}, nil, ) - c.AvgReadQueue = prometheus.NewDesc( + c.avgReadQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "avg_read_requests_queued"), "Average number of read requests that were queued for the selected disk during the sample interval (LogicalDisk.AvgDiskReadQueueLength)", []string{"volume"}, nil, ) - c.AvgWriteQueue = prometheus.NewDesc( + c.avgWriteQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "avg_write_requests_queued"), "Average number of write requests that were queued for the selected disk during the sample interval (LogicalDisk.AvgDiskWriteQueueLength)", []string{"volume"}, nil, ) - c.ReadBytesTotal = prometheus.NewDesc( + c.readBytesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "read_bytes_total"), "The number of bytes transferred from the disk during read operations (LogicalDisk.DiskReadBytesPerSec)", []string{"volume"}, nil, ) - c.ReadsTotal = prometheus.NewDesc( + c.readsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "reads_total"), "The number of read operations on the disk (LogicalDisk.DiskReadsPerSec)", []string{"volume"}, nil, ) - c.WriteBytesTotal = prometheus.NewDesc( + c.writeBytesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "write_bytes_total"), "The number of bytes transferred to the disk during write operations (LogicalDisk.DiskWriteBytesPerSec)", []string{"volume"}, nil, ) - c.WritesTotal = prometheus.NewDesc( + c.writesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "writes_total"), "The number of write operations on the disk (LogicalDisk.DiskWritesPerSec)", []string{"volume"}, nil, ) - c.ReadTime = prometheus.NewDesc( + c.readTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "read_seconds_total"), "Seconds that the disk was busy servicing read requests (LogicalDisk.PercentDiskReadTime)", []string{"volume"}, nil, ) - c.WriteTime = prometheus.NewDesc( + c.writeTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "write_seconds_total"), "Seconds that the disk was busy servicing write requests (LogicalDisk.PercentDiskWriteTime)", []string{"volume"}, nil, ) - c.FreeSpace = prometheus.NewDesc( + c.freeSpace = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "free_bytes"), "Free space in bytes, updates every 10-15 min (LogicalDisk.PercentFreeSpace)", []string{"volume"}, nil, ) - c.TotalSpace = prometheus.NewDesc( + c.totalSpace = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "size_bytes"), "Total space in bytes, updates every 10-15 min (LogicalDisk.PercentFreeSpace_Base)", []string{"volume"}, nil, ) - c.IdleTime = prometheus.NewDesc( + c.idleTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "idle_seconds_total"), "Seconds that the disk was idle (LogicalDisk.PercentIdleTime)", []string{"volume"}, nil, ) - c.SplitIOs = prometheus.NewDesc( + c.splitIOs = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "split_ios_total"), "The number of I/Os to the disk were split into multiple I/Os (LogicalDisk.SplitIOPerSec)", []string{"volume"}, nil, ) - c.ReadLatency = prometheus.NewDesc( + c.readLatency = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "read_latency_seconds_total"), "Shows the average time, in seconds, of a read operation from the disk (LogicalDisk.AvgDiskSecPerRead)", []string{"volume"}, nil, ) - c.WriteLatency = prometheus.NewDesc( + c.writeLatency = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "write_latency_seconds_total"), "Shows the average time, in seconds, of a write operation to the disk (LogicalDisk.AvgDiskSecPerWrite)", []string{"volume"}, nil, ) - c.ReadWriteLatency = prometheus.NewDesc( + c.readWriteLatency = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "read_write_latency_seconds_total"), "Shows the time, in seconds, of the average disk transfer (LogicalDisk.AvgDiskSecPerTransfer)", []string{"volume"}, @@ -316,7 +315,7 @@ func (c *Collector) collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri } ch <- prometheus.MustNewConstMetric( - c.Information, + c.information, prometheus.GaugeValue, 1, diskID, @@ -328,112 +327,112 @@ func (c *Collector) collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri ) ch <- prometheus.MustNewConstMetric( - c.RequestsQueued, + c.requestsQueued, prometheus.GaugeValue, volume.CurrentDiskQueueLength, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.AvgReadQueue, + c.avgReadQueue, prometheus.GaugeValue, volume.AvgDiskReadQueueLength*perflib.TicksToSecondScaleFactor, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.AvgWriteQueue, + c.avgWriteQueue, prometheus.GaugeValue, volume.AvgDiskWriteQueueLength*perflib.TicksToSecondScaleFactor, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.ReadBytesTotal, + c.readBytesTotal, prometheus.CounterValue, volume.DiskReadBytesPerSec, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.ReadsTotal, + c.readsTotal, prometheus.CounterValue, volume.DiskReadsPerSec, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.WriteBytesTotal, + c.writeBytesTotal, prometheus.CounterValue, volume.DiskWriteBytesPerSec, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.WritesTotal, + c.writesTotal, prometheus.CounterValue, volume.DiskWritesPerSec, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.ReadTime, + c.readTime, prometheus.CounterValue, volume.PercentDiskReadTime, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.WriteTime, + c.writeTime, prometheus.CounterValue, volume.PercentDiskWriteTime, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.FreeSpace, + c.freeSpace, prometheus.GaugeValue, volume.PercentFreeSpace_Base*1024*1024, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.TotalSpace, + c.totalSpace, prometheus.GaugeValue, volume.PercentFreeSpace*1024*1024, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.IdleTime, + c.idleTime, prometheus.CounterValue, volume.PercentIdleTime, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.SplitIOs, + c.splitIOs, prometheus.CounterValue, volume.SplitIOPerSec, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.ReadLatency, + c.readLatency, prometheus.CounterValue, volume.AvgDiskSecPerRead*perflib.TicksToSecondScaleFactor, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.WriteLatency, + c.writeLatency, prometheus.CounterValue, volume.AvgDiskSecPerWrite*perflib.TicksToSecondScaleFactor, volume.Name, ) ch <- prometheus.MustNewConstMetric( - c.ReadWriteLatency, + c.readWriteLatency, prometheus.CounterValue, volume.AvgDiskSecPerTransfer*perflib.TicksToSecondScaleFactor, volume.Name, diff --git a/pkg/collector/logon/logon.go b/pkg/collector/logon/logon.go index 7a840880..ce71e24f 100644 --- a/pkg/collector/logon/logon.go +++ b/pkg/collector/logon/logon.go @@ -23,7 +23,7 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - LogonType *prometheus.Desc + logonType *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -54,7 +54,7 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.LogonType = prometheus.NewDesc( + c.logonType = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "logon_type"), "Number of active logon sessions (LogonSession.LogonType)", []string{"status"}, @@ -136,91 +136,91 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { } ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(system), "system", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(interactive), "interactive", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(network), "network", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(batch), "batch", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(service), "service", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(proxy), "proxy", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(unlock), "unlock", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(networkcleartext), "network_clear_text", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(newcredentials), "new_credentials", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(remoteinteractive), "remote_interactive", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(cachedinteractive), "cached_interactive", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(remoteinteractive), "cached_remote_interactive", ) ch <- prometheus.MustNewConstMetric( - c.LogonType, + c.logonType, prometheus.GaugeValue, float64(cachedunlock), "cached_unlock", diff --git a/pkg/collector/memory/memory.go b/pkg/collector/memory/memory.go index 0987e506..4b2f6252 100644 --- a/pkg/collector/memory/memory.go +++ b/pkg/collector/memory/memory.go @@ -24,38 +24,38 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - AvailableBytes *prometheus.Desc - CacheBytes *prometheus.Desc - CacheBytesPeak *prometheus.Desc - CacheFaultsTotal *prometheus.Desc - CommitLimit *prometheus.Desc - CommittedBytes *prometheus.Desc - DemandZeroFaultsTotal *prometheus.Desc - FreeAndZeroPageListBytes *prometheus.Desc - FreeSystemPageTableEntries *prometheus.Desc - ModifiedPageListBytes *prometheus.Desc - PageFaultsTotal *prometheus.Desc - SwapPageReadsTotal *prometheus.Desc - SwapPagesReadTotal *prometheus.Desc - SwapPagesWrittenTotal *prometheus.Desc - SwapPageOperationsTotal *prometheus.Desc - SwapPageWritesTotal *prometheus.Desc - PoolNonpagedAllocsTotal *prometheus.Desc - PoolNonpagedBytes *prometheus.Desc - PoolPagedAllocsTotal *prometheus.Desc - PoolPagedBytes *prometheus.Desc - PoolPagedResidentBytes *prometheus.Desc - StandbyCacheCoreBytes *prometheus.Desc - StandbyCacheNormalPriorityBytes *prometheus.Desc - StandbyCacheReserveBytes *prometheus.Desc - SystemCacheResidentBytes *prometheus.Desc - SystemCodeResidentBytes *prometheus.Desc - SystemCodeTotalBytes *prometheus.Desc - SystemDriverResidentBytes *prometheus.Desc - SystemDriverTotalBytes *prometheus.Desc - TransitionFaultsTotal *prometheus.Desc - TransitionPagesRepurposedTotal *prometheus.Desc - WriteCopiesTotal *prometheus.Desc + availableBytes *prometheus.Desc + cacheBytes *prometheus.Desc + cacheBytesPeak *prometheus.Desc + cacheFaultsTotal *prometheus.Desc + commitLimit *prometheus.Desc + committedBytes *prometheus.Desc + demandZeroFaultsTotal *prometheus.Desc + freeAndZeroPageListBytes *prometheus.Desc + freeSystemPageTableEntries *prometheus.Desc + modifiedPageListBytes *prometheus.Desc + pageFaultsTotal *prometheus.Desc + swapPageReadsTotal *prometheus.Desc + swapPagesReadTotal *prometheus.Desc + swapPagesWrittenTotal *prometheus.Desc + swapPageOperationsTotal *prometheus.Desc + swapPageWritesTotal *prometheus.Desc + poolNonPagedAllocationsTotal *prometheus.Desc + poolNonPagedBytes *prometheus.Desc + poolPagedAllocationsTotal *prometheus.Desc + poolPagedBytes *prometheus.Desc + poolPagedResidentBytes *prometheus.Desc + standbyCacheCoreBytes *prometheus.Desc + standbyCacheNormalPriorityBytes *prometheus.Desc + standbyCacheReserveBytes *prometheus.Desc + systemCacheResidentBytes *prometheus.Desc + systemCodeResidentBytes *prometheus.Desc + systemCodeTotalBytes *prometheus.Desc + systemDriverResidentBytes *prometheus.Desc + systemDriverTotalBytes *prometheus.Desc + transitionFaultsTotal *prometheus.Desc + transitionPagesRepurposedTotal *prometheus.Desc + writeCopiesTotal *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -86,205 +86,205 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.AvailableBytes = prometheus.NewDesc( + c.availableBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "available_bytes"), "The amount of physical memory immediately available for allocation to a process or for system use. It is equal to the sum of memory assigned to"+ " the standby (cached), free and zero page lists (AvailableBytes)", nil, nil, ) - c.CacheBytes = prometheus.NewDesc( + c.cacheBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cache_bytes"), "(CacheBytes)", nil, nil, ) - c.CacheBytesPeak = prometheus.NewDesc( + c.cacheBytesPeak = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cache_bytes_peak"), "(CacheBytesPeak)", nil, nil, ) - c.CacheFaultsTotal = prometheus.NewDesc( + c.cacheFaultsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cache_faults_total"), "Number of faults which occur when a page sought in the file system cache is not found there and must be retrieved from elsewhere in memory (soft fault) "+ "or from disk (hard fault) (Cache Faults/sec)", nil, nil, ) - c.CommitLimit = prometheus.NewDesc( + c.commitLimit = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "commit_limit"), "(CommitLimit)", nil, nil, ) - c.CommittedBytes = prometheus.NewDesc( + c.committedBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "committed_bytes"), "(CommittedBytes)", nil, nil, ) - c.DemandZeroFaultsTotal = prometheus.NewDesc( + c.demandZeroFaultsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "demand_zero_faults_total"), "The number of zeroed pages required to satisfy faults. Zeroed pages, pages emptied of previously stored data and filled with zeros, are a security"+ " feature of Windows that prevent processes from seeing data stored by earlier processes that used the memory space (Demand Zero Faults/sec)", nil, nil, ) - c.FreeAndZeroPageListBytes = prometheus.NewDesc( + c.freeAndZeroPageListBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "free_and_zero_page_list_bytes"), "The amount of physical memory, in bytes, that is assigned to the free and zero page lists. This memory does not contain cached data. It is immediately"+ " available for allocation to a process or for system use (FreeAndZeroPageListBytes)", nil, nil, ) - c.FreeSystemPageTableEntries = prometheus.NewDesc( + c.freeSystemPageTableEntries = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "free_system_page_table_entries"), "(FreeSystemPageTableEntries)", nil, nil, ) - c.ModifiedPageListBytes = prometheus.NewDesc( + c.modifiedPageListBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "modified_page_list_bytes"), "The amount of physical memory, in bytes, that is assigned to the modified page list. This memory contains cached data and code that is not actively in "+ "use by processes, the system and the system cache (ModifiedPageListBytes)", nil, nil, ) - c.PageFaultsTotal = prometheus.NewDesc( + c.pageFaultsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "page_faults_total"), "Overall rate at which faulted pages are handled by the processor (Page Faults/sec)", nil, nil, ) - c.SwapPageReadsTotal = prometheus.NewDesc( + c.swapPageReadsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "swap_page_reads_total"), "Number of disk page reads (a single read operation reading several pages is still only counted once) (PageReadsPersec)", nil, nil, ) - c.SwapPagesReadTotal = prometheus.NewDesc( + c.swapPagesReadTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "swap_pages_read_total"), "Number of pages read across all page reads (ie counting all pages read even if they are read in a single operation) (PagesInputPersec)", nil, nil, ) - c.SwapPagesWrittenTotal = prometheus.NewDesc( + c.swapPagesWrittenTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "swap_pages_written_total"), "Number of pages written across all page writes (ie counting all pages written even if they are written in a single operation) (PagesOutputPersec)", nil, nil, ) - c.SwapPageOperationsTotal = prometheus.NewDesc( + c.swapPageOperationsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "swap_page_operations_total"), "Total number of swap page read and writes (PagesPersec)", nil, nil, ) - c.SwapPageWritesTotal = prometheus.NewDesc( + c.swapPageWritesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "swap_page_writes_total"), "Number of disk page writes (a single write operation writing several pages is still only counted once) (PageWritesPersec)", nil, nil, ) - c.PoolNonpagedAllocsTotal = prometheus.NewDesc( + c.poolNonPagedAllocationsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pool_nonpaged_allocs_total"), "The number of calls to allocate space in the nonpaged pool. The nonpaged pool is an area of system memory area for objects that cannot be written"+ " to disk, and must remain in physical memory as long as they are allocated (PoolNonpagedAllocs)", nil, nil, ) - c.PoolNonpagedBytes = prometheus.NewDesc( + c.poolNonPagedBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pool_nonpaged_bytes"), "Number of bytes in the non-paged pool, an area of the system virtual memory that is used for objects that cannot be written to disk, but must "+ "remain in physical memory as long as they are allocated (PoolNonpagedBytes)", nil, nil, ) - c.PoolPagedAllocsTotal = prometheus.NewDesc( + c.poolPagedAllocationsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pool_paged_allocs_total"), "Number of calls to allocate space in the paged pool, regardless of the amount of space allocated in each call (PoolPagedAllocs)", nil, nil, ) - c.PoolPagedBytes = prometheus.NewDesc( + c.poolPagedBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pool_paged_bytes"), "(PoolPagedBytes)", nil, nil, ) - c.PoolPagedResidentBytes = prometheus.NewDesc( + c.poolPagedResidentBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pool_paged_resident_bytes"), "The size, in bytes, of the portion of the paged pool that is currently resident and active in physical memory. The paged pool is an area of the "+ "system virtual memory that is used for objects that can be written to disk when they are not being used (PoolPagedResidentBytes)", nil, nil, ) - c.StandbyCacheCoreBytes = prometheus.NewDesc( + c.standbyCacheCoreBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "standby_cache_core_bytes"), "The amount of physical memory, in bytes, that is assigned to the core standby cache page lists. This memory contains cached data and code that is "+ "not actively in use by processes, the system and the system cache (StandbyCacheCoreBytes)", nil, nil, ) - c.StandbyCacheNormalPriorityBytes = prometheus.NewDesc( + c.standbyCacheNormalPriorityBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "standby_cache_normal_priority_bytes"), "The amount of physical memory, in bytes, that is assigned to the normal priority standby cache page lists. This memory contains cached data and "+ "code that is not actively in use by processes, the system and the system cache (StandbyCacheNormalPriorityBytes)", nil, nil, ) - c.StandbyCacheReserveBytes = prometheus.NewDesc( + c.standbyCacheReserveBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "standby_cache_reserve_bytes"), "The amount of physical memory, in bytes, that is assigned to the reserve standby cache page lists. This memory contains cached data and code "+ "that is not actively in use by processes, the system and the system cache (StandbyCacheReserveBytes)", nil, nil, ) - c.SystemCacheResidentBytes = prometheus.NewDesc( + c.systemCacheResidentBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "system_cache_resident_bytes"), "The size, in bytes, of the portion of the system file cache which is currently resident and active in physical memory (SystemCacheResidentBytes)", nil, nil, ) - c.SystemCodeResidentBytes = prometheus.NewDesc( + c.systemCodeResidentBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "system_code_resident_bytes"), "The size, in bytes, of the pageable operating system code that is currently resident and active in physical memory (SystemCodeResidentBytes)", nil, nil, ) - c.SystemCodeTotalBytes = prometheus.NewDesc( + c.systemCodeTotalBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "system_code_total_bytes"), "The size, in bytes, of the pageable operating system code currently mapped into the system virtual address space (SystemCodeTotalBytes)", nil, nil, ) - c.SystemDriverResidentBytes = prometheus.NewDesc( + c.systemDriverResidentBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "system_driver_resident_bytes"), "The size, in bytes, of the pageable physical memory being used by device drivers. It is the working set (physical memory area) of the drivers (SystemDriverResidentBytes)", nil, nil, ) - c.SystemDriverTotalBytes = prometheus.NewDesc( + c.systemDriverTotalBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "system_driver_total_bytes"), "The size, in bytes, of the pageable virtual memory currently being used by device drivers. Pageable memory can be written to disk when it is not being used (SystemDriverTotalBytes)", nil, nil, ) - c.TransitionFaultsTotal = prometheus.NewDesc( + c.transitionFaultsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transition_faults_total"), "Number of faults rate at which page faults are resolved by recovering pages that were being used by another process sharing the page, or were on the "+ "modified page list or the standby list, or were being written to disk at the time of the page fault (TransitionFaultsPersec)", nil, nil, ) - c.TransitionPagesRepurposedTotal = prometheus.NewDesc( + c.transitionPagesRepurposedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transition_pages_repurposed_total"), "Transition Pages RePurposed is the rate at which the number of transition cache pages were reused for a different purpose (TransitionPagesRePurposedPersec)", nil, nil, ) - c.WriteCopiesTotal = prometheus.NewDesc( + c.writeCopiesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "write_copies_total"), "The number of page faults caused by attempting to write that were satisfied by copying the page from elsewhere in physical memory (WriteCopiesPersec)", nil, @@ -347,193 +347,193 @@ func (c *Collector) collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri } ch <- prometheus.MustNewConstMetric( - c.AvailableBytes, + c.availableBytes, prometheus.GaugeValue, dst[0].AvailableBytes, ) ch <- prometheus.MustNewConstMetric( - c.CacheBytes, + c.cacheBytes, prometheus.GaugeValue, dst[0].CacheBytes, ) ch <- prometheus.MustNewConstMetric( - c.CacheBytesPeak, + c.cacheBytesPeak, prometheus.GaugeValue, dst[0].CacheBytesPeak, ) ch <- prometheus.MustNewConstMetric( - c.CacheFaultsTotal, + c.cacheFaultsTotal, prometheus.CounterValue, dst[0].CacheFaultsPersec, ) ch <- prometheus.MustNewConstMetric( - c.CommitLimit, + c.commitLimit, prometheus.GaugeValue, dst[0].CommitLimit, ) ch <- prometheus.MustNewConstMetric( - c.CommittedBytes, + c.committedBytes, prometheus.GaugeValue, dst[0].CommittedBytes, ) ch <- prometheus.MustNewConstMetric( - c.DemandZeroFaultsTotal, + c.demandZeroFaultsTotal, prometheus.CounterValue, dst[0].DemandZeroFaultsPersec, ) ch <- prometheus.MustNewConstMetric( - c.FreeAndZeroPageListBytes, + c.freeAndZeroPageListBytes, prometheus.GaugeValue, dst[0].FreeAndZeroPageListBytes, ) ch <- prometheus.MustNewConstMetric( - c.FreeSystemPageTableEntries, + c.freeSystemPageTableEntries, prometheus.GaugeValue, dst[0].FreeSystemPageTableEntries, ) ch <- prometheus.MustNewConstMetric( - c.ModifiedPageListBytes, + c.modifiedPageListBytes, prometheus.GaugeValue, dst[0].ModifiedPageListBytes, ) ch <- prometheus.MustNewConstMetric( - c.PageFaultsTotal, + c.pageFaultsTotal, prometheus.CounterValue, dst[0].PageFaultsPersec, ) ch <- prometheus.MustNewConstMetric( - c.SwapPageReadsTotal, + c.swapPageReadsTotal, prometheus.CounterValue, dst[0].PageReadsPersec, ) ch <- prometheus.MustNewConstMetric( - c.SwapPagesReadTotal, + c.swapPagesReadTotal, prometheus.CounterValue, dst[0].PagesInputPersec, ) ch <- prometheus.MustNewConstMetric( - c.SwapPagesWrittenTotal, + c.swapPagesWrittenTotal, prometheus.CounterValue, dst[0].PagesOutputPersec, ) ch <- prometheus.MustNewConstMetric( - c.SwapPageOperationsTotal, + c.swapPageOperationsTotal, prometheus.CounterValue, dst[0].PagesPersec, ) ch <- prometheus.MustNewConstMetric( - c.SwapPageWritesTotal, + c.swapPageWritesTotal, prometheus.CounterValue, dst[0].PageWritesPersec, ) ch <- prometheus.MustNewConstMetric( - c.PoolNonpagedAllocsTotal, + c.poolNonPagedAllocationsTotal, prometheus.GaugeValue, dst[0].PoolNonpagedAllocs, ) ch <- prometheus.MustNewConstMetric( - c.PoolNonpagedBytes, + c.poolNonPagedBytes, prometheus.GaugeValue, dst[0].PoolNonpagedBytes, ) ch <- prometheus.MustNewConstMetric( - c.PoolPagedAllocsTotal, + c.poolPagedAllocationsTotal, prometheus.CounterValue, dst[0].PoolPagedAllocs, ) ch <- prometheus.MustNewConstMetric( - c.PoolPagedBytes, + c.poolPagedBytes, prometheus.GaugeValue, dst[0].PoolPagedBytes, ) ch <- prometheus.MustNewConstMetric( - c.PoolPagedResidentBytes, + c.poolPagedResidentBytes, prometheus.GaugeValue, dst[0].PoolPagedResidentBytes, ) ch <- prometheus.MustNewConstMetric( - c.StandbyCacheCoreBytes, + c.standbyCacheCoreBytes, prometheus.GaugeValue, dst[0].StandbyCacheCoreBytes, ) ch <- prometheus.MustNewConstMetric( - c.StandbyCacheNormalPriorityBytes, + c.standbyCacheNormalPriorityBytes, prometheus.GaugeValue, dst[0].StandbyCacheNormalPriorityBytes, ) ch <- prometheus.MustNewConstMetric( - c.StandbyCacheReserveBytes, + c.standbyCacheReserveBytes, prometheus.GaugeValue, dst[0].StandbyCacheReserveBytes, ) ch <- prometheus.MustNewConstMetric( - c.SystemCacheResidentBytes, + c.systemCacheResidentBytes, prometheus.GaugeValue, dst[0].SystemCacheResidentBytes, ) ch <- prometheus.MustNewConstMetric( - c.SystemCodeResidentBytes, + c.systemCodeResidentBytes, prometheus.GaugeValue, dst[0].SystemCodeResidentBytes, ) ch <- prometheus.MustNewConstMetric( - c.SystemCodeTotalBytes, + c.systemCodeTotalBytes, prometheus.GaugeValue, dst[0].SystemCodeTotalBytes, ) ch <- prometheus.MustNewConstMetric( - c.SystemDriverResidentBytes, + c.systemDriverResidentBytes, prometheus.GaugeValue, dst[0].SystemDriverResidentBytes, ) ch <- prometheus.MustNewConstMetric( - c.SystemDriverTotalBytes, + c.systemDriverTotalBytes, prometheus.GaugeValue, dst[0].SystemDriverTotalBytes, ) ch <- prometheus.MustNewConstMetric( - c.TransitionFaultsTotal, + c.transitionFaultsTotal, prometheus.CounterValue, dst[0].TransitionFaultsPersec, ) ch <- prometheus.MustNewConstMetric( - c.TransitionPagesRepurposedTotal, + c.transitionPagesRepurposedTotal, prometheus.CounterValue, dst[0].TransitionPagesRePurposedPersec, ) ch <- prometheus.MustNewConstMetric( - c.WriteCopiesTotal, + c.writeCopiesTotal, prometheus.CounterValue, dst[0].WriteCopiesPersec, ) diff --git a/pkg/collector/mscluster_cluster/mscluster_cluster.go b/pkg/collector/mscluster_cluster/mscluster_cluster.go index 34a258a7..9d4df50d 100644 --- a/pkg/collector/mscluster_cluster/mscluster_cluster.go +++ b/pkg/collector/mscluster_cluster/mscluster_cluster.go @@ -18,83 +18,83 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - AddEvictDelay *prometheus.Desc - AdminAccessPoint *prometheus.Desc - AutoAssignNodeSite *prometheus.Desc - AutoBalancerLevel *prometheus.Desc - AutoBalancerMode *prometheus.Desc - BackupInProgress *prometheus.Desc - BlockCacheSize *prometheus.Desc - ClusSvcHangTimeout *prometheus.Desc - ClusSvcRegroupOpeningTimeout *prometheus.Desc - ClusSvcRegroupPruningTimeout *prometheus.Desc - ClusSvcRegroupStageTimeout *prometheus.Desc - ClusSvcRegroupTickInMilliseconds *prometheus.Desc - ClusterEnforcedAntiAffinity *prometheus.Desc - ClusterFunctionalLevel *prometheus.Desc - ClusterGroupWaitDelay *prometheus.Desc - ClusterLogLevel *prometheus.Desc - ClusterLogSize *prometheus.Desc - ClusterUpgradeVersion *prometheus.Desc - CrossSiteDelay *prometheus.Desc - CrossSiteThreshold *prometheus.Desc - CrossSubnetDelay *prometheus.Desc - CrossSubnetThreshold *prometheus.Desc - CsvBalancer *prometheus.Desc - DatabaseReadWriteMode *prometheus.Desc - DefaultNetworkRole *prometheus.Desc - DetectedCloudPlatform *prometheus.Desc - DetectManagedEvents *prometheus.Desc - DetectManagedEventsThreshold *prometheus.Desc - DisableGroupPreferredOwnerRandomization *prometheus.Desc - DrainOnShutdown *prometheus.Desc - DynamicQuorumEnabled *prometheus.Desc - EnableSharedVolumes *prometheus.Desc - FixQuorum *prometheus.Desc - GracePeriodEnabled *prometheus.Desc - GracePeriodTimeout *prometheus.Desc - GroupDependencyTimeout *prometheus.Desc - HangRecoveryAction *prometheus.Desc - IgnorePersistentStateOnStartup *prometheus.Desc - LogResourceControls *prometheus.Desc - LowerQuorumPriorityNodeId *prometheus.Desc - MaxNumberOfNodes *prometheus.Desc - MessageBufferLength *prometheus.Desc - MinimumNeverPreemptPriority *prometheus.Desc - MinimumPreemptorPriority *prometheus.Desc - NetftIPSecEnabled *prometheus.Desc - PlacementOptions *prometheus.Desc - PlumbAllCrossSubnetRoutes *prometheus.Desc - PreventQuorum *prometheus.Desc - QuarantineDuration *prometheus.Desc - QuarantineThreshold *prometheus.Desc - QuorumArbitrationTimeMax *prometheus.Desc - QuorumArbitrationTimeMin *prometheus.Desc - QuorumLogFileSize *prometheus.Desc - QuorumTypeValue *prometheus.Desc - RequestReplyTimeout *prometheus.Desc - ResiliencyDefaultPeriod *prometheus.Desc - ResiliencyLevel *prometheus.Desc - ResourceDllDeadlockPeriod *prometheus.Desc - RootMemoryReserved *prometheus.Desc - RouteHistoryLength *prometheus.Desc - S2DBusTypes *prometheus.Desc - S2DCacheDesiredState *prometheus.Desc - S2DCacheFlashReservePercent *prometheus.Desc - S2DCachePageSizeKBytes *prometheus.Desc - S2DEnabled *prometheus.Desc - S2DIOLatencyThreshold *prometheus.Desc - S2DOptimizations *prometheus.Desc - SameSubnetDelay *prometheus.Desc - SameSubnetThreshold *prometheus.Desc - SecurityLevel *prometheus.Desc - SecurityLevelForStorage *prometheus.Desc - SharedVolumeVssWriterOperationTimeout *prometheus.Desc - ShutdownTimeoutInMinutes *prometheus.Desc - UseClientAccessNetworksForSharedVolumes *prometheus.Desc - WitnessDatabaseWriteTimeout *prometheus.Desc - WitnessDynamicWeight *prometheus.Desc - WitnessRestartInterval *prometheus.Desc + addEvictDelay *prometheus.Desc + adminAccessPoint *prometheus.Desc + autoAssignNodeSite *prometheus.Desc + autoBalancerLevel *prometheus.Desc + autoBalancerMode *prometheus.Desc + backupInProgress *prometheus.Desc + blockCacheSize *prometheus.Desc + clusSvcHangTimeout *prometheus.Desc + clusSvcRegroupOpeningTimeout *prometheus.Desc + clusSvcRegroupPruningTimeout *prometheus.Desc + clusSvcRegroupStageTimeout *prometheus.Desc + clusSvcRegroupTickInMilliseconds *prometheus.Desc + clusterEnforcedAntiAffinity *prometheus.Desc + clusterFunctionalLevel *prometheus.Desc + clusterGroupWaitDelay *prometheus.Desc + clusterLogLevel *prometheus.Desc + clusterLogSize *prometheus.Desc + clusterUpgradeVersion *prometheus.Desc + crossSiteDelay *prometheus.Desc + crossSiteThreshold *prometheus.Desc + crossSubnetDelay *prometheus.Desc + crossSubnetThreshold *prometheus.Desc + csvBalancer *prometheus.Desc + databaseReadWriteMode *prometheus.Desc + defaultNetworkRole *prometheus.Desc + detectedCloudPlatform *prometheus.Desc + detectManagedEvents *prometheus.Desc + detectManagedEventsThreshold *prometheus.Desc + disableGroupPreferredOwnerRandomization *prometheus.Desc + drainOnShutdown *prometheus.Desc + dynamicQuorumEnabled *prometheus.Desc + enableSharedVolumes *prometheus.Desc + fixQuorum *prometheus.Desc + gracePeriodEnabled *prometheus.Desc + gracePeriodTimeout *prometheus.Desc + groupDependencyTimeout *prometheus.Desc + hangRecoveryAction *prometheus.Desc + ignorePersistentStateOnStartup *prometheus.Desc + logResourceControls *prometheus.Desc + lowerQuorumPriorityNodeId *prometheus.Desc + maxNumberOfNodes *prometheus.Desc + messageBufferLength *prometheus.Desc + minimumNeverPreemptPriority *prometheus.Desc + minimumPreemptorPriority *prometheus.Desc + netftIPSecEnabled *prometheus.Desc + placementOptions *prometheus.Desc + plumbAllCrossSubnetRoutes *prometheus.Desc + preventQuorum *prometheus.Desc + quarantineDuration *prometheus.Desc + quarantineThreshold *prometheus.Desc + quorumArbitrationTimeMax *prometheus.Desc + quorumArbitrationTimeMin *prometheus.Desc + quorumLogFileSize *prometheus.Desc + quorumTypeValue *prometheus.Desc + requestReplyTimeout *prometheus.Desc + resiliencyDefaultPeriod *prometheus.Desc + resiliencyLevel *prometheus.Desc + resourceDllDeadlockPeriod *prometheus.Desc + rootMemoryReserved *prometheus.Desc + routeHistoryLength *prometheus.Desc + s2DBusTypes *prometheus.Desc + s2DCacheDesiredState *prometheus.Desc + s2DCacheFlashReservePercent *prometheus.Desc + s2DCachePageSizeKBytes *prometheus.Desc + s2DEnabled *prometheus.Desc + s2DIOLatencyThreshold *prometheus.Desc + s2DOptimizations *prometheus.Desc + sameSubnetDelay *prometheus.Desc + sameSubnetThreshold *prometheus.Desc + securityLevel *prometheus.Desc + securityLevelForStorage *prometheus.Desc + sharedVolumeVssWriterOperationTimeout *prometheus.Desc + shutdownTimeoutInMinutes *prometheus.Desc + useClientAccessNetworksForSharedVolumes *prometheus.Desc + witnessDatabaseWriteTimeout *prometheus.Desc + witnessDynamicWeight *prometheus.Desc + witnessRestartInterval *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -125,463 +125,463 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.AddEvictDelay = prometheus.NewDesc( + c.addEvictDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "add_evict_delay"), "Provides access to the cluster's AddEvictDelay property, which is the number a seconds that a new node is delayed after an eviction of another node.", []string{"name"}, nil, ) - c.AdminAccessPoint = prometheus.NewDesc( + c.adminAccessPoint = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "admin_access_point"), "The type of the cluster administrative access point.", []string{"name"}, nil, ) - c.AutoAssignNodeSite = prometheus.NewDesc( + c.autoAssignNodeSite = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "auto_assign_node_site"), "Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information.", []string{"name"}, nil, ) - c.AutoBalancerLevel = prometheus.NewDesc( + c.autoBalancerLevel = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "auto_balancer_level"), "Determines the level of aggressiveness of AutoBalancer.", []string{"name"}, nil, ) - c.AutoBalancerMode = prometheus.NewDesc( + c.autoBalancerMode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "auto_balancer_mode"), "Determines whether or not the auto balancer is enabled.", []string{"name"}, nil, ) - c.BackupInProgress = prometheus.NewDesc( + c.backupInProgress = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "backup_in_progress"), "Indicates whether a backup is in progress.", []string{"name"}, nil, ) - c.BlockCacheSize = prometheus.NewDesc( + c.blockCacheSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "block_cache_size"), "CSV BlockCache Size in MB.", []string{"name"}, nil, ) - c.ClusSvcHangTimeout = prometheus.NewDesc( + c.clusSvcHangTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "clus_svc_hang_timeout"), "Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding.", []string{"name"}, nil, ) - c.ClusSvcRegroupOpeningTimeout = prometheus.NewDesc( + c.clusSvcRegroupOpeningTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "clus_svc_regroup_opening_timeout"), "Controls how long a node will wait on other nodes in the opening stage before deciding that they failed.", []string{"name"}, nil, ) - c.ClusSvcRegroupPruningTimeout = prometheus.NewDesc( + c.clusSvcRegroupPruningTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "clus_svc_regroup_pruning_timeout"), "Controls how long the membership leader will wait to reach full connectivity between cluster nodes.", []string{"name"}, nil, ) - c.ClusSvcRegroupStageTimeout = prometheus.NewDesc( + c.clusSvcRegroupStageTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "clus_svc_regroup_stage_timeout"), "Controls how long a node will wait on other nodes in a membership stage before deciding that they failed.", []string{"name"}, nil, ) - c.ClusSvcRegroupTickInMilliseconds = prometheus.NewDesc( + c.clusSvcRegroupTickInMilliseconds = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "clus_svc_regroup_tick_in_milliseconds"), "Controls how frequently the membership algorithm is sending periodic membership messages.", []string{"name"}, nil, ) - c.ClusterEnforcedAntiAffinity = prometheus.NewDesc( + c.clusterEnforcedAntiAffinity = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_enforced_anti_affinity"), "Enables or disables hard enforcement of group anti-affinity classes.", []string{"name"}, nil, ) - c.ClusterFunctionalLevel = prometheus.NewDesc( + c.clusterFunctionalLevel = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_functional_level"), "The functional level the cluster is currently running in.", []string{"name"}, nil, ) - c.ClusterGroupWaitDelay = prometheus.NewDesc( + c.clusterGroupWaitDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_group_wait_delay"), "Maximum time in seconds that a group waits for its preferred node to come online during cluster startup before coming online on a different node.", []string{"name"}, nil, ) - c.ClusterLogLevel = prometheus.NewDesc( + c.clusterLogLevel = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_log_level"), "Controls the level of cluster logging.", []string{"name"}, nil, ) - c.ClusterLogSize = prometheus.NewDesc( + c.clusterLogSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_log_size"), "Controls the maximum size of the cluster log files on each of the nodes.", []string{"name"}, nil, ) - c.ClusterUpgradeVersion = prometheus.NewDesc( + c.clusterUpgradeVersion = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cluster_upgrade_version"), "Specifies the upgrade version the cluster is currently running in.", []string{"name"}, nil, ) - c.CrossSiteDelay = prometheus.NewDesc( + c.crossSiteDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cross_site_delay"), "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites.", []string{"name"}, nil, ) - c.CrossSiteThreshold = prometheus.NewDesc( + c.crossSiteThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cross_site_threshold"), "Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding.", []string{"name"}, nil, ) - c.CrossSubnetDelay = prometheus.NewDesc( + c.crossSubnetDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cross_subnet_delay"), "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets.", []string{"name"}, nil, ) - c.CrossSubnetThreshold = prometheus.NewDesc( + c.crossSubnetThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cross_subnet_threshold"), "Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding.", []string{"name"}, nil, ) - c.CsvBalancer = prometheus.NewDesc( + c.csvBalancer = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "csv_balancer"), "Whether automatic balancing for CSV is enabled.", []string{"name"}, nil, ) - c.DatabaseReadWriteMode = prometheus.NewDesc( + c.databaseReadWriteMode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "database_read_write_mode"), "Sets the database read and write mode.", []string{"name"}, nil, ) - c.DefaultNetworkRole = prometheus.NewDesc( + c.defaultNetworkRole = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "default_network_role"), "Provides access to the cluster's DefaultNetworkRole property.", []string{"name"}, nil, ) - c.DetectedCloudPlatform = prometheus.NewDesc( + c.detectedCloudPlatform = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "detected_cloud_platform"), "(DetectedCloudPlatform)", []string{"name"}, nil, ) - c.DetectManagedEvents = prometheus.NewDesc( + c.detectManagedEvents = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "detect_managed_events"), "(DetectManagedEvents)", []string{"name"}, nil, ) - c.DetectManagedEventsThreshold = prometheus.NewDesc( + c.detectManagedEventsThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "detect_managed_events_threshold"), "(DetectManagedEventsThreshold)", []string{"name"}, nil, ) - c.DisableGroupPreferredOwnerRandomization = prometheus.NewDesc( + c.disableGroupPreferredOwnerRandomization = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "disable_group_preferred_owner_randomization"), "(DisableGroupPreferredOwnerRandomization)", []string{"name"}, nil, ) - c.DrainOnShutdown = prometheus.NewDesc( + c.drainOnShutdown = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "drain_on_shutdown"), "Whether to drain the node when cluster service is being stopped.", []string{"name"}, nil, ) - c.DynamicQuorumEnabled = prometheus.NewDesc( + c.dynamicQuorumEnabled = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dynamic_quorum_enabled"), "Allows cluster service to adjust node weights as needed to increase availability.", []string{"name"}, nil, ) - c.EnableSharedVolumes = prometheus.NewDesc( + c.enableSharedVolumes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "enable_shared_volumes"), "Enables or disables cluster shared volumes on this cluster.", []string{"name"}, nil, ) - c.FixQuorum = prometheus.NewDesc( + c.fixQuorum = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "fix_quorum"), "Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state.", []string{"name"}, nil, ) - c.GracePeriodEnabled = prometheus.NewDesc( + c.gracePeriodEnabled = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "grace_period_enabled"), "Whether the node grace period feature of this cluster is enabled.", []string{"name"}, nil, ) - c.GracePeriodTimeout = prometheus.NewDesc( + c.gracePeriodTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "grace_period_timeout"), "The grace period timeout in milliseconds.", []string{"name"}, nil, ) - c.GroupDependencyTimeout = prometheus.NewDesc( + c.groupDependencyTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "group_dependency_timeout"), "The timeout after which a group will be brought online despite unsatisfied dependencies", []string{"name"}, nil, ) - c.HangRecoveryAction = prometheus.NewDesc( + c.hangRecoveryAction = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "hang_recovery_action"), "Controls the action to take if the user-mode processes have stopped responding.", []string{"name"}, nil, ) - c.IgnorePersistentStateOnStartup = prometheus.NewDesc( + c.ignorePersistentStateOnStartup = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "ignore_persistent_state_on_startup"), "Provides access to the cluster's IgnorePersistentStateOnStartup property, which specifies whether the cluster will bring online groups that were online when the cluster was shut down.", []string{"name"}, nil, ) - c.LogResourceControls = prometheus.NewDesc( + c.logResourceControls = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "log_resource_controls"), "Controls the logging of resource controls.", []string{"name"}, nil, ) - c.LowerQuorumPriorityNodeId = prometheus.NewDesc( + c.lowerQuorumPriorityNodeId = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "lower_quorum_priority_node_id"), "Specifies the Node ID that has a lower priority when voting for quorum is performed. If the quorum vote is split 50/50%, the specified node's vote would be ignored to break the tie. If this is not set then the cluster will pick a node at random to break the tie.", []string{"name"}, nil, ) - c.MaxNumberOfNodes = prometheus.NewDesc( + c.maxNumberOfNodes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "max_number_of_nodes"), "Indicates the maximum number of nodes that may participate in the Cluster.", []string{"name"}, nil, ) - c.MessageBufferLength = prometheus.NewDesc( + c.messageBufferLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "message_buffer_length"), "The maximum unacknowledged message count for GEM.", []string{"name"}, nil, ) - c.MinimumNeverPreemptPriority = prometheus.NewDesc( + c.minimumNeverPreemptPriority = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "minimum_never_preempt_priority"), "Groups with this priority or higher cannot be preempted.", []string{"name"}, nil, ) - c.MinimumPreemptorPriority = prometheus.NewDesc( + c.minimumPreemptorPriority = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "minimum_preemptor_priority"), "Minimum priority a cluster group must have to be able to preempt another group.", []string{"name"}, nil, ) - c.NetftIPSecEnabled = prometheus.NewDesc( + c.netftIPSecEnabled = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "netft_ip_sec_enabled"), "Whether IPSec is enabled for cluster internal traffic.", []string{"name"}, nil, ) - c.PlacementOptions = prometheus.NewDesc( + c.placementOptions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "placement_options"), "Various option flags to modify default placement behavior.", []string{"name"}, nil, ) - c.PlumbAllCrossSubnetRoutes = prometheus.NewDesc( + c.plumbAllCrossSubnetRoutes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "plumb_all_cross_subnet_routes"), "Plumbs all possible cross subnet routes to all nodes.", []string{"name"}, nil, ) - c.PreventQuorum = prometheus.NewDesc( + c.preventQuorum = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "prevent_quorum"), "Whether the cluster will ignore group persistent state on startup.", []string{"name"}, nil, ) - c.QuarantineDuration = prometheus.NewDesc( + c.quarantineDuration = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quarantine_duration"), "The quarantine period timeout in milliseconds.", []string{"name"}, nil, ) - c.QuarantineThreshold = prometheus.NewDesc( + c.quarantineThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quarantine_threshold"), "Number of node failures before it will be quarantined.", []string{"name"}, nil, ) - c.QuorumArbitrationTimeMax = prometheus.NewDesc( + c.quorumArbitrationTimeMax = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quorum_arbitration_time_max"), "Controls the maximum time necessary to decide the Quorum owner node.", []string{"name"}, nil, ) - c.QuorumArbitrationTimeMin = prometheus.NewDesc( + c.quorumArbitrationTimeMin = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quorum_arbitration_time_min"), "Controls the minimum time necessary to decide the Quorum owner node.", []string{"name"}, nil, ) - c.QuorumLogFileSize = prometheus.NewDesc( + c.quorumLogFileSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quorum_log_file_size"), "This property is obsolete.", []string{"name"}, nil, ) - c.QuorumTypeValue = prometheus.NewDesc( + c.quorumTypeValue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "quorum_type_value"), "Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None", []string{"name"}, nil, ) - c.RequestReplyTimeout = prometheus.NewDesc( + c.requestReplyTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "request_reply_timeout"), "Controls the request reply time-out period.", []string{"name"}, nil, ) - c.ResiliencyDefaultPeriod = prometheus.NewDesc( + c.resiliencyDefaultPeriod = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "resiliency_default_period"), "The default resiliency period, in seconds, for the cluster.", []string{"name"}, nil, ) - c.ResiliencyLevel = prometheus.NewDesc( + c.resiliencyLevel = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "resiliency_level"), "The resiliency level for the cluster.", []string{"name"}, nil, ) - c.ResourceDllDeadlockPeriod = prometheus.NewDesc( + c.resourceDllDeadlockPeriod = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "resource_dll_deadlock_period"), "This property is obsolete.", []string{"name"}, nil, ) - c.RootMemoryReserved = prometheus.NewDesc( + c.rootMemoryReserved = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "root_memory_reserved"), "Controls the amount of memory reserved for the parent partition on all cluster nodes.", []string{"name"}, nil, ) - c.RouteHistoryLength = prometheus.NewDesc( + c.routeHistoryLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "route_history_length"), "The history length for routes to help finding network issues.", []string{"name"}, nil, ) - c.S2DBusTypes = prometheus.NewDesc( + c.s2DBusTypes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_bus_types"), "Bus types for storage spaces direct.", []string{"name"}, nil, ) - c.S2DCacheDesiredState = prometheus.NewDesc( + c.s2DCacheDesiredState = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_cache_desired_state"), "Desired state of the storage spaces direct cache.", []string{"name"}, nil, ) - c.S2DCacheFlashReservePercent = prometheus.NewDesc( + c.s2DCacheFlashReservePercent = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_cache_flash_reserve_percent"), "Percentage of allocated flash space to utilize when caching.", []string{"name"}, nil, ) - c.S2DCachePageSizeKBytes = prometheus.NewDesc( + c.s2DCachePageSizeKBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_cache_page_size_k_bytes"), "Page size in KB used by S2D cache.", []string{"name"}, nil, ) - c.S2DEnabled = prometheus.NewDesc( + c.s2DEnabled = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_enabled"), "Whether direct attached storage (DAS) is enabled.", []string{"name"}, nil, ) - c.S2DIOLatencyThreshold = prometheus.NewDesc( + c.s2DIOLatencyThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2dio_latency_threshold"), "The I/O latency threshold for storage spaces direct.", []string{"name"}, nil, ) - c.S2DOptimizations = prometheus.NewDesc( + c.s2DOptimizations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "s2d_optimizations"), "Optimization flags for storage spaces direct.", []string{"name"}, nil, ) - c.SameSubnetDelay = prometheus.NewDesc( + c.sameSubnetDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "same_subnet_delay"), "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet.", []string{"name"}, nil, ) - c.SameSubnetThreshold = prometheus.NewDesc( + c.sameSubnetThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "same_subnet_threshold"), "Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding.", []string{"name"}, nil, ) - c.SecurityLevel = prometheus.NewDesc( + c.securityLevel = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "security_level"), "Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt ", []string{"name"}, nil, ) - c.SecurityLevelForStorage = prometheus.NewDesc( + c.securityLevelForStorage = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "security_level_for_storage"), "(SecurityLevelForStorage)", []string{"name"}, nil, ) - c.SharedVolumeVssWriterOperationTimeout = prometheus.NewDesc( + c.sharedVolumeVssWriterOperationTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "shared_volume_vss_writer_operation_timeout"), "CSV VSS Writer operation timeout in seconds.", []string{"name"}, nil, ) - c.ShutdownTimeoutInMinutes = prometheus.NewDesc( + c.shutdownTimeoutInMinutes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "shutdown_timeout_in_minutes"), "The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown.", []string{"name"}, nil, ) - c.UseClientAccessNetworksForSharedVolumes = prometheus.NewDesc( + c.useClientAccessNetworksForSharedVolumes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "use_client_access_networks_for_shared_volumes"), "Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto", []string{"name"}, nil, ) - c.WitnessDatabaseWriteTimeout = prometheus.NewDesc( + c.witnessDatabaseWriteTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "witness_database_write_timeout"), "Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned.", []string{"name"}, nil, ) - c.WitnessDynamicWeight = prometheus.NewDesc( + c.witnessDynamicWeight = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "witness_dynamic_weight"), "The weight of the configured witness.", []string{"name"}, nil, ) - c.WitnessRestartInterval = prometheus.NewDesc( + c.witnessRestartInterval = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "witness_restart_interval"), "Controls the witness restart interval.", []string{"name"}, @@ -685,539 +685,539 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.AddEvictDelay, + c.addEvictDelay, prometheus.GaugeValue, float64(v.AddEvictDelay), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.AdminAccessPoint, + c.adminAccessPoint, prometheus.GaugeValue, float64(v.AdminAccessPoint), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.AutoAssignNodeSite, + c.autoAssignNodeSite, prometheus.GaugeValue, float64(v.AutoAssignNodeSite), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.AutoBalancerLevel, + c.autoBalancerLevel, prometheus.GaugeValue, float64(v.AutoBalancerLevel), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.AutoBalancerMode, + c.autoBalancerMode, prometheus.GaugeValue, float64(v.AutoBalancerMode), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.BackupInProgress, + c.backupInProgress, prometheus.GaugeValue, float64(v.BackupInProgress), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.BlockCacheSize, + c.blockCacheSize, prometheus.GaugeValue, float64(v.BlockCacheSize), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusSvcHangTimeout, + c.clusSvcHangTimeout, prometheus.GaugeValue, float64(v.ClusSvcHangTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusSvcRegroupOpeningTimeout, + c.clusSvcRegroupOpeningTimeout, prometheus.GaugeValue, float64(v.ClusSvcRegroupOpeningTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusSvcRegroupPruningTimeout, + c.clusSvcRegroupPruningTimeout, prometheus.GaugeValue, float64(v.ClusSvcRegroupPruningTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusSvcRegroupStageTimeout, + c.clusSvcRegroupStageTimeout, prometheus.GaugeValue, float64(v.ClusSvcRegroupStageTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusSvcRegroupTickInMilliseconds, + c.clusSvcRegroupTickInMilliseconds, prometheus.GaugeValue, float64(v.ClusSvcRegroupTickInMilliseconds), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterEnforcedAntiAffinity, + c.clusterEnforcedAntiAffinity, prometheus.GaugeValue, float64(v.ClusterEnforcedAntiAffinity), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterFunctionalLevel, + c.clusterFunctionalLevel, prometheus.GaugeValue, float64(v.ClusterFunctionalLevel), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterGroupWaitDelay, + c.clusterGroupWaitDelay, prometheus.GaugeValue, float64(v.ClusterGroupWaitDelay), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterLogLevel, + c.clusterLogLevel, prometheus.GaugeValue, float64(v.ClusterLogLevel), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterLogSize, + c.clusterLogSize, prometheus.GaugeValue, float64(v.ClusterLogSize), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ClusterUpgradeVersion, + c.clusterUpgradeVersion, prometheus.GaugeValue, float64(v.ClusterUpgradeVersion), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.CrossSiteDelay, + c.crossSiteDelay, prometheus.GaugeValue, float64(v.CrossSiteDelay), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.CrossSiteThreshold, + c.crossSiteThreshold, prometheus.GaugeValue, float64(v.CrossSiteThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.CrossSubnetDelay, + c.crossSubnetDelay, prometheus.GaugeValue, float64(v.CrossSubnetDelay), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.CrossSubnetThreshold, + c.crossSubnetThreshold, prometheus.GaugeValue, float64(v.CrossSubnetThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.CsvBalancer, + c.csvBalancer, prometheus.GaugeValue, float64(v.CsvBalancer), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DatabaseReadWriteMode, + c.databaseReadWriteMode, prometheus.GaugeValue, float64(v.DatabaseReadWriteMode), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DefaultNetworkRole, + c.defaultNetworkRole, prometheus.GaugeValue, float64(v.DefaultNetworkRole), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DetectedCloudPlatform, + c.detectedCloudPlatform, prometheus.GaugeValue, float64(v.DetectedCloudPlatform), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DetectManagedEvents, + c.detectManagedEvents, prometheus.GaugeValue, float64(v.DetectManagedEvents), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DetectManagedEventsThreshold, + c.detectManagedEventsThreshold, prometheus.GaugeValue, float64(v.DetectManagedEventsThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DisableGroupPreferredOwnerRandomization, + c.disableGroupPreferredOwnerRandomization, prometheus.GaugeValue, float64(v.DisableGroupPreferredOwnerRandomization), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DrainOnShutdown, + c.drainOnShutdown, prometheus.GaugeValue, float64(v.DrainOnShutdown), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DynamicQuorumEnabled, + c.dynamicQuorumEnabled, prometheus.GaugeValue, float64(v.DynamicQuorumEnabled), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.EnableSharedVolumes, + c.enableSharedVolumes, prometheus.GaugeValue, float64(v.EnableSharedVolumes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.FixQuorum, + c.fixQuorum, prometheus.GaugeValue, float64(v.FixQuorum), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.GracePeriodEnabled, + c.gracePeriodEnabled, prometheus.GaugeValue, float64(v.GracePeriodEnabled), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.GracePeriodTimeout, + c.gracePeriodTimeout, prometheus.GaugeValue, float64(v.GracePeriodTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.GroupDependencyTimeout, + c.groupDependencyTimeout, prometheus.GaugeValue, float64(v.GroupDependencyTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.HangRecoveryAction, + c.hangRecoveryAction, prometheus.GaugeValue, float64(v.HangRecoveryAction), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.IgnorePersistentStateOnStartup, + c.ignorePersistentStateOnStartup, prometheus.GaugeValue, float64(v.IgnorePersistentStateOnStartup), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.LogResourceControls, + c.logResourceControls, prometheus.GaugeValue, float64(v.LogResourceControls), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.LowerQuorumPriorityNodeId, + c.lowerQuorumPriorityNodeId, prometheus.GaugeValue, float64(v.LowerQuorumPriorityNodeId), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MaxNumberOfNodes, + c.maxNumberOfNodes, prometheus.GaugeValue, float64(v.MaxNumberOfNodes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MessageBufferLength, + c.messageBufferLength, prometheus.GaugeValue, float64(v.MessageBufferLength), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MinimumNeverPreemptPriority, + c.minimumNeverPreemptPriority, prometheus.GaugeValue, float64(v.MinimumNeverPreemptPriority), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MinimumPreemptorPriority, + c.minimumPreemptorPriority, prometheus.GaugeValue, float64(v.MinimumPreemptorPriority), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NetftIPSecEnabled, + c.netftIPSecEnabled, prometheus.GaugeValue, float64(v.NetftIPSecEnabled), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.PlacementOptions, + c.placementOptions, prometheus.GaugeValue, float64(v.PlacementOptions), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.PlumbAllCrossSubnetRoutes, + c.plumbAllCrossSubnetRoutes, prometheus.GaugeValue, float64(v.PlumbAllCrossSubnetRoutes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.PreventQuorum, + c.preventQuorum, prometheus.GaugeValue, float64(v.PreventQuorum), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuarantineDuration, + c.quarantineDuration, prometheus.GaugeValue, float64(v.QuarantineDuration), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuarantineThreshold, + c.quarantineThreshold, prometheus.GaugeValue, float64(v.QuarantineThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuorumArbitrationTimeMax, + c.quorumArbitrationTimeMax, prometheus.GaugeValue, float64(v.QuorumArbitrationTimeMax), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuorumArbitrationTimeMin, + c.quorumArbitrationTimeMin, prometheus.GaugeValue, float64(v.QuorumArbitrationTimeMin), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuorumLogFileSize, + c.quorumLogFileSize, prometheus.GaugeValue, float64(v.QuorumLogFileSize), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.QuorumTypeValue, + c.quorumTypeValue, prometheus.GaugeValue, float64(v.QuorumTypeValue), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RequestReplyTimeout, + c.requestReplyTimeout, prometheus.GaugeValue, float64(v.RequestReplyTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ResiliencyDefaultPeriod, + c.resiliencyDefaultPeriod, prometheus.GaugeValue, float64(v.ResiliencyDefaultPeriod), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ResiliencyLevel, + c.resiliencyLevel, prometheus.GaugeValue, float64(v.ResiliencyLevel), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ResourceDllDeadlockPeriod, + c.resourceDllDeadlockPeriod, prometheus.GaugeValue, float64(v.ResourceDllDeadlockPeriod), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RootMemoryReserved, + c.rootMemoryReserved, prometheus.GaugeValue, float64(v.RootMemoryReserved), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RouteHistoryLength, + c.routeHistoryLength, prometheus.GaugeValue, float64(v.RouteHistoryLength), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DBusTypes, + c.s2DBusTypes, prometheus.GaugeValue, float64(v.S2DBusTypes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DCacheDesiredState, + c.s2DCacheDesiredState, prometheus.GaugeValue, float64(v.S2DCacheDesiredState), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DCacheFlashReservePercent, + c.s2DCacheFlashReservePercent, prometheus.GaugeValue, float64(v.S2DCacheFlashReservePercent), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DCachePageSizeKBytes, + c.s2DCachePageSizeKBytes, prometheus.GaugeValue, float64(v.S2DCachePageSizeKBytes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DEnabled, + c.s2DEnabled, prometheus.GaugeValue, float64(v.S2DEnabled), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DIOLatencyThreshold, + c.s2DIOLatencyThreshold, prometheus.GaugeValue, float64(v.S2DIOLatencyThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.S2DOptimizations, + c.s2DOptimizations, prometheus.GaugeValue, float64(v.S2DOptimizations), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.SameSubnetDelay, + c.sameSubnetDelay, prometheus.GaugeValue, float64(v.SameSubnetDelay), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.SameSubnetThreshold, + c.sameSubnetThreshold, prometheus.GaugeValue, float64(v.SameSubnetThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.SecurityLevel, + c.securityLevel, prometheus.GaugeValue, float64(v.SecurityLevel), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.SecurityLevelForStorage, + c.securityLevelForStorage, prometheus.GaugeValue, float64(v.SecurityLevelForStorage), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.SharedVolumeVssWriterOperationTimeout, + c.sharedVolumeVssWriterOperationTimeout, prometheus.GaugeValue, float64(v.SharedVolumeVssWriterOperationTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ShutdownTimeoutInMinutes, + c.shutdownTimeoutInMinutes, prometheus.GaugeValue, float64(v.ShutdownTimeoutInMinutes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.UseClientAccessNetworksForSharedVolumes, + c.useClientAccessNetworksForSharedVolumes, prometheus.GaugeValue, float64(v.UseClientAccessNetworksForSharedVolumes), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.WitnessDatabaseWriteTimeout, + c.witnessDatabaseWriteTimeout, prometheus.GaugeValue, float64(v.WitnessDatabaseWriteTimeout), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.WitnessDynamicWeight, + c.witnessDynamicWeight, prometheus.GaugeValue, float64(v.WitnessDynamicWeight), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.WitnessRestartInterval, + c.witnessRestartInterval, prometheus.GaugeValue, float64(v.WitnessRestartInterval), v.Name, diff --git a/pkg/collector/mscluster_network/mscluster_network.go b/pkg/collector/mscluster_network/mscluster_network.go index 29a8be41..75d678b4 100644 --- a/pkg/collector/mscluster_network/mscluster_network.go +++ b/pkg/collector/mscluster_network/mscluster_network.go @@ -18,11 +18,11 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - Characteristics *prometheus.Desc - Flags *prometheus.Desc - Metric *prometheus.Desc - Role *prometheus.Desc - State *prometheus.Desc + characteristics *prometheus.Desc + flags *prometheus.Desc + metric *prometheus.Desc + role *prometheus.Desc + state *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -53,31 +53,31 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.Characteristics = prometheus.NewDesc( + c.characteristics = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "characteristics"), "Provides the characteristics of the network.", []string{"name"}, nil, ) - c.Flags = prometheus.NewDesc( + c.flags = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "flags"), "Provides access to the flags set for the node. ", []string{"name"}, nil, ) - c.Metric = prometheus.NewDesc( + c.metric = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "metric"), "The metric of a cluster network (networks with lower values are used first). If this value is set, then the AutoMetric property is set to false.", []string{"name"}, nil, ) - c.Role = prometheus.NewDesc( + c.role = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "role"), "Provides access to the network's Role property. The Role property describes the role of the network in the cluster. 0: None; 1: Cluster; 2: Client; 3: Both ", []string{"name"}, nil, ) - c.State = prometheus.NewDesc( + c.state = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "state"), "Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up", []string{"name"}, @@ -99,7 +99,7 @@ type MSCluster_Network struct { } // Collect sends the metric values for each metric -// to the provided prometheus Metric channel. +// to the provided prometheus metric channel. func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) error { var dst []MSCluster_Network q := wmi.QueryAll(&dst, c.logger) @@ -109,35 +109,35 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.Characteristics, + c.characteristics, prometheus.GaugeValue, float64(v.Characteristics), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Flags, + c.flags, prometheus.GaugeValue, float64(v.Flags), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Metric, + c.metric, prometheus.GaugeValue, float64(v.Metric), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Role, + c.role, prometheus.GaugeValue, float64(v.Role), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.State, + c.state, prometheus.GaugeValue, float64(v.State), v.Name, diff --git a/pkg/collector/mscluster_node/mscluster_node.go b/pkg/collector/mscluster_node/mscluster_node.go index dad482f8..4907ac23 100644 --- a/pkg/collector/mscluster_node/mscluster_node.go +++ b/pkg/collector/mscluster_node/mscluster_node.go @@ -21,20 +21,20 @@ var NodeName []string type Collector struct { logger log.Logger - BuildNumber *prometheus.Desc - Characteristics *prometheus.Desc - DetectedCloudPlatform *prometheus.Desc - DynamicWeight *prometheus.Desc - Flags *prometheus.Desc - MajorVersion *prometheus.Desc - MinorVersion *prometheus.Desc - NeedsPreventQuorum *prometheus.Desc - NodeDrainStatus *prometheus.Desc - NodeHighestVersion *prometheus.Desc - NodeLowestVersion *prometheus.Desc - NodeWeight *prometheus.Desc - State *prometheus.Desc - StatusInformation *prometheus.Desc + buildNumber *prometheus.Desc + characteristics *prometheus.Desc + detectedCloudPlatform *prometheus.Desc + dynamicWeight *prometheus.Desc + flags *prometheus.Desc + majorVersion *prometheus.Desc + minorVersion *prometheus.Desc + needsPreventQuorum *prometheus.Desc + nodeDrainStatus *prometheus.Desc + nodeHighestVersion *prometheus.Desc + nodeLowestVersion *prometheus.Desc + nodeWeight *prometheus.Desc + state *prometheus.Desc + statusInformation *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -65,85 +65,85 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.BuildNumber = prometheus.NewDesc( + c.buildNumber = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "build_number"), "Provides access to the node's BuildNumber property.", []string{"name"}, nil, ) - c.Characteristics = prometheus.NewDesc( + c.characteristics = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "characteristics"), "Provides access to the characteristics set for the node.", []string{"name"}, nil, ) - c.DetectedCloudPlatform = prometheus.NewDesc( + c.detectedCloudPlatform = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "detected_cloud_platform"), "(DetectedCloudPlatform)", []string{"name"}, nil, ) - c.DynamicWeight = prometheus.NewDesc( + c.dynamicWeight = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dynamic_weight"), "The dynamic vote weight of the node adjusted by dynamic quorum feature.", []string{"name"}, nil, ) - c.Flags = prometheus.NewDesc( + c.flags = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "flags"), "Provides access to the flags set for the node.", []string{"name"}, nil, ) - c.MajorVersion = prometheus.NewDesc( + c.majorVersion = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "major_version"), "Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed.", []string{"name"}, nil, ) - c.MinorVersion = prometheus.NewDesc( + c.minorVersion = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "minor_version"), "Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed.", []string{"name"}, nil, ) - c.NeedsPreventQuorum = prometheus.NewDesc( + c.needsPreventQuorum = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "needs_prevent_quorum"), "Whether the cluster service on that node should be started with prevent quorum flag.", []string{"name"}, nil, ) - c.NodeDrainStatus = prometheus.NewDesc( + c.nodeDrainStatus = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "node_drain_status"), "The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed", []string{"name"}, nil, ) - c.NodeHighestVersion = prometheus.NewDesc( + c.nodeHighestVersion = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "node_highest_version"), "Provides access to the node's NodeHighestVersion property, which specifies the highest possible version of the cluster service with which the node can join or communicate.", []string{"name"}, nil, ) - c.NodeLowestVersion = prometheus.NewDesc( + c.nodeLowestVersion = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "node_lowest_version"), "Provides access to the node's NodeLowestVersion property, which specifies the lowest possible version of the cluster service with which the node can join or communicate.", []string{"name"}, nil, ) - c.NodeWeight = prometheus.NewDesc( + c.nodeWeight = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "node_weight"), "The vote weight of the node.", []string{"name"}, nil, ) - c.State = prometheus.NewDesc( + c.state = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "state"), "Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining", []string{"name"}, nil, ) - c.StatusInformation = prometheus.NewDesc( + c.statusInformation = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "status_information"), "The isolation or quarantine status of the node.", []string{"name"}, @@ -186,98 +186,98 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.BuildNumber, + c.buildNumber, prometheus.GaugeValue, float64(v.BuildNumber), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Characteristics, + c.characteristics, prometheus.GaugeValue, float64(v.Characteristics), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DetectedCloudPlatform, + c.detectedCloudPlatform, prometheus.GaugeValue, float64(v.DetectedCloudPlatform), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DynamicWeight, + c.dynamicWeight, prometheus.GaugeValue, float64(v.DynamicWeight), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Flags, + c.flags, prometheus.GaugeValue, float64(v.Flags), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MajorVersion, + c.majorVersion, prometheus.GaugeValue, float64(v.MajorVersion), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MinorVersion, + c.minorVersion, prometheus.GaugeValue, float64(v.MinorVersion), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NeedsPreventQuorum, + c.needsPreventQuorum, prometheus.GaugeValue, float64(v.NeedsPreventQuorum), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NodeDrainStatus, + c.nodeDrainStatus, prometheus.GaugeValue, float64(v.NodeDrainStatus), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NodeHighestVersion, + c.nodeHighestVersion, prometheus.GaugeValue, float64(v.NodeHighestVersion), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NodeLowestVersion, + c.nodeLowestVersion, prometheus.GaugeValue, float64(v.NodeLowestVersion), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.NodeWeight, + c.nodeWeight, prometheus.GaugeValue, float64(v.NodeWeight), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.State, + c.state, prometheus.GaugeValue, float64(v.State), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.StatusInformation, + c.statusInformation, prometheus.GaugeValue, float64(v.StatusInformation), v.Name, diff --git a/pkg/collector/mscluster_resource/mscluster_resource.go b/pkg/collector/mscluster_resource/mscluster_resource.go index a6c09db2..ac2b0a66 100644 --- a/pkg/collector/mscluster_resource/mscluster_resource.go +++ b/pkg/collector/mscluster_resource/mscluster_resource.go @@ -19,23 +19,23 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - Characteristics *prometheus.Desc - DeadlockTimeout *prometheus.Desc - EmbeddedFailureAction *prometheus.Desc - Flags *prometheus.Desc - IsAlivePollInterval *prometheus.Desc - LooksAlivePollInterval *prometheus.Desc - MonitorProcessId *prometheus.Desc - OwnerNode *prometheus.Desc - PendingTimeout *prometheus.Desc - ResourceClass *prometheus.Desc - RestartAction *prometheus.Desc - RestartDelay *prometheus.Desc - RestartPeriod *prometheus.Desc - RestartThreshold *prometheus.Desc - RetryPeriodOnFailure *prometheus.Desc - State *prometheus.Desc - Subclass *prometheus.Desc + characteristics *prometheus.Desc + deadlockTimeout *prometheus.Desc + embeddedFailureAction *prometheus.Desc + flags *prometheus.Desc + isAlivePollInterval *prometheus.Desc + looksAlivePollInterval *prometheus.Desc + monitorProcessId *prometheus.Desc + ownerNode *prometheus.Desc + pendingTimeout *prometheus.Desc + resourceClass *prometheus.Desc + restartAction *prometheus.Desc + restartDelay *prometheus.Desc + restartPeriod *prometheus.Desc + restartThreshold *prometheus.Desc + retryPeriodOnFailure *prometheus.Desc + state *prometheus.Desc + subclass *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -66,109 +66,109 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.Characteristics = prometheus.NewDesc( + c.characteristics = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "characteristics"), "Provides the characteristics of the object.", []string{"type", "owner_group", "name"}, nil, ) - c.DeadlockTimeout = prometheus.NewDesc( + c.deadlockTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "deadlock_timeout"), "Indicates the length of time to wait, in milliseconds, before declaring a deadlock in any call into a resource.", []string{"type", "owner_group", "name"}, nil, ) - c.EmbeddedFailureAction = prometheus.NewDesc( + c.embeddedFailureAction = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "embedded_failure_action"), "The time, in milliseconds, that a resource should remain in a failed state before the Cluster service attempts to restart it.", []string{"type", "owner_group", "name"}, nil, ) - c.Flags = prometheus.NewDesc( + c.flags = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "flags"), "Provides access to the flags set for the object.", []string{"type", "owner_group", "name"}, nil, ) - c.IsAlivePollInterval = prometheus.NewDesc( + c.isAlivePollInterval = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "is_alive_poll_interval"), "Provides access to the resource's IsAlivePollInterval property, which is the recommended interval in milliseconds at which the Cluster Service should poll the resource to determine whether it is operational. If the property is set to 0xFFFFFFFF, the Cluster Service uses the IsAlivePollInterval property for the resource type associated with the resource.", []string{"type", "owner_group", "name"}, nil, ) - c.LooksAlivePollInterval = prometheus.NewDesc( + c.looksAlivePollInterval = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "looks_alive_poll_interval"), "Provides access to the resource's LooksAlivePollInterval property, which is the recommended interval in milliseconds at which the Cluster Service should poll the resource to determine whether it appears operational. If the property is set to 0xFFFFFFFF, the Cluster Service uses the LooksAlivePollInterval property for the resource type associated with the resource.", []string{"type", "owner_group", "name"}, nil, ) - c.MonitorProcessId = prometheus.NewDesc( + c.monitorProcessId = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "monitor_process_id"), "Provides the process ID of the resource host service that is currently hosting the resource.", []string{"type", "owner_group", "name"}, nil, ) - c.OwnerNode = prometheus.NewDesc( + c.ownerNode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "owner_node"), "The node hosting the resource. 0: Not hosted; 1: Hosted", []string{"type", "owner_group", "node_name", "name"}, nil, ) - c.OwnerNode = prometheus.NewDesc( + c.ownerNode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "owner_node"), "The node hosting the resource. 0: Not hosted; 1: Hosted", []string{"type", "owner_group", "node_name", "name"}, nil, ) - c.PendingTimeout = prometheus.NewDesc( + c.pendingTimeout = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "pending_timeout"), "Provides access to the resource's PendingTimeout property. If a resource cannot be brought online or taken offline in the number of milliseconds specified by the PendingTimeout property, the resource is forcibly terminated.", []string{"type", "owner_group", "name"}, nil, ) - c.ResourceClass = prometheus.NewDesc( + c.resourceClass = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "resource_class"), "Gets or sets the resource class of a resource. 0: Unknown; 1: Storage; 2: Network; 32768: Unknown ", []string{"type", "owner_group", "name"}, nil, ) - c.RestartAction = prometheus.NewDesc( + c.restartAction = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "restart_action"), "Provides access to the resource's RestartAction property, which is the action to be taken by the Cluster Service if the resource fails.", []string{"type", "owner_group", "name"}, nil, ) - c.RestartDelay = prometheus.NewDesc( + c.restartDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "restart_delay"), "Indicates the time delay before a failed resource is restarted.", []string{"type", "owner_group", "name"}, nil, ) - c.RestartPeriod = prometheus.NewDesc( + c.restartPeriod = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "restart_period"), "Provides access to the resource's RestartPeriod property, which is interval of time, in milliseconds, during which a specified number of restart attempts can be made on a nonresponsive resource.", []string{"type", "owner_group", "name"}, nil, ) - c.RestartThreshold = prometheus.NewDesc( + c.restartThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "restart_threshold"), "Provides access to the resource's RestartThreshold property which is the maximum number of restart attempts that can be made on a resource within an interval defined by the RestartPeriod property before the Cluster Service initiates the action specified by the RestartAction property.", []string{"type", "owner_group", "name"}, nil, ) - c.RetryPeriodOnFailure = prometheus.NewDesc( + c.retryPeriodOnFailure = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "retry_period_on_failure"), "Provides access to the resource's RetryPeriodOnFailure property, which is the interval of time (in milliseconds) that a resource should remain in a failed state before the Cluster service attempts to restart it.", []string{"type", "owner_group", "name"}, nil, ) - c.State = prometheus.NewDesc( + c.state = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "state"), "The current state of the resource. -1: Unknown; 0: Inherited; 1: Initializing; 2: Online; 3: Offline; 4: Failed; 128: Pending; 129: Online Pending; 130: Offline Pending ", []string{"type", "owner_group", "name"}, nil, ) - c.Subclass = prometheus.NewDesc( + c.subclass = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "subclass"), "Provides the list of references to nodes that can be the owner of this resource.", []string{"type", "owner_group", "name"}, @@ -214,49 +214,49 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.Characteristics, + c.characteristics, prometheus.GaugeValue, float64(v.Characteristics), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DeadlockTimeout, + c.deadlockTimeout, prometheus.GaugeValue, float64(v.DeadlockTimeout), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.EmbeddedFailureAction, + c.embeddedFailureAction, prometheus.GaugeValue, float64(v.EmbeddedFailureAction), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Flags, + c.flags, prometheus.GaugeValue, float64(v.Flags), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.IsAlivePollInterval, + c.isAlivePollInterval, prometheus.GaugeValue, float64(v.IsAlivePollInterval), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.LooksAlivePollInterval, + c.looksAlivePollInterval, prometheus.GaugeValue, float64(v.LooksAlivePollInterval), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.MonitorProcessId, + c.monitorProcessId, prometheus.GaugeValue, float64(v.MonitorProcessId), v.Type, v.OwnerGroup, v.Name, @@ -269,7 +269,7 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) isCurrentState = 1.0 } ch <- prometheus.MustNewConstMetric( - c.OwnerNode, + c.ownerNode, prometheus.GaugeValue, isCurrentState, v.Type, v.OwnerGroup, node_name, v.Name, @@ -278,63 +278,63 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) } ch <- prometheus.MustNewConstMetric( - c.PendingTimeout, + c.pendingTimeout, prometheus.GaugeValue, float64(v.PendingTimeout), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ResourceClass, + c.resourceClass, prometheus.GaugeValue, float64(v.ResourceClass), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RestartAction, + c.restartAction, prometheus.GaugeValue, float64(v.RestartAction), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RestartDelay, + c.restartDelay, prometheus.GaugeValue, float64(v.RestartDelay), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RestartPeriod, + c.restartPeriod, prometheus.GaugeValue, float64(v.RestartPeriod), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RestartThreshold, + c.restartThreshold, prometheus.GaugeValue, float64(v.RestartThreshold), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.RetryPeriodOnFailure, + c.retryPeriodOnFailure, prometheus.GaugeValue, float64(v.RetryPeriodOnFailure), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.State, + c.state, prometheus.GaugeValue, float64(v.State), v.Type, v.OwnerGroup, v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Subclass, + c.subclass, prometheus.GaugeValue, float64(v.Subclass), v.Type, v.OwnerGroup, v.Name, diff --git a/pkg/collector/mscluster_resourcegroup/mscluster_resourcegroup.go b/pkg/collector/mscluster_resourcegroup/mscluster_resourcegroup.go index 7e23e7db..49eaf848 100644 --- a/pkg/collector/mscluster_resourcegroup/mscluster_resourcegroup.go +++ b/pkg/collector/mscluster_resourcegroup/mscluster_resourcegroup.go @@ -19,22 +19,20 @@ var ConfigDefaults = Config{} type Collector struct { logger log.Logger - AutoFailbackType *prometheus.Desc - Characteristics *prometheus.Desc - ColdStartSetting *prometheus.Desc - DefaultOwner *prometheus.Desc - FailbackWindowEnd *prometheus.Desc - FailbackWindowStart *prometheus.Desc - FailoverPeriod *prometheus.Desc - FailoverThreshold *prometheus.Desc - FaultDomain *prometheus.Desc - Flags *prometheus.Desc - GroupType *prometheus.Desc - PlacementOptions *prometheus.Desc - OwnerNode *prometheus.Desc - Priority *prometheus.Desc - ResiliencyPeriod *prometheus.Desc - State *prometheus.Desc + autoFailbackType *prometheus.Desc + characteristics *prometheus.Desc + coldStartSetting *prometheus.Desc + defaultOwner *prometheus.Desc + failbackWindowEnd *prometheus.Desc + failbackWindowStart *prometheus.Desc + failOverPeriod *prometheus.Desc + failOverThreshold *prometheus.Desc + flags *prometheus.Desc + groupType *prometheus.Desc + ownerNode *prometheus.Desc + priority *prometheus.Desc + resiliencyPeriod *prometheus.Desc + state *prometheus.Desc } func New(logger log.Logger, _ *Config) *Collector { @@ -65,91 +63,91 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.AutoFailbackType = prometheus.NewDesc( + c.autoFailbackType = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "auto_failback_type"), "Provides access to the group's AutoFailbackType property.", []string{"name"}, nil, ) - c.Characteristics = prometheus.NewDesc( + c.characteristics = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "characteristics"), "Provides the characteristics of the group.", []string{"name"}, nil, ) - c.ColdStartSetting = prometheus.NewDesc( + c.coldStartSetting = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "cold_start_setting"), "Indicates whether a group can start after a cluster cold start.", []string{"name"}, nil, ) - c.DefaultOwner = prometheus.NewDesc( + c.defaultOwner = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "default_owner"), "Number of the last node the resource group was activated on or explicitly moved to.", []string{"name"}, nil, ) - c.FailbackWindowEnd = prometheus.NewDesc( + c.failbackWindowEnd = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failback_window_end"), "The FailbackWindowEnd property provides the latest time that the group can be moved back to the node identified as its preferred node.", []string{"name"}, nil, ) - c.FailbackWindowStart = prometheus.NewDesc( + c.failbackWindowStart = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failback_window_start"), "The FailbackWindowStart property provides the earliest time (that is, local time as kept by the cluster) that the group can be moved back to the node identified as its preferred node.", []string{"name"}, nil, ) - c.FailoverPeriod = prometheus.NewDesc( + c.failOverPeriod = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_period"), "The FailoverPeriod property specifies a number of hours during which a maximum number of failover attempts, specified by the FailoverThreshold property, can occur.", []string{"name"}, nil, ) - c.FailoverThreshold = prometheus.NewDesc( + c.failOverThreshold = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "failover_threshold"), "The FailoverThreshold property specifies the maximum number of failover attempts.", []string{"name"}, nil, ) - c.Flags = prometheus.NewDesc( + c.flags = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "flags"), "Provides access to the flags set for the group. ", []string{"name"}, nil, ) - c.GroupType = prometheus.NewDesc( + c.groupType = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "group_type"), "The Type of the resource group.", []string{"name"}, nil, ) - c.OwnerNode = prometheus.NewDesc( + c.ownerNode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "owner_node"), "The node hosting the resource group. 0: Not hosted; 1: Hosted", []string{"node_name", "name"}, nil, ) - c.OwnerNode = prometheus.NewDesc( + c.ownerNode = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "owner_node"), "The node hosting the resource group. 0: Not hosted; 1: Hosted", []string{"node_name", "name"}, nil, ) - c.Priority = prometheus.NewDesc( + c.priority = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "priority"), "Priority value of the resource group", []string{"name"}, nil, ) - c.ResiliencyPeriod = prometheus.NewDesc( + c.resiliencyPeriod = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "resiliency_period"), "The resiliency period for this group, in seconds.", []string{"name"}, nil, ) - c.State = prometheus.NewDesc( + c.state = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "state"), "The current state of the resource group. -1: Unknown; 0: Online; 1: Offline; 2: Failed; 3: Partial Online; 4: Pending", []string{"name"}, @@ -190,70 +188,70 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.AutoFailbackType, + c.autoFailbackType, prometheus.GaugeValue, float64(v.AutoFailbackType), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Characteristics, + c.characteristics, prometheus.GaugeValue, float64(v.Characteristics), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ColdStartSetting, + c.coldStartSetting, prometheus.GaugeValue, float64(v.ColdStartSetting), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.DefaultOwner, + c.defaultOwner, prometheus.GaugeValue, float64(v.DefaultOwner), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.FailbackWindowEnd, + c.failbackWindowEnd, prometheus.GaugeValue, float64(v.FailbackWindowEnd), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.FailbackWindowStart, + c.failbackWindowStart, prometheus.GaugeValue, float64(v.FailbackWindowStart), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.FailoverPeriod, + c.failOverPeriod, prometheus.GaugeValue, float64(v.FailoverPeriod), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.FailoverThreshold, + c.failOverThreshold, prometheus.GaugeValue, float64(v.FailoverThreshold), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.Flags, + c.flags, prometheus.GaugeValue, float64(v.Flags), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.GroupType, + c.groupType, prometheus.GaugeValue, float64(v.GroupType), v.Name, @@ -266,7 +264,7 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) isCurrentState = 1.0 } ch <- prometheus.MustNewConstMetric( - c.OwnerNode, + c.ownerNode, prometheus.GaugeValue, isCurrentState, node_name, v.Name, @@ -275,21 +273,21 @@ func (c *Collector) Collect(_ *types.ScrapeContext, ch chan<- prometheus.Metric) } ch <- prometheus.MustNewConstMetric( - c.Priority, + c.priority, prometheus.GaugeValue, float64(v.Priority), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.ResiliencyPeriod, + c.resiliencyPeriod, prometheus.GaugeValue, float64(v.ResiliencyPeriod), v.Name, ) ch <- prometheus.MustNewConstMetric( - c.State, + c.state, prometheus.GaugeValue, float64(v.State), v.Name, diff --git a/pkg/collector/msmq/msmq.go b/pkg/collector/msmq/msmq.go index 97f5c9e0..95a7235d 100644 --- a/pkg/collector/msmq/msmq.go +++ b/pkg/collector/msmq/msmq.go @@ -30,10 +30,10 @@ type Collector struct { queryWhereClause *string - BytesinJournalQueue *prometheus.Desc - BytesinQueue *prometheus.Desc - MessagesinJournalQueue *prometheus.Desc - MessagesinQueue *prometheus.Desc + bytesInJournalQueue *prometheus.Desc + bytesInQueue *prometheus.Desc + messagesInJournalQueue *prometheus.Desc + messagesInQueue *prometheus.Desc } func New(logger log.Logger, config *Config) *Collector { @@ -78,25 +78,25 @@ func (c *Collector) Build() error { _ = level.Warn(c.logger).Log("msg", "No where-clause specified for msmq collector. This will generate a very large number of metrics!") } - c.BytesinJournalQueue = prometheus.NewDesc( + c.bytesInJournalQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bytes_in_journal_queue"), "Size of queue journal in bytes", []string{"name"}, nil, ) - c.BytesinQueue = prometheus.NewDesc( + c.bytesInQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bytes_in_queue"), "Size of queue in bytes", []string{"name"}, nil, ) - c.MessagesinJournalQueue = prometheus.NewDesc( + c.messagesInJournalQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "messages_in_journal_queue"), "Count messages in queue journal", []string{"name"}, nil, ) - c.MessagesinQueue = prometheus.NewDesc( + c.messagesInQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "messages_in_queue"), "Count messages in queue", []string{"name"}, @@ -133,28 +133,28 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { for _, msmq := range dst { ch <- prometheus.MustNewConstMetric( - c.BytesinJournalQueue, + c.bytesInJournalQueue, prometheus.GaugeValue, float64(msmq.BytesinJournalQueue), strings.ToLower(msmq.Name), ) ch <- prometheus.MustNewConstMetric( - c.BytesinQueue, + c.bytesInQueue, prometheus.GaugeValue, float64(msmq.BytesinQueue), strings.ToLower(msmq.Name), ) ch <- prometheus.MustNewConstMetric( - c.MessagesinJournalQueue, + c.messagesInJournalQueue, prometheus.GaugeValue, float64(msmq.MessagesinJournalQueue), strings.ToLower(msmq.Name), ) ch <- prometheus.MustNewConstMetric( - c.MessagesinQueue, + c.messagesInQueue, prometheus.GaugeValue, float64(msmq.MessagesinQueue), strings.ToLower(msmq.Name), diff --git a/pkg/collector/mssql/mssql.go b/pkg/collector/mssql/mssql.go index a91d9a5b..2e0631e8 100644 --- a/pkg/collector/mssql/mssql.go +++ b/pkg/collector/mssql/mssql.go @@ -138,265 +138,265 @@ type Collector struct { mssqlScrapeSuccessDesc *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerAccessMethods - AccessMethodsAUcleanupbatches *prometheus.Desc - AccessMethodsAUcleanups *prometheus.Desc - AccessMethodsByreferenceLobCreateCount *prometheus.Desc - AccessMethodsByreferenceLobUseCount *prometheus.Desc - AccessMethodsCountLobReadahead *prometheus.Desc - AccessMethodsCountPullInRow *prometheus.Desc - AccessMethodsCountPushOffRow *prometheus.Desc - AccessMethodsDeferreddroppedAUs *prometheus.Desc - AccessMethodsDeferredDroppedrowsets *prometheus.Desc - AccessMethodsDroppedrowsetcleanups *prometheus.Desc - AccessMethodsDroppedrowsetsskipped *prometheus.Desc - AccessMethodsExtentDeallocations *prometheus.Desc - AccessMethodsExtentsAllocated *prometheus.Desc - AccessMethodsFailedAUcleanupbatches *prometheus.Desc - AccessMethodsFailedleafpagecookie *prometheus.Desc - AccessMethodsFailedtreepagecookie *prometheus.Desc - AccessMethodsForwardedRecords *prometheus.Desc - AccessMethodsFreeSpacePageFetches *prometheus.Desc - AccessMethodsFreeSpaceScans *prometheus.Desc - AccessMethodsFullScans *prometheus.Desc - AccessMethodsIndexSearches *prometheus.Desc - AccessMethodsInSysXactwaits *prometheus.Desc - AccessMethodsLobHandleCreateCount *prometheus.Desc - AccessMethodsLobHandleDestroyCount *prometheus.Desc - AccessMethodsLobSSProviderCreateCount *prometheus.Desc - AccessMethodsLobSSProviderDestroyCount *prometheus.Desc - AccessMethodsLobSSProviderTruncationCount *prometheus.Desc - AccessMethodsMixedpageallocations *prometheus.Desc - AccessMethodsPagecompressionattempts *prometheus.Desc - AccessMethodsPageDeallocations *prometheus.Desc - AccessMethodsPagesAllocated *prometheus.Desc - AccessMethodsPagescompressed *prometheus.Desc - AccessMethodsPageSplits *prometheus.Desc - AccessMethodsProbeScans *prometheus.Desc - AccessMethodsRangeScans *prometheus.Desc - AccessMethodsScanPointRevalidations *prometheus.Desc - AccessMethodsSkippedGhostedRecords *prometheus.Desc - AccessMethodsTableLockEscalations *prometheus.Desc - AccessMethodsUsedleafpagecookie *prometheus.Desc - AccessMethodsUsedtreepagecookie *prometheus.Desc - AccessMethodsWorkfilesCreated *prometheus.Desc - AccessMethodsWorktablesCreated *prometheus.Desc - AccessMethodsWorktablesFromCacheHits *prometheus.Desc - AccessMethodsWorktablesFromCacheLookups *prometheus.Desc + accessMethodsAUcleanupbatches *prometheus.Desc + accessMethodsAUcleanups *prometheus.Desc + accessMethodsByReferenceLobCreateCount *prometheus.Desc + accessMethodsByReferenceLobUseCount *prometheus.Desc + accessMethodsCountLobReadahead *prometheus.Desc + accessMethodsCountPullInRow *prometheus.Desc + accessMethodsCountPushOffRow *prometheus.Desc + accessMethodsDeferreddroppedAUs *prometheus.Desc + accessMethodsDeferredDroppedrowsets *prometheus.Desc + accessMethodsDroppedrowsetcleanups *prometheus.Desc + accessMethodsDroppedrowsetsskipped *prometheus.Desc + accessMethodsExtentDeallocations *prometheus.Desc + accessMethodsExtentsAllocated *prometheus.Desc + accessMethodsFailedAUcleanupbatches *prometheus.Desc + accessMethodsFailedleafpagecookie *prometheus.Desc + accessMethodsFailedtreepagecookie *prometheus.Desc + accessMethodsForwardedRecords *prometheus.Desc + accessMethodsFreeSpacePageFetches *prometheus.Desc + accessMethodsFreeSpaceScans *prometheus.Desc + accessMethodsFullScans *prometheus.Desc + accessMethodsIndexSearches *prometheus.Desc + accessMethodsInSysXactwaits *prometheus.Desc + accessMethodsLobHandleCreateCount *prometheus.Desc + accessMethodsLobHandleDestroyCount *prometheus.Desc + accessMethodsLobSSProviderCreateCount *prometheus.Desc + accessMethodsLobSSProviderDestroyCount *prometheus.Desc + accessMethodsLobSSProviderTruncationCount *prometheus.Desc + accessMethodsMixedPageAllocations *prometheus.Desc + accessMethodsPageCompressionAttempts *prometheus.Desc + accessMethodsPageDeallocations *prometheus.Desc + accessMethodsPagesAllocated *prometheus.Desc + accessMethodsPagesCompressed *prometheus.Desc + accessMethodsPageSplits *prometheus.Desc + accessMethodsProbeScans *prometheus.Desc + accessMethodsRangeScans *prometheus.Desc + accessMethodsScanPointRevalidations *prometheus.Desc + accessMethodsSkippedGhostedRecords *prometheus.Desc + accessMethodsTableLockEscalations *prometheus.Desc + accessMethodsUsedleafpagecookie *prometheus.Desc + accessMethodsUsedtreepagecookie *prometheus.Desc + accessMethodsWorkfilesCreated *prometheus.Desc + accessMethodsWorktablesCreated *prometheus.Desc + accessMethodsWorktablesFromCacheHits *prometheus.Desc + accessMethodsWorktablesFromCacheLookups *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerAvailabilityReplica - AvailReplicaBytesReceivedfromReplica *prometheus.Desc - AvailReplicaBytesSenttoReplica *prometheus.Desc - AvailReplicaBytesSenttoTransport *prometheus.Desc - AvailReplicaFlowControl *prometheus.Desc - AvailReplicaFlowControlTimems *prometheus.Desc - AvailReplicaReceivesfromReplica *prometheus.Desc - AvailReplicaResentMessages *prometheus.Desc - AvailReplicaSendstoReplica *prometheus.Desc - AvailReplicaSendstoTransport *prometheus.Desc + availReplicaBytesReceivedFromReplica *prometheus.Desc + availReplicaBytesSentToReplica *prometheus.Desc + availReplicaBytesSentToTransport *prometheus.Desc + availReplicaFlowControl *prometheus.Desc + availReplicaFlowControlTimeMS *prometheus.Desc + availReplicaReceivesFromReplica *prometheus.Desc + availReplicaResentMessages *prometheus.Desc + availReplicaSendsToReplica *prometheus.Desc + availReplicaSendsToTransport *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerBufferManager - BufManBackgroundwriterpages *prometheus.Desc - BufManBuffercachehits *prometheus.Desc - BufManBuffercachelookups *prometheus.Desc - BufManCheckpointpages *prometheus.Desc - BufManDatabasepages *prometheus.Desc - BufManExtensionallocatedpages *prometheus.Desc - BufManExtensionfreepages *prometheus.Desc - BufManExtensioninuseaspercentage *prometheus.Desc - BufManExtensionoutstandingIOcounter *prometheus.Desc - BufManExtensionpageevictions *prometheus.Desc - BufManExtensionpagereads *prometheus.Desc - BufManExtensionpageunreferencedtime *prometheus.Desc - BufManExtensionpagewrites *prometheus.Desc - BufManFreeliststalls *prometheus.Desc - BufManIntegralControllerSlope *prometheus.Desc - BufManLazywrites *prometheus.Desc - BufManPagelifeexpectancy *prometheus.Desc - BufManPagelookups *prometheus.Desc - BufManPagereads *prometheus.Desc - BufManPagewrites *prometheus.Desc - BufManReadaheadpages *prometheus.Desc - BufManReadaheadtime *prometheus.Desc - BufManTargetpages *prometheus.Desc + bufManBackgroundwriterpages *prometheus.Desc + bufManBuffercachehits *prometheus.Desc + bufManBuffercachelookups *prometheus.Desc + bufManCheckpointpages *prometheus.Desc + bufManDatabasepages *prometheus.Desc + bufManExtensionallocatedpages *prometheus.Desc + bufManExtensionfreepages *prometheus.Desc + bufManExtensioninuseaspercentage *prometheus.Desc + bufManExtensionoutstandingIOcounter *prometheus.Desc + bufManExtensionpageevictions *prometheus.Desc + bufManExtensionpagereads *prometheus.Desc + bufManExtensionpageunreferencedtime *prometheus.Desc + bufManExtensionpagewrites *prometheus.Desc + bufManFreeliststalls *prometheus.Desc + bufManIntegralControllerSlope *prometheus.Desc + bufManLazywrites *prometheus.Desc + bufManPagelifeexpectancy *prometheus.Desc + bufManPagelookups *prometheus.Desc + bufManPagereads *prometheus.Desc + bufManPagewrites *prometheus.Desc + bufManReadaheadpages *prometheus.Desc + bufManReadaheadtime *prometheus.Desc + bufManTargetpages *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerDatabaseReplica - DBReplicaDatabaseFlowControlDelay *prometheus.Desc - DBReplicaDatabaseFlowControls *prometheus.Desc - DBReplicaFileBytesReceived *prometheus.Desc - DBReplicaGroupCommits *prometheus.Desc - DBReplicaGroupCommitTime *prometheus.Desc - DBReplicaLogApplyPendingQueue *prometheus.Desc - DBReplicaLogApplyReadyQueue *prometheus.Desc - DBReplicaLogBytesCompressed *prometheus.Desc - DBReplicaLogBytesDecompressed *prometheus.Desc - DBReplicaLogBytesReceived *prometheus.Desc - DBReplicaLogCompressionCachehits *prometheus.Desc - DBReplicaLogCompressionCachemisses *prometheus.Desc - DBReplicaLogCompressions *prometheus.Desc - DBReplicaLogDecompressions *prometheus.Desc - DBReplicaLogremainingforundo *prometheus.Desc - DBReplicaLogSendQueue *prometheus.Desc - DBReplicaMirroredWriteTransactions *prometheus.Desc - DBReplicaRecoveryQueue *prometheus.Desc - DBReplicaRedoblocked *prometheus.Desc - DBReplicaRedoBytesRemaining *prometheus.Desc - DBReplicaRedoneBytes *prometheus.Desc - DBReplicaRedones *prometheus.Desc - DBReplicaTotalLogrequiringundo *prometheus.Desc - DBReplicaTransactionDelay *prometheus.Desc + dbReplicaDatabaseFlowControlDelay *prometheus.Desc + dbReplicaDatabaseFlowControls *prometheus.Desc + dbReplicaFileBytesReceived *prometheus.Desc + dbReplicaGroupCommits *prometheus.Desc + dbReplicaGroupCommitTime *prometheus.Desc + dbReplicaLogApplyPendingQueue *prometheus.Desc + dbReplicaLogApplyReadyQueue *prometheus.Desc + dbReplicaLogBytesCompressed *prometheus.Desc + dbReplicaLogBytesDecompressed *prometheus.Desc + dbReplicaLogBytesReceived *prometheus.Desc + dbReplicaLogCompressionCachehits *prometheus.Desc + dbReplicaLogCompressionCachemisses *prometheus.Desc + dbReplicaLogCompressions *prometheus.Desc + dbReplicaLogDecompressions *prometheus.Desc + dbReplicaLogremainingforundo *prometheus.Desc + dbReplicaLogSendQueue *prometheus.Desc + dbReplicaMirroredWritetransactions *prometheus.Desc + dbReplicaRecoveryQueue *prometheus.Desc + dbReplicaRedoblocked *prometheus.Desc + dbReplicaRedoBytesRemaining *prometheus.Desc + dbReplicaRedoneBytes *prometheus.Desc + dbReplicaRedones *prometheus.Desc + dbReplicaTotalLogrequiringundo *prometheus.Desc + dbReplicaTransactionDelay *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerDatabases - DatabasesActiveParallelredothreads *prometheus.Desc - DatabasesActiveTransactions *prometheus.Desc - DatabasesBackupPerRestoreThroughput *prometheus.Desc - DatabasesBulkCopyRows *prometheus.Desc - DatabasesBulkCopyThroughput *prometheus.Desc - DatabasesCommittableentries *prometheus.Desc - DatabasesDataFilesSizeKB *prometheus.Desc - DatabasesDBCCLogicalScanBytes *prometheus.Desc - DatabasesGroupCommitTime *prometheus.Desc - DatabasesLogBytesFlushed *prometheus.Desc - DatabasesLogCacheHits *prometheus.Desc - DatabasesLogCacheLookups *prometheus.Desc - DatabasesLogCacheReads *prometheus.Desc - DatabasesLogFilesSizeKB *prometheus.Desc - DatabasesLogFilesUsedSizeKB *prometheus.Desc - DatabasesLogFlushes *prometheus.Desc - DatabasesLogFlushWaits *prometheus.Desc - DatabasesLogFlushWaitTime *prometheus.Desc - DatabasesLogFlushWriteTimems *prometheus.Desc - DatabasesLogGrowths *prometheus.Desc - DatabasesLogPoolCacheMisses *prometheus.Desc - DatabasesLogPoolDiskReads *prometheus.Desc - DatabasesLogPoolHashDeletes *prometheus.Desc - DatabasesLogPoolHashInserts *prometheus.Desc - DatabasesLogPoolInvalidHashEntry *prometheus.Desc - DatabasesLogPoolLogScanPushes *prometheus.Desc - DatabasesLogPoolLogWriterPushes *prometheus.Desc - DatabasesLogPoolPushEmptyFreePool *prometheus.Desc - DatabasesLogPoolPushLowMemory *prometheus.Desc - DatabasesLogPoolPushNoFreeBuffer *prometheus.Desc - DatabasesLogPoolReqBehindTrunc *prometheus.Desc - DatabasesLogPoolRequestsOldVLF *prometheus.Desc - DatabasesLogPoolRequests *prometheus.Desc - DatabasesLogPoolTotalActiveLogSize *prometheus.Desc - DatabasesLogPoolTotalSharedPoolSize *prometheus.Desc - DatabasesLogShrinks *prometheus.Desc - DatabasesLogTruncations *prometheus.Desc - DatabasesPercentLogUsed *prometheus.Desc - DatabasesReplPendingXacts *prometheus.Desc - DatabasesReplTransRate *prometheus.Desc - DatabasesShrinkDataMovementBytes *prometheus.Desc - DatabasesTrackedtransactions *prometheus.Desc - DatabasesTransactions *prometheus.Desc - DatabasesWriteTransactions *prometheus.Desc - DatabasesXTPControllerDLCLatencyPerFetch *prometheus.Desc - DatabasesXTPControllerDLCPeakLatency *prometheus.Desc - DatabasesXTPControllerLogProcessed *prometheus.Desc - DatabasesXTPMemoryUsedKB *prometheus.Desc + databasesActiveParallelredothreads *prometheus.Desc + databasesActiveTransactions *prometheus.Desc + databasesBackupPerRestoreThroughput *prometheus.Desc + databasesBulkCopyRows *prometheus.Desc + databasesBulkCopyThroughput *prometheus.Desc + databasesCommitTableEntries *prometheus.Desc + databasesDataFilesSizeKB *prometheus.Desc + databasesDBCCLogicalScanBytes *prometheus.Desc + databasesGroupCommitTime *prometheus.Desc + databasesLogBytesFlushed *prometheus.Desc + databasesLogCacheHits *prometheus.Desc + databasesLogCacheLookups *prometheus.Desc + databasesLogCacheReads *prometheus.Desc + databasesLogFilesSizeKB *prometheus.Desc + databasesLogFilesUsedSizeKB *prometheus.Desc + databasesLogFlushes *prometheus.Desc + databasesLogFlushWaits *prometheus.Desc + databasesLogFlushWaitTime *prometheus.Desc + databasesLogFlushWriteTimeMS *prometheus.Desc + databasesLogGrowths *prometheus.Desc + databasesLogPoolCacheMisses *prometheus.Desc + databasesLogPoolDiskReads *prometheus.Desc + databasesLogPoolHashDeletes *prometheus.Desc + databasesLogPoolHashInserts *prometheus.Desc + databasesLogPoolInvalidHashEntry *prometheus.Desc + databasesLogPoolLogScanPushes *prometheus.Desc + databasesLogPoolLogWriterPushes *prometheus.Desc + databasesLogPoolPushEmptyFreePool *prometheus.Desc + databasesLogPoolPushLowMemory *prometheus.Desc + databasesLogPoolPushNoFreeBuffer *prometheus.Desc + databasesLogPoolReqBehindTrunc *prometheus.Desc + databasesLogPoolRequestsOldVLF *prometheus.Desc + databasesLogPoolRequests *prometheus.Desc + databasesLogPoolTotalActiveLogSize *prometheus.Desc + databasesLogPoolTotalSharedPoolSize *prometheus.Desc + databasesLogShrinks *prometheus.Desc + databasesLogTruncations *prometheus.Desc + databasesPercentLogUsed *prometheus.Desc + databasesReplPendingXacts *prometheus.Desc + databasesReplTransRate *prometheus.Desc + databasesShrinkDataMovementBytes *prometheus.Desc + databasesTrackedTransactions *prometheus.Desc + databasesTransactions *prometheus.Desc + databasesWriteTransactions *prometheus.Desc + databasesXTPControllerDLCLatencyPerFetch *prometheus.Desc + databasesXTPControllerDLCPeakLatency *prometheus.Desc + databasesXTPControllerLogProcessed *prometheus.Desc + databasesXTPMemoryUsedKB *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerGeneralStatistics - GenStatsActiveTempTables *prometheus.Desc - GenStatsConnectionReset *prometheus.Desc - GenStatsEventNotificationsDelayedDrop *prometheus.Desc - GenStatsHTTPAuthenticatedRequests *prometheus.Desc - GenStatsLogicalConnections *prometheus.Desc - GenStatsLogins *prometheus.Desc - GenStatsLogouts *prometheus.Desc - GenStatsMarsDeadlocks *prometheus.Desc - GenStatsNonatomicyieldrate *prometheus.Desc - GenStatsProcessesblocked *prometheus.Desc - GenStatsSOAPEmptyRequests *prometheus.Desc - GenStatsSOAPMethodInvocations *prometheus.Desc - GenStatsSOAPSessionInitiateRequests *prometheus.Desc - GenStatsSOAPSessionTerminateRequests *prometheus.Desc - GenStatsSOAPSQLRequests *prometheus.Desc - GenStatsSOAPWSDLRequests *prometheus.Desc - GenStatsSQLTraceIOProviderLockWaits *prometheus.Desc - GenStatsTempdbrecoveryunitid *prometheus.Desc - GenStatsTempdbrowsetid *prometheus.Desc - GenStatsTempTablesCreationRate *prometheus.Desc - GenStatsTempTablesForDestruction *prometheus.Desc - GenStatsTraceEventNotificationQueue *prometheus.Desc - GenStatsTransactions *prometheus.Desc - GenStatsUserConnections *prometheus.Desc + genStatsActiveTempTables *prometheus.Desc + genStatsConnectionReset *prometheus.Desc + genStatsEventNotificationsDelayedDrop *prometheus.Desc + genStatsHTTPAuthenticatedRequests *prometheus.Desc + genStatsLogicalConnections *prometheus.Desc + genStatsLogins *prometheus.Desc + genStatsLogouts *prometheus.Desc + genStatsMarsDeadlocks *prometheus.Desc + genStatsNonAtomicYieldRate *prometheus.Desc + genStatsProcessesBlocked *prometheus.Desc + genStatsSOAPEmptyRequests *prometheus.Desc + genStatsSOAPMethodInvocations *prometheus.Desc + genStatsSOAPSessionInitiateRequests *prometheus.Desc + genStatsSOAPSessionTerminateRequests *prometheus.Desc + genStatsSOAPSQLRequests *prometheus.Desc + genStatsSOAPWSDLRequests *prometheus.Desc + genStatsSQLTraceIOProviderLockWaits *prometheus.Desc + genStatsTempDBRecoveryUnitID *prometheus.Desc + genStatsTempDBrowSetID *prometheus.Desc + genStatsTempTablesCreationRate *prometheus.Desc + genStatsTempTablesForDestruction *prometheus.Desc + genStatsTraceEventNotificationQueue *prometheus.Desc + genStatsTransactions *prometheus.Desc + genStatsUserConnections *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerLocks - LocksWaitTime *prometheus.Desc - LocksCount *prometheus.Desc - LocksLockRequests *prometheus.Desc - LocksLockTimeouts *prometheus.Desc - LocksLockTimeoutstimeout0 *prometheus.Desc - LocksLockWaits *prometheus.Desc - LocksLockWaitTimems *prometheus.Desc - LocksNumberofDeadlocks *prometheus.Desc + locksWaitTime *prometheus.Desc + locksCount *prometheus.Desc + locksLockRequests *prometheus.Desc + locksLockTimeouts *prometheus.Desc + locksLockTimeoutstimeout0 *prometheus.Desc + locksLockWaits *prometheus.Desc + locksLockWaitTimeMS *prometheus.Desc + locksNumberOfDeadlocks *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerMemoryManager - MemMgrConnectionMemoryKB *prometheus.Desc - MemMgrDatabaseCacheMemoryKB *prometheus.Desc - MemMgrExternalbenefitofmemory *prometheus.Desc - MemMgrFreeMemoryKB *prometheus.Desc - MemMgrGrantedWorkspaceMemoryKB *prometheus.Desc - MemMgrLockBlocks *prometheus.Desc - MemMgrLockBlocksAllocated *prometheus.Desc - MemMgrLockMemoryKB *prometheus.Desc - MemMgrLockOwnerBlocks *prometheus.Desc - MemMgrLockOwnerBlocksAllocated *prometheus.Desc - MemMgrLogPoolMemoryKB *prometheus.Desc - MemMgrMaximumWorkspaceMemoryKB *prometheus.Desc - MemMgrMemoryGrantsOutstanding *prometheus.Desc - MemMgrMemoryGrantsPending *prometheus.Desc - MemMgrOptimizerMemoryKB *prometheus.Desc - MemMgrReservedServerMemoryKB *prometheus.Desc - MemMgrSQLCacheMemoryKB *prometheus.Desc - MemMgrStolenServerMemoryKB *prometheus.Desc - MemMgrTargetServerMemoryKB *prometheus.Desc - MemMgrTotalServerMemoryKB *prometheus.Desc + memMgrConnectionMemoryKB *prometheus.Desc + memMgrDatabaseCacheMemoryKB *prometheus.Desc + memMgrExternalbenefitofmemory *prometheus.Desc + memMgrFreeMemoryKB *prometheus.Desc + memMgrGrantedWorkspaceMemoryKB *prometheus.Desc + memMgrLockBlocks *prometheus.Desc + memMgrLockBlocksAllocated *prometheus.Desc + memMgrLockMemoryKB *prometheus.Desc + memMgrLockOwnerBlocks *prometheus.Desc + memMgrLockOwnerBlocksAllocated *prometheus.Desc + memMgrLogPoolMemoryKB *prometheus.Desc + memMgrMaximumWorkspaceMemoryKB *prometheus.Desc + memMgrMemoryGrantsOutstanding *prometheus.Desc + memMgrMemoryGrantsPending *prometheus.Desc + memMgrOptimizerMemoryKB *prometheus.Desc + memMgrReservedServerMemoryKB *prometheus.Desc + memMgrSQLCacheMemoryKB *prometheus.Desc + memMgrStolenServerMemoryKB *prometheus.Desc + memMgrTargetServerMemoryKB *prometheus.Desc + memMgrTotalServerMemoryKB *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerSQLStatistics - SQLStatsAutoParamAttempts *prometheus.Desc - SQLStatsBatchRequests *prometheus.Desc - SQLStatsFailedAutoParams *prometheus.Desc - SQLStatsForcedParameterizations *prometheus.Desc - SQLStatsGuidedplanexecutions *prometheus.Desc - SQLStatsMisguidedplanexecutions *prometheus.Desc - SQLStatsSafeAutoParams *prometheus.Desc - SQLStatsSQLAttentionrate *prometheus.Desc - SQLStatsSQLCompilations *prometheus.Desc - SQLStatsSQLReCompilations *prometheus.Desc - SQLStatsUnsafeAutoParams *prometheus.Desc + sqlStatsAutoParamAttempts *prometheus.Desc + sqlStatsBatchRequests *prometheus.Desc + sqlStatsFailedAutoParams *prometheus.Desc + sqlStatsForcedParameterizations *prometheus.Desc + sqlStatsGuidedplanexecutions *prometheus.Desc + sqlStatsMisguidedplanexecutions *prometheus.Desc + sqlStatsSafeAutoParams *prometheus.Desc + sqlStatsSQLAttentionrate *prometheus.Desc + sqlStatsSQLCompilations *prometheus.Desc + sqlStatsSQLReCompilations *prometheus.Desc + sqlStatsUnsafeAutoParams *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerSQLErrors - SQLErrorsTotal *prometheus.Desc + sqlErrorsTotal *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerTransactions - TransactionsTempDbFreeSpaceBytes *prometheus.Desc - TransactionsLongestTransactionRunningSeconds *prometheus.Desc - TransactionsNonSnapshotVersionActiveTotal *prometheus.Desc - TransactionsSnapshotActiveTotal *prometheus.Desc - TransactionsActive *prometheus.Desc - TransactionsUpdateConflictsTotal *prometheus.Desc - TransactionsUpdateSnapshotActiveTotal *prometheus.Desc - TransactionsVersionCleanupRateBytes *prometheus.Desc - TransactionsVersionGenerationRateBytes *prometheus.Desc - TransactionsVersionStoreSizeBytes *prometheus.Desc - TransactionsVersionStoreUnits *prometheus.Desc - TransactionsVersionStoreCreationUnits *prometheus.Desc - TransactionsVersionStoreTruncationUnits *prometheus.Desc + transactionsTempDbFreeSpaceBytes *prometheus.Desc + transactionsLongestTransactionRunningSeconds *prometheus.Desc + transactionsNonSnapshotVersionActiveTotal *prometheus.Desc + transactionsSnapshotActiveTotal *prometheus.Desc + transactionsActive *prometheus.Desc + transactionsUpdateConflictsTotal *prometheus.Desc + transactionsUpdateSnapshotActiveTotal *prometheus.Desc + transactionsVersionCleanupRateBytes *prometheus.Desc + transactionsVersionGenerationRateBytes *prometheus.Desc + transactionsVersionStoreSizeBytes *prometheus.Desc + transactionsVersionStoreUnits *prometheus.Desc + transactionsVersionStoreCreationUnits *prometheus.Desc + transactionsVersionStoreTruncationUnits *prometheus.Desc // Win32_PerfRawData_{instance}_SQLServerWaitStatistics - WaitStatsLockWaits *prometheus.Desc - WaitStatsMemoryGrantQueueWaits *prometheus.Desc - WaitStatsThreadSafeMemoryObjectsWaits *prometheus.Desc - WaitStatsLogWriteWaits *prometheus.Desc - WaitStatsLogBufferWaits *prometheus.Desc - WaitStatsNetworkIOWaits *prometheus.Desc - WaitStatsPageIOLatchWaits *prometheus.Desc - WaitStatsPageLatchWaits *prometheus.Desc - WaitStatsNonpageLatchWaits *prometheus.Desc - WaitStatsWaitForTheWorkerWaits *prometheus.Desc - WaitStatsWorkspaceSynchronizationWaits *prometheus.Desc - WaitStatsTransactionOwnershipWaits *prometheus.Desc + waitStatsLockWaits *prometheus.Desc + waitStatsMemoryGrantQueueWaits *prometheus.Desc + waitStatsThreadSafeMemoryObjectsWaits *prometheus.Desc + waitStatsLogWriteWaits *prometheus.Desc + waitStatsLogBufferWaits *prometheus.Desc + waitStatsNetworkIOWaits *prometheus.Desc + waitStatsPageIOLatchWaits *prometheus.Desc + waitStatsPageLatchWaits *prometheus.Desc + waitStatsNonPageLatchWaits *prometheus.Desc + waitStatsWaitForTheWorkerWaits *prometheus.Desc + waitStatsWorkspaceSynchronizationWaits *prometheus.Desc + waitStatsTransactionOwnershipWaits *prometheus.Desc mssqlInstances mssqlInstancesType mssqlCollectors mssqlCollectorsMap @@ -474,265 +474,265 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerAccessMethods - c.AccessMethodsAUcleanupbatches = prometheus.NewDesc( + c.accessMethodsAUcleanupbatches = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_au_batch_cleanups"), "(AccessMethods.AUcleanupbatches)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsAUcleanups = prometheus.NewDesc( + c.accessMethodsAUcleanups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_au_cleanups"), "(AccessMethods.AUcleanups)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsByreferenceLobCreateCount = prometheus.NewDesc( + c.accessMethodsByReferenceLobCreateCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_by_reference_lob_creates"), "(AccessMethods.ByreferenceLobCreateCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsByreferenceLobUseCount = prometheus.NewDesc( + c.accessMethodsByReferenceLobUseCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_by_reference_lob_uses"), "(AccessMethods.ByreferenceLobUseCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsCountLobReadahead = prometheus.NewDesc( + c.accessMethodsCountLobReadahead = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_read_aheads"), "(AccessMethods.CountLobReadahead)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsCountPullInRow = prometheus.NewDesc( + c.accessMethodsCountPullInRow = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_column_value_pulls"), "(AccessMethods.CountPullInRow)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsCountPushOffRow = prometheus.NewDesc( + c.accessMethodsCountPushOffRow = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_column_value_pushes"), "(AccessMethods.CountPushOffRow)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsDeferreddroppedAUs = prometheus.NewDesc( + c.accessMethodsDeferreddroppedAUs = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_deferred_dropped_aus"), "(AccessMethods.DeferreddroppedAUs)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsDeferredDroppedrowsets = prometheus.NewDesc( + c.accessMethodsDeferredDroppedrowsets = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_deferred_dropped_rowsets"), "(AccessMethods.DeferredDroppedrowsets)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsDroppedrowsetcleanups = prometheus.NewDesc( + c.accessMethodsDroppedrowsetcleanups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_dropped_rowset_cleanups"), "(AccessMethods.Droppedrowsetcleanups)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsDroppedrowsetsskipped = prometheus.NewDesc( + c.accessMethodsDroppedrowsetsskipped = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_dropped_rowset_skips"), "(AccessMethods.Droppedrowsetsskipped)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsExtentDeallocations = prometheus.NewDesc( + c.accessMethodsExtentDeallocations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_extent_deallocations"), "(AccessMethods.ExtentDeallocations)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsExtentsAllocated = prometheus.NewDesc( + c.accessMethodsExtentsAllocated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_extent_allocations"), "(AccessMethods.ExtentsAllocated)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFailedAUcleanupbatches = prometheus.NewDesc( + c.accessMethodsFailedAUcleanupbatches = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_au_batch_cleanup_failures"), "(AccessMethods.FailedAUcleanupbatches)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFailedleafpagecookie = prometheus.NewDesc( + c.accessMethodsFailedleafpagecookie = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_leaf_page_cookie_failures"), "(AccessMethods.Failedleafpagecookie)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFailedtreepagecookie = prometheus.NewDesc( + c.accessMethodsFailedtreepagecookie = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_tree_page_cookie_failures"), "(AccessMethods.Failedtreepagecookie)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsForwardedRecords = prometheus.NewDesc( + c.accessMethodsForwardedRecords = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_forwarded_records"), "(AccessMethods.ForwardedRecords)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFreeSpacePageFetches = prometheus.NewDesc( + c.accessMethodsFreeSpacePageFetches = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_free_space_page_fetches"), "(AccessMethods.FreeSpacePageFetches)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFreeSpaceScans = prometheus.NewDesc( + c.accessMethodsFreeSpaceScans = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_free_space_scans"), "(AccessMethods.FreeSpaceScans)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsFullScans = prometheus.NewDesc( + c.accessMethodsFullScans = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_full_scans"), "(AccessMethods.FullScans)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsIndexSearches = prometheus.NewDesc( + c.accessMethodsIndexSearches = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_index_searches"), "(AccessMethods.IndexSearches)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsInSysXactwaits = prometheus.NewDesc( + c.accessMethodsInSysXactwaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_insysxact_waits"), "(AccessMethods.InSysXactwaits)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsLobHandleCreateCount = prometheus.NewDesc( + c.accessMethodsLobHandleCreateCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_handle_creates"), "(AccessMethods.LobHandleCreateCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsLobHandleDestroyCount = prometheus.NewDesc( + c.accessMethodsLobHandleDestroyCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_handle_destroys"), "(AccessMethods.LobHandleDestroyCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsLobSSProviderCreateCount = prometheus.NewDesc( + c.accessMethodsLobSSProviderCreateCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_ss_provider_creates"), "(AccessMethods.LobSSProviderCreateCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsLobSSProviderDestroyCount = prometheus.NewDesc( + c.accessMethodsLobSSProviderDestroyCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_ss_provider_destroys"), "(AccessMethods.LobSSProviderDestroyCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsLobSSProviderTruncationCount = prometheus.NewDesc( + c.accessMethodsLobSSProviderTruncationCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_lob_ss_provider_truncations"), "(AccessMethods.LobSSProviderTruncationCount)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsMixedpageallocations = prometheus.NewDesc( + c.accessMethodsMixedPageAllocations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_mixed_page_allocations"), "(AccessMethods.MixedpageallocationsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsPagecompressionattempts = prometheus.NewDesc( + c.accessMethodsPageCompressionAttempts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_page_compression_attempts"), "(AccessMethods.PagecompressionattemptsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsPageDeallocations = prometheus.NewDesc( + c.accessMethodsPageDeallocations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_page_deallocations"), "(AccessMethods.PageDeallocationsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsPagesAllocated = prometheus.NewDesc( + c.accessMethodsPagesAllocated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_page_allocations"), "(AccessMethods.PagesAllocatedPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsPagescompressed = prometheus.NewDesc( + c.accessMethodsPagesCompressed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_page_compressions"), "(AccessMethods.PagescompressedPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsPageSplits = prometheus.NewDesc( + c.accessMethodsPageSplits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_page_splits"), "(AccessMethods.PageSplitsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsProbeScans = prometheus.NewDesc( + c.accessMethodsProbeScans = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_probe_scans"), "(AccessMethods.ProbeScansPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsRangeScans = prometheus.NewDesc( + c.accessMethodsRangeScans = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_range_scans"), "(AccessMethods.RangeScansPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsScanPointRevalidations = prometheus.NewDesc( + c.accessMethodsScanPointRevalidations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_scan_point_revalidations"), "(AccessMethods.ScanPointRevalidationsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsSkippedGhostedRecords = prometheus.NewDesc( + c.accessMethodsSkippedGhostedRecords = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_ghost_record_skips"), "(AccessMethods.SkippedGhostedRecordsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsTableLockEscalations = prometheus.NewDesc( + c.accessMethodsTableLockEscalations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_table_lock_escalations"), "(AccessMethods.TableLockEscalationsPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsUsedleafpagecookie = prometheus.NewDesc( + c.accessMethodsUsedleafpagecookie = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_leaf_page_cookie_uses"), "(AccessMethods.Usedleafpagecookie)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsUsedtreepagecookie = prometheus.NewDesc( + c.accessMethodsUsedtreepagecookie = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_tree_page_cookie_uses"), "(AccessMethods.Usedtreepagecookie)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsWorkfilesCreated = prometheus.NewDesc( + c.accessMethodsWorkfilesCreated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_workfile_creates"), "(AccessMethods.WorkfilesCreatedPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsWorktablesCreated = prometheus.NewDesc( + c.accessMethodsWorktablesCreated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_worktables_creates"), "(AccessMethods.WorktablesCreatedPersec)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsWorktablesFromCacheHits = prometheus.NewDesc( + c.accessMethodsWorktablesFromCacheHits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_worktables_from_cache_hits"), "(AccessMethods.WorktablesFromCacheRatio)", []string{"mssql_instance"}, nil, ) - c.AccessMethodsWorktablesFromCacheLookups = prometheus.NewDesc( + c.accessMethodsWorktablesFromCacheLookups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "accessmethods_worktables_from_cache_lookups"), "(AccessMethods.WorktablesFromCacheRatio_Base)", []string{"mssql_instance"}, @@ -740,55 +740,55 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerAvailabilityReplica - c.AvailReplicaBytesReceivedfromReplica = prometheus.NewDesc( + c.availReplicaBytesReceivedFromReplica = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_received_from_replica_bytes"), "(AvailabilityReplica.BytesReceivedfromReplica)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaBytesSenttoReplica = prometheus.NewDesc( + c.availReplicaBytesSentToReplica = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_sent_to_replica_bytes"), "(AvailabilityReplica.BytesSenttoReplica)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaBytesSenttoTransport = prometheus.NewDesc( + c.availReplicaBytesSentToTransport = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_sent_to_transport_bytes"), "(AvailabilityReplica.BytesSenttoTransport)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaFlowControl = prometheus.NewDesc( + c.availReplicaFlowControl = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_initiated_flow_controls"), "(AvailabilityReplica.FlowControl)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaFlowControlTimems = prometheus.NewDesc( + c.availReplicaFlowControlTimeMS = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_flow_control_wait_seconds"), "(AvailabilityReplica.FlowControlTimems)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaReceivesfromReplica = prometheus.NewDesc( + c.availReplicaReceivesFromReplica = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_receives_from_replica"), "(AvailabilityReplica.ReceivesfromReplica)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaResentMessages = prometheus.NewDesc( + c.availReplicaResentMessages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_resent_messages"), "(AvailabilityReplica.ResentMessages)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaSendstoReplica = prometheus.NewDesc( + c.availReplicaSendsToReplica = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_sends_to_replica"), "(AvailabilityReplica.SendstoReplica)", []string{"mssql_instance", "replica"}, nil, ) - c.AvailReplicaSendstoTransport = prometheus.NewDesc( + c.availReplicaSendsToTransport = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "availreplica_sends_to_transport"), "(AvailabilityReplica.SendstoTransport)", []string{"mssql_instance", "replica"}, @@ -796,139 +796,139 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerBufferManager - c.BufManBackgroundwriterpages = prometheus.NewDesc( + c.bufManBackgroundwriterpages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_background_writer_pages"), "(BufferManager.Backgroundwriterpages)", []string{"mssql_instance"}, nil, ) - c.BufManBuffercachehits = prometheus.NewDesc( + c.bufManBuffercachehits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_buffer_cache_hits"), "(BufferManager.Buffercachehitratio)", []string{"mssql_instance"}, nil, ) - c.BufManBuffercachelookups = prometheus.NewDesc( + c.bufManBuffercachelookups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_buffer_cache_lookups"), "(BufferManager.Buffercachehitratio_Base)", []string{"mssql_instance"}, nil, ) - c.BufManCheckpointpages = prometheus.NewDesc( + c.bufManCheckpointpages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_checkpoint_pages"), "(BufferManager.Checkpointpages)", []string{"mssql_instance"}, nil, ) - c.BufManDatabasepages = prometheus.NewDesc( + c.bufManDatabasepages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_database_pages"), "(BufferManager.Databasepages)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionallocatedpages = prometheus.NewDesc( + c.bufManExtensionallocatedpages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_allocated_pages"), "(BufferManager.Extensionallocatedpages)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionfreepages = prometheus.NewDesc( + c.bufManExtensionfreepages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_free_pages"), "(BufferManager.Extensionfreepages)", []string{"mssql_instance"}, nil, ) - c.BufManExtensioninuseaspercentage = prometheus.NewDesc( + c.bufManExtensioninuseaspercentage = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_in_use_as_percentage"), "(BufferManager.Extensioninuseaspercentage)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionoutstandingIOcounter = prometheus.NewDesc( + c.bufManExtensionoutstandingIOcounter = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_outstanding_io"), "(BufferManager.ExtensionoutstandingIOcounter)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionpageevictions = prometheus.NewDesc( + c.bufManExtensionpageevictions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_page_evictions"), "(BufferManager.Extensionpageevictions)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionpagereads = prometheus.NewDesc( + c.bufManExtensionpagereads = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_page_reads"), "(BufferManager.Extensionpagereads)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionpageunreferencedtime = prometheus.NewDesc( + c.bufManExtensionpageunreferencedtime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_page_unreferenced_seconds"), "(BufferManager.Extensionpageunreferencedtime)", []string{"mssql_instance"}, nil, ) - c.BufManExtensionpagewrites = prometheus.NewDesc( + c.bufManExtensionpagewrites = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_extension_page_writes"), "(BufferManager.Extensionpagewrites)", []string{"mssql_instance"}, nil, ) - c.BufManFreeliststalls = prometheus.NewDesc( + c.bufManFreeliststalls = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_free_list_stalls"), "(BufferManager.Freeliststalls)", []string{"mssql_instance"}, nil, ) - c.BufManIntegralControllerSlope = prometheus.NewDesc( + c.bufManIntegralControllerSlope = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_integral_controller_slope"), "(BufferManager.IntegralControllerSlope)", []string{"mssql_instance"}, nil, ) - c.BufManLazywrites = prometheus.NewDesc( + c.bufManLazywrites = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_lazywrites"), "(BufferManager.Lazywrites)", []string{"mssql_instance"}, nil, ) - c.BufManPagelifeexpectancy = prometheus.NewDesc( + c.bufManPagelifeexpectancy = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_page_life_expectancy_seconds"), "(BufferManager.Pagelifeexpectancy)", []string{"mssql_instance"}, nil, ) - c.BufManPagelookups = prometheus.NewDesc( + c.bufManPagelookups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_page_lookups"), "(BufferManager.Pagelookups)", []string{"mssql_instance"}, nil, ) - c.BufManPagereads = prometheus.NewDesc( + c.bufManPagereads = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_page_reads"), "(BufferManager.Pagereads)", []string{"mssql_instance"}, nil, ) - c.BufManPagewrites = prometheus.NewDesc( + c.bufManPagewrites = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_page_writes"), "(BufferManager.Pagewrites)", []string{"mssql_instance"}, nil, ) - c.BufManReadaheadpages = prometheus.NewDesc( + c.bufManReadaheadpages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_read_ahead_pages"), "(BufferManager.Readaheadpages)", []string{"mssql_instance"}, nil, ) - c.BufManReadaheadtime = prometheus.NewDesc( + c.bufManReadaheadtime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_read_ahead_issuing_seconds"), "(BufferManager.Readaheadtime)", []string{"mssql_instance"}, nil, ) - c.BufManTargetpages = prometheus.NewDesc( + c.bufManTargetpages = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bufman_target_pages"), "(BufferManager.Targetpages)", []string{"mssql_instance"}, @@ -936,145 +936,145 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerDatabaseReplica - c.DBReplicaDatabaseFlowControlDelay = prometheus.NewDesc( + c.dbReplicaDatabaseFlowControlDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_database_flow_control_wait_seconds"), "(DatabaseReplica.DatabaseFlowControlDelay)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaDatabaseFlowControls = prometheus.NewDesc( + c.dbReplicaDatabaseFlowControls = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_database_initiated_flow_controls"), "(DatabaseReplica.DatabaseFlowControls)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaFileBytesReceived = prometheus.NewDesc( + c.dbReplicaFileBytesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_received_file_bytes"), "(DatabaseReplica.FileBytesReceived)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaGroupCommits = prometheus.NewDesc( + c.dbReplicaGroupCommits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_group_commits"), "(DatabaseReplica.GroupCommits)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaGroupCommitTime = prometheus.NewDesc( + c.dbReplicaGroupCommitTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_group_commit_stall_seconds"), "(DatabaseReplica.GroupCommitTime)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogApplyPendingQueue = prometheus.NewDesc( + c.dbReplicaLogApplyPendingQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_apply_pending_queue"), "(DatabaseReplica.LogApplyPendingQueue)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogApplyReadyQueue = prometheus.NewDesc( + c.dbReplicaLogApplyReadyQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_apply_ready_queue"), "(DatabaseReplica.LogApplyReadyQueue)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogBytesCompressed = prometheus.NewDesc( + c.dbReplicaLogBytesCompressed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_compressed_bytes"), "(DatabaseReplica.LogBytesCompressed)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogBytesDecompressed = prometheus.NewDesc( + c.dbReplicaLogBytesDecompressed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_decompressed_bytes"), "(DatabaseReplica.LogBytesDecompressed)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogBytesReceived = prometheus.NewDesc( + c.dbReplicaLogBytesReceived = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_received_bytes"), "(DatabaseReplica.LogBytesReceived)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogCompressionCachehits = prometheus.NewDesc( + c.dbReplicaLogCompressionCachehits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_compression_cachehits"), "(DatabaseReplica.LogCompressionCachehits)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogCompressionCachemisses = prometheus.NewDesc( + c.dbReplicaLogCompressionCachemisses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_compression_cachemisses"), "(DatabaseReplica.LogCompressionCachemisses)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogCompressions = prometheus.NewDesc( + c.dbReplicaLogCompressions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_compressions"), "(DatabaseReplica.LogCompressions)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogDecompressions = prometheus.NewDesc( + c.dbReplicaLogDecompressions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_decompressions"), "(DatabaseReplica.LogDecompressions)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogremainingforundo = prometheus.NewDesc( + c.dbReplicaLogremainingforundo = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_remaining_for_undo"), "(DatabaseReplica.Logremainingforundo)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaLogSendQueue = prometheus.NewDesc( + c.dbReplicaLogSendQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_log_send_queue"), "(DatabaseReplica.LogSendQueue)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaMirroredWriteTransactions = prometheus.NewDesc( + c.dbReplicaMirroredWritetransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_mirrored_write_transactions"), "(DatabaseReplica.MirroredWriteTransactions)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaRecoveryQueue = prometheus.NewDesc( + c.dbReplicaRecoveryQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_recovery_queue_records"), "(DatabaseReplica.RecoveryQueue)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaRedoblocked = prometheus.NewDesc( + c.dbReplicaRedoblocked = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_redo_blocks"), "(DatabaseReplica.Redoblocked)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaRedoBytesRemaining = prometheus.NewDesc( + c.dbReplicaRedoBytesRemaining = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_redo_remaining_bytes"), "(DatabaseReplica.RedoBytesRemaining)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaRedoneBytes = prometheus.NewDesc( + c.dbReplicaRedoneBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_redone_bytes"), "(DatabaseReplica.RedoneBytes)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaRedones = prometheus.NewDesc( + c.dbReplicaRedones = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_redones"), "(DatabaseReplica.Redones)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaTotalLogrequiringundo = prometheus.NewDesc( + c.dbReplicaTotalLogrequiringundo = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_total_log_requiring_undo"), "(DatabaseReplica.TotalLogrequiringundo)", []string{"mssql_instance", "replica"}, nil, ) - c.DBReplicaTransactionDelay = prometheus.NewDesc( + c.dbReplicaTransactionDelay = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "dbreplica_transaction_delay_seconds"), "(DatabaseReplica.TransactionDelay)", []string{"mssql_instance", "replica"}, @@ -1082,289 +1082,289 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerDatabases - c.DatabasesActiveParallelredothreads = prometheus.NewDesc( + c.databasesActiveParallelredothreads = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_active_parallel_redo_threads"), "(Databases.ActiveParallelredothreads)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesActiveTransactions = prometheus.NewDesc( + c.databasesActiveTransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_active_transactions"), "(Databases.ActiveTransactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesBackupPerRestoreThroughput = prometheus.NewDesc( + c.databasesBackupPerRestoreThroughput = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_backup_restore_operations"), "(Databases.BackupPerRestoreThroughput)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesBulkCopyRows = prometheus.NewDesc( + c.databasesBulkCopyRows = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_bulk_copy_rows"), "(Databases.BulkCopyRows)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesBulkCopyThroughput = prometheus.NewDesc( + c.databasesBulkCopyThroughput = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_bulk_copy_bytes"), "(Databases.BulkCopyThroughput)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesCommittableentries = prometheus.NewDesc( + c.databasesCommitTableEntries = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_commit_table_entries"), "(Databases.Committableentries)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesDataFilesSizeKB = prometheus.NewDesc( + c.databasesDataFilesSizeKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_data_files_size_bytes"), "(Databases.DataFilesSizeKB)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesDBCCLogicalScanBytes = prometheus.NewDesc( + c.databasesDBCCLogicalScanBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_dbcc_logical_scan_bytes"), "(Databases.DBCCLogicalScanBytes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesGroupCommitTime = prometheus.NewDesc( + c.databasesGroupCommitTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_group_commit_stall_seconds"), "(Databases.GroupCommitTime)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogBytesFlushed = prometheus.NewDesc( + c.databasesLogBytesFlushed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_flushed_bytes"), "(Databases.LogBytesFlushed)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogCacheHits = prometheus.NewDesc( + c.databasesLogCacheHits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_cache_hits"), "(Databases.LogCacheHitRatio)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogCacheLookups = prometheus.NewDesc( + c.databasesLogCacheLookups = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_cache_lookups"), "(Databases.LogCacheHitRatio_Base)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogCacheReads = prometheus.NewDesc( + c.databasesLogCacheReads = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_cache_reads"), "(Databases.LogCacheReads)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFilesSizeKB = prometheus.NewDesc( + c.databasesLogFilesSizeKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_files_size_bytes"), "(Databases.LogFilesSizeKB)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFilesUsedSizeKB = prometheus.NewDesc( + c.databasesLogFilesUsedSizeKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_files_used_size_bytes"), "(Databases.LogFilesUsedSizeKB)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFlushes = prometheus.NewDesc( + c.databasesLogFlushes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_flushes"), "(Databases.LogFlushes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFlushWaits = prometheus.NewDesc( + c.databasesLogFlushWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_flush_waits"), "(Databases.LogFlushWaits)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFlushWaitTime = prometheus.NewDesc( + c.databasesLogFlushWaitTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_flush_wait_seconds"), "(Databases.LogFlushWaitTime)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogFlushWriteTimems = prometheus.NewDesc( + c.databasesLogFlushWriteTimeMS = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_flush_write_seconds"), "(Databases.LogFlushWriteTimems)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogGrowths = prometheus.NewDesc( + c.databasesLogGrowths = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_growths"), "(Databases.LogGrowths)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolCacheMisses = prometheus.NewDesc( + c.databasesLogPoolCacheMisses = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_cache_misses"), "(Databases.LogPoolCacheMisses)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolDiskReads = prometheus.NewDesc( + c.databasesLogPoolDiskReads = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_disk_reads"), "(Databases.LogPoolDiskReads)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolHashDeletes = prometheus.NewDesc( + c.databasesLogPoolHashDeletes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_hash_deletes"), "(Databases.LogPoolHashDeletes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolHashInserts = prometheus.NewDesc( + c.databasesLogPoolHashInserts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_hash_inserts"), "(Databases.LogPoolHashInserts)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolInvalidHashEntry = prometheus.NewDesc( + c.databasesLogPoolInvalidHashEntry = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_invalid_hash_entries"), "(Databases.LogPoolInvalidHashEntry)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolLogScanPushes = prometheus.NewDesc( + c.databasesLogPoolLogScanPushes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_log_scan_pushes"), "(Databases.LogPoolLogScanPushes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolLogWriterPushes = prometheus.NewDesc( + c.databasesLogPoolLogWriterPushes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_log_writer_pushes"), "(Databases.LogPoolLogWriterPushes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolPushEmptyFreePool = prometheus.NewDesc( + c.databasesLogPoolPushEmptyFreePool = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_empty_free_pool_pushes"), "(Databases.LogPoolPushEmptyFreePool)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolPushLowMemory = prometheus.NewDesc( + c.databasesLogPoolPushLowMemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_low_memory_pushes"), "(Databases.LogPoolPushLowMemory)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolPushNoFreeBuffer = prometheus.NewDesc( + c.databasesLogPoolPushNoFreeBuffer = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_no_free_buffer_pushes"), "(Databases.LogPoolPushNoFreeBuffer)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolReqBehindTrunc = prometheus.NewDesc( + c.databasesLogPoolReqBehindTrunc = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_req_behind_trunc"), "(Databases.LogPoolReqBehindTrunc)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolRequestsOldVLF = prometheus.NewDesc( + c.databasesLogPoolRequestsOldVLF = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_requests_old_vlf"), "(Databases.LogPoolRequestsOldVLF)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolRequests = prometheus.NewDesc( + c.databasesLogPoolRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_requests"), "(Databases.LogPoolRequests)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolTotalActiveLogSize = prometheus.NewDesc( + c.databasesLogPoolTotalActiveLogSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_total_active_log_bytes"), "(Databases.LogPoolTotalActiveLogSize)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogPoolTotalSharedPoolSize = prometheus.NewDesc( + c.databasesLogPoolTotalSharedPoolSize = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_pool_total_shared_pool_bytes"), "(Databases.LogPoolTotalSharedPoolSize)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogShrinks = prometheus.NewDesc( + c.databasesLogShrinks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_shrinks"), "(Databases.LogShrinks)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesLogTruncations = prometheus.NewDesc( + c.databasesLogTruncations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_truncations"), "(Databases.LogTruncations)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesPercentLogUsed = prometheus.NewDesc( + c.databasesPercentLogUsed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_log_used_percent"), "(Databases.PercentLogUsed)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesReplPendingXacts = prometheus.NewDesc( + c.databasesReplPendingXacts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_pending_repl_transactions"), "(Databases.ReplPendingTransactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesReplTransRate = prometheus.NewDesc( + c.databasesReplTransRate = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_repl_transactions"), "(Databases.ReplTranactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesShrinkDataMovementBytes = prometheus.NewDesc( + c.databasesShrinkDataMovementBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_shrink_data_movement_bytes"), "(Databases.ShrinkDataMovementBytes)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesTrackedtransactions = prometheus.NewDesc( + c.databasesTrackedTransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_tracked_transactions"), "(Databases.Trackedtransactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesTransactions = prometheus.NewDesc( + c.databasesTransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_transactions"), "(Databases.Transactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesWriteTransactions = prometheus.NewDesc( + c.databasesWriteTransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_write_transactions"), "(Databases.WriteTransactions)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesXTPControllerDLCLatencyPerFetch = prometheus.NewDesc( + c.databasesXTPControllerDLCLatencyPerFetch = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_xtp_controller_dlc_fetch_latency_seconds"), "(Databases.XTPControllerDLCLatencyPerFetch)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesXTPControllerDLCPeakLatency = prometheus.NewDesc( + c.databasesXTPControllerDLCPeakLatency = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_xtp_controller_dlc_peak_latency_seconds"), "(Databases.XTPControllerDLCPeakLatency)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesXTPControllerLogProcessed = prometheus.NewDesc( + c.databasesXTPControllerLogProcessed = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_xtp_controller_log_processed_bytes"), "(Databases.XTPControllerLogProcessed)", []string{"mssql_instance", "database"}, nil, ) - c.DatabasesXTPMemoryUsedKB = prometheus.NewDesc( + c.databasesXTPMemoryUsedKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "databases_xtp_memory_used_bytes"), "(Databases.XTPMemoryUsedKB)", []string{"mssql_instance", "database"}, @@ -1372,145 +1372,145 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerGeneralStatistics - c.GenStatsActiveTempTables = prometheus.NewDesc( + c.genStatsActiveTempTables = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_active_temp_tables"), "(GeneralStatistics.ActiveTempTables)", []string{"mssql_instance"}, nil, ) - c.GenStatsConnectionReset = prometheus.NewDesc( + c.genStatsConnectionReset = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_connection_resets"), "(GeneralStatistics.ConnectionReset)", []string{"mssql_instance"}, nil, ) - c.GenStatsEventNotificationsDelayedDrop = prometheus.NewDesc( + c.genStatsEventNotificationsDelayedDrop = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_event_notifications_delayed_drop"), "(GeneralStatistics.EventNotificationsDelayedDrop)", []string{"mssql_instance"}, nil, ) - c.GenStatsHTTPAuthenticatedRequests = prometheus.NewDesc( + c.genStatsHTTPAuthenticatedRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_http_authenticated_requests"), "(GeneralStatistics.HTTPAuthenticatedRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsLogicalConnections = prometheus.NewDesc( + c.genStatsLogicalConnections = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_logical_connections"), "(GeneralStatistics.LogicalConnections)", []string{"mssql_instance"}, nil, ) - c.GenStatsLogins = prometheus.NewDesc( + c.genStatsLogins = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_logins"), "(GeneralStatistics.Logins)", []string{"mssql_instance"}, nil, ) - c.GenStatsLogouts = prometheus.NewDesc( + c.genStatsLogouts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_logouts"), "(GeneralStatistics.Logouts)", []string{"mssql_instance"}, nil, ) - c.GenStatsMarsDeadlocks = prometheus.NewDesc( + c.genStatsMarsDeadlocks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_mars_deadlocks"), "(GeneralStatistics.MarsDeadlocks)", []string{"mssql_instance"}, nil, ) - c.GenStatsNonatomicyieldrate = prometheus.NewDesc( + c.genStatsNonAtomicYieldRate = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_non_atomic_yields"), "(GeneralStatistics.Nonatomicyields)", []string{"mssql_instance"}, nil, ) - c.GenStatsProcessesblocked = prometheus.NewDesc( + c.genStatsProcessesBlocked = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_blocked_processes"), "(GeneralStatistics.Processesblocked)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPEmptyRequests = prometheus.NewDesc( + c.genStatsSOAPEmptyRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soap_empty_requests"), "(GeneralStatistics.SOAPEmptyRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPMethodInvocations = prometheus.NewDesc( + c.genStatsSOAPMethodInvocations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soap_method_invocations"), "(GeneralStatistics.SOAPMethodInvocations)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPSessionInitiateRequests = prometheus.NewDesc( + c.genStatsSOAPSessionInitiateRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soap_session_initiate_requests"), "(GeneralStatistics.SOAPSessionInitiateRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPSessionTerminateRequests = prometheus.NewDesc( + c.genStatsSOAPSessionTerminateRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soap_session_terminate_requests"), "(GeneralStatistics.SOAPSessionTerminateRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPSQLRequests = prometheus.NewDesc( + c.genStatsSOAPSQLRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soapsql_requests"), "(GeneralStatistics.SOAPSQLRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsSOAPWSDLRequests = prometheus.NewDesc( + c.genStatsSOAPWSDLRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_soapwsdl_requests"), "(GeneralStatistics.SOAPWSDLRequests)", []string{"mssql_instance"}, nil, ) - c.GenStatsSQLTraceIOProviderLockWaits = prometheus.NewDesc( + c.genStatsSQLTraceIOProviderLockWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_sql_trace_io_provider_lock_waits"), "(GeneralStatistics.SQLTraceIOProviderLockWaits)", []string{"mssql_instance"}, nil, ) - c.GenStatsTempdbrecoveryunitid = prometheus.NewDesc( + c.genStatsTempDBRecoveryUnitID = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_tempdb_recovery_unit_ids_generated"), "(GeneralStatistics.Tempdbrecoveryunitid)", []string{"mssql_instance"}, nil, ) - c.GenStatsTempdbrowsetid = prometheus.NewDesc( + c.genStatsTempDBrowSetID = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_tempdb_rowset_ids_generated"), "(GeneralStatistics.Tempdbrowsetid)", []string{"mssql_instance"}, nil, ) - c.GenStatsTempTablesCreationRate = prometheus.NewDesc( + c.genStatsTempTablesCreationRate = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_temp_tables_creations"), "(GeneralStatistics.TempTablesCreations)", []string{"mssql_instance"}, nil, ) - c.GenStatsTempTablesForDestruction = prometheus.NewDesc( + c.genStatsTempTablesForDestruction = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_temp_tables_awaiting_destruction"), "(GeneralStatistics.TempTablesForDestruction)", []string{"mssql_instance"}, nil, ) - c.GenStatsTraceEventNotificationQueue = prometheus.NewDesc( + c.genStatsTraceEventNotificationQueue = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_trace_event_notification_queue_size"), "(GeneralStatistics.TraceEventNotificationQueue)", []string{"mssql_instance"}, nil, ) - c.GenStatsTransactions = prometheus.NewDesc( + c.genStatsTransactions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_transactions"), "(GeneralStatistics.Transactions)", []string{"mssql_instance"}, nil, ) - c.GenStatsUserConnections = prometheus.NewDesc( + c.genStatsUserConnections = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "genstats_user_connections"), "(GeneralStatistics.UserConnections)", []string{"mssql_instance"}, @@ -1518,171 +1518,171 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerLocks - c.LocksWaitTime = prometheus.NewDesc( + c.locksWaitTime = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_wait_time_seconds"), "(Locks.AverageWaitTimems Total time in seconds which locks have been holding resources)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksCount = prometheus.NewDesc( + c.locksCount = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_count"), "(Locks.AverageWaitTimems_Base count of how often requests have run into locks)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksLockRequests = prometheus.NewDesc( + c.locksLockRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_lock_requests"), "(Locks.LockRequests)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksLockTimeouts = prometheus.NewDesc( + c.locksLockTimeouts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_lock_timeouts"), "(Locks.LockTimeouts)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksLockTimeoutstimeout0 = prometheus.NewDesc( + c.locksLockTimeoutstimeout0 = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_lock_timeouts_excluding_NOWAIT"), "(Locks.LockTimeoutstimeout0)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksLockWaits = prometheus.NewDesc( + c.locksLockWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_lock_waits"), "(Locks.LockWaits)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksLockWaitTimems = prometheus.NewDesc( + c.locksLockWaitTimeMS = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_lock_wait_seconds"), "(Locks.LockWaitTimems)", []string{"mssql_instance", "resource"}, nil, ) - c.LocksNumberofDeadlocks = prometheus.NewDesc( + c.locksNumberOfDeadlocks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "locks_deadlocks"), - "(Locks.NumberofDeadlocks)", + "(Locks.NumberOfDeadlocks)", []string{"mssql_instance", "resource"}, nil, ) // Win32_PerfRawData_{instance}_SQLServerMemoryManager - c.MemMgrConnectionMemoryKB = prometheus.NewDesc( + c.memMgrConnectionMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_connection_memory_bytes"), "(MemoryManager.ConnectionMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrDatabaseCacheMemoryKB = prometheus.NewDesc( + c.memMgrDatabaseCacheMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_database_cache_memory_bytes"), "(MemoryManager.DatabaseCacheMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrExternalbenefitofmemory = prometheus.NewDesc( + c.memMgrExternalbenefitofmemory = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_external_benefit_of_memory"), "(MemoryManager.Externalbenefitofmemory)", []string{"mssql_instance"}, nil, ) - c.MemMgrFreeMemoryKB = prometheus.NewDesc( + c.memMgrFreeMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_free_memory_bytes"), "(MemoryManager.FreeMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrGrantedWorkspaceMemoryKB = prometheus.NewDesc( + c.memMgrGrantedWorkspaceMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_granted_workspace_memory_bytes"), "(MemoryManager.GrantedWorkspaceMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrLockBlocks = prometheus.NewDesc( + c.memMgrLockBlocks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_lock_blocks"), "(MemoryManager.LockBlocks)", []string{"mssql_instance"}, nil, ) - c.MemMgrLockBlocksAllocated = prometheus.NewDesc( + c.memMgrLockBlocksAllocated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_allocated_lock_blocks"), "(MemoryManager.LockBlocksAllocated)", []string{"mssql_instance"}, nil, ) - c.MemMgrLockMemoryKB = prometheus.NewDesc( + c.memMgrLockMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_lock_memory_bytes"), "(MemoryManager.LockMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrLockOwnerBlocks = prometheus.NewDesc( + c.memMgrLockOwnerBlocks = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_lock_owner_blocks"), "(MemoryManager.LockOwnerBlocks)", []string{"mssql_instance"}, nil, ) - c.MemMgrLockOwnerBlocksAllocated = prometheus.NewDesc( + c.memMgrLockOwnerBlocksAllocated = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_allocated_lock_owner_blocks"), "(MemoryManager.LockOwnerBlocksAllocated)", []string{"mssql_instance"}, nil, ) - c.MemMgrLogPoolMemoryKB = prometheus.NewDesc( + c.memMgrLogPoolMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_log_pool_memory_bytes"), "(MemoryManager.LogPoolMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrMaximumWorkspaceMemoryKB = prometheus.NewDesc( + c.memMgrMaximumWorkspaceMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_maximum_workspace_memory_bytes"), "(MemoryManager.MaximumWorkspaceMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrMemoryGrantsOutstanding = prometheus.NewDesc( + c.memMgrMemoryGrantsOutstanding = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_outstanding_memory_grants"), "(MemoryManager.MemoryGrantsOutstanding)", []string{"mssql_instance"}, nil, ) - c.MemMgrMemoryGrantsPending = prometheus.NewDesc( + c.memMgrMemoryGrantsPending = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_pending_memory_grants"), "(MemoryManager.MemoryGrantsPending)", []string{"mssql_instance"}, nil, ) - c.MemMgrOptimizerMemoryKB = prometheus.NewDesc( + c.memMgrOptimizerMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_optimizer_memory_bytes"), "(MemoryManager.OptimizerMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrReservedServerMemoryKB = prometheus.NewDesc( + c.memMgrReservedServerMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_reserved_server_memory_bytes"), "(MemoryManager.ReservedServerMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrSQLCacheMemoryKB = prometheus.NewDesc( + c.memMgrSQLCacheMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_sql_cache_memory_bytes"), "(MemoryManager.SQLCacheMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrStolenServerMemoryKB = prometheus.NewDesc( + c.memMgrStolenServerMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_stolen_server_memory_bytes"), "(MemoryManager.StolenServerMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrTargetServerMemoryKB = prometheus.NewDesc( + c.memMgrTargetServerMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_target_server_memory_bytes"), "(MemoryManager.TargetServerMemoryKB)", []string{"mssql_instance"}, nil, ) - c.MemMgrTotalServerMemoryKB = prometheus.NewDesc( + c.memMgrTotalServerMemoryKB = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "memmgr_total_server_memory_bytes"), "(MemoryManager.TotalServerMemoryKB)", []string{"mssql_instance"}, @@ -1690,67 +1690,67 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerSQLStatistics - c.SQLStatsAutoParamAttempts = prometheus.NewDesc( + c.sqlStatsAutoParamAttempts = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_auto_parameterization_attempts"), "(SQLStatistics.AutoParamAttempts)", []string{"mssql_instance"}, nil, ) - c.SQLStatsBatchRequests = prometheus.NewDesc( + c.sqlStatsBatchRequests = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_batch_requests"), "(SQLStatistics.BatchRequests)", []string{"mssql_instance"}, nil, ) - c.SQLStatsFailedAutoParams = prometheus.NewDesc( + c.sqlStatsFailedAutoParams = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_failed_auto_parameterization_attempts"), "(SQLStatistics.FailedAutoParams)", []string{"mssql_instance"}, nil, ) - c.SQLStatsForcedParameterizations = prometheus.NewDesc( + c.sqlStatsForcedParameterizations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_forced_parameterizations"), "(SQLStatistics.ForcedParameterizations)", []string{"mssql_instance"}, nil, ) - c.SQLStatsGuidedplanexecutions = prometheus.NewDesc( + c.sqlStatsGuidedplanexecutions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_guided_plan_executions"), "(SQLStatistics.Guidedplanexecutions)", []string{"mssql_instance"}, nil, ) - c.SQLStatsMisguidedplanexecutions = prometheus.NewDesc( + c.sqlStatsMisguidedplanexecutions = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_misguided_plan_executions"), "(SQLStatistics.Misguidedplanexecutions)", []string{"mssql_instance"}, nil, ) - c.SQLStatsSafeAutoParams = prometheus.NewDesc( + c.sqlStatsSafeAutoParams = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_safe_auto_parameterization_attempts"), "(SQLStatistics.SafeAutoParams)", []string{"mssql_instance"}, nil, ) - c.SQLStatsSQLAttentionrate = prometheus.NewDesc( + c.sqlStatsSQLAttentionrate = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_sql_attentions"), "(SQLStatistics.SQLAttentions)", []string{"mssql_instance"}, nil, ) - c.SQLStatsSQLCompilations = prometheus.NewDesc( + c.sqlStatsSQLCompilations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_sql_compilations"), "(SQLStatistics.SQLCompilations)", []string{"mssql_instance"}, nil, ) - c.SQLStatsSQLReCompilations = prometheus.NewDesc( + c.sqlStatsSQLReCompilations = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_sql_recompilations"), "(SQLStatistics.SQLReCompilations)", []string{"mssql_instance"}, nil, ) - c.SQLStatsUnsafeAutoParams = prometheus.NewDesc( + c.sqlStatsUnsafeAutoParams = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sqlstats_unsafe_auto_parameterization_attempts"), "(SQLStatistics.UnsafeAutoParams)", []string{"mssql_instance"}, @@ -1758,7 +1758,7 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerSQLErrors - c.SQLErrorsTotal = prometheus.NewDesc( + c.sqlErrorsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "sql_errors_total"), "(SQLErrors.Total)", []string{"mssql_instance", "resource"}, @@ -1766,79 +1766,79 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerTransactions - c.TransactionsTempDbFreeSpaceBytes = prometheus.NewDesc( + c.transactionsTempDbFreeSpaceBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_tempdb_free_space_bytes"), "(Transactions.FreeSpaceInTempDbKB)", []string{"mssql_instance"}, nil, ) - c.TransactionsLongestTransactionRunningSeconds = prometheus.NewDesc( + c.transactionsLongestTransactionRunningSeconds = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_longest_transaction_running_seconds"), "(Transactions.LongestTransactionRunningTime)", []string{"mssql_instance"}, nil, ) - c.TransactionsNonSnapshotVersionActiveTotal = prometheus.NewDesc( + c.transactionsNonSnapshotVersionActiveTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_nonsnapshot_version_active_total"), "(Transactions.NonSnapshotVersionTransactions)", []string{"mssql_instance"}, nil, ) - c.TransactionsSnapshotActiveTotal = prometheus.NewDesc( + c.transactionsSnapshotActiveTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_snapshot_active_total"), "(Transactions.SnapshotTransactions)", []string{"mssql_instance"}, nil, ) - c.TransactionsActive = prometheus.NewDesc( + c.transactionsActive = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_active"), "(Transactions.Transactions)", []string{"mssql_instance"}, nil, ) - c.TransactionsUpdateConflictsTotal = prometheus.NewDesc( + c.transactionsUpdateConflictsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_update_conflicts_total"), "(Transactions.UpdateConflictRatio)", []string{"mssql_instance"}, nil, ) - c.TransactionsUpdateSnapshotActiveTotal = prometheus.NewDesc( + c.transactionsUpdateSnapshotActiveTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_update_snapshot_active_total"), "(Transactions.UpdateSnapshotTransactions)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionCleanupRateBytes = prometheus.NewDesc( + c.transactionsVersionCleanupRateBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_cleanup_rate_bytes"), "(Transactions.VersionCleanupRateKBs)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionGenerationRateBytes = prometheus.NewDesc( + c.transactionsVersionGenerationRateBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_generation_rate_bytes"), "(Transactions.VersionGenerationRateKBs)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionStoreSizeBytes = prometheus.NewDesc( + c.transactionsVersionStoreSizeBytes = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_store_size_bytes"), "(Transactions.VersionStoreSizeKB)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionStoreUnits = prometheus.NewDesc( + c.transactionsVersionStoreUnits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_store_units"), "(Transactions.VersionStoreUnitCount)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionStoreCreationUnits = prometheus.NewDesc( + c.transactionsVersionStoreCreationUnits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_store_creation_units"), "(Transactions.VersionStoreUnitCreation)", []string{"mssql_instance"}, nil, ) - c.TransactionsVersionStoreTruncationUnits = prometheus.NewDesc( + c.transactionsVersionStoreTruncationUnits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "transactions_version_store_truncation_units"), "(Transactions.VersionStoreUnitTruncation)", []string{"mssql_instance"}, @@ -1846,74 +1846,74 @@ func (c *Collector) Build() error { ) // Win32_PerfRawData_{instance}_SQLServerWaitStatistics - c.WaitStatsLockWaits = prometheus.NewDesc( + c.waitStatsLockWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_lock_waits"), "(WaitStats.LockWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsMemoryGrantQueueWaits = prometheus.NewDesc( + c.waitStatsMemoryGrantQueueWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_memory_grant_queue_waits"), "(WaitStats.MemoryGrantQueueWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsThreadSafeMemoryObjectsWaits = prometheus.NewDesc( + c.waitStatsThreadSafeMemoryObjectsWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_thread_safe_memory_objects_waits"), "(WaitStats.ThreadSafeMemoryObjectsWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsLogWriteWaits = prometheus.NewDesc( + c.waitStatsLogWriteWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_log_write_waits"), "(WaitStats.LogWriteWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsLogBufferWaits = prometheus.NewDesc( + c.waitStatsLogBufferWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_log_buffer_waits"), "(WaitStats.LogBufferWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsNetworkIOWaits = prometheus.NewDesc( + c.waitStatsNetworkIOWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_network_io_waits"), "(WaitStats.NetworkIOWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsPageIOLatchWaits = prometheus.NewDesc( + c.waitStatsPageIOLatchWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_page_io_latch_waits"), "(WaitStats.PageIOLatchWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsPageLatchWaits = prometheus.NewDesc( + c.waitStatsPageLatchWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_page_latch_waits"), "(WaitStats.PageLatchWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsNonpageLatchWaits = prometheus.NewDesc( + c.waitStatsNonPageLatchWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_nonpage_latch_waits"), "(WaitStats.NonpageLatchWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsWaitForTheWorkerWaits = prometheus.NewDesc( + c.waitStatsWaitForTheWorkerWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_wait_for_the_worker_waits"), "(WaitStats.WaitForTheWorkerWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsWorkspaceSynchronizationWaits = prometheus.NewDesc( + c.waitStatsWorkspaceSynchronizationWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_workspace_synchronization_waits"), "(WaitStats.WorkspaceSynchronizationWaits)", []string{"mssql_instance", "item"}, nil, ) - c.WaitStatsTransactionOwnershipWaits = prometheus.NewDesc( + c.waitStatsTransactionOwnershipWaits = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "waitstats_transaction_ownership_waits"), "(WaitStats.TransactionOwnershipWaits)", []string{"mssql_instance", "item"}, @@ -1994,50 +1994,50 @@ func (c *Collector) Collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri // Win32_PerfRawData_MSSQLSERVER_SQLServerAccessMethods docs: // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-access-methods-object type mssqlAccessMethods struct { - AUcleanupbatchesPersec float64 `perflib:"AU cleanup batches/sec"` - AUcleanupsPersec float64 `perflib:"AU cleanups/sec"` - ByreferenceLobCreateCount float64 `perflib:"By-reference Lob Create Count"` - ByreferenceLobUseCount float64 `perflib:"By-reference Lob Use Count"` + AUcleanupbatchesPerSec float64 `perflib:"AU cleanup batches/sec"` + AUcleanupsPerSec float64 `perflib:"AU cleanups/sec"` + ByReferenceLobCreateCount float64 `perflib:"By-reference Lob Create Count"` + ByReferenceLobUseCount float64 `perflib:"By-reference Lob Use Count"` CountLobReadahead float64 `perflib:"Count Lob Readahead"` CountPullInRow float64 `perflib:"Count Pull In Row"` CountPushOffRow float64 `perflib:"Count Push Off Row"` DeferreddroppedAUs float64 `perflib:"Deferred dropped AUs"` DeferredDroppedrowsets float64 `perflib:"Deferred Dropped rowsets"` - DroppedrowsetcleanupsPersec float64 `perflib:"Dropped rowset cleanups/sec"` - DroppedrowsetsskippedPersec float64 `perflib:"Dropped rowsets skipped/sec"` - ExtentDeallocationsPersec float64 `perflib:"Extent Deallocations/sec"` - ExtentsAllocatedPersec float64 `perflib:"Extents Allocated/sec"` - FailedAUcleanupbatchesPersec float64 `perflib:"Failed AU cleanup batches/sec"` - Failedleafpagecookie float64 `perflib:"Failed leaf page cookie"` + DroppedrowsetcleanupsPerSec float64 `perflib:"Dropped rowset cleanups/sec"` + DroppedrowsetsskippedPerSec float64 `perflib:"Dropped rowsets skipped/sec"` + ExtentDeallocationsPerSec float64 `perflib:"Extent Deallocations/sec"` + ExtentsAllocatedPerSec float64 `perflib:"Extents Allocated/sec"` + FailedAUcleanupbatchesPerSec float64 `perflib:"Failed AU cleanup batches/sec"` + FailedLeafPageCookie float64 `perflib:"Failed leaf page cookie"` Failedtreepagecookie float64 `perflib:"Failed tree page cookie"` - ForwardedRecordsPersec float64 `perflib:"Forwarded Records/sec"` - FreeSpacePageFetchesPersec float64 `perflib:"FreeSpace Page Fetches/sec"` - FreeSpaceScansPersec float64 `perflib:"FreeSpace Scans/sec"` - FullScansPersec float64 `perflib:"Full Scans/sec"` - IndexSearchesPersec float64 `perflib:"Index Searches/sec"` - InSysXactwaitsPersec float64 `perflib:"InSysXact waits/sec"` + ForwardedRecordsPerSec float64 `perflib:"Forwarded Records/sec"` + FreeSpacePageFetchesPerSec float64 `perflib:"FreeSpace Page Fetches/sec"` + FreeSpaceScansPerSec float64 `perflib:"FreeSpace Scans/sec"` + FullScansPerSec float64 `perflib:"Full Scans/sec"` + IndexSearchesPerSec float64 `perflib:"Index Searches/sec"` + InSysXactwaitsPerSec float64 `perflib:"InSysXact waits/sec"` LobHandleCreateCount float64 `perflib:"LobHandle Create Count"` LobHandleDestroyCount float64 `perflib:"LobHandle Destroy Count"` LobSSProviderCreateCount float64 `perflib:"LobSS Provider Create Count"` LobSSProviderDestroyCount float64 `perflib:"LobSS Provider Destroy Count"` LobSSProviderTruncationCount float64 `perflib:"LobSS Provider Truncation Count"` - MixedpageallocationsPersec float64 `perflib:"Mixed page allocations/sec"` - PagecompressionattemptsPersec float64 `perflib:"Page compression attempts/sec"` - PageDeallocationsPersec float64 `perflib:"Page Deallocations/sec"` - PagesAllocatedPersec float64 `perflib:"Pages Allocated/sec"` - PagescompressedPersec float64 `perflib:"Pages compressed/sec"` - PageSplitsPersec float64 `perflib:"Page Splits/sec"` - ProbeScansPersec float64 `perflib:"Probe Scans/sec"` - RangeScansPersec float64 `perflib:"Range Scans/sec"` - ScanPointRevalidationsPersec float64 `perflib:"Scan Point Revalidations/sec"` - SkippedGhostedRecordsPersec float64 `perflib:"Skipped Ghosted Records/sec"` - TableLockEscalationsPersec float64 `perflib:"Table Lock Escalations/sec"` - Usedleafpagecookie float64 `perflib:"Used leaf page cookie"` - Usedtreepagecookie float64 `perflib:"Used tree page cookie"` - WorkfilesCreatedPersec float64 `perflib:"Workfiles Created/sec"` - WorktablesCreatedPersec float64 `perflib:"Worktables Created/sec"` + MixedpageallocationsPerSec float64 `perflib:"Mixed page allocations/sec"` + PagecompressionattemptsPerSec float64 `perflib:"Page compression attempts/sec"` + PageDeallocationsPerSec float64 `perflib:"Page Deallocations/sec"` + PagesAllocatedPerSec float64 `perflib:"Pages Allocated/sec"` + PagesCompressedPerSec float64 `perflib:"Pages compressed/sec"` + PageSplitsPerSec float64 `perflib:"Page Splits/sec"` + ProbeScansPerSec float64 `perflib:"Probe Scans/sec"` + RangeScansPerSec float64 `perflib:"Range Scans/sec"` + ScanPointRevalidationsPerSec float64 `perflib:"Scan Point Revalidations/sec"` + SkippedGhostedRecordsPerSec float64 `perflib:"Skipped Ghosted Records/sec"` + TableLockEscalationsPerSec float64 `perflib:"Table Lock Escalations/sec"` + UsedLeafPageCookie float64 `perflib:"Used leaf page cookie"` + UsedTreePageCookie float64 `perflib:"Used tree page cookie"` + WorkfilesCreatedPerSec float64 `perflib:"Workfiles Created/sec"` + WorktablesCreatedPerSec float64 `perflib:"Worktables Created/sec"` WorktablesFromCacheRatio float64 `perflib:"Worktables From Cache Ratio"` - WorktablesFromCacheRatio_Base float64 `perflib:"Worktables From Cache Base_Base"` + WorktablesFromCacheRatioBase float64 `perflib:"Worktables From Cache Base_Base"` } func (c *Collector) collectAccessMethods(ctx *types.ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) error { @@ -2050,310 +2050,310 @@ func (c *Collector) collectAccessMethods(ctx *types.ScrapeContext, ch chan<- pro for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.AccessMethodsAUcleanupbatches, + c.accessMethodsAUcleanupbatches, prometheus.CounterValue, - v.AUcleanupbatchesPersec, + v.AUcleanupbatchesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsAUcleanups, + c.accessMethodsAUcleanups, prometheus.CounterValue, - v.AUcleanupsPersec, + v.AUcleanupsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsByreferenceLobCreateCount, + c.accessMethodsByReferenceLobCreateCount, prometheus.CounterValue, - v.ByreferenceLobCreateCount, + v.ByReferenceLobCreateCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsByreferenceLobUseCount, + c.accessMethodsByReferenceLobUseCount, prometheus.CounterValue, - v.ByreferenceLobUseCount, + v.ByReferenceLobUseCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsCountLobReadahead, + c.accessMethodsCountLobReadahead, prometheus.CounterValue, v.CountLobReadahead, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsCountPullInRow, + c.accessMethodsCountPullInRow, prometheus.CounterValue, v.CountPullInRow, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsCountPushOffRow, + c.accessMethodsCountPushOffRow, prometheus.CounterValue, v.CountPushOffRow, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsDeferreddroppedAUs, + c.accessMethodsDeferreddroppedAUs, prometheus.GaugeValue, v.DeferreddroppedAUs, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsDeferredDroppedrowsets, + c.accessMethodsDeferredDroppedrowsets, prometheus.GaugeValue, v.DeferredDroppedrowsets, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsDroppedrowsetcleanups, + c.accessMethodsDroppedrowsetcleanups, prometheus.CounterValue, - v.DroppedrowsetcleanupsPersec, + v.DroppedrowsetcleanupsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsDroppedrowsetsskipped, + c.accessMethodsDroppedrowsetsskipped, prometheus.CounterValue, - v.DroppedrowsetsskippedPersec, + v.DroppedrowsetsskippedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsExtentDeallocations, + c.accessMethodsExtentDeallocations, prometheus.CounterValue, - v.ExtentDeallocationsPersec, + v.ExtentDeallocationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsExtentsAllocated, + c.accessMethodsExtentsAllocated, prometheus.CounterValue, - v.ExtentsAllocatedPersec, + v.ExtentsAllocatedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFailedAUcleanupbatches, + c.accessMethodsFailedAUcleanupbatches, prometheus.CounterValue, - v.FailedAUcleanupbatchesPersec, + v.FailedAUcleanupbatchesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFailedleafpagecookie, + c.accessMethodsFailedleafpagecookie, prometheus.CounterValue, - v.Failedleafpagecookie, + v.FailedLeafPageCookie, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFailedtreepagecookie, + c.accessMethodsFailedtreepagecookie, prometheus.CounterValue, v.Failedtreepagecookie, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsForwardedRecords, + c.accessMethodsForwardedRecords, prometheus.CounterValue, - v.ForwardedRecordsPersec, + v.ForwardedRecordsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFreeSpacePageFetches, + c.accessMethodsFreeSpacePageFetches, prometheus.CounterValue, - v.FreeSpacePageFetchesPersec, + v.FreeSpacePageFetchesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFreeSpaceScans, + c.accessMethodsFreeSpaceScans, prometheus.CounterValue, - v.FreeSpaceScansPersec, + v.FreeSpaceScansPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsFullScans, + c.accessMethodsFullScans, prometheus.CounterValue, - v.FullScansPersec, + v.FullScansPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsIndexSearches, + c.accessMethodsIndexSearches, prometheus.CounterValue, - v.IndexSearchesPersec, + v.IndexSearchesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsInSysXactwaits, + c.accessMethodsInSysXactwaits, prometheus.CounterValue, - v.InSysXactwaitsPersec, + v.InSysXactwaitsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsLobHandleCreateCount, + c.accessMethodsLobHandleCreateCount, prometheus.CounterValue, v.LobHandleCreateCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsLobHandleDestroyCount, + c.accessMethodsLobHandleDestroyCount, prometheus.CounterValue, v.LobHandleDestroyCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsLobSSProviderCreateCount, + c.accessMethodsLobSSProviderCreateCount, prometheus.CounterValue, v.LobSSProviderCreateCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsLobSSProviderDestroyCount, + c.accessMethodsLobSSProviderDestroyCount, prometheus.CounterValue, v.LobSSProviderDestroyCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsLobSSProviderTruncationCount, + c.accessMethodsLobSSProviderTruncationCount, prometheus.CounterValue, v.LobSSProviderTruncationCount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsMixedpageallocations, + c.accessMethodsMixedPageAllocations, prometheus.CounterValue, - v.MixedpageallocationsPersec, + v.MixedpageallocationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsPagecompressionattempts, + c.accessMethodsPageCompressionAttempts, prometheus.CounterValue, - v.PagecompressionattemptsPersec, + v.PagecompressionattemptsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsPageDeallocations, + c.accessMethodsPageDeallocations, prometheus.CounterValue, - v.PageDeallocationsPersec, + v.PageDeallocationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsPagesAllocated, + c.accessMethodsPagesAllocated, prometheus.CounterValue, - v.PagesAllocatedPersec, + v.PagesAllocatedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsPagescompressed, + c.accessMethodsPagesCompressed, prometheus.CounterValue, - v.PagescompressedPersec, + v.PagesCompressedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsPageSplits, + c.accessMethodsPageSplits, prometheus.CounterValue, - v.PageSplitsPersec, + v.PageSplitsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsProbeScans, + c.accessMethodsProbeScans, prometheus.CounterValue, - v.ProbeScansPersec, + v.ProbeScansPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsRangeScans, + c.accessMethodsRangeScans, prometheus.CounterValue, - v.RangeScansPersec, + v.RangeScansPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsScanPointRevalidations, + c.accessMethodsScanPointRevalidations, prometheus.CounterValue, - v.ScanPointRevalidationsPersec, + v.ScanPointRevalidationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsSkippedGhostedRecords, + c.accessMethodsSkippedGhostedRecords, prometheus.CounterValue, - v.SkippedGhostedRecordsPersec, + v.SkippedGhostedRecordsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsTableLockEscalations, + c.accessMethodsTableLockEscalations, prometheus.CounterValue, - v.TableLockEscalationsPersec, + v.TableLockEscalationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsUsedleafpagecookie, + c.accessMethodsUsedleafpagecookie, prometheus.CounterValue, - v.Usedleafpagecookie, + v.UsedLeafPageCookie, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsUsedtreepagecookie, + c.accessMethodsUsedtreepagecookie, prometheus.CounterValue, - v.Usedtreepagecookie, + v.UsedTreePageCookie, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsWorkfilesCreated, + c.accessMethodsWorkfilesCreated, prometheus.CounterValue, - v.WorkfilesCreatedPersec, + v.WorkfilesCreatedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsWorktablesCreated, + c.accessMethodsWorktablesCreated, prometheus.CounterValue, - v.WorktablesCreatedPersec, + v.WorktablesCreatedPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsWorktablesFromCacheHits, + c.accessMethodsWorktablesFromCacheHits, prometheus.CounterValue, v.WorktablesFromCacheRatio, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.AccessMethodsWorktablesFromCacheLookups, + c.accessMethodsWorktablesFromCacheLookups, prometheus.CounterValue, - v.WorktablesFromCacheRatio_Base, + v.WorktablesFromCacheRatioBase, sqlInstance, ) } @@ -2364,15 +2364,15 @@ func (c *Collector) collectAccessMethods(ctx *types.ScrapeContext, ch chan<- pro // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-availability-replica type mssqlAvailabilityReplica struct { Name string - BytesReceivedfromReplicaPersec float64 `perflib:"Bytes Received from Replica/sec"` - BytesSenttoReplicaPersec float64 `perflib:"Bytes Sent to Replica/sec"` - BytesSenttoTransportPersec float64 `perflib:"Bytes Sent to Transport/sec"` - FlowControlPersec float64 `perflib:"Flow Control/sec"` - FlowControlTimemsPersec float64 `perflib:"Flow Control Time (ms/sec)"` - ReceivesfromReplicaPersec float64 `perflib:"Receives from Replica/sec"` - ResentMessagesPersec float64 `perflib:"Resent Messages/sec"` - SendstoReplicaPersec float64 `perflib:"Sends to Replica/sec"` - SendstoTransportPersec float64 `perflib:"Sends to Transport/sec"` + BytesReceivedfromReplicaPerSec float64 `perflib:"Bytes Received from Replica/sec"` + BytesSentToReplicaPerSec float64 `perflib:"Bytes Sent to Replica/sec"` + BytesSentToTransportPerSec float64 `perflib:"Bytes Sent to Transport/sec"` + FlowControlPerSec float64 `perflib:"Flow Control/sec"` + FlowControlTimeMSPerSec float64 `perflib:"Flow Control Time (ms/sec)"` + ReceivesfromReplicaPerSec float64 `perflib:"Receives from Replica/sec"` + ResentMessagesPerSec float64 `perflib:"Resent Messages/sec"` + SendstoReplicaPerSec float64 `perflib:"Sends to Replica/sec"` + SendstoTransportPerSec float64 `perflib:"Sends to Transport/sec"` } func (c *Collector) collectAvailabilityReplica(ctx *types.ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) error { @@ -2390,65 +2390,65 @@ func (c *Collector) collectAvailabilityReplica(ctx *types.ScrapeContext, ch chan replicaName := v.Name ch <- prometheus.MustNewConstMetric( - c.AvailReplicaBytesReceivedfromReplica, + c.availReplicaBytesReceivedFromReplica, prometheus.CounterValue, - v.BytesReceivedfromReplicaPersec, + v.BytesReceivedfromReplicaPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaBytesSenttoReplica, + c.availReplicaBytesSentToReplica, prometheus.CounterValue, - v.BytesSenttoReplicaPersec, + v.BytesSentToReplicaPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaBytesSenttoTransport, + c.availReplicaBytesSentToTransport, prometheus.CounterValue, - v.BytesSenttoTransportPersec, + v.BytesSentToTransportPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaFlowControl, + c.availReplicaFlowControl, prometheus.CounterValue, - v.FlowControlPersec, + v.FlowControlPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaFlowControlTimems, + c.availReplicaFlowControlTimeMS, prometheus.CounterValue, - v.FlowControlTimemsPersec/1000.0, + v.FlowControlTimeMSPerSec/1000.0, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaReceivesfromReplica, + c.availReplicaReceivesFromReplica, prometheus.CounterValue, - v.ReceivesfromReplicaPersec, + v.ReceivesfromReplicaPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaResentMessages, + c.availReplicaResentMessages, prometheus.CounterValue, - v.ResentMessagesPersec, + v.ResentMessagesPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaSendstoReplica, + c.availReplicaSendsToReplica, prometheus.CounterValue, - v.SendstoReplicaPersec, + v.SendstoReplicaPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.AvailReplicaSendstoTransport, + c.availReplicaSendsToTransport, prometheus.CounterValue, - v.SendstoTransportPersec, + v.SendstoTransportPerSec, sqlInstance, replicaName, ) } @@ -2458,29 +2458,29 @@ func (c *Collector) collectAvailabilityReplica(ctx *types.ScrapeContext, ch chan // Win32_PerfRawData_MSSQLSERVER_SQLServerBufferManager docs: // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-buffer-manager-object type mssqlBufferManager struct { - BackgroundwriterpagesPersec float64 `perflib:"Background writer pages/sec"` - Buffercachehitratio float64 `perflib:"Buffer cache hit ratio"` - Buffercachehitratio_Base float64 `perflib:"Buffer cache hit ratio base_Base"` - CheckpointpagesPersec float64 `perflib:"Checkpoint pages/sec"` + BackgroundWriterPagesPerSec float64 `perflib:"Background writer pages/sec"` + BufferCacheHitRatio float64 `perflib:"Buffer cache hit ratio"` + BufferCacheHitRatioBase float64 `perflib:"Buffer cache hit ratio base_Base"` + CheckpointpagesPerSec float64 `perflib:"Checkpoint pages/sec"` Databasepages float64 `perflib:"Database pages"` Extensionallocatedpages float64 `perflib:"Extension allocated pages"` Extensionfreepages float64 `perflib:"Extension free pages"` Extensioninuseaspercentage float64 `perflib:"Extension in use as percentage"` ExtensionoutstandingIOcounter float64 `perflib:"Extension outstanding IO counter"` - ExtensionpageevictionsPersec float64 `perflib:"Extension page evictions/sec"` - ExtensionpagereadsPersec float64 `perflib:"Extension page reads/sec"` + ExtensionpageevictionsPerSec float64 `perflib:"Extension page evictions/sec"` + ExtensionpagereadsPerSec float64 `perflib:"Extension page reads/sec"` Extensionpageunreferencedtime float64 `perflib:"Extension page unreferenced time"` - ExtensionpagewritesPersec float64 `perflib:"Extension page writes/sec"` - FreeliststallsPersec float64 `perflib:"Free list stalls/sec"` + ExtensionpagewritesPerSec float64 `perflib:"Extension page writes/sec"` + FreeliststallsPerSec float64 `perflib:"Free list stalls/sec"` IntegralControllerSlope float64 `perflib:"Integral Controller Slope"` - LazywritesPersec float64 `perflib:"Lazy writes/sec"` + LazywritesPerSec float64 `perflib:"Lazy writes/sec"` Pagelifeexpectancy float64 `perflib:"Page life expectancy"` - PagelookupsPersec float64 `perflib:"Page lookups/sec"` - PagereadsPersec float64 `perflib:"Page reads/sec"` - PagewritesPersec float64 `perflib:"Page writes/sec"` - ReadaheadpagesPersec float64 `perflib:"Readahead pages/sec"` - ReadaheadtimePersec float64 `perflib:"Readahead time/sec"` - Targetpages float64 `perflib:"Target pages"` + PagelookupsPerSec float64 `perflib:"Page lookups/sec"` + PagereadsPerSec float64 `perflib:"Page reads/sec"` + PagewritesPerSec float64 `perflib:"Page writes/sec"` + ReadaheadpagesPerSec float64 `perflib:"Readahead pages/sec"` + ReadaheadtimePerSec float64 `perflib:"Readahead time/sec"` + TargetPages float64 `perflib:"Target pages"` } func (c *Collector) collectBufferManager(ctx *types.ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) error { @@ -2493,163 +2493,163 @@ func (c *Collector) collectBufferManager(ctx *types.ScrapeContext, ch chan<- pro for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.BufManBackgroundwriterpages, + c.bufManBackgroundwriterpages, prometheus.CounterValue, - v.BackgroundwriterpagesPersec, + v.BackgroundWriterPagesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManBuffercachehits, + c.bufManBuffercachehits, prometheus.GaugeValue, - v.Buffercachehitratio, + v.BufferCacheHitRatio, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManBuffercachelookups, + c.bufManBuffercachelookups, prometheus.GaugeValue, - v.Buffercachehitratio_Base, + v.BufferCacheHitRatioBase, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManCheckpointpages, + c.bufManCheckpointpages, prometheus.CounterValue, - v.CheckpointpagesPersec, + v.CheckpointpagesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManDatabasepages, + c.bufManDatabasepages, prometheus.GaugeValue, v.Databasepages, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionallocatedpages, + c.bufManExtensionallocatedpages, prometheus.GaugeValue, v.Extensionallocatedpages, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionfreepages, + c.bufManExtensionfreepages, prometheus.GaugeValue, v.Extensionfreepages, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensioninuseaspercentage, + c.bufManExtensioninuseaspercentage, prometheus.GaugeValue, v.Extensioninuseaspercentage, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionoutstandingIOcounter, + c.bufManExtensionoutstandingIOcounter, prometheus.GaugeValue, v.ExtensionoutstandingIOcounter, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionpageevictions, + c.bufManExtensionpageevictions, prometheus.CounterValue, - v.ExtensionpageevictionsPersec, + v.ExtensionpageevictionsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionpagereads, + c.bufManExtensionpagereads, prometheus.CounterValue, - v.ExtensionpagereadsPersec, + v.ExtensionpagereadsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionpageunreferencedtime, + c.bufManExtensionpageunreferencedtime, prometheus.GaugeValue, v.Extensionpageunreferencedtime, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManExtensionpagewrites, + c.bufManExtensionpagewrites, prometheus.CounterValue, - v.ExtensionpagewritesPersec, + v.ExtensionpagewritesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManFreeliststalls, + c.bufManFreeliststalls, prometheus.CounterValue, - v.FreeliststallsPersec, + v.FreeliststallsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManIntegralControllerSlope, + c.bufManIntegralControllerSlope, prometheus.GaugeValue, v.IntegralControllerSlope, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManLazywrites, + c.bufManLazywrites, prometheus.CounterValue, - v.LazywritesPersec, + v.LazywritesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManPagelifeexpectancy, + c.bufManPagelifeexpectancy, prometheus.GaugeValue, v.Pagelifeexpectancy, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManPagelookups, + c.bufManPagelookups, prometheus.CounterValue, - v.PagelookupsPersec, + v.PagelookupsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManPagereads, + c.bufManPagereads, prometheus.CounterValue, - v.PagereadsPersec, + v.PagereadsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManPagewrites, + c.bufManPagewrites, prometheus.CounterValue, - v.PagewritesPersec, + v.PagewritesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManReadaheadpages, + c.bufManReadaheadpages, prometheus.CounterValue, - v.ReadaheadpagesPersec, + v.ReadaheadpagesPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManReadaheadtime, + c.bufManReadaheadtime, prometheus.CounterValue, - v.ReadaheadtimePersec, + v.ReadaheadtimePerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.BufManTargetpages, + c.bufManTargetpages, prometheus.GaugeValue, - v.Targetpages, + v.TargetPages, sqlInstance, ) } @@ -2662,27 +2662,27 @@ func (c *Collector) collectBufferManager(ctx *types.ScrapeContext, ch chan<- pro type mssqlDatabaseReplica struct { Name string DatabaseFlowControlDelay float64 `perflib:"Database Flow Control Delay"` - DatabaseFlowControlsPersec float64 `perflib:"Database Flow Controls/sec"` - FileBytesReceivedPersec float64 `perflib:"File Bytes Received/sec"` + DatabaseFlowControlsPerSec float64 `perflib:"Database Flow Controls/sec"` + FileBytesReceivedPerSec float64 `perflib:"File Bytes Received/sec"` GroupCommitsPerSec float64 `perflib:"Group Commits/Sec"` GroupCommitTime float64 `perflib:"Group Commit Time"` LogApplyPendingQueue float64 `perflib:"Log Apply Pending Queue"` LogApplyReadyQueue float64 `perflib:"Log Apply Ready Queue"` - LogBytesCompressedPersec float64 `perflib:"Log Bytes Compressed/sec"` - LogBytesDecompressedPersec float64 `perflib:"Log Bytes Decompressed/sec"` - LogBytesReceivedPersec float64 `perflib:"Log Bytes Received/sec"` - LogCompressionCachehitsPersec float64 `perflib:"Log Compression Cache hits/sec"` - LogCompressionCachemissesPersec float64 `perflib:"Log Compression Cache misses/sec"` - LogCompressionsPersec float64 `perflib:"Log Compressions/sec"` - LogDecompressionsPersec float64 `perflib:"Log Decompressions/sec"` + LogBytesCompressedPerSec float64 `perflib:"Log Bytes Compressed/sec"` + LogBytesDecompressedPerSec float64 `perflib:"Log Bytes Decompressed/sec"` + LogBytesReceivedPerSec float64 `perflib:"Log Bytes Received/sec"` + LogCompressionCachehitsPerSec float64 `perflib:"Log Compression Cache hits/sec"` + LogCompressionCachemissesPerSec float64 `perflib:"Log Compression Cache misses/sec"` + LogCompressionsPerSec float64 `perflib:"Log Compressions/sec"` + LogDecompressionsPerSec float64 `perflib:"Log Decompressions/sec"` Logremainingforundo float64 `perflib:"Log remaining for undo"` LogSendQueue float64 `perflib:"Log Send Queue"` - MirroredWriteTransactionsPersec float64 `perflib:"Mirrored Write Transactions/sec"` + MirroredWriteTransactionsPerSec float64 `perflib:"Mirrored Write Transactions/sec"` RecoveryQueue float64 `perflib:"Recovery Queue"` - RedoblockedPersec float64 `perflib:"Redo blocked/sec"` + RedoblockedPerSec float64 `perflib:"Redo blocked/sec"` RedoBytesRemaining float64 `perflib:"Redo Bytes Remaining"` - RedoneBytesPersec float64 `perflib:"Redone Bytes/sec"` - RedonesPersec float64 `perflib:"Redones/sec"` + RedoneBytesPerSec float64 `perflib:"Redone Bytes/sec"` + RedonesPerSec float64 `perflib:"Redones/sec"` TotalLogrequiringundo float64 `perflib:"Total Log requiring undo"` TransactionDelay float64 `perflib:"Transaction Delay"` } @@ -2702,168 +2702,168 @@ func (c *Collector) collectDatabaseReplica(ctx *types.ScrapeContext, ch chan<- p replicaName := v.Name ch <- prometheus.MustNewConstMetric( - c.DBReplicaDatabaseFlowControlDelay, + c.dbReplicaDatabaseFlowControlDelay, prometheus.GaugeValue, v.DatabaseFlowControlDelay, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaDatabaseFlowControls, + c.dbReplicaDatabaseFlowControls, prometheus.CounterValue, - v.DatabaseFlowControlsPersec, + v.DatabaseFlowControlsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaFileBytesReceived, + c.dbReplicaFileBytesReceived, prometheus.CounterValue, - v.FileBytesReceivedPersec, + v.FileBytesReceivedPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaGroupCommits, + c.dbReplicaGroupCommits, prometheus.CounterValue, v.GroupCommitsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaGroupCommitTime, + c.dbReplicaGroupCommitTime, prometheus.GaugeValue, v.GroupCommitTime, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogApplyPendingQueue, + c.dbReplicaLogApplyPendingQueue, prometheus.GaugeValue, v.LogApplyPendingQueue, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogApplyReadyQueue, + c.dbReplicaLogApplyReadyQueue, prometheus.GaugeValue, v.LogApplyReadyQueue, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogBytesCompressed, + c.dbReplicaLogBytesCompressed, prometheus.CounterValue, - v.LogBytesCompressedPersec, + v.LogBytesCompressedPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogBytesDecompressed, + c.dbReplicaLogBytesDecompressed, prometheus.CounterValue, - v.LogBytesDecompressedPersec, + v.LogBytesDecompressedPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogBytesReceived, + c.dbReplicaLogBytesReceived, prometheus.CounterValue, - v.LogBytesReceivedPersec, + v.LogBytesReceivedPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogCompressionCachehits, + c.dbReplicaLogCompressionCachehits, prometheus.CounterValue, - v.LogCompressionCachehitsPersec, + v.LogCompressionCachehitsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogCompressionCachemisses, + c.dbReplicaLogCompressionCachemisses, prometheus.CounterValue, - v.LogCompressionCachemissesPersec, + v.LogCompressionCachemissesPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogCompressions, + c.dbReplicaLogCompressions, prometheus.CounterValue, - v.LogCompressionsPersec, + v.LogCompressionsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogDecompressions, + c.dbReplicaLogDecompressions, prometheus.CounterValue, - v.LogDecompressionsPersec, + v.LogDecompressionsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogremainingforundo, + c.dbReplicaLogremainingforundo, prometheus.GaugeValue, v.Logremainingforundo, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaLogSendQueue, + c.dbReplicaLogSendQueue, prometheus.GaugeValue, v.LogSendQueue, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaMirroredWriteTransactions, + c.dbReplicaMirroredWritetransactions, prometheus.CounterValue, - v.MirroredWriteTransactionsPersec, + v.MirroredWriteTransactionsPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaRecoveryQueue, + c.dbReplicaRecoveryQueue, prometheus.GaugeValue, v.RecoveryQueue, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaRedoblocked, + c.dbReplicaRedoblocked, prometheus.CounterValue, - v.RedoblockedPersec, + v.RedoblockedPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaRedoBytesRemaining, + c.dbReplicaRedoBytesRemaining, prometheus.GaugeValue, v.RedoBytesRemaining, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaRedoneBytes, + c.dbReplicaRedoneBytes, prometheus.CounterValue, - v.RedoneBytesPersec, + v.RedoneBytesPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaRedones, + c.dbReplicaRedones, prometheus.CounterValue, - v.RedonesPersec, + v.RedonesPerSec, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaTotalLogrequiringundo, + c.dbReplicaTotalLogrequiringundo, prometheus.GaugeValue, v.TotalLogrequiringundo, sqlInstance, replicaName, ) ch <- prometheus.MustNewConstMetric( - c.DBReplicaTransactionDelay, + c.dbReplicaTransactionDelay, prometheus.GaugeValue, v.TransactionDelay/1000.0, sqlInstance, replicaName, @@ -2876,39 +2876,39 @@ func (c *Collector) collectDatabaseReplica(ctx *types.ScrapeContext, ch chan<- p // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-databases-object?view=sql-server-2017 type mssqlDatabases struct { Name string - Activeparallelredothreads float64 `perflib:"Active parallel redo threads"` + ActiveParallelRedoThreads float64 `perflib:"Active parallel redo threads"` ActiveTransactions float64 `perflib:"Active Transactions"` - BackupPerRestoreThroughputPersec float64 `perflib:"Backup/Restore Throughput/sec"` - BulkCopyRowsPersec float64 `perflib:"Bulk Copy Rows/sec"` - BulkCopyThroughputPersec float64 `perflib:"Bulk Copy Throughput/sec"` - Committableentries float64 `perflib:"Commit table entries"` + BackupPerRestoreThroughputPerSec float64 `perflib:"Backup/Restore Throughput/sec"` + BulkCopyRowsPerSec float64 `perflib:"Bulk Copy Rows/sec"` + BulkCopyThroughputPerSec float64 `perflib:"Bulk Copy Throughput/sec"` + CommitTableEntries float64 `perflib:"Commit table entries"` DataFilesSizeKB float64 `perflib:"Data File(s) Size (KB)"` - DBCCLogicalScanBytesPersec float64 `perflib:"DBCC Logical Scan Bytes/sec"` - GroupCommitTimePersec float64 `perflib:"Group Commit Time/sec"` - LogBytesFlushedPersec float64 `perflib:"Log Bytes Flushed/sec"` + DBCCLogicalScanBytesPerSec float64 `perflib:"DBCC Logical Scan Bytes/sec"` + GroupCommitTimePerSec float64 `perflib:"Group Commit Time/sec"` + LogBytesFlushedPerSec float64 `perflib:"Log Bytes Flushed/sec"` LogCacheHitRatio float64 `perflib:"Log Cache Hit Ratio"` - LogCacheHitRatio_Base float64 `perflib:"Log Cache Hit Ratio Base_Base"` - LogCacheReadsPersec float64 `perflib:"Log Cache Reads/sec"` + LogCacheHitRatioBase float64 `perflib:"Log Cache Hit Ratio Base_Base"` + LogCacheReadsPerSec float64 `perflib:"Log Cache Reads/sec"` LogFilesSizeKB float64 `perflib:"Log File(s) Size (KB)"` LogFilesUsedSizeKB float64 `perflib:"Log File(s) Used Size (KB)"` - LogFlushesPersec float64 `perflib:"Log Flushes/sec"` - LogFlushWaitsPersec float64 `perflib:"Log Flush Waits/sec"` + LogFlushesPerSec float64 `perflib:"Log Flushes/sec"` + LogFlushWaitsPerSec float64 `perflib:"Log Flush Waits/sec"` LogFlushWaitTime float64 `perflib:"Log Flush Wait Time"` - LogFlushWriteTimems float64 `perflib:"Log Flush Write Time (ms)"` + LogFlushWriteTimeMS float64 `perflib:"Log Flush Write Time (ms)"` LogGrowths float64 `perflib:"Log Growths"` - LogPoolCacheMissesPersec float64 `perflib:"Log Pool Cache Misses/sec"` - LogPoolDiskReadsPersec float64 `perflib:"Log Pool Disk Reads/sec"` - LogPoolHashDeletesPersec float64 `perflib:"Log Pool Hash Deletes/sec"` - LogPoolHashInsertsPersec float64 `perflib:"Log Pool Hash Inserts/sec"` - LogPoolInvalidHashEntryPersec float64 `perflib:"Log Pool Invalid Hash Entry/sec"` - LogPoolLogScanPushesPersec float64 `perflib:"Log Pool Log Scan Pushes/sec"` - LogPoolLogWriterPushesPersec float64 `perflib:"Log Pool LogWriter Pushes/sec"` - LogPoolPushEmptyFreePoolPersec float64 `perflib:"Log Pool Push Empty FreePool/sec"` - LogPoolPushLowMemoryPersec float64 `perflib:"Log Pool Push Low Memory/sec"` - LogPoolPushNoFreeBufferPersec float64 `perflib:"Log Pool Push No Free Buffer/sec"` - LogPoolReqBehindTruncPersec float64 `perflib:"Log Pool Req. Behind Trunc/sec"` - LogPoolRequestsOldVLFPersec float64 `perflib:"Log Pool Requests Old VLF/sec"` - LogPoolRequestsPersec float64 `perflib:"Log Pool Requests/sec"` + LogPoolCacheMissesPerSec float64 `perflib:"Log Pool Cache Misses/sec"` + LogPoolDiskReadsPerSec float64 `perflib:"Log Pool Disk Reads/sec"` + LogPoolHashDeletesPerSec float64 `perflib:"Log Pool Hash Deletes/sec"` + LogPoolHashInsertsPerSec float64 `perflib:"Log Pool Hash Inserts/sec"` + LogPoolInvalidHashEntryPerSec float64 `perflib:"Log Pool Invalid Hash Entry/sec"` + LogPoolLogScanPushesPerSec float64 `perflib:"Log Pool Log Scan Pushes/sec"` + LogPoolLogWriterPushesPerSec float64 `perflib:"Log Pool LogWriter Pushes/sec"` + LogPoolPushEmptyFreePoolPerSec float64 `perflib:"Log Pool Push Empty FreePool/sec"` + LogPoolPushLowMemoryPerSec float64 `perflib:"Log Pool Push Low Memory/sec"` + LogPoolPushNoFreeBufferPerSec float64 `perflib:"Log Pool Push No Free Buffer/sec"` + LogPoolReqBehindTruncPerSec float64 `perflib:"Log Pool Req. Behind Trunc/sec"` + LogPoolRequestsOldVLFPerSec float64 `perflib:"Log Pool Requests Old VLF/sec"` + LogPoolRequestsPerSec float64 `perflib:"Log Pool Requests/sec"` LogPoolTotalActiveLogSize float64 `perflib:"Log Pool Total Active Log Size"` LogPoolTotalSharedPoolSize float64 `perflib:"Log Pool Total Shared Pool Size"` LogShrinks float64 `perflib:"Log Shrinks"` @@ -2916,13 +2916,13 @@ type mssqlDatabases struct { PercentLogUsed float64 `perflib:"Percent Log Used"` ReplPendingXacts float64 `perflib:"Repl. Pending Xacts"` ReplTransRate float64 `perflib:"Repl. Trans. Rate"` - ShrinkDataMovementBytesPersec float64 `perflib:"Shrink Data Movement Bytes/sec"` - TrackedtransactionsPersec float64 `perflib:"Tracked transactions/sec"` - TransactionsPersec float64 `perflib:"Transactions/sec"` - WriteTransactionsPersec float64 `perflib:"Write Transactions/sec"` + ShrinkDataMovementBytesPerSec float64 `perflib:"Shrink Data Movement Bytes/sec"` + TrackedtransactionsPerSec float64 `perflib:"Tracked transactions/sec"` + TransactionsPerSec float64 `perflib:"Transactions/sec"` + WriteTransactionsPerSec float64 `perflib:"Write Transactions/sec"` XTPControllerDLCLatencyPerFetch float64 `perflib:"XTP Controller DLC Latency/Fetch"` XTPControllerDLCPeakLatency float64 `perflib:"XTP Controller DLC Peak Latency"` - XTPControllerLogProcessedPersec float64 `perflib:"XTP Controller Log Processed/sec"` + XTPControllerLogProcessedPerSec float64 `perflib:"XTP Controller Log Processed/sec"` XTPMemoryUsedKB float64 `perflib:"XTP Memory Used (KB)"` } @@ -2941,336 +2941,336 @@ func (c *Collector) collectDatabases(ctx *types.ScrapeContext, ch chan<- prometh dbName := v.Name ch <- prometheus.MustNewConstMetric( - c.DatabasesActiveParallelredothreads, + c.databasesActiveParallelredothreads, prometheus.GaugeValue, - v.Activeparallelredothreads, + v.ActiveParallelRedoThreads, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesActiveTransactions, + c.databasesActiveTransactions, prometheus.GaugeValue, v.ActiveTransactions, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesBackupPerRestoreThroughput, + c.databasesBackupPerRestoreThroughput, prometheus.CounterValue, - v.BackupPerRestoreThroughputPersec, + v.BackupPerRestoreThroughputPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesBulkCopyRows, + c.databasesBulkCopyRows, prometheus.CounterValue, - v.BulkCopyRowsPersec, + v.BulkCopyRowsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesBulkCopyThroughput, + c.databasesBulkCopyThroughput, prometheus.CounterValue, - v.BulkCopyThroughputPersec*1024, + v.BulkCopyThroughputPerSec*1024, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesCommittableentries, + c.databasesCommitTableEntries, prometheus.GaugeValue, - v.Committableentries, + v.CommitTableEntries, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesDataFilesSizeKB, + c.databasesDataFilesSizeKB, prometheus.GaugeValue, v.DataFilesSizeKB*1024, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesDBCCLogicalScanBytes, + c.databasesDBCCLogicalScanBytes, prometheus.CounterValue, - v.DBCCLogicalScanBytesPersec, + v.DBCCLogicalScanBytesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesGroupCommitTime, + c.databasesGroupCommitTime, prometheus.CounterValue, - v.GroupCommitTimePersec/1000000.0, + v.GroupCommitTimePerSec/1000000.0, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogBytesFlushed, + c.databasesLogBytesFlushed, prometheus.CounterValue, - v.LogBytesFlushedPersec, + v.LogBytesFlushedPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogCacheHits, + c.databasesLogCacheHits, prometheus.GaugeValue, v.LogCacheHitRatio, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogCacheLookups, + c.databasesLogCacheLookups, prometheus.GaugeValue, - v.LogCacheHitRatio_Base, + v.LogCacheHitRatioBase, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogCacheReads, + c.databasesLogCacheReads, prometheus.CounterValue, - v.LogCacheReadsPersec, + v.LogCacheReadsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFilesSizeKB, + c.databasesLogFilesSizeKB, prometheus.GaugeValue, v.LogFilesSizeKB*1024, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFilesUsedSizeKB, + c.databasesLogFilesUsedSizeKB, prometheus.GaugeValue, v.LogFilesUsedSizeKB*1024, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFlushes, + c.databasesLogFlushes, prometheus.CounterValue, - v.LogFlushesPersec, + v.LogFlushesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFlushWaits, + c.databasesLogFlushWaits, prometheus.CounterValue, - v.LogFlushWaitsPersec, + v.LogFlushWaitsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFlushWaitTime, + c.databasesLogFlushWaitTime, prometheus.GaugeValue, v.LogFlushWaitTime/1000.0, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogFlushWriteTimems, + c.databasesLogFlushWriteTimeMS, prometheus.GaugeValue, - v.LogFlushWriteTimems/1000.0, + v.LogFlushWriteTimeMS/1000.0, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogGrowths, + c.databasesLogGrowths, prometheus.GaugeValue, v.LogGrowths, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolCacheMisses, + c.databasesLogPoolCacheMisses, prometheus.CounterValue, - v.LogPoolCacheMissesPersec, + v.LogPoolCacheMissesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolDiskReads, + c.databasesLogPoolDiskReads, prometheus.CounterValue, - v.LogPoolDiskReadsPersec, + v.LogPoolDiskReadsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolHashDeletes, + c.databasesLogPoolHashDeletes, prometheus.CounterValue, - v.LogPoolHashDeletesPersec, + v.LogPoolHashDeletesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolHashInserts, + c.databasesLogPoolHashInserts, prometheus.CounterValue, - v.LogPoolHashInsertsPersec, + v.LogPoolHashInsertsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolInvalidHashEntry, + c.databasesLogPoolInvalidHashEntry, prometheus.CounterValue, - v.LogPoolInvalidHashEntryPersec, + v.LogPoolInvalidHashEntryPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolLogScanPushes, + c.databasesLogPoolLogScanPushes, prometheus.CounterValue, - v.LogPoolLogScanPushesPersec, + v.LogPoolLogScanPushesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolLogWriterPushes, + c.databasesLogPoolLogWriterPushes, prometheus.CounterValue, - v.LogPoolLogWriterPushesPersec, + v.LogPoolLogWriterPushesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolPushEmptyFreePool, + c.databasesLogPoolPushEmptyFreePool, prometheus.CounterValue, - v.LogPoolPushEmptyFreePoolPersec, + v.LogPoolPushEmptyFreePoolPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolPushLowMemory, + c.databasesLogPoolPushLowMemory, prometheus.CounterValue, - v.LogPoolPushLowMemoryPersec, + v.LogPoolPushLowMemoryPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolPushNoFreeBuffer, + c.databasesLogPoolPushNoFreeBuffer, prometheus.CounterValue, - v.LogPoolPushNoFreeBufferPersec, + v.LogPoolPushNoFreeBufferPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolReqBehindTrunc, + c.databasesLogPoolReqBehindTrunc, prometheus.CounterValue, - v.LogPoolReqBehindTruncPersec, + v.LogPoolReqBehindTruncPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolRequestsOldVLF, + c.databasesLogPoolRequestsOldVLF, prometheus.CounterValue, - v.LogPoolRequestsOldVLFPersec, + v.LogPoolRequestsOldVLFPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolRequests, + c.databasesLogPoolRequests, prometheus.CounterValue, - v.LogPoolRequestsPersec, + v.LogPoolRequestsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolTotalActiveLogSize, + c.databasesLogPoolTotalActiveLogSize, prometheus.GaugeValue, v.LogPoolTotalActiveLogSize, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogPoolTotalSharedPoolSize, + c.databasesLogPoolTotalSharedPoolSize, prometheus.GaugeValue, v.LogPoolTotalSharedPoolSize, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogShrinks, + c.databasesLogShrinks, prometheus.GaugeValue, v.LogShrinks, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesLogTruncations, + c.databasesLogTruncations, prometheus.GaugeValue, v.LogTruncations, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesPercentLogUsed, + c.databasesPercentLogUsed, prometheus.GaugeValue, v.PercentLogUsed, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesReplPendingXacts, + c.databasesReplPendingXacts, prometheus.GaugeValue, v.ReplPendingXacts, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesReplTransRate, + c.databasesReplTransRate, prometheus.CounterValue, v.ReplTransRate, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesShrinkDataMovementBytes, + c.databasesShrinkDataMovementBytes, prometheus.CounterValue, - v.ShrinkDataMovementBytesPersec, + v.ShrinkDataMovementBytesPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesTrackedtransactions, + c.databasesTrackedTransactions, prometheus.CounterValue, - v.TrackedtransactionsPersec, + v.TrackedtransactionsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesTransactions, + c.databasesTransactions, prometheus.CounterValue, - v.TransactionsPersec, + v.TransactionsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesWriteTransactions, + c.databasesWriteTransactions, prometheus.CounterValue, - v.WriteTransactionsPersec, + v.WriteTransactionsPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesXTPControllerDLCLatencyPerFetch, + c.databasesXTPControllerDLCLatencyPerFetch, prometheus.GaugeValue, v.XTPControllerDLCLatencyPerFetch, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesXTPControllerDLCPeakLatency, + c.databasesXTPControllerDLCPeakLatency, prometheus.GaugeValue, v.XTPControllerDLCPeakLatency*1000000.0, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesXTPControllerLogProcessed, + c.databasesXTPControllerLogProcessed, prometheus.CounterValue, - v.XTPControllerLogProcessedPersec, + v.XTPControllerLogProcessedPerSec, sqlInstance, dbName, ) ch <- prometheus.MustNewConstMetric( - c.DatabasesXTPMemoryUsedKB, + c.databasesXTPMemoryUsedKB, prometheus.GaugeValue, v.XTPMemoryUsedKB*1024, sqlInstance, dbName, @@ -3283,12 +3283,12 @@ func (c *Collector) collectDatabases(ctx *types.ScrapeContext, ch chan<- prometh // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-general-statistics-object type mssqlGeneralStatistics struct { ActiveTempTables float64 `perflib:"Active Temp Tables"` - ConnectionResetPersec float64 `perflib:"Connection Reset/sec"` + ConnectionResetPerSec float64 `perflib:"Connection Reset/sec"` EventNotificationsDelayedDrop float64 `perflib:"Event Notifications Delayed Drop"` HTTPAuthenticatedRequests float64 `perflib:"HTTP Authenticated Requests"` LogicalConnections float64 `perflib:"Logical Connections"` - LoginsPersec float64 `perflib:"Logins/sec"` - LogoutsPersec float64 `perflib:"Logouts/sec"` + LoginsPerSec float64 `perflib:"Logins/sec"` + LogoutsPerSec float64 `perflib:"Logouts/sec"` MarsDeadlocks float64 `perflib:"Mars Deadlocks"` Nonatomicyieldrate float64 `perflib:"Non-atomic yield rate"` Processesblocked float64 `perflib:"Processes blocked"` @@ -3318,168 +3318,168 @@ func (c *Collector) collectGeneralStatistics(ctx *types.ScrapeContext, ch chan<- for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.GenStatsActiveTempTables, + c.genStatsActiveTempTables, prometheus.GaugeValue, v.ActiveTempTables, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsConnectionReset, + c.genStatsConnectionReset, prometheus.CounterValue, - v.ConnectionResetPersec, + v.ConnectionResetPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsEventNotificationsDelayedDrop, + c.genStatsEventNotificationsDelayedDrop, prometheus.GaugeValue, v.EventNotificationsDelayedDrop, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsHTTPAuthenticatedRequests, + c.genStatsHTTPAuthenticatedRequests, prometheus.GaugeValue, v.HTTPAuthenticatedRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsLogicalConnections, + c.genStatsLogicalConnections, prometheus.GaugeValue, v.LogicalConnections, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsLogins, + c.genStatsLogins, prometheus.CounterValue, - v.LoginsPersec, + v.LoginsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsLogouts, + c.genStatsLogouts, prometheus.CounterValue, - v.LogoutsPersec, + v.LogoutsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsMarsDeadlocks, + c.genStatsMarsDeadlocks, prometheus.GaugeValue, v.MarsDeadlocks, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsNonatomicyieldrate, + c.genStatsNonAtomicYieldRate, prometheus.CounterValue, v.Nonatomicyieldrate, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsProcessesblocked, + c.genStatsProcessesBlocked, prometheus.GaugeValue, v.Processesblocked, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPEmptyRequests, + c.genStatsSOAPEmptyRequests, prometheus.GaugeValue, v.SOAPEmptyRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPMethodInvocations, + c.genStatsSOAPMethodInvocations, prometheus.GaugeValue, v.SOAPMethodInvocations, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPSessionInitiateRequests, + c.genStatsSOAPSessionInitiateRequests, prometheus.GaugeValue, v.SOAPSessionInitiateRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPSessionTerminateRequests, + c.genStatsSOAPSessionTerminateRequests, prometheus.GaugeValue, v.SOAPSessionTerminateRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPSQLRequests, + c.genStatsSOAPSQLRequests, prometheus.GaugeValue, v.SOAPSQLRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSOAPWSDLRequests, + c.genStatsSOAPWSDLRequests, prometheus.GaugeValue, v.SOAPWSDLRequests, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsSQLTraceIOProviderLockWaits, + c.genStatsSQLTraceIOProviderLockWaits, prometheus.GaugeValue, v.SQLTraceIOProviderLockWaits, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTempdbrecoveryunitid, + c.genStatsTempDBRecoveryUnitID, prometheus.GaugeValue, v.Tempdbrecoveryunitid, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTempdbrowsetid, + c.genStatsTempDBrowSetID, prometheus.GaugeValue, v.Tempdbrowsetid, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTempTablesCreationRate, + c.genStatsTempTablesCreationRate, prometheus.CounterValue, v.TempTablesCreationRate, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTempTablesForDestruction, + c.genStatsTempTablesForDestruction, prometheus.GaugeValue, v.TempTablesForDestruction, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTraceEventNotificationQueue, + c.genStatsTraceEventNotificationQueue, prometheus.GaugeValue, v.TraceEventNotificationQueue, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsTransactions, + c.genStatsTransactions, prometheus.GaugeValue, v.Transactions, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.GenStatsUserConnections, + c.genStatsUserConnections, prometheus.GaugeValue, v.UserConnections, sqlInstance, @@ -3493,14 +3493,14 @@ func (c *Collector) collectGeneralStatistics(ctx *types.ScrapeContext, ch chan<- // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-locks-object type mssqlLocks struct { Name string - AverageWaitTimems float64 `perflib:"Average Wait Time (ms)"` - AverageWaitTimems_Base float64 `perflib:"Average Wait Time Base_Base"` - LockRequestsPersec float64 `perflib:"Lock Requests/sec"` - LockTimeoutsPersec float64 `perflib:"Lock Timeouts/sec"` - LockTimeoutstimeout0Persec float64 `perflib:"Lock Timeouts (timeout > 0)/sec"` - LockWaitsPersec float64 `perflib:"Lock Waits/sec"` - LockWaitTimems float64 `perflib:"Lock Wait Time (ms)"` - NumberofDeadlocksPersec float64 `perflib:"Number of Deadlocks/sec"` + AverageWaitTimeMS float64 `perflib:"Average Wait Time (ms)"` + AverageWaitTimeMSBase float64 `perflib:"Average Wait Time Base_Base"` + LockRequestsPerSec float64 `perflib:"Lock Requests/sec"` + LockTimeoutsPerSec float64 `perflib:"Lock Timeouts/sec"` + LockTimeoutsTimeout0PerSec float64 `perflib:"Lock Timeouts (timeout > 0)/sec"` + LockWaitsPerSec float64 `perflib:"Lock Waits/sec"` + LockWaitTimeMS float64 `perflib:"Lock Wait Time (ms)"` + NumberOfDeadlocksPerSec float64 `perflib:"Number of Deadlocks/sec"` } func (c *Collector) collectLocks(ctx *types.ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) error { @@ -3518,58 +3518,58 @@ func (c *Collector) collectLocks(ctx *types.ScrapeContext, ch chan<- prometheus. lockResourceName := v.Name ch <- prometheus.MustNewConstMetric( - c.LocksWaitTime, + c.locksWaitTime, prometheus.GaugeValue, - v.AverageWaitTimems/1000.0, + v.AverageWaitTimeMS/1000.0, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksCount, + c.locksCount, prometheus.GaugeValue, - v.AverageWaitTimems_Base/1000.0, + v.AverageWaitTimeMSBase/1000.0, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksLockRequests, + c.locksLockRequests, prometheus.CounterValue, - v.LockRequestsPersec, + v.LockRequestsPerSec, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksLockTimeouts, + c.locksLockTimeouts, prometheus.CounterValue, - v.LockTimeoutsPersec, + v.LockTimeoutsPerSec, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksLockTimeoutstimeout0, + c.locksLockTimeoutstimeout0, prometheus.CounterValue, - v.LockTimeoutstimeout0Persec, + v.LockTimeoutsTimeout0PerSec, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksLockWaits, + c.locksLockWaits, prometheus.CounterValue, - v.LockWaitsPersec, + v.LockWaitsPerSec, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksLockWaitTimems, + c.locksLockWaitTimeMS, prometheus.GaugeValue, - v.LockWaitTimems/1000.0, + v.LockWaitTimeMS/1000.0, sqlInstance, lockResourceName, ) ch <- prometheus.MustNewConstMetric( - c.LocksNumberofDeadlocks, + c.locksNumberOfDeadlocks, prometheus.CounterValue, - v.NumberofDeadlocksPersec, + v.NumberOfDeadlocksPerSec, sqlInstance, lockResourceName, ) } @@ -3611,140 +3611,140 @@ func (c *Collector) collectMemoryManager(ctx *types.ScrapeContext, ch chan<- pro for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.MemMgrConnectionMemoryKB, + c.memMgrConnectionMemoryKB, prometheus.GaugeValue, v.ConnectionMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrDatabaseCacheMemoryKB, + c.memMgrDatabaseCacheMemoryKB, prometheus.GaugeValue, v.DatabaseCacheMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrExternalbenefitofmemory, + c.memMgrExternalbenefitofmemory, prometheus.GaugeValue, v.Externalbenefitofmemory, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrFreeMemoryKB, + c.memMgrFreeMemoryKB, prometheus.GaugeValue, v.FreeMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrGrantedWorkspaceMemoryKB, + c.memMgrGrantedWorkspaceMemoryKB, prometheus.GaugeValue, v.GrantedWorkspaceMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLockBlocks, + c.memMgrLockBlocks, prometheus.GaugeValue, v.LockBlocks, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLockBlocksAllocated, + c.memMgrLockBlocksAllocated, prometheus.GaugeValue, v.LockBlocksAllocated, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLockMemoryKB, + c.memMgrLockMemoryKB, prometheus.GaugeValue, v.LockMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLockOwnerBlocks, + c.memMgrLockOwnerBlocks, prometheus.GaugeValue, v.LockOwnerBlocks, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLockOwnerBlocksAllocated, + c.memMgrLockOwnerBlocksAllocated, prometheus.GaugeValue, v.LockOwnerBlocksAllocated, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrLogPoolMemoryKB, + c.memMgrLogPoolMemoryKB, prometheus.GaugeValue, v.LogPoolMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrMaximumWorkspaceMemoryKB, + c.memMgrMaximumWorkspaceMemoryKB, prometheus.GaugeValue, v.MaximumWorkspaceMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrMemoryGrantsOutstanding, + c.memMgrMemoryGrantsOutstanding, prometheus.GaugeValue, v.MemoryGrantsOutstanding, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrMemoryGrantsPending, + c.memMgrMemoryGrantsPending, prometheus.GaugeValue, v.MemoryGrantsPending, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrOptimizerMemoryKB, + c.memMgrOptimizerMemoryKB, prometheus.GaugeValue, v.OptimizerMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrReservedServerMemoryKB, + c.memMgrReservedServerMemoryKB, prometheus.GaugeValue, v.ReservedServerMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrSQLCacheMemoryKB, + c.memMgrSQLCacheMemoryKB, prometheus.GaugeValue, v.SQLCacheMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrStolenServerMemoryKB, + c.memMgrStolenServerMemoryKB, prometheus.GaugeValue, v.StolenServerMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrTargetServerMemoryKB, + c.memMgrTargetServerMemoryKB, prometheus.GaugeValue, v.TargetServerMemoryKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.MemMgrTotalServerMemoryKB, + c.memMgrTotalServerMemoryKB, prometheus.GaugeValue, v.TotalServerMemoryKB*1024, sqlInstance, @@ -3757,17 +3757,17 @@ func (c *Collector) collectMemoryManager(ctx *types.ScrapeContext, ch chan<- pro // Win32_PerfRawData_MSSQLSERVER_SQLServerSQLStatistics docs: // - https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-sql-statistics-object type mssqlSQLStatistics struct { - AutoParamAttemptsPersec float64 `perflib:"Auto-Param Attempts/sec"` - BatchRequestsPersec float64 `perflib:"Batch Requests/sec"` - FailedAutoParamsPersec float64 `perflib:"Failed Auto-Params/sec"` - ForcedParameterizationsPersec float64 `perflib:"Forced Parameterizations/sec"` - GuidedplanexecutionsPersec float64 `perflib:"Guided plan executions/sec"` - MisguidedplanexecutionsPersec float64 `perflib:"Misguided plan executions/sec"` - SafeAutoParamsPersec float64 `perflib:"Safe Auto-Params/sec"` + AutoParamAttemptsPerSec float64 `perflib:"Auto-Param Attempts/sec"` + BatchRequestsPerSec float64 `perflib:"Batch Requests/sec"` + FailedAutoParamsPerSec float64 `perflib:"Failed Auto-Params/sec"` + ForcedParameterizationsPerSec float64 `perflib:"Forced Parameterizations/sec"` + GuidedplanexecutionsPerSec float64 `perflib:"Guided plan executions/sec"` + MisguidedplanexecutionsPerSec float64 `perflib:"Misguided plan executions/sec"` + SafeAutoParamsPerSec float64 `perflib:"Safe Auto-Params/sec"` SQLAttentionrate float64 `perflib:"SQL Attention rate"` - SQLCompilationsPersec float64 `perflib:"SQL Compilations/sec"` - SQLReCompilationsPersec float64 `perflib:"SQL Re-Compilations/sec"` - UnsafeAutoParamsPersec float64 `perflib:"Unsafe Auto-Params/sec"` + SQLCompilationsPerSec float64 `perflib:"SQL Compilations/sec"` + SQLReCompilationsPerSec float64 `perflib:"SQL Re-Compilations/sec"` + UnsafeAutoParamsPerSec float64 `perflib:"Unsafe Auto-Params/sec"` } func (c *Collector) collectSQLStats(ctx *types.ScrapeContext, ch chan<- prometheus.Metric, sqlInstance string) error { @@ -3780,79 +3780,79 @@ func (c *Collector) collectSQLStats(ctx *types.ScrapeContext, ch chan<- promethe for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.SQLStatsAutoParamAttempts, + c.sqlStatsAutoParamAttempts, prometheus.CounterValue, - v.AutoParamAttemptsPersec, + v.AutoParamAttemptsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsBatchRequests, + c.sqlStatsBatchRequests, prometheus.CounterValue, - v.BatchRequestsPersec, + v.BatchRequestsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsFailedAutoParams, + c.sqlStatsFailedAutoParams, prometheus.CounterValue, - v.FailedAutoParamsPersec, + v.FailedAutoParamsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsForcedParameterizations, + c.sqlStatsForcedParameterizations, prometheus.CounterValue, - v.ForcedParameterizationsPersec, + v.ForcedParameterizationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsGuidedplanexecutions, + c.sqlStatsGuidedplanexecutions, prometheus.CounterValue, - v.GuidedplanexecutionsPersec, + v.GuidedplanexecutionsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsMisguidedplanexecutions, + c.sqlStatsMisguidedplanexecutions, prometheus.CounterValue, - v.MisguidedplanexecutionsPersec, + v.MisguidedplanexecutionsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsSafeAutoParams, + c.sqlStatsSafeAutoParams, prometheus.CounterValue, - v.SafeAutoParamsPersec, + v.SafeAutoParamsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsSQLAttentionrate, + c.sqlStatsSQLAttentionrate, prometheus.CounterValue, v.SQLAttentionrate, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsSQLCompilations, + c.sqlStatsSQLCompilations, prometheus.CounterValue, - v.SQLCompilationsPersec, + v.SQLCompilationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsSQLReCompilations, + c.sqlStatsSQLReCompilations, prometheus.CounterValue, - v.SQLReCompilationsPersec, + v.SQLReCompilationsPerSec, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.SQLStatsUnsafeAutoParams, + c.sqlStatsUnsafeAutoParams, prometheus.CounterValue, - v.UnsafeAutoParamsPersec, + v.UnsafeAutoParamsPerSec, sqlInstance, ) } @@ -3890,84 +3890,84 @@ func (c *Collector) collectWaitStats(ctx *types.ScrapeContext, ch chan<- prometh item := v.Name ch <- prometheus.MustNewConstMetric( - c.WaitStatsLockWaits, + c.waitStatsLockWaits, prometheus.CounterValue, v.WaitStatsLockWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsMemoryGrantQueueWaits, + c.waitStatsMemoryGrantQueueWaits, prometheus.CounterValue, v.WaitStatsMemoryGrantQueueWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsThreadSafeMemoryObjectsWaits, + c.waitStatsThreadSafeMemoryObjectsWaits, prometheus.CounterValue, v.WaitStatsThreadSafeMemoryObjectsWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsLogWriteWaits, + c.waitStatsLogWriteWaits, prometheus.CounterValue, v.WaitStatsLogWriteWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsLogBufferWaits, + c.waitStatsLogBufferWaits, prometheus.CounterValue, v.WaitStatsLogBufferWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsNetworkIOWaits, + c.waitStatsNetworkIOWaits, prometheus.CounterValue, v.WaitStatsNetworkIOWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsPageIOLatchWaits, + c.waitStatsPageIOLatchWaits, prometheus.CounterValue, v.WaitStatsPageIOLatchWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsPageLatchWaits, + c.waitStatsPageLatchWaits, prometheus.CounterValue, v.WaitStatsPageLatchWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsNonpageLatchWaits, + c.waitStatsNonPageLatchWaits, prometheus.CounterValue, v.WaitStatsNonpageLatchWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsWaitForTheWorkerWaits, + c.waitStatsWaitForTheWorkerWaits, prometheus.CounterValue, v.WaitStatsWaitForTheWorkerWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsWorkspaceSynchronizationWaits, + c.waitStatsWorkspaceSynchronizationWaits, prometheus.CounterValue, v.WaitStatsWorkspaceSynchronizationWaits, sqlInstance, item, ) ch <- prometheus.MustNewConstMetric( - c.WaitStatsTransactionOwnershipWaits, + c.waitStatsTransactionOwnershipWaits, prometheus.CounterValue, v.WaitStatsTransactionOwnershipWaits, sqlInstance, item, @@ -3979,7 +3979,7 @@ func (c *Collector) collectWaitStats(ctx *types.ScrapeContext, ch chan<- prometh type mssqlSQLErrors struct { Name string - ErrorsPersec float64 `perflib:"Errors/sec"` + ErrorsPerSec float64 `perflib:"Errors/sec"` } // Win32_PerfRawData_MSSQLSERVER_SQLServerErrors docs: @@ -3999,9 +3999,9 @@ func (c *Collector) collectSQLErrors(ctx *types.ScrapeContext, ch chan<- prometh resource := v.Name ch <- prometheus.MustNewConstMetric( - c.SQLErrorsTotal, + c.sqlErrorsTotal, prometheus.CounterValue, - v.ErrorsPersec, + v.ErrorsPerSec, sqlInstance, resource, ) } @@ -4037,91 +4037,91 @@ func (c *Collector) collectTransactions(ctx *types.ScrapeContext, ch chan<- prom for _, v := range dst { ch <- prometheus.MustNewConstMetric( - c.TransactionsTempDbFreeSpaceBytes, + c.transactionsTempDbFreeSpaceBytes, prometheus.GaugeValue, v.FreeSpaceintempdbKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsLongestTransactionRunningSeconds, + c.transactionsLongestTransactionRunningSeconds, prometheus.GaugeValue, v.LongestTransactionRunningTime, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsNonSnapshotVersionActiveTotal, + c.transactionsNonSnapshotVersionActiveTotal, prometheus.CounterValue, v.NonSnapshotVersionTransactions, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsSnapshotActiveTotal, + c.transactionsSnapshotActiveTotal, prometheus.CounterValue, v.SnapshotTransactions, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsActive, + c.transactionsActive, prometheus.GaugeValue, v.Transactions, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsUpdateConflictsTotal, + c.transactionsUpdateConflictsTotal, prometheus.CounterValue, v.Updateconflictratio, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsUpdateSnapshotActiveTotal, + c.transactionsUpdateSnapshotActiveTotal, prometheus.CounterValue, v.UpdateSnapshotTransactions, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionCleanupRateBytes, + c.transactionsVersionCleanupRateBytes, prometheus.GaugeValue, v.VersionCleanuprateKBPers*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionGenerationRateBytes, + c.transactionsVersionGenerationRateBytes, prometheus.GaugeValue, v.VersionGenerationrateKBPers*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionStoreSizeBytes, + c.transactionsVersionStoreSizeBytes, prometheus.GaugeValue, v.VersionStoreSizeKB*1024, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionStoreUnits, + c.transactionsVersionStoreUnits, prometheus.CounterValue, v.VersionStoreunitcount, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionStoreCreationUnits, + c.transactionsVersionStoreCreationUnits, prometheus.CounterValue, v.VersionStoreunitcreation, sqlInstance, ) ch <- prometheus.MustNewConstMetric( - c.TransactionsVersionStoreTruncationUnits, + c.transactionsVersionStoreTruncationUnits, prometheus.CounterValue, v.VersionStoreunittruncation, sqlInstance, diff --git a/pkg/collector/net/net.go b/pkg/collector/net/net.go index b5cd5658..83b44462 100644 --- a/pkg/collector/net/net.go +++ b/pkg/collector/net/net.go @@ -35,19 +35,19 @@ type Collector struct { nicInclude *string nicExclude *string - BytesReceivedTotal *prometheus.Desc - BytesSentTotal *prometheus.Desc - BytesTotal *prometheus.Desc - OutputQueueLength *prometheus.Desc - PacketsOutboundDiscarded *prometheus.Desc - PacketsOutboundErrors *prometheus.Desc - PacketsTotal *prometheus.Desc - PacketsReceivedDiscarded *prometheus.Desc - PacketsReceivedErrors *prometheus.Desc - PacketsReceivedTotal *prometheus.Desc - PacketsReceivedUnknown *prometheus.Desc - PacketsSentTotal *prometheus.Desc - CurrentBandwidth *prometheus.Desc + bytesReceivedTotal *prometheus.Desc + bytesSentTotal *prometheus.Desc + bytesTotal *prometheus.Desc + outputQueueLength *prometheus.Desc + packetsOutboundDiscarded *prometheus.Desc + packetsOutboundErrors *prometheus.Desc + packetsTotal *prometheus.Desc + packetsReceivedDiscarded *prometheus.Desc + packetsReceivedErrors *prometheus.Desc + packetsReceivedTotal *prometheus.Desc + packetsReceivedUnknown *prometheus.Desc + packetsSentTotal *prometheus.Desc + currentBandwidth *prometheus.Desc nicIncludePattern *regexp.Regexp nicExcludePattern *regexp.Regexp @@ -100,79 +100,79 @@ func (c *Collector) Close() error { } func (c *Collector) Build() error { - c.BytesReceivedTotal = prometheus.NewDesc( + c.bytesReceivedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bytes_received_total"), "(Network.BytesReceivedPerSec)", []string{"nic"}, nil, ) - c.BytesSentTotal = prometheus.NewDesc( + c.bytesSentTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bytes_sent_total"), "(Network.BytesSentPerSec)", []string{"nic"}, nil, ) - c.BytesTotal = prometheus.NewDesc( + c.bytesTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "bytes_total"), "(Network.BytesTotalPerSec)", []string{"nic"}, nil, ) - c.OutputQueueLength = prometheus.NewDesc( + c.outputQueueLength = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "output_queue_length_packets"), "(Network.OutputQueueLength)", []string{"nic"}, nil, ) - c.PacketsOutboundDiscarded = prometheus.NewDesc( + c.packetsOutboundDiscarded = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_outbound_discarded_total"), "(Network.PacketsOutboundDiscarded)", []string{"nic"}, nil, ) - c.PacketsOutboundErrors = prometheus.NewDesc( + c.packetsOutboundErrors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_outbound_errors_total"), "(Network.PacketsOutboundErrors)", []string{"nic"}, nil, ) - c.PacketsReceivedDiscarded = prometheus.NewDesc( + c.packetsReceivedDiscarded = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_received_discarded_total"), "(Network.PacketsReceivedDiscarded)", []string{"nic"}, nil, ) - c.PacketsReceivedErrors = prometheus.NewDesc( + c.packetsReceivedErrors = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_received_errors_total"), "(Network.PacketsReceivedErrors)", []string{"nic"}, nil, ) - c.PacketsReceivedTotal = prometheus.NewDesc( + c.packetsReceivedTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_received_total"), "(Network.PacketsReceivedPerSec)", []string{"nic"}, nil, ) - c.PacketsReceivedUnknown = prometheus.NewDesc( + c.packetsReceivedUnknown = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_received_unknown_total"), "(Network.PacketsReceivedUnknown)", []string{"nic"}, nil, ) - c.PacketsTotal = prometheus.NewDesc( + c.packetsTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_total"), "(Network.PacketsPerSec)", []string{"nic"}, nil, ) - c.PacketsSentTotal = prometheus.NewDesc( + c.packetsSentTotal = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "packets_sent_total"), "(Network.PacketsSentPerSec)", []string{"nic"}, nil, ) - c.CurrentBandwidth = prometheus.NewDesc( + c.currentBandwidth = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "current_bandwidth_bytes"), "(Network.CurrentBandwidth)", []string{"nic"}, @@ -248,83 +248,84 @@ func (c *Collector) collect(ctx *types.ScrapeContext, ch chan<- prometheus.Metri // Counters ch <- prometheus.MustNewConstMetric( - c.BytesReceivedTotal, + c.bytesReceivedTotal, prometheus.CounterValue, nic.BytesReceivedPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.BytesSentTotal, + c.bytesSentTotal, prometheus.CounterValue, nic.BytesSentPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.BytesTotal, + c.bytesTotal, prometheus.CounterValue, nic.BytesTotalPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.OutputQueueLength, + c.outputQueueLength, prometheus.GaugeValue, nic.OutputQueueLength, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsOutboundDiscarded, + c.packetsOutboundDiscarded, prometheus.CounterValue, nic.PacketsOutboundDiscarded, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsOutboundErrors, + c.packetsOutboundErrors, prometheus.CounterValue, nic.PacketsOutboundErrors, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsTotal, + c.packetsTotal, prometheus.CounterValue, nic.PacketsPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsReceivedDiscarded, + c.packetsReceivedDiscarded, prometheus.CounterValue, nic.PacketsReceivedDiscarded, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsReceivedErrors, + c.packetsReceivedErrors, prometheus.CounterValue, nic.PacketsReceivedErrors, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsReceivedTotal, + c.packetsReceivedTotal, prometheus.CounterValue, nic.PacketsReceivedPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsReceivedUnknown, + c.packetsReceivedUnknown, prometheus.CounterValue, nic.PacketsReceivedUnknown, name, ) ch <- prometheus.MustNewConstMetric( - c.PacketsSentTotal, + c.packetsSentTotal, prometheus.CounterValue, nic.PacketsSentPerSec, name, ) ch <- prometheus.MustNewConstMetric( - c.CurrentBandwidth, + c.currentBandwidth, prometheus.GaugeValue, nic.CurrentBandwidth/8, name, ) } + return nil }