Skip to content

Commit

Permalink
Add labels with major and minor numbers to the respective metric
Browse files Browse the repository at this point in the history
Joining metric values as labels is not possible in PromQL without
separate processing. The labels added for the major and minor numbers
can be joined to an info metric, for example.
  • Loading branch information
hansmi committed Dec 17, 2024
1 parent ed6ce99 commit d410242
Show file tree
Hide file tree
Showing 14 changed files with 248 additions and 218 deletions.
5 changes: 5 additions & 0 deletions field.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ type fieldFlag uint
const (
// Whether the field should be included as a label on an info metric.
asInfoLabel fieldFlag = 1 << iota

// Include the raw field value as a label on the metric.
asRawLabel
)

type field interface {
Expand Down Expand Up @@ -52,6 +55,8 @@ type numericField struct {
fieldName string
desc string

flags fieldFlag

metricName string
metricValue metricValueFunc
}
Expand Down
23 changes: 21 additions & 2 deletions groupcollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
)

type groupField struct {
rawLabel bool
convert metricValueFunc
metricDesc *prometheus.Desc
}
Expand All @@ -22,7 +23,17 @@ func (f *groupField) collect(ch chan<- prometheus.Metric, rawValue string, keyVa
return err
}

ch <- prometheus.MustNewConstMetric(f.metricDesc, prometheus.GaugeValue, value, keyValues...)
labels := keyValues

if f.rawLabel {
labels = defaultStringSlicePool.get()
defer defaultStringSlicePool.put(labels)

labels = append(labels, keyValues...)
labels = append(labels, rawValue)
}

ch <- prometheus.MustNewConstMetric(f.metricDesc, prometheus.GaugeValue, value, labels...)

return nil
}
Expand Down Expand Up @@ -87,9 +98,17 @@ func newGroupCollector(enableLegacyInfoLabels bool, g *group) *groupCollector {
}

