What is the default interval value for vrrp_script in RHEL?
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Issue
- What is the default interval value for vrrp_script in RHEL?
Resolution
# Adds a script to be executed periodically. Its exit code will be
# recorded for all VRRP instances and sync groups which are monitoring it.
vrrp_script <SCRIPT_NAME> {
# path of the script to execute
script <STRING>|<QUOTED-STRING>
# seconds between script invocations, (default: 1 second) <<<<<<<<<<<<<<
interval <INTEGER>
Root Cause
The default interval value for vrrp_script
which means how often the script should be run in seconds.
Diagnostic Steps
Default Interval value can be set in /etc/keepalived/keepalived.conf
vrrp_script keepalived_check {
script "/usr/local/bin/keepalived_check.sh"
interval 15 <<<<< (Interval set to 15 sec)
timeout 5
rise 3
fall 3
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 244
advert_int 1
authentication {
auth_type PASS
auth_pass 12345
}
virtual_ipaddress {
192.168.122.200/24
}
track_script {
keepalived_check
}
}
For more information please refer man page of keepalived.conf # man keepalived.conf
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments