From 96e081c7d4c5da8d3274b534e0daf7abac2ad5b2 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 13:57:23 -0600 Subject: [PATCH 01/17] feat: adapting to support CimSession and alternative namespaces Signed-off-by: Sam Storie --- tools/collector-generator/New-Collector.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/collector-generator/New-Collector.ps1 b/tools/collector-generator/New-Collector.ps1 index 43944386..22ef94a5 100644 --- a/tools/collector-generator/New-Collector.ps1 +++ b/tools/collector-generator/New-Collector.ps1 @@ -2,19 +2,21 @@ Param( [Parameter(Mandatory=$true)] $Class, [Parameter(Mandatory=$false)] + $Namespace = "root/cimv2", + [Parameter(Mandatory=$false)] $CollectorName = ($Class -replace 'Win32_PerfRawData_Perf',''), [Parameter(Mandatory=$false)] $ComputerName = "localhost", [Parameter(Mandatory=$false)] - $Credential + [CimSession] $Session ) $ErrorActionPreference = "Stop" -if($Credential -ne $null) { - $wmiObject = Get-CimInstance -ComputerName $ComputerName -Credential $Credential -Class $Class +if($null -ne $Session) { + $wmiObject = Get-CimInstance -CimSession $Session -Namespace $Namespace -Class $Class } else { - $wmiObject = Get-CimInstance -ComputerName $ComputerName -Class $Class + $wmiObject = Get-CimInstance -ComputerName $ComputerName -Namespace $Namespace -Class $Class } $members = $wmiObject ` @@ -22,6 +24,7 @@ $members = $wmiObject ` | Where-Object { $_.Definition -Match '^u?int' -and $_.Name -NotMatch '_' } ` | Select-Object Name, @{Name="Type";Expression={$_.Definition.Split(" ")[0]}} $input = @{ + "Namespace"=$Namespace; "Class"=$Class; "CollectorName"=$CollectorName; "Members"=$members From 740e277cf605f3265ece1f8129e86543180e407f Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 13:58:04 -0600 Subject: [PATCH 02/17] feat: Adding mscluster_node collector functionality Breaks out the metrics by the name specified by each node Signed-off-by: Sam Storie --- collector/mscluster_node.go | 252 ++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 collector/mscluster_node.go diff --git a/collector/mscluster_node.go b/collector/mscluster_node.go new file mode 100644 index 00000000..ef874c7b --- /dev/null +++ b/collector/mscluster_node.go @@ -0,0 +1,252 @@ +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("mscluster_node", newMSCluster_NodeCollector) // TODO: Add any perflib dependencies here +} + +// A MSCluster_NodeCollector is a Prometheus collector for WMI MSCluster_Node metrics +type MSCluster_NodeCollector struct { + 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 newMSCluster_NodeCollector() (Collector, error) { + const subsystem = "mscluster_node" + return &MSCluster_NodeCollector{ + BuildNumber: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "build_number"), + "(BuildNumber)", + []string{"name"}, + nil, + ), + Characteristics: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "characteristics"), + "(Characteristics)", + []string{"name"}, + nil, + ), + DetectedCloudPlatform: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "detected_cloud_platform"), + "(DetectedCloudPlatform)", + []string{"name"}, + nil, + ), + DynamicWeight: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "dynamic_weight"), + "(DynamicWeight)", + []string{"name"}, + nil, + ), + Flags: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "flags"), + "(Flags)", + []string{"name"}, + nil, + ), + MajorVersion: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "major_version"), + "(MajorVersion)", + []string{"name"}, + nil, + ), + MinorVersion: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "minor_version"), + "(MinorVersion)", + []string{"name"}, + nil, + ), + NeedsPreventQuorum: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "needs_prevent_quorum"), + "(NeedsPreventQuorum)", + []string{"name"}, + nil, + ), + NodeDrainStatus: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "node_drain_status"), + "(NodeDrainStatus)", + []string{"name"}, + nil, + ), + NodeHighestVersion: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "node_highest_version"), + "(NodeHighestVersion)", + []string{"name"}, + nil, + ), + NodeLowestVersion: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "node_lowest_version"), + "(NodeLowestVersion)", + []string{"name"}, + nil, + ), + NodeWeight: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "node_weight"), + "(NodeWeight)", + []string{"name"}, + nil, + ), + State: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "state"), + "(State)", + []string{"name"}, + nil, + ), + StatusInformation: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "status_information"), + "(StatusInformation)", + []string{"name"}, + nil, + ), + }, nil +} + +// MSCluster_Node docs: +// - +type MSCluster_Node struct { + Name string + + BuildNumber uint + Characteristics uint + DetectedCloudPlatform uint + DynamicWeight uint + Flags uint + MajorVersion uint + MinorVersion uint + NeedsPreventQuorum uint + NodeDrainStatus uint + NodeHighestVersion uint + NodeLowestVersion uint + NodeWeight uint + State uint + StatusInformation uint +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *MSCluster_NodeCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + var dst []MSCluster_Node + q := queryAll(&dst) + if err := wmi.QueryNamespace(q, &dst, "root/MSCluster"); err != nil { + return err + } + + for _, v := range dst { + + ch <- prometheus.MustNewConstMetric( + c.BuildNumber, + prometheus.GaugeValue, + float64(v.BuildNumber), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Characteristics, + prometheus.GaugeValue, + float64(v.Characteristics), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DetectedCloudPlatform, + prometheus.GaugeValue, + float64(v.DetectedCloudPlatform), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DynamicWeight, + prometheus.GaugeValue, + float64(v.DynamicWeight), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Flags, + prometheus.GaugeValue, + float64(v.Flags), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MajorVersion, + prometheus.GaugeValue, + float64(v.MajorVersion), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MinorVersion, + prometheus.GaugeValue, + float64(v.MinorVersion), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NeedsPreventQuorum, + prometheus.GaugeValue, + float64(v.NeedsPreventQuorum), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NodeDrainStatus, + prometheus.GaugeValue, + float64(v.NodeDrainStatus), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NodeHighestVersion, + prometheus.GaugeValue, + float64(v.NodeHighestVersion), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NodeLowestVersion, + prometheus.GaugeValue, + float64(v.NodeLowestVersion), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NodeWeight, + prometheus.GaugeValue, + float64(v.NodeWeight), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.State, + prometheus.GaugeValue, + float64(v.State), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.StatusInformation, + prometheus.GaugeValue, + float64(v.StatusInformation), + v.Name, + ) + } + + return nil +} From 6a186f26f0f73817aa08c3a01c26dd2a5e5eef5d Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 14:06:43 -0600 Subject: [PATCH 03/17] feat: added mscluster_network collector functionality Signed-off-by: Sam Storie --- collector/mscluster_network.go | 116 +++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 collector/mscluster_network.go diff --git a/collector/mscluster_network.go b/collector/mscluster_network.go new file mode 100644 index 00000000..88a970a0 --- /dev/null +++ b/collector/mscluster_network.go @@ -0,0 +1,116 @@ +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("mscluster_network", newMSCluster_NetworkCollector) // TODO: Add any perflib dependencies here +} + +// A MSCluster_NetworkCollector is a Prometheus collector for WMI MSCluster_Network metrics +type MSCluster_NetworkCollector struct { + Characteristics *prometheus.Desc + Flags *prometheus.Desc + Metric *prometheus.Desc + Role *prometheus.Desc + State *prometheus.Desc +} + +func newMSCluster_NetworkCollector() (Collector, error) { + const subsystem = "mscluster_network" + return &MSCluster_NetworkCollector{ + Characteristics: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "characteristics"), + "(Characteristics)", + []string{"name"}, + nil, + ), + Flags: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "flags"), + "(Flags)", + []string{"name"}, + nil, + ), + Metric: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "metric"), + "(Metric)", + []string{"name"}, + nil, + ), + Role: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "role"), + "(Role)", + []string{"name"}, + nil, + ), + State: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "state"), + "(State)", + []string{"name"}, + nil, + ), + }, nil +} + +// MSCluster_Network docs: +// - +type MSCluster_Network struct { + Name string + + Characteristics uint + Flags uint + Metric uint + Role uint + State uint +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *MSCluster_NetworkCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + var dst []MSCluster_Network + q := queryAll(&dst) + if err := wmi.QueryNamespace(q, &dst, "root/MSCluster"); err != nil { + return err + } + + for _, v := range dst { + ch <- prometheus.MustNewConstMetric( + c.Characteristics, + prometheus.GaugeValue, + float64(v.Characteristics), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Flags, + prometheus.GaugeValue, + float64(v.Flags), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Metric, + prometheus.GaugeValue, + float64(v.Metric), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Role, + prometheus.GaugeValue, + float64(v.Role), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.State, + prometheus.GaugeValue, + float64(v.State), + v.Name, + ) + } + + return nil +} From 8c7dd7fd5ffd85c01cc58645ee2b0f2d37d4bdc0 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 14:34:22 -0600 Subject: [PATCH 04/17] feat: added the mscluster_cluster collector functionality Signed-off-by: Sam Storie --- collector/mscluster_cluster.go | 1198 ++++++++++++++++++++++++++++++++ 1 file changed, 1198 insertions(+) create mode 100644 collector/mscluster_cluster.go diff --git a/collector/mscluster_cluster.go b/collector/mscluster_cluster.go new file mode 100644 index 00000000..a7de106c --- /dev/null +++ b/collector/mscluster_cluster.go @@ -0,0 +1,1198 @@ +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("mscluster_cluster", newMSCluster_ClusterCollector) // TODO: Add any perflib dependencies here +} + +// A MSCluster_ClusterCollector is a Prometheus collector for WMI MSCluster_Cluster metrics +type MSCluster_ClusterCollector struct { + 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 newMSCluster_ClusterCollector() (Collector, error) { + const subsystem = "mscluster_cluster" + return &MSCluster_ClusterCollector{ + AddEvictDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "add_evict_delay"), + "(AddEvictDelay)", + []string{"name"}, + nil, + ), + AdminAccessPoint: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "admin_access_point"), + "(AdminAccessPoint)", + []string{"name"}, + nil, + ), + AutoAssignNodeSite: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "auto_assign_node_site"), + "(AutoAssignNodeSite)", + []string{"name"}, + nil, + ), + AutoBalancerLevel: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "auto_balancer_level"), + "(AutoBalancerLevel)", + []string{"name"}, + nil, + ), + AutoBalancerMode: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "auto_balancer_mode"), + "(AutoBalancerMode)", + []string{"name"}, + nil, + ), + BackupInProgress: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "backup_in_progress"), + "(BackupInProgress)", + []string{"name"}, + nil, + ), + BlockCacheSize: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "block_cache_size"), + "(BlockCacheSize)", + []string{"name"}, + nil, + ), + ClusSvcHangTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clus_svc_hang_timeout"), + "(ClusSvcHangTimeout)", + []string{"name"}, + nil, + ), + ClusSvcRegroupOpeningTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_opening_timeout"), + "(ClusSvcRegroupOpeningTimeout)", + []string{"name"}, + nil, + ), + ClusSvcRegroupPruningTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_pruning_timeout"), + "(ClusSvcRegroupPruningTimeout)", + []string{"name"}, + nil, + ), + ClusSvcRegroupStageTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_stage_timeout"), + "(ClusSvcRegroupStageTimeout)", + []string{"name"}, + nil, + ), + ClusSvcRegroupTickInMilliseconds: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_tick_in_milliseconds"), + "(ClusSvcRegroupTickInMilliseconds)", + []string{"name"}, + nil, + ), + ClusterEnforcedAntiAffinity: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_enforced_anti_affinity"), + "(ClusterEnforcedAntiAffinity)", + []string{"name"}, + nil, + ), + ClusterFunctionalLevel: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_functional_level"), + "(ClusterFunctionalLevel)", + []string{"name"}, + nil, + ), + ClusterGroupWaitDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_group_wait_delay"), + "(ClusterGroupWaitDelay)", + []string{"name"}, + nil, + ), + ClusterLogLevel: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_log_level"), + "(ClusterLogLevel)", + []string{"name"}, + nil, + ), + ClusterLogSize: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_log_size"), + "(ClusterLogSize)", + []string{"name"}, + nil, + ), + ClusterUpgradeVersion: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cluster_upgrade_version"), + "(ClusterUpgradeVersion)", + []string{"name"}, + nil, + ), + CrossSiteDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cross_site_delay"), + "(CrossSiteDelay)", + []string{"name"}, + nil, + ), + CrossSiteThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cross_site_threshold"), + "(CrossSiteThreshold)", + []string{"name"}, + nil, + ), + CrossSubnetDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cross_subnet_delay"), + "(CrossSubnetDelay)", + []string{"name"}, + nil, + ), + CrossSubnetThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cross_subnet_threshold"), + "(CrossSubnetThreshold)", + []string{"name"}, + nil, + ), + CsvBalancer: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "csv_balancer"), + "(CsvBalancer)", + []string{"name"}, + nil, + ), + DatabaseReadWriteMode: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "database_read_write_mode"), + "(DatabaseReadWriteMode)", + []string{"name"}, + nil, + ), + DefaultNetworkRole: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "default_network_role"), + "(DefaultNetworkRole)", + []string{"name"}, + nil, + ), + DetectedCloudPlatform: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "detected_cloud_platform"), + "(DetectedCloudPlatform)", + []string{"name"}, + nil, + ), + DetectManagedEvents: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "detect_managed_events"), + "(DetectManagedEvents)", + []string{"name"}, + nil, + ), + DetectManagedEventsThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "detect_managed_events_threshold"), + "(DetectManagedEventsThreshold)", + []string{"name"}, + nil, + ), + DisableGroupPreferredOwnerRandomization: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "disable_group_preferred_owner_randomization"), + "(DisableGroupPreferredOwnerRandomization)", + []string{"name"}, + nil, + ), + DrainOnShutdown: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "drain_on_shutdown"), + "(DrainOnShutdown)", + []string{"name"}, + nil, + ), + DynamicQuorumEnabled: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "dynamic_quorum_enabled"), + "(DynamicQuorumEnabled)", + []string{"name"}, + nil, + ), + EnableSharedVolumes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "enable_shared_volumes"), + "(EnableSharedVolumes)", + []string{"name"}, + nil, + ), + FixQuorum: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "fix_quorum"), + "(FixQuorum)", + []string{"name"}, + nil, + ), + GracePeriodEnabled: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "grace_period_enabled"), + "(GracePeriodEnabled)", + []string{"name"}, + nil, + ), + GracePeriodTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "grace_period_timeout"), + "(GracePeriodTimeout)", + []string{"name"}, + nil, + ), + GroupDependencyTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "group_dependency_timeout"), + "(GroupDependencyTimeout)", + []string{"name"}, + nil, + ), + HangRecoveryAction: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "hang_recovery_action"), + "(HangRecoveryAction)", + []string{"name"}, + nil, + ), + IgnorePersistentStateOnStartup: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "ignore_persistent_state_on_startup"), + "(IgnorePersistentStateOnStartup)", + []string{"name"}, + nil, + ), + LogResourceControls: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "log_resource_controls"), + "(LogResourceControls)", + []string{"name"}, + nil, + ), + LowerQuorumPriorityNodeId: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "lower_quorum_priority_node_id"), + "(LowerQuorumPriorityNodeId)", + []string{"name"}, + nil, + ), + MaxNumberOfNodes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "max_number_of_nodes"), + "(MaxNumberOfNodes)", + []string{"name"}, + nil, + ), + MessageBufferLength: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "message_buffer_length"), + "(MessageBufferLength)", + []string{"name"}, + nil, + ), + MinimumNeverPreemptPriority: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "minimum_never_preempt_priority"), + "(MinimumNeverPreemptPriority)", + []string{"name"}, + nil, + ), + MinimumPreemptorPriority: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "minimum_preemptor_priority"), + "(MinimumPreemptorPriority)", + []string{"name"}, + nil, + ), + NetftIPSecEnabled: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "netft_ip_sec_enabled"), + "(NetftIPSecEnabled)", + []string{"name"}, + nil, + ), + PlacementOptions: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "placement_options"), + "(PlacementOptions)", + []string{"name"}, + nil, + ), + PlumbAllCrossSubnetRoutes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "plumb_all_cross_subnet_routes"), + "(PlumbAllCrossSubnetRoutes)", + []string{"name"}, + nil, + ), + PreventQuorum: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "prevent_quorum"), + "(PreventQuorum)", + []string{"name"}, + nil, + ), + QuarantineDuration: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quarantine_duration"), + "(QuarantineDuration)", + []string{"name"}, + nil, + ), + QuarantineThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quarantine_threshold"), + "(QuarantineThreshold)", + []string{"name"}, + nil, + ), + QuorumArbitrationTimeMax: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quorum_arbitration_time_max"), + "(QuorumArbitrationTimeMax)", + []string{"name"}, + nil, + ), + QuorumArbitrationTimeMin: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quorum_arbitration_time_min"), + "(QuorumArbitrationTimeMin)", + []string{"name"}, + nil, + ), + QuorumLogFileSize: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quorum_log_file_size"), + "(QuorumLogFileSize)", + []string{"name"}, + nil, + ), + QuorumTypeValue: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "quorum_type_value"), + "(QuorumTypeValue)", + []string{"name"}, + nil, + ), + RequestReplyTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "request_reply_timeout"), + "(RequestReplyTimeout)", + []string{"name"}, + nil, + ), + ResiliencyDefaultPeriod: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "resiliency_default_period"), + "(ResiliencyDefaultPeriod)", + []string{"name"}, + nil, + ), + ResiliencyLevel: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "resiliency_level"), + "(ResiliencyLevel)", + []string{"name"}, + nil, + ), + ResourceDllDeadlockPeriod: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "resource_dll_deadlock_period"), + "(ResourceDllDeadlockPeriod)", + []string{"name"}, + nil, + ), + RootMemoryReserved: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "root_memory_reserved"), + "(RootMemoryReserved)", + []string{"name"}, + nil, + ), + RouteHistoryLength: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "route_history_length"), + "(RouteHistoryLength)", + []string{"name"}, + nil, + ), + S2DBusTypes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_bus_types"), + "(S2DBusTypes)", + []string{"name"}, + nil, + ), + S2DCacheDesiredState: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_desired_state"), + "(S2DCacheDesiredState)", + []string{"name"}, + nil, + ), + S2DCacheFlashReservePercent: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_flash_reserve_percent"), + "(S2DCacheFlashReservePercent)", + []string{"name"}, + nil, + ), + S2DCachePageSizeKBytes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_page_size_k_bytes"), + "(S2DCachePageSizeKBytes)", + []string{"name"}, + nil, + ), + S2DEnabled: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_enabled"), + "(S2DEnabled)", + []string{"name"}, + nil, + ), + S2DIOLatencyThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2dio_latency_threshold"), + "(S2DIOLatencyThreshold)", + []string{"name"}, + nil, + ), + S2DOptimizations: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "s2d_optimizations"), + "(S2DOptimizations)", + []string{"name"}, + nil, + ), + SameSubnetDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "same_subnet_delay"), + "(SameSubnetDelay)", + []string{"name"}, + nil, + ), + SameSubnetThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "same_subnet_threshold"), + "(SameSubnetThreshold)", + []string{"name"}, + nil, + ), + SecurityLevel: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "security_level"), + "(SecurityLevel)", + []string{"name"}, + nil, + ), + SecurityLevelForStorage: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "security_level_for_storage"), + "(SecurityLevelForStorage)", + []string{"name"}, + nil, + ), + SharedVolumeVssWriterOperationTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "shared_volume_vss_writer_operation_timeout"), + "(SharedVolumeVssWriterOperationTimeout)", + []string{"name"}, + nil, + ), + ShutdownTimeoutInMinutes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "shutdown_timeout_in_minutes"), + "(ShutdownTimeoutInMinutes)", + []string{"name"}, + nil, + ), + UseClientAccessNetworksForSharedVolumes: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "use_client_access_networks_for_shared_volumes"), + "(UseClientAccessNetworksForSharedVolumes)", + []string{"name"}, + nil, + ), + WitnessDatabaseWriteTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "witness_database_write_timeout"), + "(WitnessDatabaseWriteTimeout)", + []string{"name"}, + nil, + ), + WitnessDynamicWeight: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "witness_dynamic_weight"), + "(WitnessDynamicWeight)", + []string{"name"}, + nil, + ), + WitnessRestartInterval: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "witness_restart_interval"), + "(WitnessRestartInterval)", + []string{"name"}, + nil, + ), + }, nil +} + +// MSCluster_Cluster docs: +// - +type MSCluster_Cluster struct { + Name string + + AddEvictDelay uint + AdminAccessPoint uint + AutoAssignNodeSite uint + AutoBalancerLevel uint + AutoBalancerMode uint + BackupInProgress uint + BlockCacheSize uint + ClusSvcHangTimeout uint + ClusSvcRegroupOpeningTimeout uint + ClusSvcRegroupPruningTimeout uint + ClusSvcRegroupStageTimeout uint + ClusSvcRegroupTickInMilliseconds uint + ClusterEnforcedAntiAffinity uint + ClusterFunctionalLevel uint + ClusterGroupWaitDelay uint + ClusterLogLevel uint + ClusterLogSize uint + ClusterUpgradeVersion uint + CrossSiteDelay uint + CrossSiteThreshold uint + CrossSubnetDelay uint + CrossSubnetThreshold uint + CsvBalancer uint + DatabaseReadWriteMode uint + DefaultNetworkRole uint + DetectedCloudPlatform uint + DetectManagedEvents uint + DetectManagedEventsThreshold uint + DisableGroupPreferredOwnerRandomization uint + DrainOnShutdown uint + DynamicQuorumEnabled uint + EnableSharedVolumes uint + FixQuorum uint + GracePeriodEnabled uint + GracePeriodTimeout uint + GroupDependencyTimeout uint + HangRecoveryAction uint + IgnorePersistentStateOnStartup uint + LogResourceControls uint + LowerQuorumPriorityNodeId uint + MaxNumberOfNodes uint + MessageBufferLength uint + MinimumNeverPreemptPriority uint + MinimumPreemptorPriority uint + NetftIPSecEnabled uint + PlacementOptions uint + PlumbAllCrossSubnetRoutes uint + PreventQuorum uint + QuarantineDuration uint + QuarantineThreshold uint + QuorumArbitrationTimeMax uint + QuorumArbitrationTimeMin uint + QuorumLogFileSize uint + QuorumTypeValue uint + RequestReplyTimeout uint + ResiliencyDefaultPeriod uint + ResiliencyLevel uint + ResourceDllDeadlockPeriod uint + RootMemoryReserved uint + RouteHistoryLength uint + S2DBusTypes uint + S2DCacheDesiredState uint + S2DCacheFlashReservePercent uint + S2DCachePageSizeKBytes uint + S2DEnabled uint + S2DIOLatencyThreshold uint + S2DOptimizations uint + SameSubnetDelay uint + SameSubnetThreshold uint + SecurityLevel uint + SecurityLevelForStorage uint + SharedVolumeVssWriterOperationTimeout uint + ShutdownTimeoutInMinutes uint + UseClientAccessNetworksForSharedVolumes uint + WitnessDatabaseWriteTimeout uint + WitnessDynamicWeight uint + WitnessRestartInterval uint +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *MSCluster_ClusterCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + var dst []MSCluster_Cluster + q := queryAll(&dst) + if err := wmi.QueryNamespace(q, &dst, "root/MSCluster"); err != nil { + return err + } + + for _, v := range dst { + + ch <- prometheus.MustNewConstMetric( + c.AddEvictDelay, + prometheus.GaugeValue, + float64(v.AddEvictDelay), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.AdminAccessPoint, + prometheus.GaugeValue, + float64(v.AdminAccessPoint), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.AutoAssignNodeSite, + prometheus.GaugeValue, + float64(v.AutoAssignNodeSite), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.AutoBalancerLevel, + prometheus.GaugeValue, + float64(v.AutoBalancerLevel), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.AutoBalancerMode, + prometheus.GaugeValue, + float64(v.AutoBalancerMode), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.BackupInProgress, + prometheus.GaugeValue, + float64(v.BackupInProgress), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.BlockCacheSize, + prometheus.GaugeValue, + float64(v.BlockCacheSize), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusSvcHangTimeout, + prometheus.GaugeValue, + float64(v.ClusSvcHangTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusSvcRegroupOpeningTimeout, + prometheus.GaugeValue, + float64(v.ClusSvcRegroupOpeningTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusSvcRegroupPruningTimeout, + prometheus.GaugeValue, + float64(v.ClusSvcRegroupPruningTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusSvcRegroupStageTimeout, + prometheus.GaugeValue, + float64(v.ClusSvcRegroupStageTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusSvcRegroupTickInMilliseconds, + prometheus.GaugeValue, + float64(v.ClusSvcRegroupTickInMilliseconds), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterEnforcedAntiAffinity, + prometheus.GaugeValue, + float64(v.ClusterEnforcedAntiAffinity), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterFunctionalLevel, + prometheus.GaugeValue, + float64(v.ClusterFunctionalLevel), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterGroupWaitDelay, + prometheus.GaugeValue, + float64(v.ClusterGroupWaitDelay), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterLogLevel, + prometheus.GaugeValue, + float64(v.ClusterLogLevel), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterLogSize, + prometheus.GaugeValue, + float64(v.ClusterLogSize), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ClusterUpgradeVersion, + prometheus.GaugeValue, + float64(v.ClusterUpgradeVersion), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.CrossSiteDelay, + prometheus.GaugeValue, + float64(v.CrossSiteDelay), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.CrossSiteThreshold, + prometheus.GaugeValue, + float64(v.CrossSiteThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.CrossSubnetDelay, + prometheus.GaugeValue, + float64(v.CrossSubnetDelay), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.CrossSubnetThreshold, + prometheus.GaugeValue, + float64(v.CrossSubnetThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.CsvBalancer, + prometheus.GaugeValue, + float64(v.CsvBalancer), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DatabaseReadWriteMode, + prometheus.GaugeValue, + float64(v.DatabaseReadWriteMode), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DefaultNetworkRole, + prometheus.GaugeValue, + float64(v.DefaultNetworkRole), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DetectedCloudPlatform, + prometheus.GaugeValue, + float64(v.DetectedCloudPlatform), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DetectManagedEvents, + prometheus.GaugeValue, + float64(v.DetectManagedEvents), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DetectManagedEventsThreshold, + prometheus.GaugeValue, + float64(v.DetectManagedEventsThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DisableGroupPreferredOwnerRandomization, + prometheus.GaugeValue, + float64(v.DisableGroupPreferredOwnerRandomization), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DrainOnShutdown, + prometheus.GaugeValue, + float64(v.DrainOnShutdown), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DynamicQuorumEnabled, + prometheus.GaugeValue, + float64(v.DynamicQuorumEnabled), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.EnableSharedVolumes, + prometheus.GaugeValue, + float64(v.EnableSharedVolumes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FixQuorum, + prometheus.GaugeValue, + float64(v.FixQuorum), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.GracePeriodEnabled, + prometheus.GaugeValue, + float64(v.GracePeriodEnabled), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.GracePeriodTimeout, + prometheus.GaugeValue, + float64(v.GracePeriodTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.GroupDependencyTimeout, + prometheus.GaugeValue, + float64(v.GroupDependencyTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.HangRecoveryAction, + prometheus.GaugeValue, + float64(v.HangRecoveryAction), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.IgnorePersistentStateOnStartup, + prometheus.GaugeValue, + float64(v.IgnorePersistentStateOnStartup), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.LogResourceControls, + prometheus.GaugeValue, + float64(v.LogResourceControls), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.LowerQuorumPriorityNodeId, + prometheus.GaugeValue, + float64(v.LowerQuorumPriorityNodeId), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MaxNumberOfNodes, + prometheus.GaugeValue, + float64(v.MaxNumberOfNodes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MessageBufferLength, + prometheus.GaugeValue, + float64(v.MessageBufferLength), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MinimumNeverPreemptPriority, + prometheus.GaugeValue, + float64(v.MinimumNeverPreemptPriority), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MinimumPreemptorPriority, + prometheus.GaugeValue, + float64(v.MinimumPreemptorPriority), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.NetftIPSecEnabled, + prometheus.GaugeValue, + float64(v.NetftIPSecEnabled), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.PlacementOptions, + prometheus.GaugeValue, + float64(v.PlacementOptions), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.PlumbAllCrossSubnetRoutes, + prometheus.GaugeValue, + float64(v.PlumbAllCrossSubnetRoutes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.PreventQuorum, + prometheus.GaugeValue, + float64(v.PreventQuorum), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuarantineDuration, + prometheus.GaugeValue, + float64(v.QuarantineDuration), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuarantineThreshold, + prometheus.GaugeValue, + float64(v.QuarantineThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuorumArbitrationTimeMax, + prometheus.GaugeValue, + float64(v.QuorumArbitrationTimeMax), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuorumArbitrationTimeMin, + prometheus.GaugeValue, + float64(v.QuorumArbitrationTimeMin), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuorumLogFileSize, + prometheus.GaugeValue, + float64(v.QuorumLogFileSize), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.QuorumTypeValue, + prometheus.GaugeValue, + float64(v.QuorumTypeValue), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RequestReplyTimeout, + prometheus.GaugeValue, + float64(v.RequestReplyTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ResiliencyDefaultPeriod, + prometheus.GaugeValue, + float64(v.ResiliencyDefaultPeriod), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ResiliencyLevel, + prometheus.GaugeValue, + float64(v.ResiliencyLevel), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ResourceDllDeadlockPeriod, + prometheus.GaugeValue, + float64(v.ResourceDllDeadlockPeriod), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RootMemoryReserved, + prometheus.GaugeValue, + float64(v.RootMemoryReserved), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RouteHistoryLength, + prometheus.GaugeValue, + float64(v.RouteHistoryLength), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DBusTypes, + prometheus.GaugeValue, + float64(v.S2DBusTypes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DCacheDesiredState, + prometheus.GaugeValue, + float64(v.S2DCacheDesiredState), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DCacheFlashReservePercent, + prometheus.GaugeValue, + float64(v.S2DCacheFlashReservePercent), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DCachePageSizeKBytes, + prometheus.GaugeValue, + float64(v.S2DCachePageSizeKBytes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DEnabled, + prometheus.GaugeValue, + float64(v.S2DEnabled), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DIOLatencyThreshold, + prometheus.GaugeValue, + float64(v.S2DIOLatencyThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.S2DOptimizations, + prometheus.GaugeValue, + float64(v.S2DOptimizations), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.SameSubnetDelay, + prometheus.GaugeValue, + float64(v.SameSubnetDelay), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.SameSubnetThreshold, + prometheus.GaugeValue, + float64(v.SameSubnetThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.SecurityLevel, + prometheus.GaugeValue, + float64(v.SecurityLevel), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.SecurityLevelForStorage, + prometheus.GaugeValue, + float64(v.SecurityLevelForStorage), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.SharedVolumeVssWriterOperationTimeout, + prometheus.GaugeValue, + float64(v.SharedVolumeVssWriterOperationTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ShutdownTimeoutInMinutes, + prometheus.GaugeValue, + float64(v.ShutdownTimeoutInMinutes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.UseClientAccessNetworksForSharedVolumes, + prometheus.GaugeValue, + float64(v.UseClientAccessNetworksForSharedVolumes), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.WitnessDatabaseWriteTimeout, + prometheus.GaugeValue, + float64(v.WitnessDatabaseWriteTimeout), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.WitnessDynamicWeight, + prometheus.GaugeValue, + float64(v.WitnessDynamicWeight), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.WitnessRestartInterval, + prometheus.GaugeValue, + float64(v.WitnessRestartInterval), + v.Name, + ) + + } + + return nil +} From af523f13bc844f5eae884c91e0dde36ba2ead33e Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 14:34:38 -0600 Subject: [PATCH 05/17] feat: added the mscluster_resource collector functionality Signed-off-by: Sam Storie --- collector/mscluster_resource.go | 285 ++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 collector/mscluster_resource.go diff --git a/collector/mscluster_resource.go b/collector/mscluster_resource.go new file mode 100644 index 00000000..7004e277 --- /dev/null +++ b/collector/mscluster_resource.go @@ -0,0 +1,285 @@ +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("mscluster_resource", newMSCluster_ResourceCollector) // TODO: Add any perflib dependencies here +} + +// A MSCluster_ResourceCollector is a Prometheus collector for WMI MSCluster_Resource metrics +type MSCluster_ResourceCollector struct { + Characteristics *prometheus.Desc + DeadlockTimeout *prometheus.Desc + EmbeddedFailureAction *prometheus.Desc + Flags *prometheus.Desc + IsAlivePollInterval *prometheus.Desc + LooksAlivePollInterval *prometheus.Desc + MonitorProcessId *prometheus.Desc + PendingTimeout *prometheus.Desc + RequiredDependencyClasses *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 newMSCluster_ResourceCollector() (Collector, error) { + const subsystem = "mscluster_resource" + return &MSCluster_ResourceCollector{ + Characteristics: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "characteristics"), + "(Characteristics)", + []string{"type", "owner_group", "name"}, + nil, + ), + DeadlockTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "deadlock_timeout"), + "(DeadlockTimeout)", + []string{"type", "owner_group", "name"}, + nil, + ), + EmbeddedFailureAction: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "embedded_failure_action"), + "(EmbeddedFailureAction)", + []string{"type", "owner_group", "name"}, + nil, + ), + Flags: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "flags"), + "(Flags)", + []string{"type", "owner_group", "name"}, + nil, + ), + IsAlivePollInterval: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "is_alive_poll_interval"), + "(IsAlivePollInterval)", + []string{"type", "owner_group", "name"}, + nil, + ), + LooksAlivePollInterval: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "looks_alive_poll_interval"), + "(LooksAlivePollInterval)", + []string{"type", "owner_group", "name"}, + nil, + ), + MonitorProcessId: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "monitor_process_id"), + "(MonitorProcessId)", + []string{"type", "owner_group", "name"}, + nil, + ), + PendingTimeout: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "pending_timeout"), + "(PendingTimeout)", + []string{"type", "owner_group", "name"}, + nil, + ), + ResourceClass: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "resource_class"), + "(ResourceClass)", + []string{"type", "owner_group", "name"}, + nil, + ), + RestartAction: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "restart_action"), + "(RestartAction)", + []string{"type", "owner_group", "name"}, + nil, + ), + RestartDelay: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "restart_delay"), + "(RestartDelay)", + []string{"type", "owner_group", "name"}, + nil, + ), + RestartPeriod: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "restart_period"), + "(RestartPeriod)", + []string{"type", "owner_group", "name"}, + nil, + ), + RestartThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "restart_threshold"), + "(RestartThreshold)", + []string{"type", "owner_group", "name"}, + nil, + ), + RetryPeriodOnFailure: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "retry_period_on_failure"), + "(RetryPeriodOnFailure)", + []string{"type", "owner_group", "name"}, + nil, + ), + State: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "state"), + "(State)", + []string{"type", "owner_group", "name"}, + nil, + ), + Subclass: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "subclass"), + "(Subclass)", + []string{"type", "owner_group", "name"}, + nil, + ), + }, nil +} + +// MSCluster_Resource docs: +// - +type MSCluster_Resource struct { + Name string + Type string + OwnerGroup string + + Characteristics uint + DeadlockTimeout uint + EmbeddedFailureAction uint + Flags uint + IsAlivePollInterval uint + LooksAlivePollInterval uint + MonitorProcessId uint + PendingTimeout uint + ResourceClass uint + RestartAction uint + RestartDelay uint + RestartPeriod uint + RestartThreshold uint + RetryPeriodOnFailure uint + State uint + Subclass uint +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *MSCluster_ResourceCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + var dst []MSCluster_Resource + q := queryAll(&dst) + if err := wmi.QueryNamespace(q, &dst, "root/MSCluster"); err != nil { + return err + } + + for _, v := range dst { + + ch <- prometheus.MustNewConstMetric( + c.Characteristics, + prometheus.GaugeValue, + float64(v.Characteristics), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DeadlockTimeout, + prometheus.GaugeValue, + float64(v.DeadlockTimeout), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.EmbeddedFailureAction, + prometheus.GaugeValue, + float64(v.EmbeddedFailureAction), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Flags, + prometheus.GaugeValue, + float64(v.Flags), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.IsAlivePollInterval, + prometheus.GaugeValue, + float64(v.IsAlivePollInterval), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.LooksAlivePollInterval, + prometheus.GaugeValue, + float64(v.LooksAlivePollInterval), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.MonitorProcessId, + prometheus.GaugeValue, + float64(v.MonitorProcessId), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.PendingTimeout, + prometheus.GaugeValue, + float64(v.PendingTimeout), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ResourceClass, + prometheus.GaugeValue, + float64(v.ResourceClass), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RestartAction, + prometheus.GaugeValue, + float64(v.RestartAction), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RestartDelay, + prometheus.GaugeValue, + float64(v.RestartDelay), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RestartPeriod, + prometheus.GaugeValue, + float64(v.RestartPeriod), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RestartThreshold, + prometheus.GaugeValue, + float64(v.RestartThreshold), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.RetryPeriodOnFailure, + prometheus.GaugeValue, + float64(v.RetryPeriodOnFailure), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.State, + prometheus.GaugeValue, + float64(v.State), + v.Type, v.OwnerGroup, v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Subclass, + prometheus.GaugeValue, + float64(v.Subclass), + v.Type, v.OwnerGroup, v.Name, + ) + } + + return nil +} From b6f12aeb9fc3b378ed507c175dbb0ef304905d2d Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Mon, 6 Dec 2021 14:57:17 -0600 Subject: [PATCH 06/17] feat: added the mscluster_resourcegroup collector functionality Signed-off-by: Sam Storie --- collector/mscluster_resourcegroup.go | 283 +++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 collector/mscluster_resourcegroup.go diff --git a/collector/mscluster_resourcegroup.go b/collector/mscluster_resourcegroup.go new file mode 100644 index 00000000..464278b5 --- /dev/null +++ b/collector/mscluster_resourcegroup.go @@ -0,0 +1,283 @@ +package collector + +import ( + "github.com/StackExchange/wmi" + "github.com/prometheus/client_golang/prometheus" +) + +func init() { + registerCollector("mscluster_resourcegroup", newMSCluster_ResourceGroupCollector) // TODO: Add any perflib dependencies here +} + +// A MSCluster_ResourceGroupCollector is a Prometheus collector for WMI MSCluster_ResourceGroup metrics +type MSCluster_ResourceGroupCollector struct { + 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 + Priority *prometheus.Desc + ResiliencyPeriod *prometheus.Desc + State *prometheus.Desc + UpdateDomain *prometheus.Desc +} + +func newMSCluster_ResourceGroupCollector() (Collector, error) { + const subsystem = "mscluster_resourcegroup" + return &MSCluster_ResourceGroupCollector{ + AutoFailbackType: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "auto_failback_type"), + "(AutoFailbackType)", + []string{"name"}, + nil, + ), + Characteristics: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "characteristics"), + "(Characteristics)", + []string{"name"}, + nil, + ), + ColdStartSetting: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "cold_start_setting"), + "(ColdStartSetting)", + []string{"name"}, + nil, + ), + DefaultOwner: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "default_owner"), + "(DefaultOwner)", + []string{"name"}, + nil, + ), + FailbackWindowEnd: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "failback_window_end"), + "(FailbackWindowEnd)", + []string{"name"}, + nil, + ), + FailbackWindowStart: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "failback_window_start"), + "(FailbackWindowStart)", + []string{"name"}, + nil, + ), + FailoverPeriod: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "failover_period"), + "(FailoverPeriod)", + []string{"name"}, + nil, + ), + FailoverThreshold: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "failover_threshold"), + "(FailoverThreshold)", + []string{"name"}, + nil, + ), + FaultDomain: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "fault_domain"), + "(FaultDomain)", + []string{"name"}, + nil, + ), + Flags: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "flags"), + "(Flags)", + []string{"name"}, + nil, + ), + GroupType: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "group_type"), + "(GroupType)", + []string{"name"}, + nil, + ), + PlacementOptions: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "placement_options"), + "(PlacementOptions)", + []string{"name"}, + nil, + ), + Priority: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "priority"), + "(Priority)", + []string{"name"}, + nil, + ), + ResiliencyPeriod: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "resiliency_period"), + "(ResiliencyPeriod)", + []string{"name"}, + nil, + ), + State: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "state"), + "(State)", + []string{"name"}, + nil, + ), + UpdateDomain: prometheus.NewDesc( + prometheus.BuildFQName(Namespace, subsystem, "update_domain"), + "(UpdateDomain)", + []string{"name"}, + nil, + ), + }, nil +} + +// MSCluster_ResourceGroup docs: +// - +type MSCluster_ResourceGroup struct { + Name string + + AutoFailbackType uint + Characteristics uint + ColdStartSetting uint + DefaultOwner uint + FailbackWindowEnd int + FailbackWindowStart int + FailoverPeriod uint + FailoverThreshold uint + FaultDomain uint + Flags uint + GroupType uint + PlacementOptions uint + Priority uint + ResiliencyPeriod uint + State uint + UpdateDomain uint +} + +// Collect sends the metric values for each metric +// to the provided prometheus Metric channel. +func (c *MSCluster_ResourceGroupCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { + var dst []MSCluster_ResourceGroup + q := queryAll(&dst) + if err := wmi.QueryNamespace(q, &dst, "root/MSCluster"); err != nil { + return err + } + + for _, v := range dst { + + ch <- prometheus.MustNewConstMetric( + c.AutoFailbackType, + prometheus.GaugeValue, + float64(v.AutoFailbackType), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Characteristics, + prometheus.GaugeValue, + float64(v.Characteristics), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ColdStartSetting, + prometheus.GaugeValue, + float64(v.ColdStartSetting), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.DefaultOwner, + prometheus.GaugeValue, + float64(v.DefaultOwner), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FailbackWindowEnd, + prometheus.GaugeValue, + float64(v.FailbackWindowEnd), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FailbackWindowStart, + prometheus.GaugeValue, + float64(v.FailbackWindowStart), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FailoverPeriod, + prometheus.GaugeValue, + float64(v.FailoverPeriod), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FailoverThreshold, + prometheus.GaugeValue, + float64(v.FailoverThreshold), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.FaultDomain, + prometheus.GaugeValue, + float64(v.FaultDomain), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Flags, + prometheus.GaugeValue, + float64(v.Flags), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.GroupType, + prometheus.GaugeValue, + float64(v.GroupType), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.PlacementOptions, + prometheus.GaugeValue, + float64(v.PlacementOptions), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.Priority, + prometheus.GaugeValue, + float64(v.Priority), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.ResiliencyPeriod, + prometheus.GaugeValue, + float64(v.ResiliencyPeriod), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.State, + prometheus.GaugeValue, + float64(v.State), + v.Name, + ) + + ch <- prometheus.MustNewConstMetric( + c.UpdateDomain, + prometheus.GaugeValue, + float64(v.UpdateDomain), + v.Name, + ) + + } + + return nil +} From 0f304413b5a5bf77c19d6333f87de9c0482e89b8 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Wed, 22 Dec 2021 06:33:52 -0600 Subject: [PATCH 07/17] chore: removing some errant comments about perflib Signed-off-by: Sam Storie --- collector/mscluster_cluster.go | 2 +- collector/mscluster_network.go | 2 +- collector/mscluster_node.go | 2 +- collector/mscluster_resource.go | 2 +- collector/mscluster_resourcegroup.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collector/mscluster_cluster.go b/collector/mscluster_cluster.go index a7de106c..2e48a6ab 100644 --- a/collector/mscluster_cluster.go +++ b/collector/mscluster_cluster.go @@ -6,7 +6,7 @@ import ( ) func init() { - registerCollector("mscluster_cluster", newMSCluster_ClusterCollector) // TODO: Add any perflib dependencies here + registerCollector("mscluster_cluster", newMSCluster_ClusterCollector) } // A MSCluster_ClusterCollector is a Prometheus collector for WMI MSCluster_Cluster metrics diff --git a/collector/mscluster_network.go b/collector/mscluster_network.go index 88a970a0..340b6d63 100644 --- a/collector/mscluster_network.go +++ b/collector/mscluster_network.go @@ -6,7 +6,7 @@ import ( ) func init() { - registerCollector("mscluster_network", newMSCluster_NetworkCollector) // TODO: Add any perflib dependencies here + registerCollector("mscluster_network", newMSCluster_NetworkCollector) } // A MSCluster_NetworkCollector is a Prometheus collector for WMI MSCluster_Network metrics diff --git a/collector/mscluster_node.go b/collector/mscluster_node.go index ef874c7b..cc274ec7 100644 --- a/collector/mscluster_node.go +++ b/collector/mscluster_node.go @@ -6,7 +6,7 @@ import ( ) func init() { - registerCollector("mscluster_node", newMSCluster_NodeCollector) // TODO: Add any perflib dependencies here + registerCollector("mscluster_node", newMSCluster_NodeCollector) } // A MSCluster_NodeCollector is a Prometheus collector for WMI MSCluster_Node metrics diff --git a/collector/mscluster_resource.go b/collector/mscluster_resource.go index 7004e277..9c67a692 100644 --- a/collector/mscluster_resource.go +++ b/collector/mscluster_resource.go @@ -6,7 +6,7 @@ import ( ) func init() { - registerCollector("mscluster_resource", newMSCluster_ResourceCollector) // TODO: Add any perflib dependencies here + registerCollector("mscluster_resource", newMSCluster_ResourceCollector) } // A MSCluster_ResourceCollector is a Prometheus collector for WMI MSCluster_Resource metrics diff --git a/collector/mscluster_resourcegroup.go b/collector/mscluster_resourcegroup.go index 464278b5..41603f62 100644 --- a/collector/mscluster_resourcegroup.go +++ b/collector/mscluster_resourcegroup.go @@ -6,7 +6,7 @@ import ( ) func init() { - registerCollector("mscluster_resourcegroup", newMSCluster_ResourceGroupCollector) // TODO: Add any perflib dependencies here + registerCollector("mscluster_resourcegroup", newMSCluster_ResourceGroupCollector) } // A MSCluster_ResourceGroupCollector is a Prometheus collector for WMI MSCluster_ResourceGroup metrics From c7cbc48afc3de0385b6757cad974177a3ba81fef Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Wed, 22 Dec 2021 06:42:17 -0600 Subject: [PATCH 08/17] chore: updated links to MS documentation for each struct Signed-off-by: Sam Storie --- collector/mscluster_cluster.go | 3 ++- collector/mscluster_network.go | 3 ++- collector/mscluster_node.go | 3 ++- collector/mscluster_resource.go | 3 ++- collector/mscluster_resourcegroup.go | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/collector/mscluster_cluster.go b/collector/mscluster_cluster.go index 2e48a6ab..dd9b8fcf 100644 --- a/collector/mscluster_cluster.go +++ b/collector/mscluster_cluster.go @@ -559,7 +559,8 @@ func newMSCluster_ClusterCollector() (Collector, error) { } // MSCluster_Cluster docs: -// - +// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-cluster +// type MSCluster_Cluster struct { Name string diff --git a/collector/mscluster_network.go b/collector/mscluster_network.go index 340b6d63..69ee00ed 100644 --- a/collector/mscluster_network.go +++ b/collector/mscluster_network.go @@ -55,7 +55,8 @@ func newMSCluster_NetworkCollector() (Collector, error) { } // MSCluster_Network docs: -// - +// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-network +// type MSCluster_Network struct { Name string diff --git a/collector/mscluster_node.go b/collector/mscluster_node.go index cc274ec7..c87402b6 100644 --- a/collector/mscluster_node.go +++ b/collector/mscluster_node.go @@ -118,7 +118,8 @@ func newMSCluster_NodeCollector() (Collector, error) { } // MSCluster_Node docs: -// - +// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-node +// type MSCluster_Node struct { Name string diff --git a/collector/mscluster_resource.go b/collector/mscluster_resource.go index 9c67a692..ff55918c 100644 --- a/collector/mscluster_resource.go +++ b/collector/mscluster_resource.go @@ -133,7 +133,8 @@ func newMSCluster_ResourceCollector() (Collector, error) { } // MSCluster_Resource docs: -// - +// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resource +// type MSCluster_Resource struct { Name string Type string diff --git a/collector/mscluster_resourcegroup.go b/collector/mscluster_resourcegroup.go index 41603f62..51e2c616 100644 --- a/collector/mscluster_resourcegroup.go +++ b/collector/mscluster_resourcegroup.go @@ -132,7 +132,8 @@ func newMSCluster_ResourceGroupCollector() (Collector, error) { } // MSCluster_ResourceGroup docs: -// - +// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resourcegroup +// type MSCluster_ResourceGroup struct { Name string From 3d50cf4309cc1a850d8e82a28e4400ac23407886 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 16:16:03 -0600 Subject: [PATCH 09/17] chore: Added/updated documentation for mscluster_cluster collector Signed-off-by: Sam Storie --- collector/mscluster_cluster.go | 144 ++++++++++++++-------------- docs/collector.mscluster_cluster.md | 104 ++++++++++++++++++++ 2 files changed, 176 insertions(+), 72 deletions(-) create mode 100644 docs/collector.mscluster_cluster.md diff --git a/collector/mscluster_cluster.go b/collector/mscluster_cluster.go index dd9b8fcf..2f819ca9 100644 --- a/collector/mscluster_cluster.go +++ b/collector/mscluster_cluster.go @@ -95,151 +95,151 @@ func newMSCluster_ClusterCollector() (Collector, error) { return &MSCluster_ClusterCollector{ AddEvictDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "add_evict_delay"), - "(AddEvictDelay)", + "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, ), AdminAccessPoint: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "admin_access_point"), - "(AdminAccessPoint)", + "The type of the cluster administrative access point.", []string{"name"}, nil, ), AutoAssignNodeSite: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "auto_assign_node_site"), - "(AutoAssignNodeSite)", + "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, ), AutoBalancerLevel: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "auto_balancer_level"), - "(AutoBalancerLevel)", + "Determines the level of aggressiveness of AutoBalancer.", []string{"name"}, nil, ), AutoBalancerMode: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "auto_balancer_mode"), - "(AutoBalancerMode)", + "Determines whether or not the auto balancer is enabled.", []string{"name"}, nil, ), BackupInProgress: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "backup_in_progress"), - "(BackupInProgress)", + "Indicates whether a backup is in progress.", []string{"name"}, nil, ), BlockCacheSize: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "block_cache_size"), - "(BlockCacheSize)", + "CSV BlockCache Size in MB.", []string{"name"}, nil, ), ClusSvcHangTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "clus_svc_hang_timeout"), - "(ClusSvcHangTimeout)", + "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, ), ClusSvcRegroupOpeningTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_opening_timeout"), - "(ClusSvcRegroupOpeningTimeout)", + "Controls how long a node will wait on other nodes in the opening stage before deciding that they failed.", []string{"name"}, nil, ), ClusSvcRegroupPruningTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_pruning_timeout"), - "(ClusSvcRegroupPruningTimeout)", + "Controls how long the membership leader will wait to reach full connectivity between cluster nodes.", []string{"name"}, nil, ), ClusSvcRegroupStageTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_stage_timeout"), - "(ClusSvcRegroupStageTimeout)", + "Controls how long a node will wait on other nodes in a membership stage before deciding that they failed.", []string{"name"}, nil, ), ClusSvcRegroupTickInMilliseconds: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "clus_svc_regroup_tick_in_milliseconds"), - "(ClusSvcRegroupTickInMilliseconds)", + "Controls how frequently the membership algorithm is sending periodic membership messages.", []string{"name"}, nil, ), ClusterEnforcedAntiAffinity: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_enforced_anti_affinity"), - "(ClusterEnforcedAntiAffinity)", + "Enables or disables hard enforcement of group anti-affinity classes.", []string{"name"}, nil, ), ClusterFunctionalLevel: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_functional_level"), - "(ClusterFunctionalLevel)", + "The functional level the cluster is currently running in.", []string{"name"}, nil, ), ClusterGroupWaitDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_group_wait_delay"), - "(ClusterGroupWaitDelay)", + "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, ), ClusterLogLevel: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_log_level"), - "(ClusterLogLevel)", + "Controls the level of cluster logging.", []string{"name"}, nil, ), ClusterLogSize: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_log_size"), - "(ClusterLogSize)", + "Controls the maximum size of the cluster log files on each of the nodes.", []string{"name"}, nil, ), ClusterUpgradeVersion: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cluster_upgrade_version"), - "(ClusterUpgradeVersion)", + "Specifies the upgrade version the cluster is currently running in.", []string{"name"}, nil, ), CrossSiteDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cross_site_delay"), - "(CrossSiteDelay)", + "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites.", []string{"name"}, nil, ), CrossSiteThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cross_site_threshold"), - "(CrossSiteThreshold)", + "Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding.", []string{"name"}, nil, ), CrossSubnetDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cross_subnet_delay"), - "(CrossSubnetDelay)", + "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets.", []string{"name"}, nil, ), CrossSubnetThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cross_subnet_threshold"), - "(CrossSubnetThreshold)", + "Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding.", []string{"name"}, nil, ), CsvBalancer: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "csv_balancer"), - "(CsvBalancer)", + "Whether automatic balancing for CSV is enabled.", []string{"name"}, nil, ), DatabaseReadWriteMode: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "database_read_write_mode"), - "(DatabaseReadWriteMode)", + "Sets the database read and write mode.", []string{"name"}, nil, ), DefaultNetworkRole: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "default_network_role"), - "(DefaultNetworkRole)", + "Provides access to the cluster's DefaultNetworkRole property.", []string{"name"}, nil, ), @@ -269,247 +269,247 @@ func newMSCluster_ClusterCollector() (Collector, error) { ), DrainOnShutdown: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "drain_on_shutdown"), - "(DrainOnShutdown)", + "Whether to drain the node when cluster service is being stopped.", []string{"name"}, nil, ), DynamicQuorumEnabled: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "dynamic_quorum_enabled"), - "(DynamicQuorumEnabled)", + "Allows cluster service to adjust node weights as needed to increase availability.", []string{"name"}, nil, ), EnableSharedVolumes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "enable_shared_volumes"), - "(EnableSharedVolumes)", + "Enables or disables cluster shared volumes on this cluster.", []string{"name"}, nil, ), FixQuorum: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "fix_quorum"), - "(FixQuorum)", + "Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state.", []string{"name"}, nil, ), GracePeriodEnabled: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "grace_period_enabled"), - "(GracePeriodEnabled)", + "Whether the node grace period feature of this cluster is enabled.", []string{"name"}, nil, ), GracePeriodTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "grace_period_timeout"), - "(GracePeriodTimeout)", + "The grace period timeout in milliseconds.", []string{"name"}, nil, ), GroupDependencyTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "group_dependency_timeout"), - "(GroupDependencyTimeout)", + "The timeout after which a group will be brought online despite unsatisfied dependencies", []string{"name"}, nil, ), HangRecoveryAction: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "hang_recovery_action"), - "(HangRecoveryAction)", + "Controls the action to take if the user-mode processes have stopped responding.", []string{"name"}, nil, ), IgnorePersistentStateOnStartup: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "ignore_persistent_state_on_startup"), - "(IgnorePersistentStateOnStartup)", + "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, ), LogResourceControls: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "log_resource_controls"), - "(LogResourceControls)", + "Controls the logging of resource controls.", []string{"name"}, nil, ), LowerQuorumPriorityNodeId: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "lower_quorum_priority_node_id"), - "(LowerQuorumPriorityNodeId)", + "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, ), MaxNumberOfNodes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "max_number_of_nodes"), - "(MaxNumberOfNodes)", + "Indicates the maximum number of nodes that may participate in the Cluster.", []string{"name"}, nil, ), MessageBufferLength: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "message_buffer_length"), - "(MessageBufferLength)", + "The maximum unacknowledged message count for GEM.", []string{"name"}, nil, ), MinimumNeverPreemptPriority: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "minimum_never_preempt_priority"), - "(MinimumNeverPreemptPriority)", + "Groups with this priority or higher cannot be preempted.", []string{"name"}, nil, ), MinimumPreemptorPriority: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "minimum_preemptor_priority"), - "(MinimumPreemptorPriority)", + "Minimum priority a cluster group must have to be able to preempt another group.", []string{"name"}, nil, ), NetftIPSecEnabled: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "netft_ip_sec_enabled"), - "(NetftIPSecEnabled)", + "Whether IPSec is enabled for cluster internal traffic.", []string{"name"}, nil, ), PlacementOptions: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "placement_options"), - "(PlacementOptions)", + "Various option flags to modify default placement behavior.", []string{"name"}, nil, ), PlumbAllCrossSubnetRoutes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "plumb_all_cross_subnet_routes"), - "(PlumbAllCrossSubnetRoutes)", + "Plumbs all possible cross subnet routes to all nodes.", []string{"name"}, nil, ), PreventQuorum: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "prevent_quorum"), - "(PreventQuorum)", + "Whether the cluster will ignore group persistent state on startup.", []string{"name"}, nil, ), QuarantineDuration: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quarantine_duration"), - "(QuarantineDuration)", + "The quarantine period timeout in milliseconds.", []string{"name"}, nil, ), QuarantineThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quarantine_threshold"), - "(QuarantineThreshold)", + "Number of node failures before it will be quarantined.", []string{"name"}, nil, ), QuorumArbitrationTimeMax: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quorum_arbitration_time_max"), - "(QuorumArbitrationTimeMax)", + "Controls the maximum time necessary to decide the Quorum owner node.", []string{"name"}, nil, ), QuorumArbitrationTimeMin: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quorum_arbitration_time_min"), - "(QuorumArbitrationTimeMin)", + "Controls the minimum time necessary to decide the Quorum owner node.", []string{"name"}, nil, ), QuorumLogFileSize: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quorum_log_file_size"), - "(QuorumLogFileSize)", + "This property is obsolete.", []string{"name"}, nil, ), QuorumTypeValue: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "quorum_type_value"), - "(QuorumTypeValue)", + "Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None", []string{"name"}, nil, ), RequestReplyTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "request_reply_timeout"), - "(RequestReplyTimeout)", + "Controls the request reply time-out period.", []string{"name"}, nil, ), ResiliencyDefaultPeriod: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "resiliency_default_period"), - "(ResiliencyDefaultPeriod)", + "The default resiliency period, in seconds, for the cluster.", []string{"name"}, nil, ), ResiliencyLevel: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "resiliency_level"), - "(ResiliencyLevel)", + "The resiliency level for the cluster.", []string{"name"}, nil, ), ResourceDllDeadlockPeriod: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "resource_dll_deadlock_period"), - "(ResourceDllDeadlockPeriod)", + "This property is obsolete.", []string{"name"}, nil, ), RootMemoryReserved: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "root_memory_reserved"), - "(RootMemoryReserved)", + "Controls the amount of memory reserved for the parent partition on all cluster nodes.", []string{"name"}, nil, ), RouteHistoryLength: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "route_history_length"), - "(RouteHistoryLength)", + "The history length for routes to help finding network issues.", []string{"name"}, nil, ), S2DBusTypes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_bus_types"), - "(S2DBusTypes)", + "Bus types for storage spaces direct.", []string{"name"}, nil, ), S2DCacheDesiredState: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_desired_state"), - "(S2DCacheDesiredState)", + "Desired state of the storage spaces direct cache.", []string{"name"}, nil, ), S2DCacheFlashReservePercent: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_flash_reserve_percent"), - "(S2DCacheFlashReservePercent)", + "Percentage of allocated flash space to utilize when caching.", []string{"name"}, nil, ), S2DCachePageSizeKBytes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_cache_page_size_k_bytes"), - "(S2DCachePageSizeKBytes)", + "Page size in KB used by S2D cache.", []string{"name"}, nil, ), S2DEnabled: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_enabled"), - "(S2DEnabled)", + "Whether direct attached storage (DAS) is enabled.", []string{"name"}, nil, ), S2DIOLatencyThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2dio_latency_threshold"), - "(S2DIOLatencyThreshold)", + "The I/O latency threshold for storage spaces direct.", []string{"name"}, nil, ), S2DOptimizations: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "s2d_optimizations"), - "(S2DOptimizations)", + "Optimization flags for storage spaces direct.", []string{"name"}, nil, ), SameSubnetDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "same_subnet_delay"), - "(SameSubnetDelay)", + "Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet.", []string{"name"}, nil, ), SameSubnetThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "same_subnet_threshold"), - "(SameSubnetThreshold)", + "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, ), SecurityLevel: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "security_level"), - "(SecurityLevel)", + "Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt ", []string{"name"}, nil, ), @@ -521,37 +521,37 @@ func newMSCluster_ClusterCollector() (Collector, error) { ), SharedVolumeVssWriterOperationTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "shared_volume_vss_writer_operation_timeout"), - "(SharedVolumeVssWriterOperationTimeout)", + "CSV VSS Writer operation timeout in seconds.", []string{"name"}, nil, ), ShutdownTimeoutInMinutes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "shutdown_timeout_in_minutes"), - "(ShutdownTimeoutInMinutes)", + "The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown.", []string{"name"}, nil, ), UseClientAccessNetworksForSharedVolumes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "use_client_access_networks_for_shared_volumes"), - "(UseClientAccessNetworksForSharedVolumes)", + "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, ), WitnessDatabaseWriteTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "witness_database_write_timeout"), - "(WitnessDatabaseWriteTimeout)", + "Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned.", []string{"name"}, nil, ), WitnessDynamicWeight: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "witness_dynamic_weight"), - "(WitnessDynamicWeight)", + "The weight of the configured witness.", []string{"name"}, nil, ), WitnessRestartInterval: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "witness_restart_interval"), - "(WitnessRestartInterval)", + "Controls the witness restart interval.", []string{"name"}, nil, ), diff --git a/docs/collector.mscluster_cluster.md b/docs/collector.mscluster_cluster.md new file mode 100644 index 00000000..7a793e79 --- /dev/null +++ b/docs/collector.mscluster_cluster.md @@ -0,0 +1,104 @@ +# mscluster_cluster collector + +The The MSCluster_Cluster class is a dynamic WMI class that represents a cluster. + +||| +-|- +Metric name prefix | `mscluster_cluster` +Classes | `MSCluster_Cluster` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`AddEvictDelay` | 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. | guage | None +`AdminAccessPoint` | The type of the cluster administrative access point. | guage | None +`AutoAssignNodeSite` | Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information. | guage | None +`AutoBalancerLevel` | Determines the level of aggressiveness of AutoBalancer. | guage | None +`AutoBalancerMode` | Determines whether or not the auto balancer is enabled. | guage | None +`BackupInProgress` | Indicates whether a backup is in progress. | guage | None +`BlockCacheSize` | CSV BlockCache Size in MB. | guage | None +`ClusSvcHangTimeout` | Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding. | guage | None +`ClusSvcRegroupOpeningTimeout` | Controls how long a node will wait on other nodes in the opening stage before deciding that they failed. | guage | None +`ClusSvcRegroupPruningTimeout` | Controls how long the membership leader will wait to reach full connectivity between cluster nodes. | guage | None +`ClusSvcRegroupStageTimeout` | Controls how long a node will wait on other nodes in a membership stage before deciding that they failed. | guage | None +`ClusSvcRegroupTickInMilliseconds` | Controls how frequently the membership algorithm is sending periodic membership messages. | guage | None +`ClusterEnforcedAntiAffinity` | Enables or disables hard enforcement of group anti-affinity classes. | guage | None +`ClusterFunctionalLevel` | The functional level the cluster is currently running in. | guage | None +`ClusterGroupWaitDelay` | 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. | guage | None +`ClusterLogLevel` | Controls the level of cluster logging. | guage | None +`ClusterLogSize` | Controls the maximum size of the cluster log files on each of the nodes. | guage | None +`ClusterUpgradeVersion` | Specifies the upgrade version the cluster is currently running in. | guage | None +`CrossSiteDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites. | guage | None +`CrossSiteThreshold` | Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding. | guage | None +`CrossSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets. | guage | None +`CrossSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding. | guage | None +`CsvBalancer` | Whether automatic balancing for CSV is enabled. | guage | None +`DatabaseReadWriteMode` | Sets the database read and write mode. | guage | None +`DefaultNetworkRole` | Provides access to the cluster's DefaultNetworkRole property. | guage | None +`DetectedCloudPlatform` | | guage | None +`DetectManagedEvents` | | guage | None +`DetectManagedEventsThreshold` | | guage | None +`DisableGroupPreferredOwnerRandomization` | | guage | None +`DrainOnShutdown` | Whether to drain the node when cluster service is being stopped. | guage | None +`DynamicQuorumEnabled` | Allows cluster service to adjust node weights as needed to increase availability. | guage | None +`EnableSharedVolumes` | Enables or disables cluster shared volumes on this cluster. | guage | None +`FixQuorum` | Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state. | guage | None +`GracePeriodEnabled` | Whether the node grace period feature of this cluster is enabled. | guage | None +`GracePeriodTimeout` | The grace period timeout in milliseconds. | guage | None +`GroupDependencyTimeout` | The timeout after which a group will be brought online despite unsatisfied dependencies | guage | None +`HangRecoveryAction` | Controls the action to take if the user-mode processes have stopped responding. | guage | None +`IgnorePersistentStateOnStartup` | 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. | guage | None +`LogResourceControls` | Controls the logging of resource controls. | guage | None +`LowerQuorumPriorityNodeId` | 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. | guage | None +`MaxNumberOfNodes` | Indicates the maximum number of nodes that may participate in the Cluster. | guage | None +`MessageBufferLength` | The maximum unacknowledged message count for GEM. | guage | None +`MinimumNeverPreemptPriority` | Groups with this priority or higher cannot be preempted. | guage | None +`MinimumPreemptorPriority` | Minimum priority a cluster group must have to be able to preempt another group. | guage | None +`NetftIPSecEnabled` | Whether IPSec is enabled for cluster internal traffic. | guage | None +`PlacementOptions` | Various option flags to modify default placement behavior. | guage | None +`PlumbAllCrossSubnetRoutes` | Plumbs all possible cross subnet routes to all nodes. | guage | None +`PreventQuorum` | Whether the cluster will ignore group persistent state on startup. | guage | None +`QuarantineDuration` | The quarantine period timeout in milliseconds. | guage | None +`QuarantineThreshold` | Number of node failures before it will be quarantined. | guage | None +`QuorumArbitrationTimeMax` | Controls the maximum time necessary to decide the Quorum owner node. | guage | None +`QuorumArbitrationTimeMin` | Controls the minimum time necessary to decide the Quorum owner node. | guage | None +`QuorumLogFileSize` | This property is obsolete. | guage | None +`QuorumTypeValue` | Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None | guage | None +`RequestReplyTimeout` | Controls the request reply time-out period. | guage | None +`ResiliencyDefaultPeriod` | The default resiliency period, in seconds, for the cluster. | guage | None +`ResiliencyLevel` | The resiliency level for the cluster. | guage | None +`ResourceDllDeadlockPeriod` | This property is obsolete. | guage | None +`RootMemoryReserved` | Controls the amount of memory reserved for the parent partition on all cluster nodes. | guage | None +`RouteHistoryLength` | The history length for routes to help finding network issues. | guage | None +`S2DBusTypes` | Bus types for storage spaces direct. | guage | None +`S2DCacheDesiredState` | Desired state of the storage spaces direct cache. | guage | None +`S2DCacheFlashReservePercent` | Percentage of allocated flash space to utilize when caching. | guage | None +`S2DCachePageSizeKBytes` | Page size in KB used by S2D cache. | guage | None +`S2DEnabled` | Whether direct attached storage (DAS) is enabled. | guage | None +`S2DIOLatencyThreshold` | The I/O latency threshold for storage spaces direct. | guage | None +`S2DOptimizations` | Optimization flags for storage spaces direct. | guage | None +`SameSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet. | guage | None +`SameSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding. | guage | None +`SecurityLevel` | Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt | guage | None +`SecurityLevelForStorage` | | guage | None +`SharedVolumeVssWriterOperationTimeout` | CSV VSS Writer operation timeout in seconds. | guage | None +`ShutdownTimeoutInMinutes` | The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown. | guage | None +`UseClientAccessNetworksForSharedVolumes` | Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto | guage | None +`WitnessDatabaseWriteTimeout` | Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned. | guage | None +`WitnessDynamicWeight` | The weight of the configured witness. | guage | None +`WitnessRestartInterval` | Controls the witness restart interval. | guage | None + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From 00f79ebaf485d7ba46b317b0cb88b5edad568ef8 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 16:28:09 -0600 Subject: [PATCH 10/17] chore: Adding/updating documentation for mscluster_network collector Signed-off-by: Sam Storie --- collector/mscluster_network.go | 10 ++++----- docs/collector.mscluster_network.md | 32 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 docs/collector.mscluster_network.md diff --git a/collector/mscluster_network.go b/collector/mscluster_network.go index 69ee00ed..f0281ef5 100644 --- a/collector/mscluster_network.go +++ b/collector/mscluster_network.go @@ -23,31 +23,31 @@ func newMSCluster_NetworkCollector() (Collector, error) { return &MSCluster_NetworkCollector{ Characteristics: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "characteristics"), - "(Characteristics)", + "Provides the characteristics of the network.", []string{"name"}, nil, ), Flags: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "flags"), - "(Flags)", + "Provides access to the flags set for the node. ", []string{"name"}, nil, ), Metric: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "metric"), - "(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, ), Role: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "role"), - "(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, ), State: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "state"), - "(State)", + "Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up", []string{"name"}, nil, ), diff --git a/docs/collector.mscluster_network.md b/docs/collector.mscluster_network.md new file mode 100644 index 00000000..e485046a --- /dev/null +++ b/docs/collector.mscluster_network.md @@ -0,0 +1,32 @@ +# mscluster_network collector + +The MSCluster_Network class is a dynamic WMI class that represents cluster networks. + +||| +-|- +Metric name prefix | `mscluster_network` +Classes | `MSCluster_Network` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`Characteristics` | Provides the characteristics of the network. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://msdn.microsoft.com/library/aa367466). | guage | None +`Flags` | Provides access to the flags set for the network. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | None +`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. | guage | None +`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 | guage | None +`State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | guage | None + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From bf5177ed12614d678d1d8be7018fbd55d4a03525 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 16:28:22 -0600 Subject: [PATCH 11/17] chore: fixing a typo Signed-off-by: Sam Storie --- docs/collector.mscluster_cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/collector.mscluster_cluster.md b/docs/collector.mscluster_cluster.md index 7a793e79..957ee5a6 100644 --- a/docs/collector.mscluster_cluster.md +++ b/docs/collector.mscluster_cluster.md @@ -1,6 +1,6 @@ # mscluster_cluster collector -The The MSCluster_Cluster class is a dynamic WMI class that represents a cluster. +The MSCluster_Cluster class is a dynamic WMI class that represents a cluster. ||| -|- From 48e54e8513a6a4ffe941500799352ac44df9032b Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 19:58:12 -0600 Subject: [PATCH 12/17] chore: Adding/updating documentation for mscluster_node collector The isolation or quarantine status of the node. Signed-off-by: Sam Storie --- collector/mscluster_node.go | 26 ++++++++++---------- docs/collector.mscluster_node.md | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 docs/collector.mscluster_node.md diff --git a/collector/mscluster_node.go b/collector/mscluster_node.go index c87402b6..e3f375f4 100644 --- a/collector/mscluster_node.go +++ b/collector/mscluster_node.go @@ -32,13 +32,13 @@ func newMSCluster_NodeCollector() (Collector, error) { return &MSCluster_NodeCollector{ BuildNumber: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "build_number"), - "(BuildNumber)", + "Provides access to the node's BuildNumber property.", []string{"name"}, nil, ), Characteristics: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "characteristics"), - "(Characteristics)", + "Provides access to the characteristics set for the node.", []string{"name"}, nil, ), @@ -50,67 +50,67 @@ func newMSCluster_NodeCollector() (Collector, error) { ), DynamicWeight: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "dynamic_weight"), - "(DynamicWeight)", + "The dynamic vote weight of the node adjusted by dynamic quorum feature.", []string{"name"}, nil, ), Flags: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "flags"), - "(Flags)", + "Provides access to the flags set for the node.", []string{"name"}, nil, ), MajorVersion: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "major_version"), - "(MajorVersion)", + "Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed.", []string{"name"}, nil, ), MinorVersion: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "minor_version"), - "(MinorVersion)", + "Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed.", []string{"name"}, nil, ), NeedsPreventQuorum: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "needs_prevent_quorum"), - "(NeedsPreventQuorum)", + "Whether the cluster service on that node should be started with prevent quorum flag.", []string{"name"}, nil, ), NodeDrainStatus: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "node_drain_status"), - "(NodeDrainStatus)", + "The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed", []string{"name"}, nil, ), NodeHighestVersion: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "node_highest_version"), - "(NodeHighestVersion)", + "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, ), NodeLowestVersion: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "node_lowest_version"), - "(NodeLowestVersion)", + "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, ), NodeWeight: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "node_weight"), - "(NodeWeight)", + "The vote weight of the node.", []string{"name"}, nil, ), State: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "state"), - "(State)", + "Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining", []string{"name"}, nil, ), StatusInformation: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "status_information"), - "(StatusInformation)", + "The isolation or quarantine status of the node.", []string{"name"}, nil, ), diff --git a/docs/collector.mscluster_node.md b/docs/collector.mscluster_node.md new file mode 100644 index 00000000..8bee1577 --- /dev/null +++ b/docs/collector.mscluster_node.md @@ -0,0 +1,41 @@ +# mscluster_node collector + +The MSCluster_Node class is a dynamic WMI class that represents a cluster node. + +||| +-|- +Metric name prefix | `mscluster_node` +Classes | `MSCluster_Node` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`BuildNumber` | Provides access to the node's BuildNumber property. | guage | None +`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | guage | None +`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | None +`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | None +`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | guage | None +`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | guage | None +`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | guage | None +`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | guage | None +`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | guage | None +`NodeHighestVersion` | 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. | guage | None +`NodeLowestVersion` | 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. | guage | None +`NodeWeight` | The vote weight of the node. | guage | None +`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | guage | None +`StatusInformation` | The isolation or quarantine status of the node. | guage | None + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From 313ffb73bd5533122c586ecd2413e9af580ff01d Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 20:16:04 -0600 Subject: [PATCH 13/17] chore: Adding/updating the documentation for mscluster_resource collector Signed-off-by: Sam Storie --- collector/mscluster_resource.go | 65 ++++++++++++++-------------- docs/collector.mscluster_resource.md | 43 ++++++++++++++++++ 2 files changed, 75 insertions(+), 33 deletions(-) create mode 100644 docs/collector.mscluster_resource.md diff --git a/collector/mscluster_resource.go b/collector/mscluster_resource.go index ff55918c..1c50aea7 100644 --- a/collector/mscluster_resource.go +++ b/collector/mscluster_resource.go @@ -11,23 +11,22 @@ func init() { // A MSCluster_ResourceCollector is a Prometheus collector for WMI MSCluster_Resource metrics type MSCluster_ResourceCollector struct { - Characteristics *prometheus.Desc - DeadlockTimeout *prometheus.Desc - EmbeddedFailureAction *prometheus.Desc - Flags *prometheus.Desc - IsAlivePollInterval *prometheus.Desc - LooksAlivePollInterval *prometheus.Desc - MonitorProcessId *prometheus.Desc - PendingTimeout *prometheus.Desc - RequiredDependencyClasses *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 + 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 newMSCluster_ResourceCollector() (Collector, error) { @@ -35,97 +34,97 @@ func newMSCluster_ResourceCollector() (Collector, error) { return &MSCluster_ResourceCollector{ Characteristics: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "characteristics"), - "(Characteristics)", + "Provides the characteristics of the object.", []string{"type", "owner_group", "name"}, nil, ), DeadlockTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "deadlock_timeout"), - "(DeadlockTimeout)", + "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, ), EmbeddedFailureAction: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "embedded_failure_action"), - "(EmbeddedFailureAction)", + "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, ), Flags: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "flags"), - "(Flags)", + "Provides access to the flags set for the object.", []string{"type", "owner_group", "name"}, nil, ), IsAlivePollInterval: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "is_alive_poll_interval"), - "(IsAlivePollInterval)", + "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, ), LooksAlivePollInterval: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "looks_alive_poll_interval"), - "(LooksAlivePollInterval)", + "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, ), MonitorProcessId: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "monitor_process_id"), - "(MonitorProcessId)", + "Provides the process ID of the resource host service that is currently hosting the resource.", []string{"type", "owner_group", "name"}, nil, ), PendingTimeout: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "pending_timeout"), - "(PendingTimeout)", + "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, ), ResourceClass: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "resource_class"), - "(ResourceClass)", + "Gets or sets the resource class of a resource. 0: Unknown; 1: Storage; 2: Network; 32768: Unknown ", []string{"type", "owner_group", "name"}, nil, ), RestartAction: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "restart_action"), - "(RestartAction)", + "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, ), RestartDelay: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "restart_delay"), - "(RestartDelay)", + "Indicates the time delay before a failed resource is restarted.", []string{"type", "owner_group", "name"}, nil, ), RestartPeriod: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "restart_period"), - "(RestartPeriod)", + "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, ), RestartThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "restart_threshold"), - "(RestartThreshold)", + "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, ), RetryPeriodOnFailure: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "retry_period_on_failure"), - "(RetryPeriodOnFailure)", + "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, ), State: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "state"), - "(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, ), Subclass: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "subclass"), - "(Subclass)", + "Provides the list of references to nodes that can be the owner of this resource.", []string{"type", "owner_group", "name"}, nil, ), diff --git a/docs/collector.mscluster_resource.md b/docs/collector.mscluster_resource.md new file mode 100644 index 00000000..47ce5516 --- /dev/null +++ b/docs/collector.mscluster_resource.md @@ -0,0 +1,43 @@ +# mscluster_resource collector + +The MSCluster_resource class is a dynamic WMI class that represents a cluster resource. + +||| +-|- +Metric name prefix | `mscluster_resource` +Classes | `MSCluster_Resource` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`Characteristics` | Provides the characteristics of the object. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | guage | `type`, `owner_group`, `name` +`DeadlockTimeout` | Indicates the length of time to wait, in milliseconds, before declaring a deadlock in any call into a resource. | guage | `type`, `owner_group`, `name` +`EmbeddedFailureAction` | The time, in milliseconds, that a resource should remain in a failed state before the Cluster service attempts to restart it. | guage | `type`, `owner_group`, `name` +`Flags` | Provides access to the flags set for the object. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `type`, `owner_group`, `name` +`IsAlivePollInterval` | 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. | guage | `type`, `owner_group`, `name` +`LooksAlivePollInterval` | 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. | guage | `type`, `owner_group`, `name` +`MonitorProcessId` | Provides the process ID of the resource host service that is currently hosting the resource. | guage | `type`, `owner_group`, `name` +`PendingTimeout` | 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. | guage | `type`, `owner_group`, `name` +`ResourceClass` | Gets or sets the resource class of a resource. 0: Unknown; 1: Storage; 2: Network; 32768: Unknown | guage | `type`, `owner_group`, `name` +`RestartAction` | Provides access to the resource's RestartAction property, which is the action to be taken by the Cluster Service if the resource fails. | guage | `type`, `owner_group`, `name` +`RestartDelay` | Indicates the time delay before a failed resource is restarted. | guage | `type`, `owner_group`, `name` +`RestartPeriod` | 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. | guage | `type`, `owner_group`, `name` +`RestartThreshold` | 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. | guage | `type`, `owner_group`, `name` +`RetryPeriodOnFailure` | 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. | guage | `type`, `owner_group`, `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 | guage | `type`, `owner_group`, `name` +`Subclass` | Provides the list of references to nodes that can be the owner of this resource. | guage | `type`, `owner_group`, `name` + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From 33615c8b587f7591b81d6fd921267d72e8f0e6f3 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 20:16:28 -0600 Subject: [PATCH 14/17] chore: updating the label list in the docs Signed-off-by: Sam Storie --- docs/collector.mscluster_cluster.md | 154 ++++++++++++++-------------- docs/collector.mscluster_network.md | 10 +- docs/collector.mscluster_node.md | 28 ++--- 3 files changed, 96 insertions(+), 96 deletions(-) diff --git a/docs/collector.mscluster_cluster.md b/docs/collector.mscluster_cluster.md index 957ee5a6..fd8b1717 100644 --- a/docs/collector.mscluster_cluster.md +++ b/docs/collector.mscluster_cluster.md @@ -16,83 +16,83 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`AddEvictDelay` | 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. | guage | None -`AdminAccessPoint` | The type of the cluster administrative access point. | guage | None -`AutoAssignNodeSite` | Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information. | guage | None -`AutoBalancerLevel` | Determines the level of aggressiveness of AutoBalancer. | guage | None -`AutoBalancerMode` | Determines whether or not the auto balancer is enabled. | guage | None -`BackupInProgress` | Indicates whether a backup is in progress. | guage | None -`BlockCacheSize` | CSV BlockCache Size in MB. | guage | None -`ClusSvcHangTimeout` | Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding. | guage | None -`ClusSvcRegroupOpeningTimeout` | Controls how long a node will wait on other nodes in the opening stage before deciding that they failed. | guage | None -`ClusSvcRegroupPruningTimeout` | Controls how long the membership leader will wait to reach full connectivity between cluster nodes. | guage | None -`ClusSvcRegroupStageTimeout` | Controls how long a node will wait on other nodes in a membership stage before deciding that they failed. | guage | None -`ClusSvcRegroupTickInMilliseconds` | Controls how frequently the membership algorithm is sending periodic membership messages. | guage | None -`ClusterEnforcedAntiAffinity` | Enables or disables hard enforcement of group anti-affinity classes. | guage | None -`ClusterFunctionalLevel` | The functional level the cluster is currently running in. | guage | None -`ClusterGroupWaitDelay` | 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. | guage | None -`ClusterLogLevel` | Controls the level of cluster logging. | guage | None -`ClusterLogSize` | Controls the maximum size of the cluster log files on each of the nodes. | guage | None -`ClusterUpgradeVersion` | Specifies the upgrade version the cluster is currently running in. | guage | None -`CrossSiteDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites. | guage | None -`CrossSiteThreshold` | Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding. | guage | None -`CrossSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets. | guage | None -`CrossSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding. | guage | None -`CsvBalancer` | Whether automatic balancing for CSV is enabled. | guage | None -`DatabaseReadWriteMode` | Sets the database read and write mode. | guage | None -`DefaultNetworkRole` | Provides access to the cluster's DefaultNetworkRole property. | guage | None -`DetectedCloudPlatform` | | guage | None -`DetectManagedEvents` | | guage | None -`DetectManagedEventsThreshold` | | guage | None -`DisableGroupPreferredOwnerRandomization` | | guage | None -`DrainOnShutdown` | Whether to drain the node when cluster service is being stopped. | guage | None -`DynamicQuorumEnabled` | Allows cluster service to adjust node weights as needed to increase availability. | guage | None -`EnableSharedVolumes` | Enables or disables cluster shared volumes on this cluster. | guage | None -`FixQuorum` | Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state. | guage | None -`GracePeriodEnabled` | Whether the node grace period feature of this cluster is enabled. | guage | None -`GracePeriodTimeout` | The grace period timeout in milliseconds. | guage | None -`GroupDependencyTimeout` | The timeout after which a group will be brought online despite unsatisfied dependencies | guage | None -`HangRecoveryAction` | Controls the action to take if the user-mode processes have stopped responding. | guage | None -`IgnorePersistentStateOnStartup` | 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. | guage | None -`LogResourceControls` | Controls the logging of resource controls. | guage | None -`LowerQuorumPriorityNodeId` | 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. | guage | None -`MaxNumberOfNodes` | Indicates the maximum number of nodes that may participate in the Cluster. | guage | None -`MessageBufferLength` | The maximum unacknowledged message count for GEM. | guage | None -`MinimumNeverPreemptPriority` | Groups with this priority or higher cannot be preempted. | guage | None -`MinimumPreemptorPriority` | Minimum priority a cluster group must have to be able to preempt another group. | guage | None -`NetftIPSecEnabled` | Whether IPSec is enabled for cluster internal traffic. | guage | None -`PlacementOptions` | Various option flags to modify default placement behavior. | guage | None -`PlumbAllCrossSubnetRoutes` | Plumbs all possible cross subnet routes to all nodes. | guage | None -`PreventQuorum` | Whether the cluster will ignore group persistent state on startup. | guage | None -`QuarantineDuration` | The quarantine period timeout in milliseconds. | guage | None -`QuarantineThreshold` | Number of node failures before it will be quarantined. | guage | None -`QuorumArbitrationTimeMax` | Controls the maximum time necessary to decide the Quorum owner node. | guage | None -`QuorumArbitrationTimeMin` | Controls the minimum time necessary to decide the Quorum owner node. | guage | None -`QuorumLogFileSize` | This property is obsolete. | guage | None -`QuorumTypeValue` | Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None | guage | None -`RequestReplyTimeout` | Controls the request reply time-out period. | guage | None -`ResiliencyDefaultPeriod` | The default resiliency period, in seconds, for the cluster. | guage | None -`ResiliencyLevel` | The resiliency level for the cluster. | guage | None -`ResourceDllDeadlockPeriod` | This property is obsolete. | guage | None -`RootMemoryReserved` | Controls the amount of memory reserved for the parent partition on all cluster nodes. | guage | None -`RouteHistoryLength` | The history length for routes to help finding network issues. | guage | None -`S2DBusTypes` | Bus types for storage spaces direct. | guage | None -`S2DCacheDesiredState` | Desired state of the storage spaces direct cache. | guage | None -`S2DCacheFlashReservePercent` | Percentage of allocated flash space to utilize when caching. | guage | None -`S2DCachePageSizeKBytes` | Page size in KB used by S2D cache. | guage | None -`S2DEnabled` | Whether direct attached storage (DAS) is enabled. | guage | None -`S2DIOLatencyThreshold` | The I/O latency threshold for storage spaces direct. | guage | None -`S2DOptimizations` | Optimization flags for storage spaces direct. | guage | None -`SameSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet. | guage | None -`SameSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding. | guage | None -`SecurityLevel` | Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt | guage | None -`SecurityLevelForStorage` | | guage | None -`SharedVolumeVssWriterOperationTimeout` | CSV VSS Writer operation timeout in seconds. | guage | None -`ShutdownTimeoutInMinutes` | The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown. | guage | None -`UseClientAccessNetworksForSharedVolumes` | Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto | guage | None -`WitnessDatabaseWriteTimeout` | Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned. | guage | None -`WitnessDynamicWeight` | The weight of the configured witness. | guage | None -`WitnessRestartInterval` | Controls the witness restart interval. | guage | None +`AddEvictDelay` | 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. | guage | `name` +`AdminAccessPoint` | The type of the cluster administrative access point. | guage | `name` +`AutoAssignNodeSite` | Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information. | guage | `name` +`AutoBalancerLevel` | Determines the level of aggressiveness of AutoBalancer. | guage | `name` +`AutoBalancerMode` | Determines whether or not the auto balancer is enabled. | guage | `name` +`BackupInProgress` | Indicates whether a backup is in progress. | guage | `name` +`BlockCacheSize` | CSV BlockCache Size in MB. | guage | `name` +`ClusSvcHangTimeout` | Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding. | guage | `name` +`ClusSvcRegroupOpeningTimeout` | Controls how long a node will wait on other nodes in the opening stage before deciding that they failed. | guage | `name` +`ClusSvcRegroupPruningTimeout` | Controls how long the membership leader will wait to reach full connectivity between cluster nodes. | guage | `name` +`ClusSvcRegroupStageTimeout` | Controls how long a node will wait on other nodes in a membership stage before deciding that they failed. | guage | `name` +`ClusSvcRegroupTickInMilliseconds` | Controls how frequently the membership algorithm is sending periodic membership messages. | guage | `name` +`ClusterEnforcedAntiAffinity` | Enables or disables hard enforcement of group anti-affinity classes. | guage | `name` +`ClusterFunctionalLevel` | The functional level the cluster is currently running in. | guage | `name` +`ClusterGroupWaitDelay` | 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. | guage | `name` +`ClusterLogLevel` | Controls the level of cluster logging. | guage | `name` +`ClusterLogSize` | Controls the maximum size of the cluster log files on each of the nodes. | guage | `name` +`ClusterUpgradeVersion` | Specifies the upgrade version the cluster is currently running in. | guage | `name` +`CrossSiteDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites. | guage | `name` +`CrossSiteThreshold` | Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding. | guage | `name` +`CrossSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets. | guage | `name` +`CrossSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding. | guage | `name` +`CsvBalancer` | Whether automatic balancing for CSV is enabled. | guage | `name` +`DatabaseReadWriteMode` | Sets the database read and write mode. | guage | `name` +`DefaultNetworkRole` | Provides access to the cluster's DefaultNetworkRole property. | guage | `name` +`DetectedCloudPlatform` | | guage | `name` +`DetectManagedEvents` | | guage | `name` +`DetectManagedEventsThreshold` | | guage | `name` +`DisableGroupPreferredOwnerRandomization` | | guage | `name` +`DrainOnShutdown` | Whether to drain the node when cluster service is being stopped. | guage | `name` +`DynamicQuorumEnabled` | Allows cluster service to adjust node weights as needed to increase availability. | guage | `name` +`EnableSharedVolumes` | Enables or disables cluster shared volumes on this cluster. | guage | `name` +`FixQuorum` | Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state. | guage | `name` +`GracePeriodEnabled` | Whether the node grace period feature of this cluster is enabled. | guage | `name` +`GracePeriodTimeout` | The grace period timeout in milliseconds. | guage | `name` +`GroupDependencyTimeout` | The timeout after which a group will be brought online despite unsatisfied dependencies | guage | `name` +`HangRecoveryAction` | Controls the action to take if the user-mode processes have stopped responding. | guage | `name` +`IgnorePersistentStateOnStartup` | 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. | guage | `name` +`LogResourceControls` | Controls the logging of resource controls. | guage | `name` +`LowerQuorumPriorityNodeId` | 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. | guage | `name` +`MaxNumberOfNodes` | Indicates the maximum number of nodes that may participate in the Cluster. | guage | `name` +`MessageBufferLength` | The maximum unacknowledged message count for GEM. | guage | `name` +`MinimumNeverPreemptPriority` | Groups with this priority or higher cannot be preempted. | guage | `name` +`MinimumPreemptorPriority` | Minimum priority a cluster group must have to be able to preempt another group. | guage | `name` +`NetftIPSecEnabled` | Whether IPSec is enabled for cluster internal traffic. | guage | `name` +`PlacementOptions` | Various option flags to modify default placement behavior. | guage | `name` +`PlumbAllCrossSubnetRoutes` | Plumbs all possible cross subnet routes to all nodes. | guage | `name` +`PreventQuorum` | Whether the cluster will ignore group persistent state on startup. | guage | `name` +`QuarantineDuration` | The quarantine period timeout in milliseconds. | guage | `name` +`QuarantineThreshold` | Number of node failures before it will be quarantined. | guage | `name` +`QuorumArbitrationTimeMax` | Controls the maximum time necessary to decide the Quorum owner node. | guage | `name` +`QuorumArbitrationTimeMin` | Controls the minimum time necessary to decide the Quorum owner node. | guage | `name` +`QuorumLogFileSize` | This property is obsolete. | guage | `name` +`QuorumTypeValue` | Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None | guage | `name` +`RequestReplyTimeout` | Controls the request reply time-out period. | guage | `name` +`ResiliencyDefaultPeriod` | The default resiliency period, in seconds, for the cluster. | guage | `name` +`ResiliencyLevel` | The resiliency level for the cluster. | guage | `name` +`ResourceDllDeadlockPeriod` | This property is obsolete. | guage | `name` +`RootMemoryReserved` | Controls the amount of memory reserved for the parent partition on all cluster nodes. | guage | `name` +`RouteHistoryLength` | The history length for routes to help finding network issues. | guage | `name` +`S2DBusTypes` | Bus types for storage spaces direct. | guage | `name` +`S2DCacheDesiredState` | Desired state of the storage spaces direct cache. | guage | `name` +`S2DCacheFlashReservePercent` | Percentage of allocated flash space to utilize when caching. | guage | `name` +`S2DCachePageSizeKBytes` | Page size in KB used by S2D cache. | guage | `name` +`S2DEnabled` | Whether direct attached storage (DAS) is enabled. | guage | `name` +`S2DIOLatencyThreshold` | The I/O latency threshold for storage spaces direct. | guage | `name` +`S2DOptimizations` | Optimization flags for storage spaces direct. | guage | `name` +`SameSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet. | guage | `name` +`SameSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding. | guage | `name` +`SecurityLevel` | Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt | guage | `name` +`SecurityLevelForStorage` | | guage | `name` +`SharedVolumeVssWriterOperationTimeout` | CSV VSS Writer operation timeout in seconds. | guage | `name` +`ShutdownTimeoutInMinutes` | The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown. | guage | `name` +`UseClientAccessNetworksForSharedVolumes` | Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto | guage | `name` +`WitnessDatabaseWriteTimeout` | Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned. | guage | `name` +`WitnessDynamicWeight` | The weight of the configured witness. | guage | `name` +`WitnessRestartInterval` | Controls the witness restart interval. | guage | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_network.md b/docs/collector.mscluster_network.md index e485046a..0e482736 100644 --- a/docs/collector.mscluster_network.md +++ b/docs/collector.mscluster_network.md @@ -16,11 +16,11 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`Characteristics` | Provides the characteristics of the network. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://msdn.microsoft.com/library/aa367466). | guage | None -`Flags` | Provides access to the flags set for the network. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | None -`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. | guage | None -`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 | guage | None -`State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | guage | None +`Characteristics` | Provides the characteristics of the network. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://msdn.microsoft.com/library/aa367466). | guage | `name` +`Flags` | Provides access to the flags set for the network. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `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. | guage | `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 | guage | `name` +`State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | guage | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_node.md b/docs/collector.mscluster_node.md index 8bee1577..d02f3d67 100644 --- a/docs/collector.mscluster_node.md +++ b/docs/collector.mscluster_node.md @@ -16,20 +16,20 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`BuildNumber` | Provides access to the node's BuildNumber property. | guage | None -`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | guage | None -`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | None -`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | None -`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | guage | None -`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | guage | None -`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | guage | None -`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | guage | None -`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | guage | None -`NodeHighestVersion` | 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. | guage | None -`NodeLowestVersion` | 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. | guage | None -`NodeWeight` | The vote weight of the node. | guage | None -`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | guage | None -`StatusInformation` | The isolation or quarantine status of the node. | guage | None +`BuildNumber` | Provides access to the node's BuildNumber property. | guage | `name` +`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | guage | `name` +`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | `name` +`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | `name` +`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | guage | `name` +`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | guage | `name` +`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | guage | `name` +`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | guage | `name` +`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | guage | `name` +`NodeHighestVersion` | 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. | guage | `name` +`NodeLowestVersion` | 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. | guage | `name` +`NodeWeight` | The vote weight of the node. | guage | `name` +`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | guage | `name` +`StatusInformation` | The isolation or quarantine status of the node. | guage | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ From a50fe95370ebc65e138e61b8da8ea35f834cf8e7 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 20:29:13 -0600 Subject: [PATCH 15/17] chore: adding/updating the documentation for mscluster_resourcegroup collector Signed-off-by: Sam Storie --- collector/mscluster_resourcegroup.go | 60 +++++------------------ docs/collector.mscluster_resourcegroup.md | 41 ++++++++++++++++ 2 files changed, 54 insertions(+), 47 deletions(-) create mode 100644 docs/collector.mscluster_resourcegroup.md diff --git a/collector/mscluster_resourcegroup.go b/collector/mscluster_resourcegroup.go index 51e2c616..fe805b5c 100644 --- a/collector/mscluster_resourcegroup.go +++ b/collector/mscluster_resourcegroup.go @@ -34,97 +34,79 @@ func newMSCluster_ResourceGroupCollector() (Collector, error) { return &MSCluster_ResourceGroupCollector{ AutoFailbackType: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "auto_failback_type"), - "(AutoFailbackType)", + "Provides access to the group's AutoFailbackType property.", []string{"name"}, nil, ), Characteristics: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "characteristics"), - "(Characteristics)", + "Provides the characteristics of the group.", []string{"name"}, nil, ), ColdStartSetting: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "cold_start_setting"), - "(ColdStartSetting)", + "Indicates whether a group can start after a cluster cold start.", []string{"name"}, nil, ), DefaultOwner: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "default_owner"), - "(DefaultOwner)", + "Number of the last node the resource group was activated on or explicitly moved to.", []string{"name"}, nil, ), FailbackWindowEnd: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "failback_window_end"), - "(FailbackWindowEnd)", + "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, ), FailbackWindowStart: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "failback_window_start"), - "(FailbackWindowStart)", + "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, ), FailoverPeriod: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "failover_period"), - "(FailoverPeriod)", + "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, ), FailoverThreshold: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "failover_threshold"), - "(FailoverThreshold)", - []string{"name"}, - nil, - ), - FaultDomain: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "fault_domain"), - "(FaultDomain)", + "The FailoverThreshold property specifies the maximum number of failover attempts.", []string{"name"}, nil, ), Flags: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "flags"), - "(Flags)", + "Provides access to the flags set for the group. ", []string{"name"}, nil, ), GroupType: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "group_type"), - "(GroupType)", - []string{"name"}, - nil, - ), - PlacementOptions: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "placement_options"), - "(PlacementOptions)", + "The Type of the resource group.", []string{"name"}, nil, ), Priority: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "priority"), - "(Priority)", + "Priority value of the resource group", []string{"name"}, nil, ), ResiliencyPeriod: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "resiliency_period"), - "(ResiliencyPeriod)", + "The resiliency period for this group, in seconds.", []string{"name"}, nil, ), State: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "state"), - "(State)", - []string{"name"}, - nil, - ), - UpdateDomain: prometheus.NewDesc( - prometheus.BuildFQName(Namespace, subsystem, "update_domain"), - "(UpdateDomain)", + "The current state of the resource group. -1: Unknown; 0: Online; 1: Offline; 2: Failed; 3: Partial Online; 4: Pending", []string{"name"}, nil, ), @@ -145,10 +127,8 @@ type MSCluster_ResourceGroup struct { FailbackWindowStart int FailoverPeriod uint FailoverThreshold uint - FaultDomain uint Flags uint GroupType uint - PlacementOptions uint Priority uint ResiliencyPeriod uint State uint @@ -222,13 +202,6 @@ func (c *MSCluster_ResourceGroupCollector) Collect(ctx *ScrapeContext, ch chan<- v.Name, ) - ch <- prometheus.MustNewConstMetric( - c.FaultDomain, - prometheus.GaugeValue, - float64(v.FaultDomain), - v.Name, - ) - ch <- prometheus.MustNewConstMetric( c.Flags, prometheus.GaugeValue, @@ -243,13 +216,6 @@ func (c *MSCluster_ResourceGroupCollector) Collect(ctx *ScrapeContext, ch chan<- v.Name, ) - ch <- prometheus.MustNewConstMetric( - c.PlacementOptions, - prometheus.GaugeValue, - float64(v.PlacementOptions), - v.Name, - ) - ch <- prometheus.MustNewConstMetric( c.Priority, prometheus.GaugeValue, diff --git a/docs/collector.mscluster_resourcegroup.md b/docs/collector.mscluster_resourcegroup.md new file mode 100644 index 00000000..98d2e18a --- /dev/null +++ b/docs/collector.mscluster_resourcegroup.md @@ -0,0 +1,41 @@ +# mscluster_resourcegroup collector + +The MSCluster_ResourceGroup class is a dynamic WMI class that represents a cluster group. + +||| +-|- +Metric name prefix | `mscluster_resourcegroup` +Classes | `MSCluster_ResourceGroup` +Enabled by default? | No + +## Flags + +None + +## Metrics + +Name | Description | Type | Labels +-----|-------------|------|------- +`AutoFailbackType` | Provides access to the group's AutoFailbackType property. | guage | `name` +`Characteristics` | Provides the characteristics of the group. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | guage | `name` +`ColdStartSetting` | Indicates whether a group can start after a cluster cold start. | guage | `name` +`DefaultOwner` | Number of the last node the resource group was activated on or explicitly moved to. | guage | `name` +`FailbackWindowEnd` | The FailbackWindowEnd property provides the latest time that the group can be moved back to the node identified as its preferred node. | guage | `name` +`FailbackWindowStart` | 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. | guage | `name` +`FailoverPeriod` | The FailoverPeriod property specifies a number of hours during which a maximum number of failover attempts, specified by the FailoverThreshold property, can occur. | guage | `name` +`FailoverThreshold` | The FailoverThreshold property specifies the maximum number of failover attempts. | guage | `name` +`Flags` | Provides access to the flags set for the group. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `name` +`GroupType` | The Type of the resource group. | guage | `name` +`Priority` | Priority value of the resource group | guage | `name` +`ResiliencyPeriod` | The resiliency period for this group, in seconds. | guage | `name` +`State` | The current state of the resource group. -1: Unknown; 0: Online; 1: Offline; 2: Failed; 3: Partial Online; 4: Pending | guage | `name` +`UpdateDomain` | | guage | `name` + +### Example metric +_This collector does not yet have explained examples, we would appreciate your help adding them!_ + +## Useful queries +_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ + +## Alerting examples +_This collector does not yet have alerting examples, we would appreciate your help adding them!_ From 61ea9d049c0a5c042a2a11f3c61204b920e8d922 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 20:31:58 -0600 Subject: [PATCH 16/17] chore: fix mis-spelling Signed-off-by: Sam Storie --- docs/collector.mscluster_cluster.md | 154 +++++++++++----------- docs/collector.mscluster_network.md | 10 +- docs/collector.mscluster_node.md | 28 ++-- docs/collector.mscluster_resource.md | 32 ++--- docs/collector.mscluster_resourcegroup.md | 28 ++-- 5 files changed, 126 insertions(+), 126 deletions(-) diff --git a/docs/collector.mscluster_cluster.md b/docs/collector.mscluster_cluster.md index fd8b1717..e9b80052 100644 --- a/docs/collector.mscluster_cluster.md +++ b/docs/collector.mscluster_cluster.md @@ -16,83 +16,83 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`AddEvictDelay` | 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. | guage | `name` -`AdminAccessPoint` | The type of the cluster administrative access point. | guage | `name` -`AutoAssignNodeSite` | Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information. | guage | `name` -`AutoBalancerLevel` | Determines the level of aggressiveness of AutoBalancer. | guage | `name` -`AutoBalancerMode` | Determines whether or not the auto balancer is enabled. | guage | `name` -`BackupInProgress` | Indicates whether a backup is in progress. | guage | `name` -`BlockCacheSize` | CSV BlockCache Size in MB. | guage | `name` -`ClusSvcHangTimeout` | Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding. | guage | `name` -`ClusSvcRegroupOpeningTimeout` | Controls how long a node will wait on other nodes in the opening stage before deciding that they failed. | guage | `name` -`ClusSvcRegroupPruningTimeout` | Controls how long the membership leader will wait to reach full connectivity between cluster nodes. | guage | `name` -`ClusSvcRegroupStageTimeout` | Controls how long a node will wait on other nodes in a membership stage before deciding that they failed. | guage | `name` -`ClusSvcRegroupTickInMilliseconds` | Controls how frequently the membership algorithm is sending periodic membership messages. | guage | `name` -`ClusterEnforcedAntiAffinity` | Enables or disables hard enforcement of group anti-affinity classes. | guage | `name` -`ClusterFunctionalLevel` | The functional level the cluster is currently running in. | guage | `name` -`ClusterGroupWaitDelay` | 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. | guage | `name` -`ClusterLogLevel` | Controls the level of cluster logging. | guage | `name` -`ClusterLogSize` | Controls the maximum size of the cluster log files on each of the nodes. | guage | `name` -`ClusterUpgradeVersion` | Specifies the upgrade version the cluster is currently running in. | guage | `name` -`CrossSiteDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites. | guage | `name` -`CrossSiteThreshold` | Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding. | guage | `name` -`CrossSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets. | guage | `name` -`CrossSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding. | guage | `name` -`CsvBalancer` | Whether automatic balancing for CSV is enabled. | guage | `name` -`DatabaseReadWriteMode` | Sets the database read and write mode. | guage | `name` -`DefaultNetworkRole` | Provides access to the cluster's DefaultNetworkRole property. | guage | `name` -`DetectedCloudPlatform` | | guage | `name` -`DetectManagedEvents` | | guage | `name` -`DetectManagedEventsThreshold` | | guage | `name` -`DisableGroupPreferredOwnerRandomization` | | guage | `name` -`DrainOnShutdown` | Whether to drain the node when cluster service is being stopped. | guage | `name` -`DynamicQuorumEnabled` | Allows cluster service to adjust node weights as needed to increase availability. | guage | `name` -`EnableSharedVolumes` | Enables or disables cluster shared volumes on this cluster. | guage | `name` -`FixQuorum` | Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state. | guage | `name` -`GracePeriodEnabled` | Whether the node grace period feature of this cluster is enabled. | guage | `name` -`GracePeriodTimeout` | The grace period timeout in milliseconds. | guage | `name` -`GroupDependencyTimeout` | The timeout after which a group will be brought online despite unsatisfied dependencies | guage | `name` -`HangRecoveryAction` | Controls the action to take if the user-mode processes have stopped responding. | guage | `name` -`IgnorePersistentStateOnStartup` | 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. | guage | `name` -`LogResourceControls` | Controls the logging of resource controls. | guage | `name` -`LowerQuorumPriorityNodeId` | 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. | guage | `name` -`MaxNumberOfNodes` | Indicates the maximum number of nodes that may participate in the Cluster. | guage | `name` -`MessageBufferLength` | The maximum unacknowledged message count for GEM. | guage | `name` -`MinimumNeverPreemptPriority` | Groups with this priority or higher cannot be preempted. | guage | `name` -`MinimumPreemptorPriority` | Minimum priority a cluster group must have to be able to preempt another group. | guage | `name` -`NetftIPSecEnabled` | Whether IPSec is enabled for cluster internal traffic. | guage | `name` -`PlacementOptions` | Various option flags to modify default placement behavior. | guage | `name` -`PlumbAllCrossSubnetRoutes` | Plumbs all possible cross subnet routes to all nodes. | guage | `name` -`PreventQuorum` | Whether the cluster will ignore group persistent state on startup. | guage | `name` -`QuarantineDuration` | The quarantine period timeout in milliseconds. | guage | `name` -`QuarantineThreshold` | Number of node failures before it will be quarantined. | guage | `name` -`QuorumArbitrationTimeMax` | Controls the maximum time necessary to decide the Quorum owner node. | guage | `name` -`QuorumArbitrationTimeMin` | Controls the minimum time necessary to decide the Quorum owner node. | guage | `name` -`QuorumLogFileSize` | This property is obsolete. | guage | `name` -`QuorumTypeValue` | Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None | guage | `name` -`RequestReplyTimeout` | Controls the request reply time-out period. | guage | `name` -`ResiliencyDefaultPeriod` | The default resiliency period, in seconds, for the cluster. | guage | `name` -`ResiliencyLevel` | The resiliency level for the cluster. | guage | `name` -`ResourceDllDeadlockPeriod` | This property is obsolete. | guage | `name` -`RootMemoryReserved` | Controls the amount of memory reserved for the parent partition on all cluster nodes. | guage | `name` -`RouteHistoryLength` | The history length for routes to help finding network issues. | guage | `name` -`S2DBusTypes` | Bus types for storage spaces direct. | guage | `name` -`S2DCacheDesiredState` | Desired state of the storage spaces direct cache. | guage | `name` -`S2DCacheFlashReservePercent` | Percentage of allocated flash space to utilize when caching. | guage | `name` -`S2DCachePageSizeKBytes` | Page size in KB used by S2D cache. | guage | `name` -`S2DEnabled` | Whether direct attached storage (DAS) is enabled. | guage | `name` -`S2DIOLatencyThreshold` | The I/O latency threshold for storage spaces direct. | guage | `name` -`S2DOptimizations` | Optimization flags for storage spaces direct. | guage | `name` -`SameSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet. | guage | `name` -`SameSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding. | guage | `name` -`SecurityLevel` | Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt | guage | `name` -`SecurityLevelForStorage` | | guage | `name` -`SharedVolumeVssWriterOperationTimeout` | CSV VSS Writer operation timeout in seconds. | guage | `name` -`ShutdownTimeoutInMinutes` | The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown. | guage | `name` -`UseClientAccessNetworksForSharedVolumes` | Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto | guage | `name` -`WitnessDatabaseWriteTimeout` | Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned. | guage | `name` -`WitnessDynamicWeight` | The weight of the configured witness. | guage | `name` -`WitnessRestartInterval` | Controls the witness restart interval. | guage | `name` +`AddEvictDelay` | 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. | gauge | `name` +`AdminAccessPoint` | The type of the cluster administrative access point. | gauge | `name` +`AutoAssignNodeSite` | Determines whether or not the cluster will attempt to automatically assign nodes to sites based on networks and Active Directory Site information. | gauge | `name` +`AutoBalancerLevel` | Determines the level of aggressiveness of AutoBalancer. | gauge | `name` +`AutoBalancerMode` | Determines whether or not the auto balancer is enabled. | gauge | `name` +`BackupInProgress` | Indicates whether a backup is in progress. | gauge | `name` +`BlockCacheSize` | CSV BlockCache Size in MB. | gauge | `name` +`ClusSvcHangTimeout` | Controls how long the cluster network driver waits between Failover Cluster Service heartbeats before it determines that the Failover Cluster Service has stopped responding. | gauge | `name` +`ClusSvcRegroupOpeningTimeout` | Controls how long a node will wait on other nodes in the opening stage before deciding that they failed. | gauge | `name` +`ClusSvcRegroupPruningTimeout` | Controls how long the membership leader will wait to reach full connectivity between cluster nodes. | gauge | `name` +`ClusSvcRegroupStageTimeout` | Controls how long a node will wait on other nodes in a membership stage before deciding that they failed. | gauge | `name` +`ClusSvcRegroupTickInMilliseconds` | Controls how frequently the membership algorithm is sending periodic membership messages. | gauge | `name` +`ClusterEnforcedAntiAffinity` | Enables or disables hard enforcement of group anti-affinity classes. | gauge | `name` +`ClusterFunctionalLevel` | The functional level the cluster is currently running in. | gauge | `name` +`ClusterGroupWaitDelay` | 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. | gauge | `name` +`ClusterLogLevel` | Controls the level of cluster logging. | gauge | `name` +`ClusterLogSize` | Controls the maximum size of the cluster log files on each of the nodes. | gauge | `name` +`ClusterUpgradeVersion` | Specifies the upgrade version the cluster is currently running in. | gauge | `name` +`CrossSiteDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across sites. | gauge | `name` +`CrossSiteThreshold` | Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding. | gauge | `name` +`CrossSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats across subnets. | gauge | `name` +`CrossSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding. | gauge | `name` +`CsvBalancer` | Whether automatic balancing for CSV is enabled. | gauge | `name` +`DatabaseReadWriteMode` | Sets the database read and write mode. | gauge | `name` +`DefaultNetworkRole` | Provides access to the cluster's DefaultNetworkRole property. | gauge | `name` +`DetectedCloudPlatform` | | gauge | `name` +`DetectManagedEvents` | | gauge | `name` +`DetectManagedEventsThreshold` | | gauge | `name` +`DisableGroupPreferredOwnerRandomization` | | gauge | `name` +`DrainOnShutdown` | Whether to drain the node when cluster service is being stopped. | gauge | `name` +`DynamicQuorumEnabled` | Allows cluster service to adjust node weights as needed to increase availability. | gauge | `name` +`EnableSharedVolumes` | Enables or disables cluster shared volumes on this cluster. | gauge | `name` +`FixQuorum` | Provides access to the cluster's FixQuorum property, which specifies if the cluster is in a fix quorum state. | gauge | `name` +`GracePeriodEnabled` | Whether the node grace period feature of this cluster is enabled. | gauge | `name` +`GracePeriodTimeout` | The grace period timeout in milliseconds. | gauge | `name` +`GroupDependencyTimeout` | The timeout after which a group will be brought online despite unsatisfied dependencies | gauge | `name` +`HangRecoveryAction` | Controls the action to take if the user-mode processes have stopped responding. | gauge | `name` +`IgnorePersistentStateOnStartup` | 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. | gauge | `name` +`LogResourceControls` | Controls the logging of resource controls. | gauge | `name` +`LowerQuorumPriorityNodeId` | 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. | gauge | `name` +`MaxNumberOfNodes` | Indicates the maximum number of nodes that may participate in the Cluster. | gauge | `name` +`MessageBufferLength` | The maximum unacknowledged message count for GEM. | gauge | `name` +`MinimumNeverPreemptPriority` | Groups with this priority or higher cannot be preempted. | gauge | `name` +`MinimumPreemptorPriority` | Minimum priority a cluster group must have to be able to preempt another group. | gauge | `name` +`NetftIPSecEnabled` | Whether IPSec is enabled for cluster internal traffic. | gauge | `name` +`PlacementOptions` | Various option flags to modify default placement behavior. | gauge | `name` +`PlumbAllCrossSubnetRoutes` | Plumbs all possible cross subnet routes to all nodes. | gauge | `name` +`PreventQuorum` | Whether the cluster will ignore group persistent state on startup. | gauge | `name` +`QuarantineDuration` | The quarantine period timeout in milliseconds. | gauge | `name` +`QuarantineThreshold` | Number of node failures before it will be quarantined. | gauge | `name` +`QuorumArbitrationTimeMax` | Controls the maximum time necessary to decide the Quorum owner node. | gauge | `name` +`QuorumArbitrationTimeMin` | Controls the minimum time necessary to decide the Quorum owner node. | gauge | `name` +`QuorumLogFileSize` | This property is obsolete. | gauge | `name` +`QuorumTypeValue` | Get the current quorum type value. -1: Unknown; 1: Node; 2: FileShareWitness; 3: Storage; 4: None | gauge | `name` +`RequestReplyTimeout` | Controls the request reply time-out period. | gauge | `name` +`ResiliencyDefaultPeriod` | The default resiliency period, in seconds, for the cluster. | gauge | `name` +`ResiliencyLevel` | The resiliency level for the cluster. | gauge | `name` +`ResourceDllDeadlockPeriod` | This property is obsolete. | gauge | `name` +`RootMemoryReserved` | Controls the amount of memory reserved for the parent partition on all cluster nodes. | gauge | `name` +`RouteHistoryLength` | The history length for routes to help finding network issues. | gauge | `name` +`S2DBusTypes` | Bus types for storage spaces direct. | gauge | `name` +`S2DCacheDesiredState` | Desired state of the storage spaces direct cache. | gauge | `name` +`S2DCacheFlashReservePercent` | Percentage of allocated flash space to utilize when caching. | gauge | `name` +`S2DCachePageSizeKBytes` | Page size in KB used by S2D cache. | gauge | `name` +`S2DEnabled` | Whether direct attached storage (DAS) is enabled. | gauge | `name` +`S2DIOLatencyThreshold` | The I/O latency threshold for storage spaces direct. | gauge | `name` +`S2DOptimizations` | Optimization flags for storage spaces direct. | gauge | `name` +`SameSubnetDelay` | Controls how long the cluster network driver waits in milliseconds between sending Cluster Service heartbeats on the same subnet. | gauge | `name` +`SameSubnetThreshold` | Controls how many Cluster Service heartbeats can be missed on the same subnet before it determines that Cluster Service has stopped responding. | gauge | `name` +`SecurityLevel` | Controls the level of security that should apply to intracluster messages. 0: Clear Text; 1: Sign; 2: Encrypt | gauge | `name` +`SecurityLevelForStorage` | | gauge | `name` +`SharedVolumeVssWriterOperationTimeout` | CSV VSS Writer operation timeout in seconds. | gauge | `name` +`ShutdownTimeoutInMinutes` | The maximum time in minutes allowed for cluster resources to come offline during cluster service shutdown. | gauge | `name` +`UseClientAccessNetworksForSharedVolumes` | Whether the use of client access networks for cluster shared volumes feature of this cluster is enabled. 0: Disabled; 1: Enabled; 2: Auto | gauge | `name` +`WitnessDatabaseWriteTimeout` | Controls the maximum time in seconds that a cluster database write to a witness can take before the write is abandoned. | gauge | `name` +`WitnessDynamicWeight` | The weight of the configured witness. | gauge | `name` +`WitnessRestartInterval` | Controls the witness restart interval. | gauge | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_network.md b/docs/collector.mscluster_network.md index 0e482736..0219a92f 100644 --- a/docs/collector.mscluster_network.md +++ b/docs/collector.mscluster_network.md @@ -16,11 +16,11 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`Characteristics` | Provides the characteristics of the network. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://msdn.microsoft.com/library/aa367466). | guage | `name` -`Flags` | Provides access to the flags set for the network. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `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. | guage | `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 | guage | `name` -`State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | guage | `name` +`Characteristics` | Provides the characteristics of the network. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://msdn.microsoft.com/library/aa367466). | gauge | `name` +`Flags` | Provides access to the flags set for the network. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | gauge | `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. | gauge | `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 | gauge | `name` +`State` | Provides the current state of the network. 1-1: Unknown; 0: Unavailable; 1: Down; 2: Partitioned; 3: Up | gauge | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_node.md b/docs/collector.mscluster_node.md index d02f3d67..3daf542c 100644 --- a/docs/collector.mscluster_node.md +++ b/docs/collector.mscluster_node.md @@ -16,20 +16,20 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`BuildNumber` | Provides access to the node's BuildNumber property. | guage | `name` -`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | guage | `name` -`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | `name` -`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | guage | `name` -`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | guage | `name` -`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | guage | `name` -`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | guage | `name` -`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | guage | `name` -`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | guage | `name` -`NodeHighestVersion` | 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. | guage | `name` -`NodeLowestVersion` | 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. | guage | `name` -`NodeWeight` | The vote weight of the node. | guage | `name` -`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | guage | `name` -`StatusInformation` | The isolation or quarantine status of the node. | guage | `name` +`BuildNumber` | Provides access to the node's BuildNumber property. | gauge | `name` +`Characteristics` | Provides access to the characteristics set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-characteristics). | gauge | `name` +`DetectedCloudPlatform` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | gauge | `name` +`DynamicWeight` | The dynamic vote weight of the node adjusted by dynamic quorum feature. | gauge | `name` +`Flags` | Provides access to the flags set for the node. For a list of possible characteristics, see [CLUSCTL_NODE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-node-get-flags). | gauge | `name` +`MajorVersion` | Provides access to the node's MajorVersion property, which specifies the major portion of the Windows version installed. | gauge | `name` +`MinorVersion` | Provides access to the node's MinorVersion property, which specifies the minor portion of the Windows version installed. | gauge | `name` +`NeedsPreventQuorum` | Whether the cluster service on that node should be started with prevent quorum flag. | gauge | `name` +`NodeDrainStatus` | The current node drain status of a node. 0: Not Initiated; 1: In Progress; 2: Completed; 3: Failed | gauge | `name` +`NodeHighestVersion` | 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. | gauge | `name` +`NodeLowestVersion` | 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. | gauge | `name` +`NodeWeight` | The vote weight of the node. | gauge | `name` +`State` | Returns the current state of a node. -1: Unknown; 0: Up; 1: Down; 2: Paused; 3: Joining | gauge | `name` +`StatusInformation` | The isolation or quarantine status of the node. | gauge | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_resource.md b/docs/collector.mscluster_resource.md index 47ce5516..11754beb 100644 --- a/docs/collector.mscluster_resource.md +++ b/docs/collector.mscluster_resource.md @@ -16,22 +16,22 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`Characteristics` | Provides the characteristics of the object. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | guage | `type`, `owner_group`, `name` -`DeadlockTimeout` | Indicates the length of time to wait, in milliseconds, before declaring a deadlock in any call into a resource. | guage | `type`, `owner_group`, `name` -`EmbeddedFailureAction` | The time, in milliseconds, that a resource should remain in a failed state before the Cluster service attempts to restart it. | guage | `type`, `owner_group`, `name` -`Flags` | Provides access to the flags set for the object. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `type`, `owner_group`, `name` -`IsAlivePollInterval` | 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. | guage | `type`, `owner_group`, `name` -`LooksAlivePollInterval` | 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. | guage | `type`, `owner_group`, `name` -`MonitorProcessId` | Provides the process ID of the resource host service that is currently hosting the resource. | guage | `type`, `owner_group`, `name` -`PendingTimeout` | 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. | guage | `type`, `owner_group`, `name` -`ResourceClass` | Gets or sets the resource class of a resource. 0: Unknown; 1: Storage; 2: Network; 32768: Unknown | guage | `type`, `owner_group`, `name` -`RestartAction` | Provides access to the resource's RestartAction property, which is the action to be taken by the Cluster Service if the resource fails. | guage | `type`, `owner_group`, `name` -`RestartDelay` | Indicates the time delay before a failed resource is restarted. | guage | `type`, `owner_group`, `name` -`RestartPeriod` | 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. | guage | `type`, `owner_group`, `name` -`RestartThreshold` | 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. | guage | `type`, `owner_group`, `name` -`RetryPeriodOnFailure` | 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. | guage | `type`, `owner_group`, `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 | guage | `type`, `owner_group`, `name` -`Subclass` | Provides the list of references to nodes that can be the owner of this resource. | guage | `type`, `owner_group`, `name` +`Characteristics` | Provides the characteristics of the object. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | gauge | `type`, `owner_group`, `name` +`DeadlockTimeout` | Indicates the length of time to wait, in milliseconds, before declaring a deadlock in any call into a resource. | gauge | `type`, `owner_group`, `name` +`EmbeddedFailureAction` | The time, in milliseconds, that a resource should remain in a failed state before the Cluster service attempts to restart it. | gauge | `type`, `owner_group`, `name` +`Flags` | Provides access to the flags set for the object. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | gauge | `type`, `owner_group`, `name` +`IsAlivePollInterval` | 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. | gauge | `type`, `owner_group`, `name` +`LooksAlivePollInterval` | 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. | gauge | `type`, `owner_group`, `name` +`MonitorProcessId` | Provides the process ID of the resource host service that is currently hosting the resource. | gauge | `type`, `owner_group`, `name` +`PendingTimeout` | 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. | gauge | `type`, `owner_group`, `name` +`ResourceClass` | Gets or sets the resource class of a resource. 0: Unknown; 1: Storage; 2: Network; 32768: Unknown | gauge | `type`, `owner_group`, `name` +`RestartAction` | Provides access to the resource's RestartAction property, which is the action to be taken by the Cluster Service if the resource fails. | gauge | `type`, `owner_group`, `name` +`RestartDelay` | Indicates the time delay before a failed resource is restarted. | gauge | `type`, `owner_group`, `name` +`RestartPeriod` | 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. | gauge | `type`, `owner_group`, `name` +`RestartThreshold` | 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. | gauge | `type`, `owner_group`, `name` +`RetryPeriodOnFailure` | 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. | gauge | `type`, `owner_group`, `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 | gauge | `type`, `owner_group`, `name` +`Subclass` | Provides the list of references to nodes that can be the owner of this resource. | gauge | `type`, `owner_group`, `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ diff --git a/docs/collector.mscluster_resourcegroup.md b/docs/collector.mscluster_resourcegroup.md index 98d2e18a..44ad6d93 100644 --- a/docs/collector.mscluster_resourcegroup.md +++ b/docs/collector.mscluster_resourcegroup.md @@ -16,20 +16,20 @@ None Name | Description | Type | Labels -----|-------------|------|------- -`AutoFailbackType` | Provides access to the group's AutoFailbackType property. | guage | `name` -`Characteristics` | Provides the characteristics of the group. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | guage | `name` -`ColdStartSetting` | Indicates whether a group can start after a cluster cold start. | guage | `name` -`DefaultOwner` | Number of the last node the resource group was activated on or explicitly moved to. | guage | `name` -`FailbackWindowEnd` | The FailbackWindowEnd property provides the latest time that the group can be moved back to the node identified as its preferred node. | guage | `name` -`FailbackWindowStart` | 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. | guage | `name` -`FailoverPeriod` | The FailoverPeriod property specifies a number of hours during which a maximum number of failover attempts, specified by the FailoverThreshold property, can occur. | guage | `name` -`FailoverThreshold` | The FailoverThreshold property specifies the maximum number of failover attempts. | guage | `name` -`Flags` | Provides access to the flags set for the group. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | guage | `name` -`GroupType` | The Type of the resource group. | guage | `name` -`Priority` | Priority value of the resource group | guage | `name` -`ResiliencyPeriod` | The resiliency period for this group, in seconds. | guage | `name` -`State` | The current state of the resource group. -1: Unknown; 0: Online; 1: Offline; 2: Failed; 3: Partial Online; 4: Pending | guage | `name` -`UpdateDomain` | | guage | `name` +`AutoFailbackType` | Provides access to the group's AutoFailbackType property. | gauge | `name` +`Characteristics` | Provides the characteristics of the group. The cluster defines characteristics only for resources. For a description of these characteristics, see [CLUSCTL_RESOURCE_GET_CHARACTERISTICS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-characteristics). | gauge | `name` +`ColdStartSetting` | Indicates whether a group can start after a cluster cold start. | gauge | `name` +`DefaultOwner` | Number of the last node the resource group was activated on or explicitly moved to. | gauge | `name` +`FailbackWindowEnd` | The FailbackWindowEnd property provides the latest time that the group can be moved back to the node identified as its preferred node. | gauge | `name` +`FailbackWindowStart` | 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. | gauge | `name` +`FailoverPeriod` | The FailoverPeriod property specifies a number of hours during which a maximum number of failover attempts, specified by the FailoverThreshold property, can occur. | gauge | `name` +`FailoverThreshold` | The FailoverThreshold property specifies the maximum number of failover attempts. | gauge | `name` +`Flags` | Provides access to the flags set for the group. The cluster defines flags only for resources. For a description of these flags, see [CLUSCTL_RESOURCE_GET_FLAGS](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/mscs/clusctl-resource-get-flags). | gauge | `name` +`GroupType` | The Type of the resource group. | gauge | `name` +`Priority` | Priority value of the resource group | gauge | `name` +`ResiliencyPeriod` | The resiliency period for this group, in seconds. | gauge | `name` +`State` | The current state of the resource group. -1: Unknown; 0: Online; 1: Offline; 2: Failed; 3: Partial Online; 4: Pending | gauge | `name` +`UpdateDomain` | | gauge | `name` ### Example metric _This collector does not yet have explained examples, we would appreciate your help adding them!_ From fe7730a51bd69a36c9480478464893877f43b823 Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Tue, 11 Jan 2022 14:46:54 -0600 Subject: [PATCH 17/17] chore: adding links to the doc pages in the README Signed-off-by: Storie --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 17a38e82..c14b86e6 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ Name | Description | Enabled by default [logical_disk](docs/collector.logical_disk.md) | Logical disks, disk I/O | ✓ [logon](docs/collector.logon.md) | User logon sessions | [memory](docs/collector.memory.md) | Memory usage metrics | +[mscluster_cluster](docs/collector.mscluster_cluster.md) | MSCluster cluster metrics | +[mscluster_network](docs/collector.mscluster_network.md) | MSCluster network metrics | +[mscluster_node](docs/collector.mscluster_node.md) | MSCluster Node metrics | +[mscluster_resource](docs/collector.mscluster_resource.md) | MSCluster Resource metrics | +[mscluster_resourcegroup](docs/collector.mscluster_resourcegroup.md) | MSCluster ResourceGroup metrics | [msmq](docs/collector.msmq.md) | MSMQ queues | [mssql](docs/collector.mssql.md) | [SQL Server Performance Objects](https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/use-sql-server-objects#SQLServerPOs) metrics | [netframework_clrexceptions](docs/collector.netframework_clrexceptions.md) | .NET Framework CLR Exceptions |