[Keepalived-devel] Binding to the VIP
Status: Beta
Brought to you by:
acassen
|
From: 700 g. <70...@gm...> - 2019-05-17 09:13:41
|
Hi,
I have 2 SNMPD services that are configured to bind to VIP:
snmpd configuration:
agentAddress udp:10.12.4.51:161
agentAddress udp:10.12.4.52:161
However "notify" option is starting SNMP agents before VIPs are moved, and
because of it it cannot start services as there are still no VIPs
How to configure keepalived to move VIPs initially even when vrrp_script
is failing at first, I've tried global_defs and vrrp_script
######## CONFIGURATION ###############
! Configuration File for keepalived
global_defs {
router_id snmpservers
vrrp_mcast_group4 224.0.0.18
script_user root root
enable_script_security
}
vrrp_script chk_snmpd {
script '/usr/bin/pkill -0 snmpd'
interval 1
fall 1
rise 1
}
vrrp_instance VI_1 {
state MASTER
interface ens160
virtual_router_id 1
priority 150
advert_int 1
authentication {
auth_type PASS
auth_pass 12345678
}
notify /etc/keepalived/start-snmpd-agents.sh
virtual_ipaddress {
10.12.4.51/24
10.12.4.52/24
}
track_script {
chk_snmpd
}
}
########## END ######################
|