kingbaseV7standby配置参数

V7standby配置参数

  • 主库ip为192.168.174.111
  • 备库ip为192.168.174.112
  • 浮动ip为192.168.174.113

主库配置

[standby]
#this resource managed by the standby or not
#此资源是否由备用服务器管理
managed						= false
#debug the system, if it's true, will output 
#more information to the standby log file.
#调试系统,如果为真,将输出
#有关备用日志文件的详细信息。
is_debug					= false
#if it's true the log message will have
#the timestamp at it's head.
#如果这是真的,日志消息将具有
#头部的时间戳。
log_timestamp				= true
#the standby listenning port.
#备用侦听端口。
local_server_port			= 54322
#remote server's IP address
#远程服务器的IP地址
remote_server_ip			= 192.168.174.112 		-- 对方ip
#remote standby port
#远程备用端口
remote_server_port			= 54322
#standby log directory 
#备用日志目录
log_dir						= '/home/kingbase/ES/log'
#standby log file name pattern.
#备用日志文件名模式。
standby_log					= "standby-%w.log" 
#servermode primary  standby
#服务器模式主备用
server_mode					= primary
#how many times let ha switch, 0 indicate that 
#do not use this property.
#让ha切换多少次,0表示
#不要使用此属性。
kingbase_fault_num			= 0
# true : enable float ip,false : disable float ip
# true:启用浮点ip,false:禁用浮点ip
enable_float_ip				= true
#example : floatip_readonly_addcmd =       
#"/sbin/ifconfig eth0:0 192.168.4.230 netmask 255.255.240.0"
#example : floatip_readonly_delcmd = 
#"/sbin/ifconfig eth0:0 down"
#for standby server
#示例:floatip\u readonly\u addcmd=
#“/sbin/ifconfig eth0:0 192.168.4.230网络掩码255.255.240.0”
#示例:floatip\u readonly\u delcmd=
#“/sbin/ifconfig eth0:0向下”
#用于备用服务器
floatip_readonly_addcmd		= ""
floatip_readonly_delcmd		= ""
#for primary server
#对于主服务器
floatip_readwrite_addcmd	= "/home/kingbase/ES/V7/config/ifconfigadd.sh eno16777736:0 192.168.174.113 255.255.255.0" -- 浮动ip
floatip_readwrite_delcmd	= "/home/kingbase/ES/V7/config/ifconfigdown.sh eno16777736:0"

#the special resource kingbase
#特种资源基地
[kingbase]
#this resource managed by the standby or not
#此资源是否由备用服务器管理
managed						= false
#for check the network
#用于检查网络
lifecheck_interval			= 2
#kingbase log file name pattern.
#kingbase日志文件名模式。
kingbase_log				= "kingbase-%w.log"
#kingbase binary directory
#kingbase二进制目录
bin_dir						= '/home/kingbase/ES/V7/bin'
#kingbase data directory
#kingbase数据目录
data_dir					= '/home/kingbase/ES/V7/data'
#for kingbase to store the archive log
#供kingbase存储归档日志
log_archive_dest			= "/home/kingbase/archive"
#ip address & port of primary kingbase
#example : primary_conninfo = "host=127.0.0.1 port=1234"
#主kingbase的ip地址和端口
#示例:primary_conninfo=“主机=127.0.0.1端口=1234”
    primary_conninfo			= "host=192.168.174.112 port=54321"     -- 对方ip
#parallel recovering threads numbers
#并行恢复线程数
parallel_recover_threads	= 1
#the local kingbase listenning port to communicate
#standby server.
#要通信的本地kingbase侦听端口
#备用服务器。
local_kingbase_cmdport 		= 54323
#protection_mode  maxperformance
#保护模式最大性能
protection_mode				= maxprotection
#if it's true when the primary server change it's
#mode, the standby server will send the log which
#primary hadn't send.
#如果主服务器更改时为true,则
#模式下,备用服务器将发送以下日志:
#主还没发。
send_taillog				= true
#when the kingbase broken down, standby retry
#how many times
#当kingbase出现故障时,请待机重试
#多少次
retrytimes					= 0

