Orchestrator介绍5-配置文件解释

1 配置文件解释

Debug                                      bool   // 是否运行在debug模式下 ,输出更详细 。在命令行中使用 --debug 是一样的效果
EnableSyslog                               bool   // 是否将日志输出到系统日志
ListenAddress                              string // Orchestrator监听的TCP端口
ListenSocket                               string // Orchestrator HTTP 监听 unix 套接字的位置(默认值:空;指定时,TCP 被禁用)
HTTPAdvertise                              string // optional, for raft setups, what is the HTTP address this node will advertise to its peers (potentially use where behind NAT or when rerouting ports; example: "http://11.22.33.44:3030")
AgentsServerPort                           string // port orchestrator agents talk back to
MySQLTopologyUser                          string // 被管理的MySQL集群账号
MySQLTopologyPassword                      string // 被管理的MySQL集群账号的密码
MySQLTopologyCredentialsConfigFile         string // 从my.cnf配置文件获取连接MySQL的账号密码。 在“[client]”部分下需要有“user”、“password”
MySQLTopologySSLPrivateKeyFile             string // 通过 TLS 与MySQL实例认证的私钥文件
MySQLTopologySSLCertFile                   string // 用于通过 TLS 对与 mysql 实例进行身份验证的 PEM 证书文件
MySQLTopologySSLCAFile                     string // 用于通过 TLS 对拓扑 mysql 实例进行身份验证的证书的颁发机构 PEM 文件
MySQLTopologySSLSkipVerify                 bool   // If true, do not strictly validate mutual TLS certs for Topology mysql instances
MySQLTopologyUseMutualTLS                  bool   // Turn on TLS authentication with the Topology MySQL instances
MySQLTopologyUseMixedTLS                   bool   // Mixed TLS and non-TLS authentication with the Topology MySQL instances
TLSCacheTTLFactor                          uint   // Factor of InstancePollSeconds that we set as TLS info cache expiry
BackendDB                                  string // 后端数据库的类型; “mysql”或“sqlite3”
SQLite3DataFile                            string // 当 BackendDB == "sqlite3" 时,sqlite3 数据文件的完整路径
SkipOrchestratorDatabaseUpdate             bool   // 如果为 true,则不检查后端数据库架构,也不尝试更新它。 当您可能运行多个版本的 Orchestrator,并且您只希望某些框来指示数据库结构时很有用(否则任何时候不同的 Orchestrator 版本运行时都会重建数据库架构)
PanicIfDifferentDatabaseDeploy             bool   // 如果设置为 true,发现 Orchestrator 后端数据库是由不同版本配置的,则 panic
RaftEnabled                                bool   // 如果为 true,则启用在 raft 共识算法。 当 false(默认)时,所有 Raft* 变量都会被忽略。
RaftBind                                   string
RaftAdvertise                              string
RaftDataDir                                string
DefaultRaftPort                            int      // 如果 RaftNodes没有指定端口, 则使用这个默认的
RaftNodes                                  []string // 所有的 Raft nodes
ExpectFailureAnalysisConcensus             bool     
MySQLOrchestratorHost                      string   // Orchestrator 后端数据库的IP
MySQLOrchestratorMaxPoolConnections        int      // Orchestrator 后端的连接池的最大值
MySQLOrchestratorPort                      uint     // Orchestrator 后端数据库的端口
MySQLOrchestratorDatabase                  string   // Orchestrator 后端数据库的名称
MySQLOrchestratorUser                      string   // Orchestrator 后端数据库的用户
MySQLOrchestratorPassword                  string   // Orchestrator 后端数据库的用户密码
MySQLOrchestratorCredentialsConfigFile     string   // my.cnf style configuration file from where to pick credentials. Expecting `user`, `password` under `[client]` section
MySQLOrchestratorSSLPrivateKeyFile         string   // Private key file used to authenticate with the Orchestrator mysql instance with TLS
MySQLOrchestratorSSLCertFile               string   // Certificate PEM file used to authenticate with the Orchestrator mysql instance with TLS
MySQLOrchestratorSSLCAFile                 string   // Certificate Authority PEM file used to authenticate with the Orchestrator mysql instance with TLS
MySQLOrchestratorSSLSkipVerify             bool     // If true, do not strictly validate mutual TLS certs for the Orchestrator mysql instances
MySQLOrchestratorUseMutualTLS              bool     // Turn on TLS authentication with the Orchestrator MySQL instance
MySQLOrchestratorReadTimeoutSeconds        int      // Orchestrator 后端数据库查询超时时间
MySQLOrchestratorRejectReadOnly            bool     // 拒绝只读连接 https://github.com/go-sql-driver/mysql#rejectreadonly
MySQLConnectTimeoutSeconds                 int      // 被管理的MySQL 连接超时时间 (driver-side)
MySQLDiscoveryReadTimeoutSeconds           int      // 被管理的MySQL 查询超时时间 (driver-side).只用做 discovery 查询.
MySQLTopologyReadTimeoutSeconds            int      // 被管理的MySQL 查询超时时间 (driver-side). 作用于除了discovery所有的查询 
MySQLConnectionLifetimeSeconds             int      // 被管理的MySQL 会话保持时间
DefaultInstancePort                        int      // 默认端口 
SlaveLagQuery                              string   // 含义和ReplicationLagQuery相同
ReplicationLagQuery                        string   // 自定义查询用来检查复制延迟 (e.g. heartbeat table). 必须返回一个单行的数字,就是至延迟
ReplicationCredentialsQuery                string   // 自定义查询以获取复制凭据。 必须返回单行,包含五个文本列:第一个是用户名,第二个是密码,第三个是 SSLCaCert,第四个是 SSLCert,第五个是 SSLKey。 这是可选的,Orchestrator可以使用它来在主控接管或设置辅助主控后配置复制。 您需要确保 Orchestrator 用户具有运行此查询的权限
DiscoverByShowSlaveHosts                   bool     // 在通过show  PROCESSLISTs 获取从副本的host之前尝试使用 SHOW SLAVE HOSTS 来获取。
UseSuperReadOnly                           bool     // Orchestrator 是否应在设置 read_only 时设置 super_read_only
InstancePollSeconds                        uint     // 实例读取之间的秒数
ReasonableInstanceCheckSeconds             uint     // Number of seconds an instance read is allowed to take before it is considered invalid, i.e. before LastCheckValid will be false
InstanceWriteBufferSize                    int      // Instance write buffer size (max number of instances to flush in one INSERT ODKU)
BufferInstanceWrites                       bool     // Set to 'true' for write-optimization on backend table (compromise: writes can be stale and overwrite non stale data)
InstanceFlushIntervalMilliseconds          int      // Max interval between instance write buffer flushes
SkipMaxScaleCheck                          bool     // If you don't ever have MaxScale BinlogServer in your topology (and most people don't), set this to 'true' to save some pointless queries
UnseenInstanceForgetHours                  uint     // Number of hours after which an unseen instance is forgotten
SnapshotTopologiesIntervalHours            uint     // snapshot-topologies invocation的时间间隔 . 默认: 0 (禁用)
DiscoveryMaxConcurrency                    uint     // 进行Discovery的并发数
DiscoveryQueueCapacity                     uint     // 发现队列的缓冲区大小。 应大于正在发现的数据库实例的数量
DiscoveryQueueMaxStatisticsSize            int      // The maximum number of individual secondly statistics taken of the discovery queue
DiscoveryCollectionRetentionSeconds        uint     // Number of seconds to retain the discovery collection information
DiscoverySeeds                             []string // Hard coded array of hostname:port, ensuring orchestrator discovers these hosts upon startup, assuming not already known to orchestrator
InstanceBulkOperationsWaitTimeoutSeconds   uint     // Time to wait on a single instance when doing bulk (many instances) operation
HostnameResolveMethod                      string   // "normalize" 主机名方法 ("none"/"default"/"cname")
MySQLHostnameResolveMethod                 string   // "normalize" MySQL主机名方法. ("none"/"@@hostname"/"@@report_host"; default "@@hostname")
SkipBinlogServerUnresolveCheck             bool     // Skip the double-check that an unresolved hostname resolves back to same hostname for binlog servers
ExpiryHostnameResolvesMinutes              int      // 主机名解析过期的分钟数
RejectHostnameResolvePattern               string   // Regexp pattern for resolved hostname that will not be accepted (not cached, not written to db). This is done to avoid storing wrong resolves due to network glitches.
ReasonableReplicationLagSeconds            int      // Above this value is considered a problem
ProblemIgnoreHostnameFilters               []string // Will minimize problem visualization for hostnames matching given regexp filters
VerifyReplicationFilters                   bool     // Include replication filters check before approving topology refactoring
ReasonableMaintenanceReplicationLagSeconds int      // Above this value move-up and move-below are blocked
CandidateInstanceExpireMinutes             uint     // Minutes after which a suggestion to use an instance as a candidate replica (to be preferably promoted on master failover) is expired.
AuditLogFile                               string   // 审计操作的日志文件名称. 当设置为空时被禁用
AuditToSyslog                              bool     // 如果为 true,审核日志将写入系统日志
AuditToBackendDB                           bool     // 如果为 true,审核消息将写入后端数据库的“audit”表(默认值:true)
AuditPurgeDays                             uint     // 从数据库中清除审核条目的天数
RemoveTextFromHostnameDisplay              string   // 用于去除集群/集群页面上的主机名的文本
ReadOnly                                   bool
AuthenticationMethod                       string // Type of autherntication to use, if any. "" for none, "basic" for BasicAuth, "multi" for advanced BasicAuth, "proxy" for forwarded credentials via reverse proxy, "token" for token based access
OAuthClientId                              string
OAuthClientSecret                          string
OAuthScopes                                []string
HTTPAuthUser                               string            // HTTP 基本身份验证的用户名(空白禁用身份验证)
HTTPAuthPassword                           string            // HTTP 基本身份验证的密码
AuthUserHeader                             string            // 当 AuthenticationMethod 为“proxy”时,指示身份验证用户的 HTTP 标头
PowerAuthUsers                             []string          // 在 AuthenticationMethod == "proxy" 上,可以进行更改的用户列表。 所有其他都是只读的。
PowerAuthGroups                            []string          // 经过身份验证的用户必须是 Unix 组的成员才能进行更改的列表。
AccessTokenUseExpirySeconds                uint              // Time by which an issued token must be used
AccessTokenExpiryMinutes                   uint              // HTTP 访问令牌过期的时间
ClusterNameToAlias                         map[string]string // 将正则表达式匹配到集群名称映射为易读的别名
DetectClusterAliasQuery                    string            // 返回集群别名的可选查询(在拓扑实例上执行)。 查询将仅在集群主节点上执行(尽管在拓扑主节点解析之前,它可能会在其他/所有副本上执行)。 如果提供,必须返回一行、一列
DetectClusterDomainQuery                   string            // Optional query (executed on topology instance) that returns the VIP/CNAME/Alias/whatever domain name for the master of this cluster. Query will only be executed on cluster master (though until the topology's master is resovled it may execute on other/all replicas). If provided, must return one row, one column
DetectInstanceAliasQuery                   string            // 返回实例别名的可选查询(在拓扑实例上执行)。 如果提供,必须返回一行、一列
DetectPromotionRuleQuery                   string            // 可选查询(在拓扑实例上执行),返回实例的提升规则。 如果提供,必须返回一行、一列。
DataCenterPattern                          string            // 一组正则表达式模式,从主机名中提取数据中心名称
RegionPattern                              string            // 一组正则表达式模式,从主机名中提取区域名称
PhysicalEnvironmentPattern                 string            // 一组正则表达式模式,从主机名中提取物理环境信息(例如数据中心和产品/开发环境的组合)
DetectDataCenterQuery                      string            // 可选查询(在拓扑实例上执行),返回实例的数据中心 。如果提供,则必须返回一行、一列。 覆盖 DataCenterPattern 并且对于无法通过主机名推断 DC 的非常有用
DetectRegionQuery                          string            // 返回实例区域的可选查询(在拓扑实例上执行)。 如果提供,必须返回一行、一列。 覆盖 RegionPattern,对于无法通过主机名推断区域的非常有用
DetectPhysicalEnvironmentQuery             string            // 返回实例的物理环境的可选查询(在拓扑实例上执行)。 如果提供,必须返回一行、一列。 覆盖 PhysicalEnvironmentPattern,对于无法通过主机名推断 env 的非常有用
DetectSemiSyncEnforcedQuery                string            // 可选查询(在拓扑实例上执行)以确定是否对主写入完全强制执行半同步(在任何情况下都不允许异步回退)。 如果提供,必须返回一行、一列、值 0 或 1。
SupportFuzzyPoolHostnames                  bool              // Should "submit-pool-instances" command be able to pass list of fuzzy instances (fuzzy means non-fqdn, but unique enough to recognize). Defaults 'true', implies more queries on backend db
InstancePoolExpiryMinutes                  uint              // Time after which entries in database_instance_pool are expired (resubmit via `submit-pool-instances`)
PromotionIgnoreHostnameFilters             []string          // Orchestrator不会提升符合匹配规则的从副本为主 (via -c recovery; for example, avoid promoting dev-dedicated machines)
ServeAgentsHttp                            bool              // 生成另一个专用于 Orchestrator-agent 的 HTTP 接口
AgentsUseSSL                               bool              // 当设置为"true"时 ,orchestrator会通过SSL监听和连接agents的端口
AgentsUseMutualTLS                         bool              // 当设置为"true"时, 使用双向 TLS 进行服务器与agent的通信
AgentSSLSkipVerify                         bool              // Agent 使用SSL时,是否应该忽略SSL认证错误
AgentSSLPrivateKeyFile                     string            // Agent SSL 私钥文件的名称,仅当 AgentsUseSSL = true 时适用
AgentSSLCertFile                           string            // Agent SSL 认证文件的名称,仅当 AgentsUseSSL = true 时适用
AgentSSLCAFile                             string            // Agent 证书颁发机构文件的名称,仅在 AgentsUseSSL = true 时适用
AgentSSLValidOUs                           []string          // Valid organizational units when using mutual TLS to communicate with the agents
UseSSL                                     bool              // 在 Web 端口上使用 SSL
UseMutualTLS                               bool              // When "true" Use mutual TLS for the server's web and API connections
SSLSkipVerify                              bool              // When using SSL, should we ignore SSL certification error
SSLPrivateKeyFile                          string            // Name of SSL private key file, applies only when UseSSL = true
SSLCertFile                                string            // Name of SSL certification file, applies only when UseSSL = true
SSLCAFile                                  string            // Name of the Certificate Authority file, applies only when UseSSL = true
SSLValidOUs                                []string          // Valid organizational units when using mutual TLS
StatusEndpoint                             string            // 覆盖状态端点。 默认为“/api/status”
StatusOUVerify                             bool              // If true, try to verify OUs when Mutual TLS is on.  Defaults to false
AgentPollMinutes                           uint              // Minutes between agent polling
UnseenAgentForgetHours                     uint              // 忘记不可见的代理的小时数
StaleSeedFailMinutes                       uint              // Number of minutes after which a stale (no progress) seed is considered failed.
SeedAcceptableBytesDiff                    int64             // Difference in bytes between seed source & target data size that is still considered as successful copy
SeedWaitSecondsBeforeSend                  int64             // Number of seconds for waiting before start send data command on agent
AutoPseudoGTID                             bool              // Should orchestrator automatically inject Pseudo-GTID entries to the masters
PseudoGTIDPattern                          string            // Pattern to look for in binary logs that makes for a unique entry (pseudo GTID). When empty, Pseudo-GTID based refactoring is disabled.
PseudoGTIDPatternIsFixedSubstring          bool              // If true, then PseudoGTIDPattern is not treated as regular expression but as fixed substring, and can boost search time
PseudoGTIDMonotonicHint                    string            // subtring in Pseudo-GTID entry which indicates Pseudo-GTID entries are expected to be monotonically increasing
DetectPseudoGTIDQuery                      string            // Optional query which is used to authoritatively decide whether pseudo gtid is enabled on instance
BinlogEventsChunkSize                      int               // SHOW BINLOG|RELAYLOG EVENTS LIMIT ?, chunk size。 更小意味着更少的锁定和更多的工作要做
SkipBinlogEventsContaining                 []string          // 扫描/比较二进制日志中的 Pseudo-GTID 时,跳过包含给定文本的条目。 这些不是正则表达式(在扫描二进制日志时会消耗太多 CPU),只是要查找的子字符串。
ReduceReplicationAnalysisCount             bool              // When true, replication analysis will only report instances where possibility of handled problems is possible in the first place (e.g. will not report most leaf nodes, that are mostly uninteresting). When false, provides an entry for every known instance
FailureDetectionPeriodBlockMinutes         int               // The time for which an instance's failure discovery is kept "active", so as to avoid concurrent "discoveries" of the instance's failure; this preceeds any recovery process, if any.
RecoveryPeriodBlockMinutes                 int               // (supported for backwards compatibility but please use newer `RecoveryPeriodBlockSeconds` instead) The time for which an instance's recovery is kept "active", so as to avoid concurrent recoveries on same instance as well as flapping
RecoveryPeriodBlockSeconds                 int               // (overrides `RecoveryPeriodBlockMinutes`) The time for which an instance's recovery is kept "active", so as to avoid concurrent recoveries on same instance as well as flapping
RecoveryIgnoreHostnameFilters              []string          // 匹配规则匹配到的主机将不会被恢复
RecoverMasterClusterFilters                []string          // 只有复合正则匹配规则集群名才做主库的恢复(".*" 匹配所有) 
RecoverIntermediateMasterClusterFilters    []string          // 只有复合正则匹配规则集群名才做中间主库(比如历练复制)的恢复(".*" 匹配所有
ProcessesShellCommand                      string            // 执行命令脚本的shell
OnFailureDetectionProcesses                []string          // 检测到故障转移场景时要执行的流程 (在决定是否进行故障转移之前).可以并且应该使用以下一些占位符: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {autoMasterRecovery}, {autoIntermediateMasterRecovery}
PreGracefulTakeoverProcesses               []string          // 在执行 failover 之前执行的流程(如果其中任何一个以非零代码退出,则中止操作;执行顺序未定义)。可以并且应该使用以下一些占位符: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {countReplicas}, {replicaHosts}, {isDowntimed}
PreFailoverProcesses                       []string          // 在执行 failover 之前要执行的流程(如果其中任何一个以非零代码退出,则中止操作;执行顺序未定义)。 可以并且应该使用以下一些占位符: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {countReplicas}, {replicaHosts}, {isDowntimed}
PostFailoverProcesses                      []string          // 执行故障转移后要执行的流程(执行顺序未定义)。 可以并且应该使用以下一些占位符: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorBinlogCoordinates}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {isSuccessful}, {lostReplicas}, {countLostReplicas}
PostUnsuccessfulFailoverProcesses          []string          // 未完全成功的故障转移后执行的流程(执行顺序未定义)。 可以并且应该使用以下一些占位符: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorBinlogCoordinates}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {isSuccessful}, {lostReplicas}, {countLostReplicas}
PostMasterFailoverProcesses                []string          // 执行主故障转移后要执行的流程(执行顺序未定义)。 使用与 PostFailoverProcesses 相同的占位符
PostIntermediateMasterFailoverProcesses    []string          // 执行 中间主库(级联复制)故障转移后要执行的进程(执行顺序未定义)。 使用与 PostFailoverProcesses 相同的占位符
PostGracefulTakeoverProcesses              []string          // 运行优雅的主接管后要执行的进程。 使用与 PostFailoverProcesses 相同的占位符
PostTakeMasterProcesses                    []string          // Take-Master 事件成功发生后要执行的流程
RecoverNonWriteableMaster                  bool              // 当设置为“true”时,orchestrator 将只读主服务器视为故障场景,并尝试使主服务器可写
CoMasterRecoveryMustPromoteOtherCoMaster   bool              // 当设置为“false”时,任何实例都可以提升为主(候选实例比其他实例更受青睐)。 当“true”时,orchestrator 将提升其他 co-master,否则会失败
DetachLostSlavesAfterMasterFailover        bool              // 同义词 DetachLostReplicasAfterMasterFailover
DetachLostReplicasAfterMasterFailover      bool              // 是否应该强制分离在主恢复中没有中断的从库(即使该副本有可能比提升为主的副本更新)
ApplyMySQLPromotionAfterMasterFailover     bool              // Should orchestrator take upon itself to apply MySQL master promotion: set read_only=0, detach replication, etc.
PreventCrossDataCenterMasterFailover       bool              // 当 true (默认值: false)时,不允许跨 DC 主故障转移,orchestrator 将尽其所能仅在同一 DC 内进行故障转移,否则根本不进行故障转移。
PreventCrossRegionMasterFailover           bool              // When当 true (默认值: false)时,不允许跨区域主故障转移,orchestrator 将尽一切努力仅在同一区域内进行故障转移,否则根本不进行故障转移。
MasterFailoverLostInstancesDowntimeMinutes uint              // 主服务器故障转移后丢失的任何服务器(包括发生故障的主服务器和丢失的副本)所需的停机分钟数。 0 禁用
MasterFailoverDetachSlaveMasterHost        bool              // 同 MasterFailoverDetachReplicaMasterHost
MasterFailoverDetachReplicaMasterHost      bool              // 是否应该在新升级的主服务器上发出 detach-replica-master-host (这可以确保新的主服务器不会尝试复制旧的主服务器(如果旧的主服务器恢复正常))。 默认为“false”。 如果ApplyMySQLPromotionAfterMasterFailover 为“true”,则毫无意义。
FailMasterPromotionOnLagMinutes            uint              // 当 > 0 时,如果候选副本滞后 >= 配置的分钟数,则主提升失败。
FailMasterPromotionIfSQLThreadNotUpToDate  bool              // 当 true 时,并且发生主节点故障转移,如果候选主节点尚未消耗所有中继日志,则升级将中止并出现错误
DelayMasterPromotionIfSQLThreadNotUpToDate bool              // 当 true 时,并且发生 master 故障转移,如果候选 master 尚未消耗所有中继日志,则延迟升级直到 sql 线程赶上
PostponeSlaveRecoveryOnLagMinutes          uint              // PostponeReplicaRecoveryOnLagMinutes 的同义词
PostponeReplicaRecoveryOnLagMinutes        uint              // 在崩溃恢复时,滞后超过给定分钟数的副本仅在恢复过程的后期、在选择主/IM 并执行进程之后复活。 值为 0 禁用此功能
OSCIgnoreHostnameFilters                   []string          // OSC 副本推荐将忽略与给定模式匹配的副本主机名
GraphiteAddr                               string            // Optional; address of graphite port. If supplied, metrics will be written here
GraphitePath                               string            // Prefix for graphite path. May include {hostname} magic placeholder
GraphiteConvertHostnameDotsToUnderscores   bool              // If true, then hostname's dots are converted to underscores before being used in graphite path
GraphitePollSeconds                        int               // Graphite writes interval. 0 disables.
URLPrefix                                  string            // 在非根 Web 路径上运行 Orchestrator 的 URL 前缀,例如 /orchestrator 将其放在 nginx 后面。
DiscoveryIgnoreReplicaHostnameFilters      []string          // 阻止自动发现正则表达式匹配到的新的从副本. 用途:由于防火墙、二进制日志转储的应用程序而无法访问服务器
DiscoveryIgnoreMasterHostnameFilters       []string          // 阻止自动发现正则表达式匹配到的主实例 用法:暂时让你的master从外部主机复制一些数据
DiscoveryIgnoreHostnameFilters             []string          // 阻止自动发现正则表达式匹配到的实例
ConsulAddress                              string            // Consul HTTP api 的地址。 示例:127.0.0.1:8500
ConsulScheme                               string            // Scheme (http or https) for Consul
ConsulAclToken                             string            // ACL token used to write to Consul KV
ConsulCrossDataCenterDistribution          bool              // should orchestrator automatically auto-deduce all consul DCs and write KVs in all DCs
ConsulKVStoreProvider                      string            // Consul KV store provider (consul or consul-txn), default: "consul"
ConsulMaxKVsPerTransaction                 int               // Maximum number of KV operations to perform in a single Consul Transaction. Requires the "consul-txn" ConsulKVStoreProvider
ZkAddress                                  string            // UNSUPPERTED YET. Address where (single or multiple) ZooKeeper servers are found, in `srv1[:port1][,srv2[:port2]...]` format. Default port is 2181. Example: srv-a,srv-b:12181,srv-c
KVClusterMasterPrefix                      string            // Prefix to use for clusters' masters entries in KV stores (internal, consul, ZK), default: "mysql/master"
WebMessage                                 string            // 如果提供,将显示在标题栏下方的所有网页上
MaxConcurrentReplicaOperations             int               // 副本上的最大并发操作数
EnforceExactSemiSyncReplicas               bool              // 如果为 true,则将启用/禁用半同步副本以匹配所需优先级顺序中的等待计数; 这适用于 LockedSemiSyncMaster 和 MasterWithTooManySemiSyncReplicas
RecoverLockedSemiSyncMaster                bool              // 如果为 true,则 Orchestrator 将通过在副本上启用半同步以匹配等待计数来从 LockedSemiSync 状态恢复; 此行为可以被 EnforceExactSemiSyncReplicas 覆盖
ReasonableLockedSemiSyncMasterSeconds      uint              // 在触发 LockedSemiSync 分析之前评估 LockedSemiSyncHypothesis 的时间; 如果未设置,则回退到 ReasonableReplicationLagSeconds

