View file File name : keepalived.conf Content :UserParameter=keepalived.vrrp_instance,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | grep -oP '(VRRP Instance: \s*\K\w+)' ### Advertisements ### UserParameter=keepalived.ads_received,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Advertisements:/,$p' | head -3 | grep -oP '(Received: \s*\K\d+)' UserParameter=keepalived.ads_sent,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Advertisements:/,$p' | head -3 | grep -oP '(Sent: \s*\K\d+)' UserParameter=keepalived.ads_became,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | grep -oP '(Became master: \s*\K\d+)' UserParameter=keepalived.ads_release,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | grep -oP '(Released master: \s*\K\d+)' ### Packet Errros ### UserParameter=keepalived.packet_errors_length,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Packet Errors:/,$p' | head -6 | grep -oP '(Length: \s*\K\d+)' UserParameter=keepalived.packet_errors_ttl,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Packet Errors:/,$p' | head -6 | grep -oP '(TTL: \s*\K\d+)' UserParameter=keepalived.packet_errors_invalid_type,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Packet Errors:/,$p' | head -6 | grep -oP '(Invalid Type: \s*\K\d+)' UserParameter=keepalived.packet_errors_ads_interval,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Packet Errors:/,$p' | head -6 | grep -oP '(Advertisement Interval: \s*\K\d+)' UserParameter=keepalived.packet_errors_address_list,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Packet Errors:/,$p' | head -6 | grep -oP '(Address List: \s*\K\d+)' ### Auth Errors ### UserParameter=keepalived.auth_error_type,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Authentication Errors:/,$p' | head -4 | grep -oP '(Invalid Type: \s*\K\d+)' UserParameter=keepalived.auth_error_mismatch,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Authentication Errors:/,$p' | head -4 | grep -oP '(Type Mismatch: \s*\K\d+)' UserParameter=keepalived.auth_error_failure,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Authentication Errors:/,$p' | head -4 | grep -oP '(Failure: \s*\K\d+)' ### Priority Zero ### UserParameter=keepalived.priority_zero_received,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Priority Zero:/,$p' | head -3 | grep -oP '(Received: \s*\K\d+)' UserParameter=keepalived.priority_zero_sent,sudo kill -s $(keepalived --signum=STATS) $(sudo cat /var/run/keepalived.pid) && sudo cat /tmp/keepalived.stats | sed -n -e '/Priority Zero:/,$p' | head -3 | grep -oP '(Sent: \s*\K\d+)'