#one normal config resource managed by standby
#一个由备用服务器管理的正常配置资源
[network]
#this resource managed by the standby or not
#此资源是否由备用服务器管理
managed						= true
#resource start level, it's 0~99, 0 is highest
#资源起始级别,为0~99,最高为0
startlevel					= 99
#resource stop level, it's 0~99, 0 is highest
资源停止级别,为0~990为最高
stoplevel					= 0
#the cmd check the resource live or not
#命令检查资源是否处于活动状态
checkalive					= "touch /home/kingbase/kingbase.txt && ping -c 1 -w 1 192.168.174.1 1>/dev/null 2>/dev/null"    -- 网关
#the time between two check action, unit is second
#两次检查动作之间的时间,单位为秒
checkinterval				= 5
#how much times the check fails then we judge the resource down
#检查失败多少次,然后我们判断资源是否已关闭
checkfails					= 3
#the resource standby must work when the primay works
#当主服务器工作时,资源备用服务器必须工作
hotstandby					= false
#the cmd that start the resource
#启动资源的cmd
startcmd					= ""
#the command that stop the resource
#停止资源的命令
stopcmd						= ""
#the resource fails need swtich or not
#资源失败,是否需要切换
needswitch					= true 
#when the resource down, how many times restart it before judge it down
#当资源关闭时,在判断它是否关闭之前重启多少次
retrytimes					= 0 
#the cmd to restart the resouce
#命令重新启动资源
retrycmd					= ""

#one normal config resource managed by standby
#一个由备用服务器管理的正常配置资源
[klogminer]
#this resource managed by the standby or not
#此资源是否由备用服务器管理
managed						= false
#resource start level, it's 0~99, 0 is highest
#资源起始级别,为0~99,最高为0
startlevel					= 99
#resource stop level, it's 0~99, 0 is highest
#资源停止级别,为0~99,0为最高
stoplevel					= 0
#the cmd check the resource alive or not
#命令检查资源是否处于活动状态
checkalive					= "kdb_logminerd status"
#the time between two check action, unit is second
#两次检查动作之间的时间,单位为秒
checkinterval				= 3
#how much times the check fails then we judge the resource down
#检查失败多少次,然后我们判断资源是否已关闭
checkfails					= 1
#the resource standby must work when the primay works
#当主服务器工作时,资源备用服务器必须工作
hotstandby					= false
#the cmd that start the resource
#启动资源的cmd
startcmd					= "kdb_logminerd start $MODE$"
#the command that stop the resource
#停止资源的命令
stopcmd						= "kdb_logminerd stop $PID$"
#the resource fails need swtich or not
#资源失败,是否需要切换
needswitch					= true 
#when the resource down, how many times restart it before judge it down
#当资源关闭时,在判断它是否关闭之前重启多少次
retrytimes					= 0 
#the cmd to restart the resouce
#命令重新启动资源
retrycmd					= "kdb_logminerd restart $FAILEDTIMES$"

备库配置

# 备库配置
[standby]
managed						= false
is_debug					= false
log_timestamp				= true
local_server_port			= 54322
remote_server_ip			= 192.168.174.111			-- 对方ip
remote_server_port			= 54322
log_dir						= '/home/kingbase/ES/log'
standby_log					= "standby-%w.log" 
server_mode					= primary
kingbase_fault_num			= 0
enable_float_ip				= true
floatip_readonly_addcmd		= ""
floatip_readonly_delcmd		= ""
floatip_readwrite_addcmd	= "/home/kingbase/ES/V7/config/ifconfigadd.sh eno16777736:0 192.168.174.113 255.255.255.0"  
floatip_readwrite_delcmd	= "/home/kingbase/ES/V7/config/ifconfigdown.sh eno16777736:0"

[kingbase]
managed						= false
lifecheck_interval			= 2
kingbase_log				= "kingbase-%w.log"
bin_dir						= '/home/kingbase/ES/V7/bin'
data_dir					= '/home/kingbase/ES/V7/data'
log_archive_dest			= "/home/kingbase/archive"
primary_conninfo			= "host=192.168.174.111 port=54321"
parallel_recover_threads	= 1
local_kingbase_cmdport 		= 54323
protection_mode				= maxprotection
send_taillog				= true
retrytimes					= 0

[network]
managed						= true
startlevel					= 99
资源停止级别,为0~990为最高
stoplevel					= 0
checkalive					= "touch /home/kingbase/kingbase.txt && ping -c 1 -w 1 192.168.174.1 1>/dev/null 2>/dev/null"
checkinterval				= 5
checkfails					= 3
hotstandby					= false
startcmd					= ""
stopcmd						= ""
needswitch					= true 
retrytimes					= 0 
retrycmd					= ""

[klogminer]
managed						= false
startlevel					= 99
stoplevel					= 0
checkalive					= "kdb_logminerd status"
checkinterval				= 3
checkfails					= 1
hotstandby					= false
startcmd					= "kdb_logminerd start $MODE$"
stopcmd						= "kdb_logminerd stop $PID$"
needswitch					= true 
retrytimes					= 0 
retrycmd					= "kdb_logminerd restart $FAILEDTIMES$"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值