2 源码中配置项注释(英文)

type Configuration struct {
	Debug                                      bool   // set debug mode (similar to --debug option)
	EnableSyslog                               bool   // Should logs be directed (in addition) to syslog daemon?
	ListenAddress                              string // Where orchestrator HTTP should listen for TCP
	ListenSocket                               string // Where orchestrator HTTP should listen for unix socket (default: empty; when given, TCP is disabled)
	HTTPAdvertise                              string // optional, for raft setups, what is the HTTP address this node will advertise to its peers (potentially use where behind NAT or when rerouting ports; example: "http://11.22.33.44:3030")
	AgentsServerPort                           string // port orchestrator agents talk back to
	MySQLTopologyUser                          string
	MySQLTopologyPassword                      string
	MySQLTopologyCredentialsConfigFile         string // my.cnf style configuration file from where to pick credentials. Expecting `user`, `password` under `[client]` section
	MySQLTopologySSLPrivateKeyFile             string // Private key file used to authenticate with a Topology mysql instance with TLS
	MySQLTopologySSLCertFile                   string // Certificate PEM file used to authenticate with a Topology mysql instance with TLS
	MySQLTopologySSLCAFile                     string // Certificate Authority PEM file used to authenticate with a Topology mysql instance with TLS
	MySQLTopologySSLSkipVerify                 bool   // If true, do not strictly validate mutual TLS certs for Topology mysql instances
	MySQLTopologyUseMutualTLS                  bool   // Turn on TLS authentication with the Topology MySQL instances
	MySQLTopologyUseMixedTLS                   bool   // Mixed TLS and non-TLS authentication with the Topology MySQL instances
	TLSCacheTTLFactor                          uint   // Factor of InstancePollSeconds that we set as TLS info cache expiry
	BackendDB                                  string // EXPERIMENTAL: type of backend db; either "mysql" or "sqlite3"
	SQLite3DataFile                            string // when BackendDB == "sqlite3", full path to sqlite3 datafile
	SkipOrchestratorDatabaseUpdate             bool   // When true, do not check backend database schema nor attempt to update it. Useful when you may be running multiple versions of orchestrator, and you only wish certain boxes to dictate the db structure (or else any time a different orchestrator version runs it will rebuild database schema)
	PanicIfDifferentDatabaseDeploy             bool   // When true, and this process finds the orchestrator backend DB was provisioned by a different version, panic
	RaftEnabled                                bool   // When true, setup orchestrator in a raft consensus layout. When false (default) all Raft* variables are ignored
	RaftBind                                   string
	RaftAdvertise                              string
	RaftDataDir                                string
	DefaultRaftPort                            int      // if a RaftNodes entry does not specify port, use this one
	RaftNodes                                  []string // Raft nodes to make initial connection with
	ExpectFailureAnalysisConcensus             bool
	MySQLOrchestratorHost                      string
	MySQLOrchestratorMaxPoolConnections        int // The maximum size of the connection pool to the Orchestrator backend.
	MySQLOrchestratorPort                      uint
	MySQLOrchestratorDatabase                  string
	MySQLOrchestratorUser                      string
	MySQLOrchestratorPassword                  string
	MySQLOrchestratorCredentialsConfigFile     string   // my.cnf style configuration file from where to pick credentials. Expecting `user`, `password` under `[client]` section
	MySQLOrchestratorSSLPrivateKeyFile         string   // Private key file used to authenticate with the Orchestrator mysql instance with TLS
	MySQLOrchestratorSSLCertFile               string   // Certificate PEM file used to authenticate with the Orchestrator mysql instance with TLS
	MySQLOrchestratorSSLCAFile                 string   // Certificate Authority PEM file used to authenticate with the Orchestrator mysql instance with TLS
	MySQLOrchestratorSSLSkipVerify             bool     // If true, do not strictly validate mutual TLS certs for the Orchestrator mysql instances
	MySQLOrchestratorUseMutualTLS              bool     // Turn on TLS authentication with the Orchestrator MySQL instance
	MySQLOrchestratorReadTimeoutSeconds        int      // Number of seconds before backend mysql read operation is aborted (driver-side)
	MySQLOrchestratorRejectReadOnly            bool     // Reject read only connections https://github.com/go-sql-driver/mysql#rejectreadonly
	MySQLConnectTimeoutSeconds                 int      // Number of seconds before connection is aborted (driver-side)
	MySQLDiscoveryReadTimeoutSeconds           int      // Number of seconds before topology mysql read operation is aborted (driver-side). Used for discovery queries.
	MySQLTopologyReadTimeoutSeconds            int      // Number of seconds before topology mysql read operation is aborted (driver-side). Used for all but discovery queries.
	MySQLConnectionLifetimeSeconds             int      // Number of seconds the mysql driver will keep database connection alive before recycling it
	DefaultInstancePort                        int      // In case port was not specified on command line
	SlaveLagQuery                              string   // Synonym to ReplicationLagQuery
	ReplicationLagQuery                        string   // custom query to check on replica lg (e.g. heartbeat table). Must return a single row with a single numeric column, which is the lag.
	ReplicationCredentialsQuery                string   // custom query to get replication credentials. Must return a single row, with five text columns: 1st is username, 2nd is password, 3rd is SSLCaCert, 4th is SSLCert, 5th is SSLKey. This is optional, and can be used by orchestrator to configure replication after master takeover or setup of co-masters. You need to ensure the orchestrator user has the privileges to run this query
	DiscoverByShowSlaveHosts                   bool     // Attempt SHOW SLAVE HOSTS before PROCESSLIST
	UseSuperReadOnly                           bool     // Should orchestrator super_read_only any time it sets read_only
	InstancePollSeconds                        uint     // Number of seconds between instance reads
	ReasonableInstanceCheckSeconds             uint     // Number of seconds an instance read is allowed to take before it is considered invalid, i.e. before LastCheckValid will be false
	InstanceWriteBufferSize                    int      // Instance write buffer size (max number of instances to flush in one INSERT ODKU)
	BufferInstanceWrites                       bool     // Set to 'true' for write-optimization on backend table (compromise: writes can be stale and overwrite non stale data)
	InstanceFlushIntervalMilliseconds          int      // Max interval between instance write buffer flushes
	SkipMaxScaleCheck                          bool     // If you don't ever have MaxScale BinlogServer in your topology (and most people don't), set this to 'true' to save some pointless queries
	UnseenInstanceForgetHours                  uint     // Number of hours after which an unseen instance is forgotten
	SnapshotTopologiesIntervalHours            uint     // Interval in hour between snapshot-topologies invocation. Default: 0 (disabled)
	DiscoveryMaxConcurrency                    uint     // Number of goroutines doing hosts discovery
	DiscoveryQueueCapacity                     uint     // Buffer size of the discovery queue. Should be greater than the number of DB instances being discovered
	DiscoveryQueueMaxStatisticsSize            int      // The maximum number of individual secondly statistics taken of the discovery queue
	DiscoveryCollectionRetentionSeconds        uint     // Number of seconds to retain the discovery collection information
	DiscoverySeeds                             []string // Hard coded array of hostname:port, ensuring orchestrator discovers these hosts upon startup, assuming not already known to orchestrator
	InstanceBulkOperationsWaitTimeoutSeconds   uint     // Time to wait on a single instance when doing bulk (many instances) operation
	HostnameResolveMethod                      string   // Method by which to "normalize" hostname ("none"/"default"/"cname")
	MySQLHostnameResolveMethod                 string   // Method by which to "normalize" hostname via MySQL server. ("none"/"@@hostname"/"@@report_host"; default "@@hostname")
	SkipBinlogServerUnresolveCheck             bool     // Skip the double-check that an unresolved hostname resolves back to same hostname for binlog servers
	ExpiryHostnameResolvesMinutes              int      // Number of minutes after which to expire hostname-resolves
	RejectHostnameResolvePattern               string   // Regexp pattern for resolved hostname that will not be accepted (not cached, not written to db). This is done to avoid storing wrong resolves due to network glitches.
	ReasonableReplicationLagSeconds            int      // Above this value is considered a problem
	ProblemIgnoreHostnameFilters               []string // Will minimize problem visualization for hostnames matching given regexp filters
	VerifyReplicationFilters                   bool     // Include replication filters check before approving topology refactoring
	ReasonableMaintenanceReplicationLagSeconds int      // Above this value move-up and move-below are blocked
	CandidateInstanceExpireMinutes             uint     // Minutes after which a suggestion to use an instance as a candidate replica (to be preferably promoted on master failover) is expired.
	AuditLogFile                               string   // Name of log file for audit operations. Disabled when empty.
	AuditToSyslog                              bool     // If true, audit messages are written to syslog
	AuditToBackendDB                           bool     // If true, audit messages are written to the backend DB's `audit` table (default: true)
	AuditPurgeDays                             uint     // Days after which audit entries are purged from the database
	RemoveTextFromHostnameDisplay              string   // Text to strip off the hostname on cluster/clusters pages
	ReadOnly                                   bool
	AuthenticationMethod                       string // Type of autherntication to use, if any. "" for none, "basic" for BasicAuth, "multi" for advanced BasicAuth, "proxy" for forwarded credentials via reverse proxy, "token" for token based access
	OAuthClientId                              string
	OAuthClientSecret                          string
	OAuthScopes                                []string
	HTTPAuthUser                               string            // Username for HTTP Basic authentication (blank disables authentication)
	HTTPAuthPassword                           string            // Password for HTTP Basic authentication
	AuthUserHeader                             string            // HTTP header indicating auth user, when AuthenticationMethod is "proxy"
	PowerAuthUsers                             []string          // On AuthenticationMethod == "proxy", list of users that can make changes. All others are read-only.
	PowerAuthGroups                            []string          // list of unix groups the authenticated user must be a member of to make changes.
	AccessTokenUseExpirySeconds                uint              // Time by which an issued token must be used
	AccessTokenExpiryMinutes                   uint              // Time after which HTTP access token expires
	ClusterNameToAlias                         map[string]string // map between regex matching cluster name to a human friendly alias
	DetectClusterAliasQuery                    string            // Optional query (executed on topology instance) that returns the alias of a cluster. Query will only be executed on cluster master (though until the topology's master is resovled it may execute on other/all replicas). If provided, must return one row, one column
	DetectClusterDomainQuery                   string            // Optional query (executed on topology instance) that returns the VIP/CNAME/Alias/whatever domain name for the master of this cluster. Query will only be executed on cluster master (though until the topology's master is resovled it may execute on other/all replicas). If provided, must return one row, one column
	DetectInstanceAliasQuery                   string            // Optional query (executed on topology instance) that returns the alias of an instance. If provided, must return one row, one column
	DetectPromotionRuleQuery                   string            // Optional query (executed on topology instance) that returns the promotion rule of an instance. If provided, must return one row, one column.
	DataCenterPattern                          string            // Regexp pattern with one group, extracting the datacenter name from the hostname
	RegionPattern                              string            // Regexp pattern with one group, extracting the region name from the hostname
	PhysicalEnvironmentPattern                 string            // Regexp pattern with one group, extracting physical environment info from hostname (e.g. combination of datacenter & prod/dev env)
	DetectDataCenterQuery                      string            // Optional query (executed on topology instance) that returns the data center of an instance. If provided, must return one row, one column. Overrides DataCenterPattern and useful for installments where DC cannot be inferred by hostname
	DetectRegionQuery                          string            // Optional query (executed on topology instance) that returns the region of an instance. If provided, must return one row, one column. Overrides RegionPattern and useful for installments where Region cannot be inferred by hostname
	DetectPhysicalEnvironmentQuery             string            // Optional query (executed on topology instance) that returns the physical environment of an instance. If provided, must return one row, one column. Overrides PhysicalEnvironmentPattern and useful for installments where env cannot be inferred by hostname
	DetectSemiSyncEnforcedQuery                string            // Optional query (executed on topology instance) to determine whether semi-sync is fully enforced for master writes (async fallback is not allowed under any circumstance). If provided, must return one row, one column, value 0 or 1.
	SupportFuzzyPoolHostnames                  bool              // Should "submit-pool-instances" command be able to pass list of fuzzy instances (fuzzy means non-fqdn, but unique enough to recognize). Defaults 'true', implies more queries on backend db
	InstancePoolExpiryMinutes                  uint              // Time after which entries in database_instance_pool are expired (resubmit via `submit-pool-instances`)
	PromotionIgnoreHostnameFilters             []string          // Orchestrator will not promote replicas with hostname matching pattern (via -c recovery; for example, avoid promoting dev-dedicated machines)
	ServeAgentsHttp                            bool              // Spawn another HTTP interface dedicated for orchestrator-agent
	AgentsUseSSL                               bool              // When "true" orchestrator will listen on agents port with SSL as well as connect to agents via SSL
	AgentsUseMutualTLS                         bool              // When "true" Use mutual TLS for the server to agent communication
	AgentSSLSkipVerify                         bool              // When using SSL for the Agent, should we ignore SSL certification error
	AgentSSLPrivateKeyFile                     string            // Name of Agent SSL private key file, applies only when AgentsUseSSL = true
	AgentSSLCertFile                           string            // Name of Agent SSL certification file, applies only when AgentsUseSSL = true
	AgentSSLCAFile                             string            // Name of the Agent Certificate Authority file, applies only when AgentsUseSSL = true
	AgentSSLValidOUs                           []string          // Valid organizational units when using mutual TLS to communicate with the agents
	UseSSL                                     bool              // Use SSL on the server web port
	UseMutualTLS                               bool              // When "true" Use mutual TLS for the server's web and API connections
	SSLSkipVerify                              bool              // When using SSL, should we ignore SSL certification error
	SSLPrivateKeyFile                          string            // Name of SSL private key file, applies only when UseSSL = true
	SSLCertFile                                string            // Name of SSL certification file, applies only when UseSSL = true
	SSLCAFile                                  string            // Name of the Certificate Authority file, applies only when UseSSL = true
	SSLValidOUs                                []string          // Valid organizational units when using mutual TLS
	StatusEndpoint                             string            // Override the status endpoint.  Defaults to '/api/status'
	StatusOUVerify                             bool              // If true, try to verify OUs when Mutual TLS is on.  Defaults to false
	AgentPollMinutes                           uint              // Minutes between agent polling
	UnseenAgentForgetHours                     uint              // Number of hours after which an unseen agent is forgotten
	StaleSeedFailMinutes                       uint              // Number of minutes after which a stale (no progress) seed is considered failed.
	SeedAcceptableBytesDiff                    int64             // Difference in bytes between seed source & target data size that is still considered as successful copy
	SeedWaitSecondsBeforeSend                  int64             // Number of seconds for waiting before start send data command on agent
	AutoPseudoGTID                             bool              // Should orchestrator automatically inject Pseudo-GTID entries to the masters
	PseudoGTIDPattern                          string            // Pattern to look for in binary logs that makes for a unique entry (pseudo GTID). When empty, Pseudo-GTID based refactoring is disabled.
	PseudoGTIDPatternIsFixedSubstring          bool              // If true, then PseudoGTIDPattern is not treated as regular expression but as fixed substring, and can boost search time
	PseudoGTIDMonotonicHint                    string            // subtring in Pseudo-GTID entry which indicates Pseudo-GTID entries are expected to be monotonically increasing
	DetectPseudoGTIDQuery                      string            // Optional query which is used to authoritatively decide whether pseudo gtid is enabled on instance
	BinlogEventsChunkSize                      int               // Chunk size (X) for SHOW BINLOG|RELAYLOG EVENTS LIMIT ?,X statements. Smaller means less locking and mroe work to be done
	SkipBinlogEventsContaining                 []string          // When scanning/comparing binlogs for Pseudo-GTID, skip entries containing given texts. These are NOT regular expressions (would consume too much CPU while scanning binlogs), just substrings to find.
	ReduceReplicationAnalysisCount             bool              // When true, replication analysis will only report instances where possibility of handled problems is possible in the first place (e.g. will not report most leaf nodes, that are mostly uninteresting). When false, provides an entry for every known instance
	FailureDetectionPeriodBlockMinutes         int               // The time for which an instance's failure discovery is kept "active", so as to avoid concurrent "discoveries" of the instance's failure; this preceeds any recovery process, if any.
	RecoveryPeriodBlockMinutes                 int               // (supported for backwards compatibility but please use newer `RecoveryPeriodBlockSeconds` instead) The time for which an instance's recovery is kept "active", so as to avoid concurrent recoveries on same instance as well as flapping
	RecoveryPeriodBlockSeconds                 int               // (overrides `RecoveryPeriodBlockMinutes`) The time for which an instance's recovery is kept "active", so as to avoid concurrent recoveries on same instance as well as flapping
	RecoveryIgnoreHostnameFilters              []string          // Recovery analysis will completely ignore hosts matching given patterns
	RecoverMasterClusterFilters                []string          // Only do master recovery on clusters matching these regexp patterns (of course the ".*" pattern matches everything)
	RecoverIntermediateMasterClusterFilters    []string          // Only do IM recovery on clusters matching these regexp patterns (of course the ".*" pattern matches everything)
	ProcessesShellCommand                      string            // Shell that executes command scripts
	OnFailureDetectionProcesses                []string          // Processes to execute when detecting a failover scenario (before making a decision whether to failover or not). May and should use some of these placeholders: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {autoMasterRecovery}, {autoIntermediateMasterRecovery}
	PreGracefulTakeoverProcesses               []string          // Processes to execute before doing a failover (aborting operation should any once of them exits with non-zero code; order of execution undefined). May and should use some of these placeholders: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {countReplicas}, {replicaHosts}, {isDowntimed}
	PreFailoverProcesses                       []string          // Processes to execute before doing a failover (aborting operation should any once of them exits with non-zero code; order of execution undefined). May and should use some of these placeholders: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {countReplicas}, {replicaHosts}, {isDowntimed}
	PostFailoverProcesses                      []string          // Processes to execute after doing a failover (order of execution undefined). May and should use some of these placeholders: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorBinlogCoordinates}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {isSuccessful}, {lostReplicas}, {countLostReplicas}
	PostUnsuccessfulFailoverProcesses          []string          // Processes to execute after a not-completely-successful failover (order of execution undefined). May and should use some of these placeholders: {failureType}, {instanceType}, {isMaster}, {isCoMaster}, {failureDescription}, {command}, {failedHost}, {failureCluster}, {failureClusterAlias}, {failureClusterDomain}, {failedPort}, {successorHost}, {successorPort}, {successorBinlogCoordinates}, {successorAlias}, {countReplicas}, {replicaHosts}, {isDowntimed}, {isSuccessful}, {lostReplicas}, {countLostReplicas}
	PostMasterFailoverProcesses                []string          // Processes to execute after doing a master failover (order of execution undefined). Uses same placeholders as PostFailoverProcesses
	PostIntermediateMasterFailoverProcesses    []string          // Processes to execute after doing a master failover (order of execution undefined). Uses same placeholders as PostFailoverProcesses
	PostGracefulTakeoverProcesses              []string          // Processes to execute after runnign a graceful master takeover. Uses same placeholders as PostFailoverProcesses
	PostTakeMasterProcesses                    []string          // Processes to execute after a successful Take-Master event has taken place
	RecoverNonWriteableMaster                  bool              // When 'true', orchestrator treats a read-only master as a failure scenario and attempts to make the master writeable
	CoMasterRecoveryMustPromoteOtherCoMaster   bool              // When 'false', anything can get promoted (and candidates are prefered over others). When 'true', orchestrator will promote the other co-master or else fail
	DetachLostSlavesAfterMasterFailover        bool              // synonym to DetachLostReplicasAfterMasterFailover
	DetachLostReplicasAfterMasterFailover      bool              // Should replicas that are not to be lost in master recovery (i.e. were more up-to-date than promoted replica) be forcibly detached
	ApplyMySQLPromotionAfterMasterFailover     bool              // Should orchestrator take upon itself to apply MySQL master promotion: set read_only=0, detach replication, etc.
	PreventCrossDataCenterMasterFailover       bool              // When true (default: false), cross-DC master failover are not allowed, orchestrator will do all it can to only fail over within same DC, or else not fail over at all.
	PreventCrossRegionMasterFailover           bool              // When true (default: false), cross-region master failover are not allowed, orchestrator will do all it can to only fail over within same region, or else not fail over at all.
	MasterFailoverLostInstancesDowntimeMinutes uint              // Number of minutes to downtime any server that was lost after a master failover (including failed master & lost replicas). 0 to disable
	MasterFailoverDetachSlaveMasterHost        bool              // synonym to MasterFailoverDetachReplicaMasterHost
	MasterFailoverDetachReplicaMasterHost      bool              // Should orchestrator issue a detach-replica-master-host on newly promoted master (this makes sure the new master will not attempt to replicate old master if that comes back to life). Defaults 'false'. Meaningless if ApplyMySQLPromotionAfterMasterFailover is 'true'.
	FailMasterPromotionOnLagMinutes            uint              // when > 0, fail a master promotion if the candidate replica is lagging >= configured number of minutes.
	FailMasterPromotionIfSQLThreadNotUpToDate  bool              // when true, and a master failover takes place, if candidate master has not consumed all relay logs, promotion is aborted with error
	DelayMasterPromotionIfSQLThreadNotUpToDate bool              // when true, and a master failover takes place, if candidate master has not consumed all relay logs, delay promotion until the sql thread has caught up
	PostponeSlaveRecoveryOnLagMinutes          uint              // Synonym to PostponeReplicaRecoveryOnLagMinutes
	PostponeReplicaRecoveryOnLagMinutes        uint              // On crash recovery, replicas that are lagging more than given minutes are only resurrected late in the recovery process, after master/IM has been elected and processes executed. Value of 0 disables this feature
	OSCIgnoreHostnameFilters                   []string          // OSC replicas recommendation will ignore replica hostnames matching given patterns
	GraphiteAddr                               string            // Optional; address of graphite port. If supplied, metrics will be written here
	GraphitePath                               string            // Prefix for graphite path. May include {hostname} magic placeholder
	GraphiteConvertHostnameDotsToUnderscores   bool              // If true, then hostname's dots are converted to underscores before being used in graphite path
	GraphitePollSeconds                        int               // Graphite writes interval. 0 disables.
	URLPrefix                                  string            // URL prefix to run orchestrator on non-root web path, e.g. /orchestrator to put it behind nginx.
	DiscoveryIgnoreReplicaHostnameFilters      []string          // Regexp filters to apply to prevent auto-discovering new replicas. Usage: unreachable servers due to firewalls, applications which trigger binlog dumps
	DiscoveryIgnoreMasterHostnameFilters       []string          // Regexp filters to apply to prevent auto-discovering a master. Usage: pointing your master temporarily to replicate some data from external host
	DiscoveryIgnoreHostnameFilters             []string          // Regexp filters to apply to prevent discovering instances of any kind
	ConsulAddress                              string            // Address where Consul HTTP api is found. Example: 127.0.0.1:8500
	ConsulScheme                               string            // Scheme (http or https) for Consul
	ConsulAclToken                             string            // ACL token used to write to Consul KV
	ConsulCrossDataCenterDistribution          bool              // should orchestrator automatically auto-deduce all consul DCs and write KVs in all DCs
	ConsulKVStoreProvider                      string            // Consul KV store provider (consul or consul-txn), default: "consul"
	ConsulMaxKVsPerTransaction                 int               // Maximum number of KV operations to perform in a single Consul Transaction. Requires the "consul-txn" ConsulKVStoreProvider
	ZkAddress                                  string            // UNSUPPERTED YET. Address where (single or multiple) ZooKeeper servers are found, in `srv1[:port1][,srv2[:port2]...]` format. Default port is 2181. Example: srv-a,srv-b:12181,srv-c
	KVClusterMasterPrefix                      string            // Prefix to use for clusters' masters entries in KV stores (internal, consul, ZK), default: "mysql/master"
	WebMessage                                 string            // If provided, will be shown on all web pages below the title bar
	MaxConcurrentReplicaOperations             int               // Maximum number of concurrent operations on replicas
	EnforceExactSemiSyncReplicas               bool              // If true, semi-sync replicas will be enabled/disabled to match the wait count in the desired priority order; this applies to LockedSemiSyncMaster and MasterWithTooManySemiSyncReplicas
	RecoverLockedSemiSyncMaster                bool              // If true, orchestrator will recover from a LockedSemiSync state by enabling semi-sync on replicas to match the wait count; this behavior can be overridden by EnforceExactSemiSyncReplicas
	ReasonableLockedSemiSyncMasterSeconds      uint              // Time to evaluate the LockedSemiSyncHypothesis before triggering the LockedSemiSync analysis; falls back to ReasonableReplicationLagSeconds if not set
}

