From 48e54e8513a6a4ffe941500799352ac44df9032b Mon Sep 17 00:00:00 2001 From: Sam Storie Date: Sun, 9 Jan 2022 19:58:12 -0600 Subject: [PATCH] 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!_