You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ go get github.com/ClusterLabs/ha_cluster_exporter
48
48
```
49
49
50
50
### RPM
51
-
You can find the repositories for RPM based distributions in [SUSE's Open Build Service](https://build.opensuse.org/repositories/server:monitoring/prometheus-ha_cluster_exporter).
51
+
You can find the repositories for RPM based distributions in [SUSE's Open Build Service](https://build.opensuse.org/package/show/server:monitoring/prometheus-ha_cluster_exporter).
52
52
On openSUSE or SUSE Linux Enterprise you can just use the `zypper` system package manager:
@@ -92,13 +90,6 @@ Either the value is `1`, or the line is absent altogether.
92
90
The total number of lines for this metric will be the cardinality of `name` times the cardinality of `status`.
93
91
94
92
95
-
### `ha_cluster_pacemaker_nodes_total`
96
-
97
-
#### Description
98
-
99
-
The total number of *configured* nodes in the cluster. This value is mostly static and *does not* take into account the status of the nodes. It only changes when the Pacemaker configuration changes.
100
-
101
-
102
93
### `ha_cluster_pacemaker_resources`
103
94
104
95
#### Description
@@ -117,13 +108,6 @@ Either the value is `1`, or the line is absent altogether.
117
108
The total number of lines for this metric will be the cardinality of `id` times the cardinality of `status`.
118
109
119
110
120
-
### `ha_cluster_pacemaker_resources_total`
121
-
122
-
#### Description
123
-
124
-
The total number of *configured* resources in the cluster. This value is mostly static and *does not* take into account the status of the resources. It only changes when the Pacemaker configuration changes.
125
-
126
-
127
111
### `ha_cluster_pacemaker_stonith_enabled`
128
112
129
113
#### Description
@@ -139,7 +123,7 @@ The Corosync subsystem collects cluster quorum votes and ring status by parsing
Copy file name to clipboardExpand all lines: drbd_metrics.go
+21-25Lines changed: 21 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -43,41 +43,37 @@ type drbdStatus struct {
43
43
} `json:"connections"`
44
44
}
45
45
46
-
var (
47
-
drbdMetrics=metricDescriptors{
48
-
// the map key will function as an identifier of the metric throughout the rest of the code;
49
-
// it is arbitrary, but by convention we use the actual metric name
50
-
"resources": NewMetricDesc("drbd", "resources", "The DRBD resources; 1 line per name, per volume", []string{"resource", "role", "volume", "disk_state"}),
51
-
"written": NewMetricDesc("drbd", "written", "KiB written to DRBD; 1 line per res, per volume", []string{"resource", "volume"}),
52
-
"read": NewMetricDesc("drbd", "read", "KiB read from DRBD; 1 line per res, per volume", []string{"resource", "volume"}),
53
-
"al_writes": NewMetricDesc("drbd", "al_writes", "Writes to activity log; 1 line per res, per volume", []string{"resource", "volume"}),
54
-
"bm_writes": NewMetricDesc("drbd", "bm_writes", "Writes to bitmap; 1 line per res, per volume", []string{"resource", "volume"}),
55
-
"upper_pending": NewMetricDesc("drbd", "upper_pending", "Upper pending; 1 line per res, per volume", []string{"resource", "volume"}),
56
-
"lower_pending": NewMetricDesc("drbd", "lower_pending", "Lower pending; 1 line per res, per volume", []string{"resource", "volume"}),
57
-
"quorum": NewMetricDesc("drbd", "quorum", "Quorum status per resource and per volume", []string{"resource", "volume"}),
58
-
"connections": NewMetricDesc("drbd", "connections", "The DRBD resource connections; 1 line per per resource, per peer_node_id", []string{"resource", "peer_node_id", "peer_role", "volume", "peer_disk_state"}),
59
-
"connections_sync": NewMetricDesc("drbd", "connections_sync", "The in sync percentage value for DRBD resource connections", []string{"resource", "peer_node_id", "volume"}),
60
-
"connections_received": NewMetricDesc("drbd", "connections_received", "KiB received per connection", []string{"resource", "peer_node_id", "volume"}),
61
-
"connections_sent": NewMetricDesc("drbd", "connections_sent", "KiB sent per connection", []string{"resource", "peer_node_id", "volume"}),
62
-
"connections_pending": NewMetricDesc("drbd", "connections_pending", "Pending value per connection", []string{"resource", "peer_node_id", "volume"}),
63
-
"connections_unacked": NewMetricDesc("drbd", "connections_unacked", "Unacked value per connection", []string{"resource", "peer_node_id", "volume"}),
64
-
"split_brain": NewMetricDesc("drbd", "split_brain", "Whether a split brain has been detected; 1 line per resource, per volume.", []string{"resource", "volume"}),
returnnil, errors.Wrap(err, "could not initialize DRBD collector")
72
50
}
73
51
74
-
return&drbdCollector{
52
+
collector:=&drbdCollector{
75
53
DefaultCollector{
76
-
metrics: drbdMetrics,
54
+
subsystem: "drbd",
77
55
},
78
56
drbdSetupPath,
79
57
drbdSplitBrainPath,
80
-
}, nil
58
+
}
59
+
60
+
collector.setDescriptor("resources", "The DRBD resources; 1 line per name, per volume", []string{"resource", "role", "volume", "disk_state"})
61
+
collector.setDescriptor("written", "KiB written to DRBD; 1 line per res, per volume", []string{"resource", "volume"})
62
+
collector.setDescriptor("read", "KiB read from DRBD; 1 line per res, per volume", []string{"resource", "volume"})
63
+
collector.setDescriptor("al_writes", "Writes to activity log; 1 line per res, per volume", []string{"resource", "volume"})
64
+
collector.setDescriptor("bm_writes", "Writes to bitmap; 1 line per res, per volume", []string{"resource", "volume"})
65
+
collector.setDescriptor("upper_pending", "Upper pending; 1 line per res, per volume", []string{"resource", "volume"})
66
+
collector.setDescriptor("lower_pending", "Lower pending; 1 line per res, per volume", []string{"resource", "volume"})
67
+
collector.setDescriptor("quorum", "Quorum status per resource and per volume", []string{"resource", "volume"})
68
+
collector.setDescriptor("connections", "The DRBD resource connections; 1 line per per resource, per peer_node_id", []string{"resource", "peer_node_id", "peer_role", "volume", "peer_disk_state"})
69
+
collector.setDescriptor("connections_sync", "The in sync percentage value for DRBD resource connections", []string{"resource", "peer_node_id", "volume"})
70
+
collector.setDescriptor("connections_received", "KiB received per connection", []string{"resource", "peer_node_id", "volume"})
71
+
collector.setDescriptor("connections_sent", "KiB sent per connection", []string{"resource", "peer_node_id", "volume"})
72
+
collector.setDescriptor("connections_pending", "Pending value per connection", []string{"resource", "peer_node_id", "volume"})
73
+
collector.setDescriptor("connections_unacked", "Unacked value per connection", []string{"resource", "peer_node_id", "volume"})
74
+
collector.setDescriptor("split_brain", "Whether a split brain has been detected; 1 line per resource, per volume.", []string{"resource", "volume"})
0 commit comments