mehdy / keepalived-exporter

Prometheus Keepalived exporter
GNU General Public License v3.0
121 stars 40 forks source link

Occasional wrong result keepalived_up=0 #75

Closed bpetermannS11 closed 1 year ago

bpetermannS11 commented 3 years ago

Occasionally the exporter returns no keepalived metrics and keepalived_up = 0 even though the keepalived works fine. In the exporter log there are lines

level=error msg="keepalived.data and keepalived.stats datas are not synced"
level=error msg="No data found to be exported" error="keepalived.data and keepalived.stats datas are not synced"

keepalived-exporter version 1.2.0 on Ubuntu 18.04.5 LTS, keepalived version is 1.3.9 without support for JSON output, so stats/data is used.

One explanation could be that keepalived takes too long to write the stats or data file after the SIGSTATS/SIGDATA signal. Waiting 10 ms as in keepalived_container_collector_host.go:115 may not always be enough.

bondif commented 3 years ago

I have the same problem

mehdy commented 1 year ago

Sorry for the very long delay. I'll investigate soon.