for _, f := range g.numericFields {
labelNames := keyLabelNames

if f.flags&asRawLabel != 0 {
labelNames = slices.Clone(labelNames)
labelNames = append(labelNames, f.metricName)
}

info := &groupField{
rawLabel: f.flags&asRawLabel != 0,
convert: f.metricValue,
metricDesc: prometheus.NewDesc(f.metricName, f.desc, keyLabelNames, nil),
metricDesc: prometheus.NewDesc(f.metricName, f.desc, labelNames, nil),
}
if info.convert == nil {
info.convert = fromNumeric
Expand Down
4 changes: 4 additions & 0 deletions lv.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,13 @@ var lvGroup = &group{
{
fieldName: "lv_kernel_major",
metricName: "lv_kernel_major",
flags: asRawLabel,
desc: "Currently assigned major number or -1 if LV is not active",
},
{
fieldName: "lv_kernel_minor",
metricName: "lv_kernel_minor",
flags: asRawLabel,
desc: "Currently assigned minor number or -1 if LV is not active",
},
{
Expand All @@ -371,6 +373,7 @@ var lvGroup = &group{
{
fieldName: "lv_major",
metricName: "lv_major",
flags: asRawLabel,
desc: "Persistent major number or -1 if not persistent",
},
{
Expand All @@ -391,6 +394,7 @@ var lvGroup = &group{
{
fieldName: "lv_minor",
metricName: "lv_minor",
flags: asRawLabel,
desc: "Persistent minor number or -1 if not persistent",
},
{
Expand Down
2 changes: 2 additions & 0 deletions pv.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var pvGroup = &group{
{
fieldName: "pv_major",
metricName: "pv_major",
flags: asRawLabel,
desc: "Device major number",
},
{
Expand All @@ -99,6 +100,7 @@ var pvGroup = &group{
{
fieldName: "pv_minor",
metricName: "pv_minor",
flags: asRawLabel,
desc: "Device minor number",
},
{
Expand Down
56 changes: 28 additions & 28 deletions testdata/mirrored-legacy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ lvm_lv_kernel_discards{lv_kernel_discards="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT
lvm_lv_kernel_discards{lv_kernel_discards="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_kernel_major Currently assigned major number or -1 if LV is not active
# TYPE lvm_lv_kernel_major gauge
lvm_lv_kernel_major{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 253
lvm_lv_kernel_major{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} 253
lvm_lv_kernel_major{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} 253
lvm_lv_kernel_major{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} 253
lvm_lv_kernel_major{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} 253
lvm_lv_kernel_major{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} 253
lvm_lv_kernel_major{lv_kernel_major="253",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 253
# HELP lvm_lv_kernel_metadata_format Cache metadata format used in kernel
# TYPE lvm_lv_kernel_metadata_format gauge
lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand All @@ -259,12 +259,12 @@ lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="gLHiHN-1hen-
lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_kernel_minor Currently assigned minor number or -1 if LV is not active
# TYPE lvm_lv_kernel_minor gauge
lvm_lv_kernel_minor{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 3
lvm_lv_kernel_minor{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} 2
lvm_lv_kernel_minor{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} 4
lvm_lv_kernel_minor{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} 5
lvm_lv_kernel_minor{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} 0
lvm_lv_kernel_minor{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
lvm_lv_kernel_minor{lv_kernel_minor="0",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} 0
lvm_lv_kernel_minor{lv_kernel_minor="1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
lvm_lv_kernel_minor{lv_kernel_minor="2",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} 2
lvm_lv_kernel_minor{lv_kernel_minor="3",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 3
lvm_lv_kernel_minor{lv_kernel_minor="4",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} 4
lvm_lv_kernel_minor{lv_kernel_minor="5",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} 5
# HELP lvm_lv_kernel_read_ahead_bytes Currently-in-use read ahead setting
# TYPE lvm_lv_kernel_read_ahead_bytes gauge
lvm_lv_kernel_read_ahead_bytes{lv_kernel_read_ahead_bytes="131072",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand Down Expand Up @@ -299,12 +299,12 @@ lvm_lv_lockargs{lv_lockargs="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"}
lvm_lv_lockargs{lv_lockargs="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_major Persistent major number or -1 if not persistent
# TYPE lvm_lv_major gauge
lvm_lv_major{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_major{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_major{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_major{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_major{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_major{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_major{lv_major="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_major{lv_major="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_major{lv_major="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_major{lv_major="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_major{lv_major="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_major{lv_major="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_merge_failed Set if snapshot merge failed
# TYPE lvm_lv_merge_failed gauge
lvm_lv_merge_failed{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
Expand Down Expand Up @@ -339,12 +339,12 @@ lvm_lv_metadata_lv_uuid{lv_metadata_lv_uuid="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26
lvm_lv_metadata_lv_uuid{lv_metadata_lv_uuid="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_minor Persistent minor number or -1 if not persistent
# TYPE lvm_lv_minor gauge
lvm_lv_minor{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_minor{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_minor{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_minor{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_minor{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_minor{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_mirror_log For mirrors, the LV holding the synchronisation log
# TYPE lvm_lv_mirror_log gauge
lvm_lv_mirror_log{lv_mirror_log="",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand Down Expand Up @@ -585,8 +585,8 @@ lvm_pv_info{pv_attr="a--",pv_fmt="lvm2",pv_name="/dev/loop0",pv_tags="",pv_uuid=
lvm_pv_info{pv_attr="a--",pv_fmt="lvm2",pv_name="/dev/loop1",pv_tags="",pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 1
# HELP lvm_pv_major Device major number
# TYPE lvm_pv_major gauge
lvm_pv_major{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 7
lvm_pv_major{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 7
lvm_pv_major{pv_major="7",pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 7
lvm_pv_major{pv_major="7",pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 7
# HELP lvm_pv_mda_count Number of metadata areas
# TYPE lvm_pv_mda_count gauge
lvm_pv_mda_count{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 1
Expand All @@ -605,8 +605,8 @@ lvm_pv_mda_used_count{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 1
lvm_pv_mda_used_count{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 1
# HELP lvm_pv_minor Device minor number
# TYPE lvm_pv_minor gauge
lvm_pv_minor{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_minor{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 1
lvm_pv_minor{pv_minor="0",pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_minor{pv_minor="1",pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 1
# HELP lvm_pv_missing Set if this device is missing in system
# TYPE lvm_pv_missing gauge
lvm_pv_missing{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
Expand Down
56 changes: 28 additions & 28 deletions testdata/mirrored-unhealthy-legacy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ lvm_lv_kernel_discards{lv_kernel_discards="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT
lvm_lv_kernel_discards{lv_kernel_discards="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_kernel_major Currently assigned major number or -1 if LV is not active
# TYPE lvm_lv_kernel_major gauge
lvm_lv_kernel_major{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_kernel_major{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_kernel_major{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_kernel_major{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_kernel_major{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_kernel_major{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_kernel_major{lv_kernel_major="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_kernel_metadata_format Cache metadata format used in kernel
# TYPE lvm_lv_kernel_metadata_format gauge
lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand All @@ -256,12 +256,12 @@ lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="gLHiHN-1hen-
lvm_lv_kernel_metadata_format{lv_kernel_metadata_format="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_kernel_minor Currently assigned minor number or -1 if LV is not active
# TYPE lvm_lv_kernel_minor gauge
lvm_lv_kernel_minor{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_kernel_minor{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_kernel_minor{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_kernel_minor{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_kernel_minor{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_kernel_minor{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_kernel_minor{lv_kernel_minor="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_kernel_read_ahead_bytes Currently-in-use read ahead setting
# TYPE lvm_lv_kernel_read_ahead_bytes gauge
lvm_lv_kernel_read_ahead_bytes{lv_kernel_read_ahead_bytes="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand Down Expand Up @@ -296,12 +296,12 @@ lvm_lv_lockargs{lv_lockargs="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"}
lvm_lv_lockargs{lv_lockargs="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_major Persistent major number or -1 if not persistent
# TYPE lvm_lv_major gauge
lvm_lv_major{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_major{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_major{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_major{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_major{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_major{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_major{lv_major="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_major{lv_major="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_major{lv_major="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_major{lv_major="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_major{lv_major="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_major{lv_major="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_merge_failed Set if snapshot merge failed
# TYPE lvm_lv_merge_failed gauge
lvm_lv_merge_failed{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
Expand Down Expand Up @@ -336,12 +336,12 @@ lvm_lv_metadata_lv_uuid{lv_metadata_lv_uuid="",lv_uuid="gLHiHN-1hen-1gy2-asXt-26
lvm_lv_metadata_lv_uuid{lv_metadata_lv_uuid="",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} 1
# HELP lvm_lv_minor Persistent minor number or -1 if not persistent
# TYPE lvm_lv_minor gauge
lvm_lv_minor{lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_minor{lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_minor{lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_minor{lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_minor{lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_minor{lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="LlZ3Rq-bBXT-f36k-oPQn-WdcR-OQ2I-KzVfIh"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="O8BdUR-sp9G-y52K-kdc7-wyP0-aMqR-6Ls234"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="X5tkZ2-pzPA-Aumf-lCF1-eKI8-AuPk-lf1VHq"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="gLHiHN-1hen-1gy2-asXt-26ZT-UCrh-Va08BP"} -1
lvm_lv_minor{lv_minor="-1",lv_uuid="ijb7Yx-rXx5-uU9j-Gv5g-eZi4-yYX8-o3yNJu"} -1
# HELP lvm_lv_mirror_log For mirrors, the LV holding the synchronisation log
# TYPE lvm_lv_mirror_log gauge
lvm_lv_mirror_log{lv_mirror_log="",lv_uuid="Egw38P-CT81-ZnK0-vBC3-iEnY-11XL-mz23e1"} 1
Expand Down Expand Up @@ -575,8 +575,8 @@ lvm_pv_info{pv_attr="a--",pv_fmt="lvm2",pv_name="/dev/loop0",pv_tags="",pv_uuid=
lvm_pv_info{pv_attr="a-m",pv_fmt="lvm2",pv_name="[unknown]",pv_tags="",pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 1
# HELP lvm_pv_major Device major number
# TYPE lvm_pv_major gauge
lvm_pv_major{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_major{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 7
lvm_pv_major{pv_major="0",pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_major{pv_major="7",pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 7
# HELP lvm_pv_mda_count Number of metadata areas
# TYPE lvm_pv_mda_count gauge
lvm_pv_mda_count{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
Expand All @@ -595,8 +595,8 @@ lvm_pv_mda_used_count{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_mda_used_count{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 1
# HELP lvm_pv_minor Device minor number
# TYPE lvm_pv_minor gauge
lvm_pv_minor{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_minor{pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 0
lvm_pv_minor{pv_minor="0",pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 0
lvm_pv_minor{pv_minor="0",pv_uuid="yc1zVe-9eOY-3bsX-qwqN-Wkk0-eDze-Rgrmzh"} 0
# HELP lvm_pv_missing Set if this device is missing in system
# TYPE lvm_pv_missing gauge
lvm_pv_missing{pv_uuid="WVIH97-eRwc-thU9-mCj9-80zl-UDp6-VlhBOg"} 1
Expand Down
Loading

0 comments on commit d410242

Please sign in to comment.