mehdy / keepalived-exporter

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

Recurring warning about unkown script state with keepalived 1.3.5 #57

Closed fpicot closed 3 years ago

fpicot commented 4 years ago

Running keepalived-exporter 1.1.0 with keepalived 1.3.5 returns a recurring warning in the logs :

keepalived-exporter: time="2020-10-23T15:40:13+02:00" level=warning msg="Unknown state" name=node_status state=

It seems that the exporter tries to get the script state here : https://github.com/cafebazaar/keepalived-exporter/blob/7f70713c5b9d41121339e7e5195f91df9147fb1d/internal/collector/collector.go#L176

However, keepalived 1.3.5 does not expose this information in the data, only the status.

The warning can be safely ignored, but spam the logs with false positives.

mehdy commented 4 years ago

Thanks for the report. You're right. I think this should be removed as well. @clwluvw What's your thoughts on this? Should we log this only if we expected keepalived to provide it?

clwluvw commented 4 years ago

@mehdy Do you think should we log this warn if state isn't empty in any keepalived versions or just for versions that doesn't support script state?

mehdy commented 4 years ago

@clwluvw I think we should warn only if we expected the state to be non-empty (e.g. certain versions of keepalived). So I think it's better to decide based on the version.

clwluvw commented 4 years ago

@mehdy I think this can be done after #55