3 配置文件默认值

Debug:                                      false,
EnableSyslog:                               false,
ListenAddress:                              ":3000",
ListenSocket:                               "",
HTTPAdvertise:                              "",
AgentsServerPort:                           ":3001",
StatusEndpoint:                             DefaultStatusAPIEndpoint,
StatusOUVerify:                             false,
BackendDB:                                  "mysql",
SQLite3DataFile:                            "",
SkipOrchestratorDatabaseUpdate:             false,
PanicIfDifferentDatabaseDeploy:             false,
RaftBind:                                   "127.0.0.1:10008",
RaftAdvertise:                              "",
RaftDataDir:                                "",
DefaultRaftPort:                            10008,
RaftNodes:                                  []string{},
ExpectFailureAnalysisConcensus:             true,
MySQLOrchestratorMaxPoolConnections:        128, // limit concurrent conns to backend DB
MySQLOrchestratorPort:                      3306,
MySQLTopologyUseMutualTLS:                  false,
MySQLTopologyUseMixedTLS:                   true,
MySQLOrchestratorUseMutualTLS:              false,
MySQLConnectTimeoutSeconds:                 2,
MySQLOrchestratorReadTimeoutSeconds:        30,
MySQLOrchestratorRejectReadOnly:            false,
MySQLDiscoveryReadTimeoutSeconds:           10,
MySQLTopologyReadTimeoutSeconds:            600,
MySQLConnectionLifetimeSeconds:             0,
DefaultInstancePort:                        3306,
TLSCacheTTLFactor:                          100,
InstancePollSeconds:                        5,
ReasonableInstanceCheckSeconds:             1,
InstanceWriteBufferSize:                    100,
BufferInstanceWrites:                       false,
InstanceFlushIntervalMilliseconds:          100,
SkipMaxScaleCheck:                          true,
UnseenInstanceForgetHours:                  240,
SnapshotTopologiesIntervalHours:            0,
DiscoverByShowSlaveHosts:                   false,
UseSuperReadOnly:                           false,
DiscoveryMaxConcurrency:                    300,
DiscoveryQueueCapacity:                     100000,
DiscoveryQueueMaxStatisticsSize:            120,
DiscoveryCollectionRetentionSeconds:        120,
DiscoverySeeds:                             []string{},
InstanceBulkOperationsWaitTimeoutSeconds:   10,
HostnameResolveMethod:                      "default",
MySQLHostnameResolveMethod:                 "@@hostname",
SkipBinlogServerUnresolveCheck:             true,
ExpiryHostnameResolvesMinutes:              60,
RejectHostnameResolvePattern:               "",
ReasonableReplicationLagSeconds:            10,
ProblemIgnoreHostnameFilters:               []string{},
VerifyReplicationFilters:                   false,
ReasonableMaintenanceReplicationLagSeconds: 20,
CandidateInstanceExpireMinutes:             60,
AuditLogFile:                               "",
AuditToSyslog:                              false,
AuditToBackendDB:                           false,
AuditPurgeDays:                             7,
RemoveTextFromHostnameDisplay:              "",
ReadOnly:                                   false,
AuthenticationMethod:                       "",
HTTPAuthUser:                               "",
HTTPAuthPassword:                           "",
AuthUserHeader:                             "X-Forwarded-User",
PowerAuthUsers:                             []string{"*"},
PowerAuthGroups:                            []string{},
AccessTokenUseExpirySeconds:                60,
AccessTokenExpiryMinutes:                   1440,
ClusterNameToAlias:                         make(map[string]string),
DetectClusterAliasQuery:                    "",
DetectClusterDomainQuery:                   "",
DetectInstanceAliasQuery:                   "",
DetectPromotionRuleQuery:                   "",
DataCenterPattern:                          "",
PhysicalEnvironmentPattern:                 "",
DetectDataCenterQuery:                      "",
DetectPhysicalEnvironmentQuery:             "",
DetectSemiSyncEnforcedQuery:                "",
SupportFuzzyPoolHostnames:                  true,
InstancePoolExpiryMinutes:                  60,
PromotionIgnoreHostnameFilters:             []string{},
ServeAgentsHttp:                            false,
AgentsUseSSL:                               false,
AgentsUseMutualTLS:                         false,
AgentSSLValidOUs:                           []string{},
AgentSSLSkipVerify:                         false,
AgentSSLPrivateKeyFile:                     "",
AgentSSLCertFile:                           "",
AgentSSLCAFile:                             "",
UseSSL:                                     false,
UseMutualTLS:                               false,
SSLValidOUs:                                []string{},
SSLSkipVerify:                              false,
SSLPrivateKeyFile:                          "",
SSLCertFile:                                "",
SSLCAFile:                                  "",
AgentPollMinutes:                           60,
UnseenAgentForgetHours:                     6,
StaleSeedFailMinutes:                       60,
SeedAcceptableBytesDiff:                    8192,
SeedWaitSecondsBeforeSend:                  2,
AutoPseudoGTID:                             false,
PseudoGTIDPattern:                          "",
PseudoGTIDPatternIsFixedSubstring:          false,
PseudoGTIDMonotonicHint:                    "",
DetectPseudoGTIDQuery:                      "",
BinlogEventsChunkSize:                      10000,
SkipBinlogEventsContaining:                 []string{},
ReduceReplicationAnalysisCount:             true,
FailureDetectionPeriodBlockMinutes:         60,
RecoveryPeriodBlockMinutes:                 60,
RecoveryPeriodBlockSeconds:                 3600,
RecoveryIgnoreHostnameFilters:              []string{},
RecoverMasterClusterFilters:                []string{},
RecoverIntermediateMasterClusterFilters:    []string{},
ProcessesShellCommand:                      "bash",
OnFailureDetectionProcesses:                []string{},
PreGracefulTakeoverProcesses:               []string{},
PreFailoverProcesses:                       []string{},
PostMasterFailoverProcesses:                []string{},
PostIntermediateMasterFailoverProcesses:    []string{},
PostFailoverProcesses:                      []string{},
PostUnsuccessfulFailoverProcesses:          []string{},
PostGracefulTakeoverProcesses:              []string{},
PostTakeMasterProcesses:                    []string{},
RecoverNonWriteableMaster:                  false,
CoMasterRecoveryMustPromoteOtherCoMaster:   true,
DetachLostSlavesAfterMasterFailover:        true,
ApplyMySQLPromotionAfterMasterFailover:     true,
PreventCrossDataCenterMasterFailover:       false,
PreventCrossRegionMasterFailover:           false,
MasterFailoverLostInstancesDowntimeMinutes: 0,
MasterFailoverDetachSlaveMasterHost:        false,
FailMasterPromotionOnLagMinutes:            0,
FailMasterPromotionIfSQLThreadNotUpToDate:  false,
DelayMasterPromotionIfSQLThreadNotUpToDate: false,
PostponeSlaveRecoveryOnLagMinutes:          0,
OSCIgnoreHostnameFilters:                   []string{},
GraphiteAddr:                               "",
GraphitePath:                               "",
GraphiteConvertHostnameDotsToUnderscores:   true,
GraphitePollSeconds:                        60,
URLPrefix:                                  "",
DiscoveryIgnoreReplicaHostnameFilters:      []string{},
ConsulAddress:                              "",
ConsulScheme:                               "http",
ConsulAclToken:                             "",
ConsulCrossDataCenterDistribution:          false,
ConsulKVStoreProvider:                      "consul",
ConsulMaxKVsPerTransaction:                 ConsulKVsPerCluster,
ZkAddress:                                  "",
KVClusterMasterPrefix:                      "mysql/master",
WebMessage:                                 "",
MaxConcurrentReplicaOperations:             5,
EnforceExactSemiSyncReplicas:               false,
RecoverLockedSemiSyncMaster:                false,
ReasonableLockedSemiSyncMasterSeconds:      0,

4 参考

源码

https://github.com/openark/orchestrator/blob/master/go/config/config.go

文档

你可能感兴趣的:(orchestrator,mysql)