masterha_manager参数说明

masterha_manager: Command to run MHA Manager

MHA Manager can be started by executing masterha_manager command.

1
# masterha_manager --conf=/etc/conf/masterha/app1.cnf

masterha_manager takes below arguments.

Common arguments

  • –conf=(config file path)

    Application and local scope configuration file. This argument is mandatory.

  • –global_conf=(global config file path)

    Global scope configuration file. Default is /etc/masterha_default.cnf

  • –manager_workdir, –workdir

    Same as manager_workdir parameter.

  • –manager_log, –log_output

    Same as manager_log parameter.

Monitoring specific arguments

  • –wait_on_monitor_error=(seconds)

    如果再监控过程中发生了错误,masterha_manager sleep wait_on_monitor_error 秒然后退出.默认值是0.此功能主要用于从守护程序脚本执行自动化主监控和故障转移。 在重新启动监视之前等待一段时间的错误是非常合理的。

    This functionality is mainly introduced for doing automated master monitoring and failover from daemon scripts. It is pretty reasonable for waiting for some time on errors before restarting monitoring again.

  • –ignore_fail_on_start

    当有slave 节点宕掉时,默认是启动不了的,加上 –ignore_fail_on_start 即使有节点宕掉也能启动MHA,加上该参数会忽略启动文件中配置ignore_fail=1的server

Failover specific arguments

  • –last_failover_minute=(minutes)

    1
    当最近的一个failover 切换发生在last_failover_minute(默认为8小时) 之内,MHA manager 将不会在切换。因为它会认为有些问题没有得到解决。如果设置了 --ignore_last_failover 参数,参数(--last_failover_minute) 将会失效
  • –ignore_last_failover

    1
    如果最近failover 失败,MHA 将不会再次开始failover机制,因为这个问题可能再次发生。常规步骤:手动清理failover 错误文件,此文件一般在manager_workdir/app_name.failover.error文件,然后在启动failover机制。如果设置此参数,MHA 将会继续failover 不管上次的failover状态
  • –wait_on_failover_error=(seconds)

    在failover的过程,当发出错误了,masterha_manager 等待 wait_no_failover_error 的时间后,退出。如果设置为了0,直接退出。这个好处,是当后台运行master monitor 和 failover scripts的时候,masterha_manager 可以在 wait_no_failover_error 时间到达之前重启监控
    
  • –remove_dead_master_conf

    1
    2
    如果设置此参数,当成功failover后,MHA manager将会自动删除配置文件中关于dead master的配置选项。
    eg: For example, if the dead master's hostname is host1 and it belongs to the section of server1, the entire part of the server1 will be removed from the configuration file. By default, the configuration file is not modified at all. After MHA finishes failover, the section of the dead master still exists. If you start masterha_manager immediately (this includes automatic restart from any daemon program), masterha_manager stops with an error that "there is a dead slave" (previous dead master). You might want to change this behavior especially if you want to continuously monitor and failover MySQL master automatically. In such cases, --remove_dead_master_conf argument is helpful.

Powered by Hexo and Hexo-theme-hiker

Copyright © 2013 - 2018 Fan() All Rights Reserved.

访客数 : | 访问量 :

#