gen2brain / keepalived_exporter

Keepalived Prometheus Exporter
Apache License 2.0
46 stars 14 forks source link

Exporter is unable to parse keepalived.data on CentOS 7 #8

Closed vpolikarpov closed 4 years ago

vpolikarpov commented 4 years ago

I'm running keepalived v1.3.5-6 on CentOS 7.6.1810 and the latest version of exporter with no extra options.

Exporter parses stats file perfectly, but fails to parse data file. Here is an example of /tmp/keepalived.data file head:

------< VRRP Topology >------
 VRRP Instance = foo
 VRRP Version = 2
   State = MASTER
   Last transition = 1582118865 (Wed Feb 19 13:27:45 2020)
   Listening device = ens192
   Using src_ip = 10.0.0.1
   Gratuitous ARP delay = 5
   Gratuitous ARP repeat = 5
...

Looks like the line containing VRRP version prevents exporter from parsing data since the line looks like the beginning of the new block of data.