hansmi / prometheus-lvm-exporter

Prometheus exporter for LVM metrics.
BSD 3-Clause "New" or "Revised" License
22 stars 5 forks source link

Ancestors/Descendents not parsed correctly #1

Closed dsnt02518 closed 2 years ago

dsnt02518 commented 2 years ago

I've just been looking at using this for monitoring our LVM snapshot usage, and found that running with snapshots causes a scrape parse error:

lvm_up{status="4 error(s) occurred:\n* field lv_ancestors: strconv.ParseFloat: parsing \"lv_home\": invalid syntax\n* field lv_descendants: strconv.ParseFloat: parsing \"test_snapshot\": invalid syntax\n* field lv_full_ancestors: strconv.ParseFloat: parsing \"lv_home\": invalid syntax\n* field lv_full_descendants: strconv.ParseFloat: parsing \"test_snapshot\": invalid syntax"} 0

It seems that the fields lv_ancestors, lv_descendants, lv_full_ancestors and lv_full_descendants are being parsed as metrics, when they should be considered information fields. Moving these fields from metricFields into infoFields seems to resolve the issue.

hansmi commented 2 years ago

@dsnt02518, thank you again for #2. Do you want me to tag a new release or do you use your own build anyway?

dsnt02518 commented 2 years ago

We're using our own build, but would be happier if we could be using an official upstream release. No hurry though, and thanks for merging.

On Fri, 3 Dec 2021 at 16:02, hansmi @.***> wrote:

@dsnt02518 https://github.com/dsnt02518, thank you again for #2 https://github.com/hansmi/prometheus-lvm-exporter/pull/2. Do you want me to tag a new release or do you use your own build anyway?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hansmi/prometheus-lvm-exporter/issues/1#issuecomment-985637361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETQITN6UKLCCXR327GNLRTUPDSYVANCNFSM5JGSMCNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

hansmi commented 2 years ago

I've tagged version 0.3.0 and made a release out of it (https://github.com/hansmi/prometheus-lvm-exporter/releases/tag/v0.3.0).

dsnt02518 commented 2 years ago

Perfect, many thanks.