mehdy / keepalived-exporter

Prometheus Keepalived exporter
GNU General Public License v3.0
115 stars 37 forks source link

fix: adapt parsing logic for keepalived v2.2.7 #88

Closed vin01 closed 1 year ago

vin01 commented 1 year ago

might fix https://github.com/mehdy/keepalived-exporter/issues/84

I noticed this on a recent keepalived 2.2.7 version where no keepalived_vrrp_state was being reported.

looks like the format has been updated to reflect a count along with Virtual IP string, see https://github.com/acassen/keepalived/commit/8e0371a1598e4669213a73d40c20e1e378a5b7e3#diff-0223680d17d787f6b86e04dc2f561503d4e8331d7e5f494ec98fb397733ea285L736

please review.

mehdy commented 1 year ago

@vin01 Thanks for the PR. It seems about right. Just make sure to format the code properly, please.

vin01 commented 1 year ago

@vin01 Thanks for the PR. It seems about right. Just make sure to format the code properly, please.

ah my bad, just re-formatted and pushed! please take a look