Keepalived provides an SNMP subsystem that can gather various metrics about the
VRRP stack and the health checker system. The keepalived MIB is in
directory of the project. The base SNMP OID for the MIB is
, which is hosted under the
Debian OID space
assigned by IANA.
Install the SNMP protocol tools and libraries onto your system. This requires
the installation of a few packages:
Once SNMP has been installed on your system, configure keepalived with SNMP
support. When compiling keepalived, add the --enable-snmp configure
option. For example:
During the configure step of the compiling process, you will get a
configuration summary before building with make. For example, you may see
similar output on a CentOS 6 machine:
The VRRP section includes objects that contain information about each
configured VRRP instance. Within each instance, there are objects that include
instance name, current state, and virtual IP addresses.
The Check section includes objects that contain information about each
configured virtual server. It includes server tables for virtual and real
servers and also configured load balancing algorithms, load balancing method,
protocol, status, real and virtual server network connection statistics.