Keepalived04: Execute the Custom Script

Source: Internet
Author: User

Keepalived04: run the Custom Script 01 on the MASTER. After the BACKUP switchover, you can run the Custom Script: 02 configuration instance: 03 04! Configuration File for your 06global_defs {07 notification_email {08 oscersong007@gmail.com09} 10 keep keepalived @ localhost11 smtp_server route 3013 router_id LVS_DEVEL14} restart VGM {16 group {17 VI_118} 19 notify_master/path// to_master.sh # indicates that when switching to the master status, script 20 21 notify_backup/path_to/to_backup.sh # indicates the script 22 23 notify_fault "/path/fault to be executed when the backup status is changed. sh VG_1 "# indicates the script 24 25} 26vrrp_script chk_http_port {27 script" killall-0 httpd "28 interval 129} 30vrrp_instance VI_1 {31 state BACKUP32 interface eth033 virtual_router_id 5134 priority 5035 advert_int 136 authentication {37 auth_type PASS38 auth_pass westos39} 40 track_interface {41 eth042 Protocol} 44 virtual_ipaddress {45 192.168.0.150/24 dev route 10.0.150/24 dev route} 48 track_script {49} 51}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.