Repository: sohutv/cachecloud
Branch: main
Commit: abbd3e3582c5
Files: 1298
Total size: 32.7 MB
Directory structure:
gitextract_rpc3q3g2/
├── .github/
│ └── workflows/
│ └── maven.yml
├── .gitignore
├── LICENSE
├── README.md
├── README_CN.md
├── README_EN.md
├── cachecloud-custom/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── sohu/
│ └── cache/
│ ├── DefaultCustomConfiguration.java
│ ├── alert/
│ │ ├── EmailComponent.java
│ │ ├── WeChatComponent.java
│ │ ├── impl/
│ │ │ ├── DefaultEmailComponent.java
│ │ │ └── DefaultWeChatComponent.java
│ │ └── utils/
│ │ └── AlertUtils.java
│ ├── configuration/
│ │ └── DefaultRestTemplateConfig.java
│ ├── login/
│ │ ├── LoginComponent.java
│ │ └── impl/
│ │ └── DefaultLoginComponent.java
│ ├── report/
│ │ ├── ReportDataComponent.java
│ │ └── impl/
│ │ └── DefaultReportDataComponent.java
│ └── utils/
│ └── EnvCustomUtil.java
├── cachecloud-web/
│ ├── pom.xml
│ ├── sql/
│ │ ├── 2.0.sql
│ │ ├── 3.0.sql
│ │ ├── 3.1.sql
│ │ ├── 3.2.sql
│ │ ├── 3.3.sql
│ │ ├── function-support_custom_password.sql
│ │ ├── update 2.0 to 3.0.sql
│ │ ├── update 3.0 to 3.1.sql
│ │ ├── update 3.1 to 3.2.sql
│ │ ├── update 3.2 to 3.3.sql
│ │ ├── update-system_resource.sql
│ │ └── update2.0-2.1.sql
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── sohu/
│ │ └── cache/
│ │ ├── ApplicationStarter.java
│ │ ├── alert/
│ │ │ ├── InstanceAlertService.java
│ │ │ ├── bean/
│ │ │ │ └── AlertConfigBaseData.java
│ │ │ ├── impl/
│ │ │ │ ├── BaseAlertService.java
│ │ │ │ └── InstanceAlertServiceImpl.java
│ │ │ └── strategy/
│ │ │ ├── AlertConfigStrategy.java
│ │ │ ├── AofCurrentSizeAlertStrategy.java
│ │ │ ├── ClientBiggestInputBufAlertStrategy.java
│ │ │ ├── ClientLongestOutputListAlertStrategy.java
│ │ │ ├── ClusterSlotsOkAlertStrategy.java
│ │ │ ├── ClusterStateAlertStrategy.java
│ │ │ ├── DefaultCommonAlertStrategy.java
│ │ │ ├── InstantaneousOpsPerSecAlertStrategy.java
│ │ │ ├── LatestForkUsecAlertStrategy.java
│ │ │ ├── MasterSlaveOffsetAlertStrategy.java
│ │ │ ├── MemFragmentationRatioAlertStrategy.java
│ │ │ ├── MinuteAofDelayedFsyncAlertStrategy.java
│ │ │ ├── MinuteRejectedConnectionsAlertStrategy.java
│ │ │ ├── MinuteSyncFullAlertStrategy.java
│ │ │ ├── MinuteSyncPartialErrAlertStrategy.java
│ │ │ ├── MinuteSyncPartialOkAlertStrategy.java
│ │ │ ├── MinuteTotalNetInputMBytesAlertStrategy.java
│ │ │ ├── MinuteTotalNetOutputMBytesAlertStrategy.java
│ │ │ ├── MinuteUsedCpuSysChStrategy.java
│ │ │ ├── MinuteUsedCpuSysStrategy.java
│ │ │ ├── MinuteUsedCpuUserChStrategy.java
│ │ │ ├── MinuteUsedCpuUserStrategy.java
│ │ │ └── RdbLastBgsaveStatusAlertStrategy.java
│ │ ├── async/
│ │ │ ├── AsyncService.java
│ │ │ ├── AsyncThreadPoolFactory.java
│ │ │ ├── CounterRejectedExecutionHandler.java
│ │ │ ├── KeyCallable.java
│ │ │ ├── KeyFuture.java
│ │ │ ├── NamedThreadFactory.java
│ │ │ └── impl/
│ │ │ └── AsyncServiceImpl.java
│ │ ├── client/
│ │ │ ├── AppClientReportConstant.java
│ │ │ ├── AppClientReportModel.java
│ │ │ ├── command/
│ │ │ │ ├── AppClientCommand.java
│ │ │ │ └── AppClientParams.java
│ │ │ ├── heartbeat/
│ │ │ │ ├── RedisClientController.java
│ │ │ │ ├── RedisClientOldController.java
│ │ │ │ └── RedisClientReportDataController.java
│ │ │ └── service/
│ │ │ ├── AppClientReportCommandService.java
│ │ │ ├── AppClientReportExceptionService.java
│ │ │ ├── AppClientService.java
│ │ │ ├── AppClientStatisticGatherService.java
│ │ │ ├── AppInstanceClientRelationService.java
│ │ │ ├── ClientReportExceptionService.java
│ │ │ ├── ClientReportInstanceService.java
│ │ │ ├── ClientVersionService.java
│ │ │ ├── DealClientReportService.java
│ │ │ └── impl/
│ │ │ ├── AppClientReportCommandServiceImpl.java
│ │ │ ├── AppClientReportExceptionServiceImpl.java
│ │ │ ├── AppClientServiceImpl.java
│ │ │ ├── AppClientStatisticGatherServiceImpl.java
│ │ │ ├── AppInstanceClientRelationServiceImpl.java
│ │ │ ├── ClientReportExceptionServiceImpl.java
│ │ │ ├── ClientReportInstanceServiceImpl.java
│ │ │ ├── ClientVersionServiceImpl.java
│ │ │ └── DealClientReportServiceImpl.java
│ │ ├── configuration/
│ │ │ ├── AppClientReportBean.java
│ │ │ ├── AsynExecutorConfiguration.java
│ │ │ ├── AsyncConfiguration.java
│ │ │ ├── DataSourceConfig.java
│ │ │ ├── FreemakerCustomConfig.java
│ │ │ ├── SSHPoolConfig.java
│ │ │ └── WebAntPathConfig.java
│ │ ├── constant/
│ │ │ ├── AppAuditLogTypeEnum.java
│ │ │ ├── AppAuditType.java
│ │ │ ├── AppCheckEnum.java
│ │ │ ├── AppDataMigrateEnum.java
│ │ │ ├── AppDataMigrateResult.java
│ │ │ ├── AppDataMigrateStatusEnum.java
│ │ │ ├── AppDescEnum.java
│ │ │ ├── AppEnvNameEnum.java
│ │ │ ├── AppStatusEnum.java
│ │ │ ├── AppTopology.java
│ │ │ ├── AppUserAlertEnum.java
│ │ │ ├── AppUserTypeEnum.java
│ │ │ ├── BaseConstant.java
│ │ │ ├── ChmodEnum.java
│ │ │ ├── ClientStatusEnum.java
│ │ │ ├── ClusterOperateResult.java
│ │ │ ├── CommandResult.java
│ │ │ ├── DataFormatCheckResult.java
│ │ │ ├── DiagnosticTypeEnum.java
│ │ │ ├── EmptyObjectConstant.java
│ │ │ ├── ErrorMessageEnum.java
│ │ │ ├── HorizontalResult.java
│ │ │ ├── ImportAppResult.java
│ │ │ ├── InstanceStatusEnum.java
│ │ │ ├── MachineConstant.java
│ │ │ ├── MachineInfoEnum.java
│ │ │ ├── OperateResult.java
│ │ │ ├── PipelineEnum.java
│ │ │ ├── RedisConfigTemplateChangeEnum.java
│ │ │ ├── RedisConstant.java
│ │ │ ├── RedisExcludeCommand.java
│ │ │ ├── RedisMigrateToolConstant.java
│ │ │ ├── RedisShakeEnum.java
│ │ │ ├── ReshardStatusEnum.java
│ │ │ ├── SymbolConstant.java
│ │ │ ├── TimeDimensionalityEnum.java
│ │ │ ├── UserLoginTypeEnum.java
│ │ │ └── ValueSizeDistriEnum.java
│ │ ├── dao/
│ │ │ ├── AppAlertRecordDao.java
│ │ │ ├── AppAuditDao.java
│ │ │ ├── AppAuditLogDao.java
│ │ │ ├── AppBizDao.java
│ │ │ ├── AppCapacityMonitorDao.java
│ │ │ ├── AppClientCommandStatisticsDao.java
│ │ │ ├── AppClientCostTimeStatDao.java
│ │ │ ├── AppClientCostTimeTotalStatDao.java
│ │ │ ├── AppClientExceptionStatDao.java
│ │ │ ├── AppClientExceptionStatisticsDao.java
│ │ │ ├── AppClientLatencyCommandDao.java
│ │ │ ├── AppClientReportDataSizeDao.java
│ │ │ ├── AppClientStatisticGatherDao.java
│ │ │ ├── AppClientVersionDao.java
│ │ │ ├── AppDailyDao.java
│ │ │ ├── AppDao.java
│ │ │ ├── AppDataMigrateStatusDao.java
│ │ │ ├── AppImportDao.java
│ │ │ ├── AppInstanceClientRelationDao.java
│ │ │ ├── AppStatsDao.java
│ │ │ ├── AppToUserDao.java
│ │ │ ├── AppUserDao.java
│ │ │ ├── ConfigDao.java
│ │ │ ├── ConfigRestartRecordDao.java
│ │ │ ├── DiagnosticTaskRecordDao.java
│ │ │ ├── InstanceAlertConfigDao.java
│ │ │ ├── InstanceBigKeyDao.java
│ │ │ ├── InstanceConfigDao.java
│ │ │ ├── InstanceDao.java
│ │ │ ├── InstanceFaultDao.java
│ │ │ ├── InstanceLatencyHistoryDao.java
│ │ │ ├── InstanceReshardProcessDao.java
│ │ │ ├── InstanceSlowLogDao.java
│ │ │ ├── InstanceStatsDao.java
│ │ │ ├── MachineDao.java
│ │ │ ├── MachineRelationDao.java
│ │ │ ├── MachineRoomDao.java
│ │ │ ├── MachineStatsDao.java
│ │ │ ├── QuartzDao.java
│ │ │ ├── ResourceDao.java
│ │ │ ├── ServerStatusDao.java
│ │ │ ├── StandardStatsDao.java
│ │ │ ├── TaskQueueDao.java
│ │ │ ├── TaskStepFlowDao.java
│ │ │ └── TaskStepMetaDao.java
│ │ ├── entity/
│ │ │ ├── AppAlertRecord.java
│ │ │ ├── AppAudit.java
│ │ │ ├── AppAuditLog.java
│ │ │ ├── AppBiz.java
│ │ │ ├── AppCapacityMonitor.java
│ │ │ ├── AppCapacityStatisticsResult.java
│ │ │ ├── AppClientCommandStatistics.java
│ │ │ ├── AppClientCostTimeStat.java
│ │ │ ├── AppClientCostTimeTotalStat.java
│ │ │ ├── AppClientDataSizeStat.java
│ │ │ ├── AppClientExceptionStat.java
│ │ │ ├── AppClientExceptionStatistics.java
│ │ │ ├── AppClientLatencyCommand.java
│ │ │ ├── AppClientStatisticGather.java
│ │ │ ├── AppClientValueDistriSimple.java
│ │ │ ├── AppClientValueDistriStatTotal.java
│ │ │ ├── AppClientVersion.java
│ │ │ ├── AppCommandGroup.java
│ │ │ ├── AppCommandStats.java
│ │ │ ├── AppDailyData.java
│ │ │ ├── AppDataMigrateSearch.java
│ │ │ ├── AppDataMigrateStatus.java
│ │ │ ├── AppDesc.java
│ │ │ ├── AppImport.java
│ │ │ ├── AppInfoApi.java
│ │ │ ├── AppInstanceClientRelation.java
│ │ │ ├── AppMonitorStatisticsResult.java
│ │ │ ├── AppSearch.java
│ │ │ ├── AppStatisticsSearch.java
│ │ │ ├── AppStats.java
│ │ │ ├── AppToUser.java
│ │ │ ├── AppTopMemFragRatio.java
│ │ │ ├── AppUser.java
│ │ │ ├── BrevityScheduleTask.java
│ │ │ ├── ClientInstanceException.java
│ │ │ ├── ConfigRestartRecord.java
│ │ │ ├── DbPoolStat.java
│ │ │ ├── DeployInfo.java
│ │ │ ├── DeployInfoStat.java
│ │ │ ├── DiagnosticTaskRecord.java
│ │ │ ├── InstanceAlertConfig.java
│ │ │ ├── InstanceAlertValueResult.java
│ │ │ ├── InstanceCommandStats.java
│ │ │ ├── InstanceConfig.java
│ │ │ ├── InstanceFault.java
│ │ │ ├── InstanceInfo.java
│ │ │ ├── InstanceLatencyHistory.java
│ │ │ ├── InstanceMinuteStats.java
│ │ │ ├── InstanceReshardProcess.java
│ │ │ ├── InstanceSlotModel.java
│ │ │ ├── InstanceSlowLog.java
│ │ │ ├── InstanceStats.java
│ │ │ ├── LoginResult.java
│ │ │ ├── MachineInfo.java
│ │ │ ├── MachineInstanceStat.java
│ │ │ ├── MachineMemInfo.java
│ │ │ ├── MachineMemStatInfo.java
│ │ │ ├── MachineRelation.java
│ │ │ ├── MachineRoom.java
│ │ │ ├── MachineStats.java
│ │ │ ├── OperationAlertValueResult.java
│ │ │ ├── ParamCount.java
│ │ │ ├── RedisVersion.java
│ │ │ ├── RedisVersionStat.java
│ │ │ ├── ServerInfo.java
│ │ │ ├── ServerStatus.java
│ │ │ ├── StandardStats.java
│ │ │ ├── SystemConfig.java
│ │ │ ├── SystemResource.java
│ │ │ ├── ThreadPoolStat.java
│ │ │ ├── TimeBetween.java
│ │ │ ├── TimeDimensionality.java
│ │ │ ├── TopologyExamResult.java
│ │ │ └── TriggerInfo.java
│ │ ├── exception/
│ │ │ ├── IllegalParamException.java
│ │ │ └── SSHException.java
│ │ ├── inspect/
│ │ │ ├── InspectHandler.java
│ │ │ ├── InspectParamEnum.java
│ │ │ ├── Inspector.java
│ │ │ ├── InspectorJob.java
│ │ │ └── impl/
│ │ │ ├── AbstractInspectHandler.java
│ │ │ ├── AppClientConnInspector.java
│ │ │ ├── AppHitPrecentInspector.java
│ │ │ ├── AppInspectHandler.java
│ │ │ ├── AppMemInspector.java
│ │ │ ├── HostInspectHandler.java
│ │ │ ├── InstanceRunInspector.java
│ │ │ ├── InstanceStateInspector.java
│ │ │ └── RedisIsolationPersistenceInspector.java
│ │ ├── interceptor/
│ │ │ ├── AppAndInstanceAuthorityInterceptor.java
│ │ │ ├── FrontUserLoginInterceptor.java
│ │ │ └── ManageUserLoginInterceptor.java
│ │ ├── log/
│ │ │ ├── CustLogAppenderInit.java
│ │ │ └── TaskFlowRecordAppender.java
│ │ ├── machine/
│ │ │ ├── MachineCenter.java
│ │ │ ├── MachineDeployCenter.java
│ │ │ ├── MachineProperty.java
│ │ │ ├── PortGenerator.java
│ │ │ └── impl/
│ │ │ ├── MachineCenterImpl.java
│ │ │ └── MachineDeployCenterImpl.java
│ │ ├── protocol/
│ │ │ ├── MachineProtocol.java
│ │ │ └── RedisProtocol.java
│ │ ├── redis/
│ │ │ ├── AssistRedisService.java
│ │ │ ├── RedisCenter.java
│ │ │ ├── RedisClusterNode.java
│ │ │ ├── RedisClusterReshard.java
│ │ │ ├── RedisConfigTemplateService.java
│ │ │ ├── RedisDeployCenter.java
│ │ │ ├── enums/
│ │ │ │ ├── AppTypeToAlertTypeEnum.java
│ │ │ │ ├── DirEnum.java
│ │ │ │ ├── InstanceAlertCheckCycleEnum.java
│ │ │ │ ├── InstanceAlertCompareTypeEnum.java
│ │ │ │ ├── InstanceAlertStatusEnum.java
│ │ │ │ ├── InstanceAlertTypeEnum.java
│ │ │ │ ├── RedisAlertConfigEnum.java
│ │ │ │ ├── RedisClusterConfigEnum.java
│ │ │ │ ├── RedisClusterInfoEnum.java
│ │ │ │ ├── RedisConfigEnum.java
│ │ │ │ ├── RedisInfoEnum.java
│ │ │ │ ├── RedisReadOnlyCommandEnum.java
│ │ │ │ └── RedisSentinelConfigEnum.java
│ │ │ ├── impl/
│ │ │ │ ├── AssistRedisServiceImpl.java
│ │ │ │ ├── RedisCenterImpl.java
│ │ │ │ ├── RedisConfigTemplateServiceImpl.java
│ │ │ │ └── RedisDeployCenterImpl.java
│ │ │ └── util/
│ │ │ ├── AuthUtil.java
│ │ │ ├── ClusterNodeInformation.java
│ │ │ ├── ClusterNodeInformationParser.java
│ │ │ ├── Command.java
│ │ │ ├── JedisUtil.java
│ │ │ ├── Keyword.java
│ │ │ ├── LatencyHistoryItem.java
│ │ │ ├── LatencyItem.java
│ │ │ ├── PipelineUtil.java
│ │ │ ├── ProtostuffSerializer.java
│ │ │ └── VO.java
│ │ ├── schedule/
│ │ │ ├── SchedulerCenter.java
│ │ │ ├── TriggerCenter.java
│ │ │ ├── brevity/
│ │ │ │ ├── BrevityScheduleType.java
│ │ │ │ ├── BrevityScheduler.java
│ │ │ │ ├── BrevitySchedulerJob.java
│ │ │ │ ├── DispatcherBrevityScheduleJob.java
│ │ │ │ └── impl/
│ │ │ │ ├── BrevitySchedulerImpl.java
│ │ │ │ └── BrevitySchedulerImpl_Original.java
│ │ │ ├── impl/
│ │ │ │ ├── SchedulerCenterImpl.java
│ │ │ │ └── TriggerCenterImpl.java
│ │ │ └── jobs/
│ │ │ ├── AppCapacityMonitorJob.java
│ │ │ ├── AppDailyJob.java
│ │ │ ├── AppPersistenceCheckJob.java
│ │ │ ├── CacheBaseJob.java
│ │ │ ├── CleanupDayAppClientStatJob.java
│ │ │ ├── CleanupDayDimensionalityJob.java
│ │ │ ├── CleanupMinuteDimensionalityJob.java
│ │ │ ├── ExpAppsDailyJob.java
│ │ │ ├── GatherAppClientStatisticsJob.java
│ │ │ ├── GatherAppClientStatisticsServerCmdCountJob.java
│ │ │ ├── InstanceAlertValueJob.java
│ │ │ ├── InstanceStatJob.java
│ │ │ ├── ReviseAppClientStatisGatherJob.java
│ │ │ ├── SystemConfigRefreshJob.java
│ │ │ └── TaskExecuteJob.java
│ │ ├── server/
│ │ │ ├── ServerStatusCollector.java
│ │ │ ├── data/
│ │ │ │ ├── CPU.java
│ │ │ │ ├── Connection.java
│ │ │ │ ├── Disk.java
│ │ │ │ ├── LineParser.java
│ │ │ │ ├── Load.java
│ │ │ │ ├── Memory.java
│ │ │ │ ├── Net.java
│ │ │ │ ├── OS.java
│ │ │ │ ├── OSInfo.java
│ │ │ │ └── Server.java
│ │ │ └── nmon/
│ │ │ └── NMONService.java
│ │ ├── ssh/
│ │ │ ├── SSHClient.java
│ │ │ ├── SSHMachineInfo.java
│ │ │ ├── SSHService.java
│ │ │ ├── SSHServiceImpl.java
│ │ │ ├── SSHSessionPooledObjectFactory.java
│ │ │ ├── SSHTemplate.java
│ │ │ └── SSHUtil.java
│ │ ├── stats/
│ │ │ ├── admin/
│ │ │ │ ├── CoreAppsStatCenter.java
│ │ │ │ └── impl/
│ │ │ │ └── CoreAppsStatCenterImpl.java
│ │ │ ├── app/
│ │ │ │ ├── AppDailyDataCenter.java
│ │ │ │ ├── AppDataMigrateCenter.java
│ │ │ │ ├── AppDeployCenter.java
│ │ │ │ ├── AppPersistenceCheckCenter.java
│ │ │ │ ├── AppStatsCenter.java
│ │ │ │ ├── ImportAppCenter.java
│ │ │ │ ├── RedisMigrateToolCenter.java
│ │ │ │ ├── RedisShakeCenter.java
│ │ │ │ └── impl/
│ │ │ │ ├── AppDailyDataCenterImpl.java
│ │ │ │ ├── AppDataMigrateCenterImpl.java
│ │ │ │ ├── AppDeployCenterImpl.java
│ │ │ │ ├── AppPersistenceCheckCenterImpl.java
│ │ │ │ ├── AppStatsCenterImpl.java
│ │ │ │ ├── ImportAppCenterImpl.java
│ │ │ │ ├── RedisMigrateToolCenterImpl.java
│ │ │ │ └── RedisShakeCenterImpl.java
│ │ │ └── instance/
│ │ │ ├── InstanceAlertConfigService.java
│ │ │ ├── InstanceDeployCenter.java
│ │ │ ├── InstanceStatsCenter.java
│ │ │ └── impl/
│ │ │ ├── InstanceAlertConfigServiceImpl.java
│ │ │ ├── InstanceDeployCenterImpl.java
│ │ │ └── InstanceStatsCenterImpl.java
│ │ ├── swagger/
│ │ │ └── Swagger2.java
│ │ ├── task/
│ │ │ ├── BaseTask.java
│ │ │ ├── TaskService.java
│ │ │ ├── constant/
│ │ │ │ ├── IdleTimeDistriEnum.java
│ │ │ │ ├── InstanceInfoEnum.java
│ │ │ │ ├── InstanceRoleEnum.java
│ │ │ │ ├── MachineExamContants.java
│ │ │ │ ├── MachineSyncEnum.java
│ │ │ │ ├── PikaNode.java
│ │ │ │ ├── PushEnum.java
│ │ │ │ ├── RedisDataStructureTypeEnum.java
│ │ │ │ ├── ResourceEnum.java
│ │ │ │ ├── ScanCleanConstants.java
│ │ │ │ ├── TaskConstants.java
│ │ │ │ ├── TaskQueueEnum.java
│ │ │ │ ├── TaskStepFlowEnum.java
│ │ │ │ ├── TopoloyExamContants.java
│ │ │ │ ├── TtlTimeDistriEnum.java
│ │ │ │ └── ValueSizeDistriEnum.java
│ │ │ ├── entity/
│ │ │ │ ├── InstanceBigKey.java
│ │ │ │ ├── NutCrackerNode.java
│ │ │ │ ├── RedisSentinelNode.java
│ │ │ │ ├── RedisServerNode.java
│ │ │ │ ├── TaskQueue.java
│ │ │ │ ├── TaskSearch.java
│ │ │ │ ├── TaskStepFlow.java
│ │ │ │ └── TaskStepMeta.java
│ │ │ ├── impl/
│ │ │ │ └── TaskServiceImpl.java
│ │ │ ├── tasks/
│ │ │ │ ├── AppKeyAnalysisTask.java
│ │ │ │ ├── MachineSyncTask.java
│ │ │ │ ├── OffLineAppTask.java
│ │ │ │ ├── RedisClusterAppDeployTask.java
│ │ │ │ ├── RedisSentinelAppDeployTask.java
│ │ │ │ ├── RedisStandaloneAppDeployTask.java
│ │ │ │ ├── TwemproxyAppDeployTask.java
│ │ │ │ ├── analysis/
│ │ │ │ │ ├── RedisServerBigKeyAnalysisTask.java
│ │ │ │ │ ├── RedisServerIdleKeyAnalysisTask.java
│ │ │ │ │ ├── RedisServerKeyTtlAnalysisTask.java
│ │ │ │ │ ├── RedisServerKeyTypeAnalysisTask.java
│ │ │ │ │ └── RedisServerKeyValueAnalysisTask.java
│ │ │ │ ├── daily/
│ │ │ │ │ ├── MachineExamTask.java
│ │ │ │ │ └── TopologyExamTask.java
│ │ │ │ ├── diagnosticTask/
│ │ │ │ │ ├── AppBigKeyTask.java
│ │ │ │ │ ├── AppDelKeyTask.java
│ │ │ │ │ ├── AppHotKeyTask.java
│ │ │ │ │ ├── AppIdleKeyTask.java
│ │ │ │ │ ├── AppScanCleanKeyTask.java
│ │ │ │ │ ├── AppScanKeyTask.java
│ │ │ │ │ ├── AppSlotAnalysisTask.java
│ │ │ │ │ ├── InstanceBigKeyTask.java
│ │ │ │ │ ├── InstanceDelKeyTask.java
│ │ │ │ │ ├── InstanceHotKeyTask.java
│ │ │ │ │ ├── InstanceIdleKeyTask.java
│ │ │ │ │ ├── InstanceScanCleanKeyTask.java
│ │ │ │ │ ├── InstanceScanKeyTask.java
│ │ │ │ │ └── InstanceSlotAnalysisTask.java
│ │ │ │ ├── install/
│ │ │ │ │ ├── RedisSentinelInstallTask.java
│ │ │ │ │ └── RedisServerInstallTask.java
│ │ │ │ └── resource/
│ │ │ │ └── PackCompileTask.java
│ │ │ └── util/
│ │ │ ├── AppWechatUtil.java
│ │ │ └── SpringContextUtil.java
│ │ ├── util/
│ │ │ ├── AppKeyUtil.java
│ │ │ ├── ConstUtils.java
│ │ │ ├── DemoCodeUtil.java
│ │ │ ├── EnvUtil.java
│ │ │ ├── IdempotentConfirmer.java
│ │ │ ├── IntegerUtil.java
│ │ │ ├── JsonUtil.java
│ │ │ ├── MD5Util.java
│ │ │ ├── MapUtil.java
│ │ │ ├── NMONFileFactory.java
│ │ │ ├── NamedArg.java
│ │ │ ├── NumberUtil.java
│ │ │ ├── OSFactory.java
│ │ │ ├── ObjectConvert.java
│ │ │ ├── Pair.java
│ │ │ ├── PandectUtil.java
│ │ │ ├── RedisConstUtils.java
│ │ │ ├── ScheduleUtil.java
│ │ │ ├── StringUtil.java
│ │ │ └── TypeUtil.java
│ │ └── web/
│ │ ├── chart/
│ │ │ ├── key/
│ │ │ │ └── ChartKeysUtil.java
│ │ │ └── model/
│ │ │ ├── AreaChartEntity.java
│ │ │ ├── ChartEntity.java
│ │ │ ├── HighchartDoublePoint.java
│ │ │ ├── HighchartPoint.java
│ │ │ ├── SimpleChartData.java
│ │ │ └── SplineChartEntity.java
│ │ ├── controller/
│ │ │ ├── AnalysisController.java
│ │ │ ├── AppAutomationApiController.java
│ │ │ ├── AppClientDataShowController.java
│ │ │ ├── AppController.java
│ │ │ ├── AppDataMigrateController.java
│ │ │ ├── AppManageController.java
│ │ │ ├── AppMigrateController.java
│ │ │ ├── AppScrollRestartController.java
│ │ │ ├── AppStatController.java
│ │ │ ├── AppToolController.java
│ │ │ ├── BaseController.java
│ │ │ ├── ClientManageController.java
│ │ │ ├── ConfigManageController.java
│ │ │ ├── ExamToolController.java
│ │ │ ├── ImportAppController.java
│ │ │ ├── IndexController.java
│ │ │ ├── InstanceAlertValueController.java
│ │ │ ├── InstanceController.java
│ │ │ ├── InstanceManageController.java
│ │ │ ├── InstanceOperationController.java
│ │ │ ├── LoginController.java
│ │ │ ├── MachineManageController.java
│ │ │ ├── NoticeManageController.java
│ │ │ ├── OperationController.java
│ │ │ ├── QuartzManageController.java
│ │ │ ├── RedisConfigTemplateController.java
│ │ │ ├── RedisVersionUpgradeController.java
│ │ │ ├── ResourceController.java
│ │ │ ├── ServerController.java
│ │ │ ├── TaskController.java
│ │ │ ├── TotalManageController.java
│ │ │ ├── TriggerController.java
│ │ │ ├── UserController.java
│ │ │ ├── UserManageController.java
│ │ │ ├── WebResourceController.java
│ │ │ └── WikiController.java
│ │ ├── enums/
│ │ │ ├── AdminEnum.java
│ │ │ ├── AlertTypeEnum.java
│ │ │ ├── AppImportStatusEnum.java
│ │ │ ├── AppOrderByEnum.java
│ │ │ ├── AppTypeEnum.java
│ │ │ ├── BooleanEnum.java
│ │ │ ├── CheckEnum.java
│ │ │ ├── ClientTypeEnum.java
│ │ │ ├── CompareTypeEnum.java
│ │ │ ├── ConfigRestartOperateEnum.java
│ │ │ ├── DeployInfoEnum.java
│ │ │ ├── ExamToolEnum.java
│ │ │ ├── ImportantLevelTypeEnum.java
│ │ │ ├── LoginEnum.java
│ │ │ ├── MachineMemoryDistriEnum.java
│ │ │ ├── MachineTaskEnum.java
│ │ │ ├── MasterSlaveExistEnum.java
│ │ │ ├── NodeEnum.java
│ │ │ ├── PodStatusEnum.java
│ │ │ ├── RedisOperateEnum.java
│ │ │ ├── RedisVersionEnum.java
│ │ │ ├── RestartStatusEnum.java
│ │ │ ├── SshAuthTypeEnum.java
│ │ │ ├── StatEnum.java
│ │ │ ├── SuccessEnum.java
│ │ │ ├── TriggerStateEnum.java
│ │ │ ├── UseTypeEnum.java
│ │ │ └── WebClients.java
│ │ ├── service/
│ │ │ ├── AppAlertRecordService.java
│ │ │ ├── AppAutoCapacityService.java
│ │ │ ├── AppImportService.java
│ │ │ ├── AppRedisCommandCheckService.java
│ │ │ ├── AppRedisConfigCheckService.java
│ │ │ ├── AppScrollRestartService.java
│ │ │ ├── AppService.java
│ │ │ ├── ConfigService.java
│ │ │ ├── DiagnosticToolService.java
│ │ │ ├── InstancePortService.java
│ │ │ ├── MigrateService.java
│ │ │ ├── ResourceService.java
│ │ │ ├── ServerDataService.java
│ │ │ ├── ToolService.java
│ │ │ ├── UserLoginStatusService.java
│ │ │ ├── UserService.java
│ │ │ ├── WebClientComponent.java
│ │ │ └── impl/
│ │ │ ├── AppAlertRecordServiceImpl.java
│ │ │ ├── AppAutoCapacityServiceImpl.java
│ │ │ ├── AppImportServiceImpl.java
│ │ │ ├── AppRedisCommandCheckServiceImpl.java
│ │ │ ├── AppRedisConfigCheckServiceImpl.java
│ │ │ ├── AppScrollRestartServiceImpl.java
│ │ │ ├── AppServiceImpl.java
│ │ │ ├── ConfigServiceImpl.java
│ │ │ ├── DiagnosticToolServiceImpl.java
│ │ │ ├── InstancePortServiceImpl.java
│ │ │ ├── MigrateServiceImpl.java
│ │ │ ├── ResourceServiceImpl.java
│ │ │ ├── ServerDataServiceImpl.java
│ │ │ ├── ToolServiceImpl.java
│ │ │ ├── UserLoginStatusCookieServiceImpl.java
│ │ │ └── UserServiceImpl.java
│ │ ├── util/
│ │ │ ├── AESCoder.java
│ │ │ ├── AppEmailUtil.java
│ │ │ ├── DateUtil.java
│ │ │ ├── FreemakerUtils.java
│ │ │ ├── IpUtil.java
│ │ │ ├── Page.java
│ │ │ ├── SimpleFileUtil.java
│ │ │ └── WebUtil.java
│ │ └── vo/
│ │ ├── AlertConfig.java
│ │ ├── AppDetailVO.java
│ │ ├── AppRedisCommandCheckResult.java
│ │ ├── AppRedisCommandCheckVo.java
│ │ ├── AppRedisConfigCheckResult.java
│ │ ├── AppRedisConfigCheckVo.java
│ │ ├── AppRedisConfigVo.java
│ │ ├── AppUserVo.java
│ │ ├── ExecuteResult.java
│ │ ├── GeneralResponse.java
│ │ ├── InstanceRedisCommandCheckResult.java
│ │ ├── InstanceRedisConfigCheckResult.java
│ │ ├── MachineEnv.java
│ │ ├── MachineStatsVo.java
│ │ ├── MasterSlaveGroupBo.java
│ │ ├── RedisClusterNode.java
│ │ ├── RedisCommandCheckResult.java
│ │ ├── RedisConfigCheckResult.java
│ │ ├── RedisConfigVo.java
│ │ ├── RedisInfo.java
│ │ └── RedisSlowLog.java
│ ├── resources/
│ │ ├── application-local.yml
│ │ ├── application-online.yml
│ │ ├── application-open.yml
│ │ ├── application-test.yml
│ │ ├── application.yml
│ │ ├── assets/
│ │ │ ├── css/
│ │ │ │ ├── buttons.css
│ │ │ │ ├── common.css
│ │ │ │ ├── custom.css
│ │ │ │ ├── githubmd.css
│ │ │ │ ├── jobindex.css
│ │ │ │ └── mem-cloud.css
│ │ │ ├── dist/
│ │ │ │ ├── css/
│ │ │ │ │ ├── adminlte.css
│ │ │ │ │ └── alt/
│ │ │ │ │ ├── adminlte.components.css
│ │ │ │ │ ├── adminlte.core.css
│ │ │ │ │ ├── adminlte.extra-components.css
│ │ │ │ │ ├── adminlte.light.css
│ │ │ │ │ ├── adminlte.pages.css
│ │ │ │ │ └── adminlte.plugins.css
│ │ │ │ └── js/
│ │ │ │ ├── adminlte.js
│ │ │ │ └── demo.js
│ │ │ ├── js/
│ │ │ │ ├── custom/
│ │ │ │ │ ├── appDeploy.js
│ │ │ │ │ ├── appDetail.js
│ │ │ │ │ ├── appInit.js
│ │ │ │ │ ├── auditManage.js
│ │ │ │ │ ├── getInstancesByAppId.js
│ │ │ │ │ ├── jquery-console.js
│ │ │ │ │ ├── machineManage.js
│ │ │ │ │ ├── myPopover.js
│ │ │ │ │ └── userManage.js
│ │ │ │ ├── main.js
│ │ │ │ └── myhighchart.js
│ │ │ ├── plugins/
│ │ │ │ ├── fontawesome-free/
│ │ │ │ │ └── css/
│ │ │ │ │ ├── all.css
│ │ │ │ │ ├── brands.css
│ │ │ │ │ ├── fontawesome.css
│ │ │ │ │ ├── regular.css
│ │ │ │ │ ├── solid.css
│ │ │ │ │ ├── svg-with-js.css
│ │ │ │ │ └── v4-shims.css
│ │ │ │ └── overlayScrollbars/
│ │ │ │ ├── css/
│ │ │ │ │ └── OverlayScrollbars.css
│ │ │ │ └── js/
│ │ │ │ ├── OverlayScrollbars.js
│ │ │ │ └── jquery.overlayScrollbars.js
│ │ │ └── vendor/
│ │ │ ├── apexcharts/
│ │ │ │ ├── apexcharts.amd.js
│ │ │ │ ├── apexcharts.common.js
│ │ │ │ ├── apexcharts.css
│ │ │ │ ├── apexcharts.esm.js
│ │ │ │ ├── apexcharts.js
│ │ │ │ └── locales/
│ │ │ │ ├── ar.json
│ │ │ │ ├── ca.json
│ │ │ │ ├── cs.json
│ │ │ │ ├── de.json
│ │ │ │ ├── el.json
│ │ │ │ ├── en.json
│ │ │ │ ├── es.json
│ │ │ │ ├── et.json
│ │ │ │ ├── fa.json
│ │ │ │ ├── fi.json
│ │ │ │ ├── fr.json
│ │ │ │ ├── he.json
│ │ │ │ ├── hi.json
│ │ │ │ ├── hr.json
│ │ │ │ ├── hu.json
│ │ │ │ ├── hy.json
│ │ │ │ ├── id.json
│ │ │ │ ├── it.json
│ │ │ │ ├── ja.json
│ │ │ │ ├── ka.json
│ │ │ │ ├── ko.json
│ │ │ │ ├── lt.json
│ │ │ │ ├── lv.json
│ │ │ │ ├── nb.json
│ │ │ │ ├── nl.json
│ │ │ │ ├── pl.json
│ │ │ │ ├── pt-br.json
│ │ │ │ ├── pt.json
│ │ │ │ ├── rs.json
│ │ │ │ ├── ru.json
│ │ │ │ ├── se.json
│ │ │ │ ├── sk.json
│ │ │ │ ├── sl.json
│ │ │ │ ├── sq.json
│ │ │ │ ├── th.json
│ │ │ │ ├── tr.json
│ │ │ │ ├── ua.json
│ │ │ │ ├── zh-cn.json
│ │ │ │ └── zh-tw.json
│ │ │ ├── bootstrap/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-grid.css
│ │ │ │ │ ├── bootstrap-grid.rtl.css
│ │ │ │ │ ├── bootstrap-reboot.css
│ │ │ │ │ ├── bootstrap-reboot.rtl.css
│ │ │ │ │ ├── bootstrap-utilities.css
│ │ │ │ │ ├── bootstrap-utilities.rtl.css
│ │ │ │ │ ├── bootstrap.css
│ │ │ │ │ └── bootstrap.rtl.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.bundle.js
│ │ │ │ ├── bootstrap.esm.js
│ │ │ │ └── bootstrap.js
│ │ │ ├── bootstrap-icons/
│ │ │ │ ├── bootstrap-icons.css
│ │ │ │ ├── bootstrap-icons.json
│ │ │ │ └── bootstrap-icons.scss
│ │ │ ├── bootstrap-select/
│ │ │ │ ├── bootstrap-select.css
│ │ │ │ └── bootstrap-select.js
│ │ │ ├── boxicons/
│ │ │ │ └── css/
│ │ │ │ ├── animations.css
│ │ │ │ ├── boxicons.css
│ │ │ │ └── transformations.css
│ │ │ ├── chart.js/
│ │ │ │ ├── chart.cjs
│ │ │ │ ├── chart.js
│ │ │ │ ├── chart.umd.js
│ │ │ │ ├── chunks/
│ │ │ │ │ ├── helpers.segment.cjs
│ │ │ │ │ └── helpers.segment.js
│ │ │ │ ├── controllers/
│ │ │ │ │ ├── controller.bar.d.ts
│ │ │ │ │ ├── controller.bubble.d.ts
│ │ │ │ │ ├── controller.doughnut.d.ts
│ │ │ │ │ ├── controller.line.d.ts
│ │ │ │ │ ├── controller.pie.d.ts
│ │ │ │ │ ├── controller.polarArea.d.ts
│ │ │ │ │ ├── controller.radar.d.ts
│ │ │ │ │ ├── controller.scatter.d.ts
│ │ │ │ │ └── index.d.ts
│ │ │ │ ├── core/
│ │ │ │ │ ├── core.adapters.d.ts
│ │ │ │ │ ├── core.animation.d.ts
│ │ │ │ │ ├── core.animations.d.ts
│ │ │ │ │ ├── core.animations.defaults.d.ts
│ │ │ │ │ ├── core.animator.d.ts
│ │ │ │ │ ├── core.config.d.ts
│ │ │ │ │ ├── core.controller.d.ts
│ │ │ │ │ ├── core.datasetController.d.ts
│ │ │ │ │ ├── core.defaults.d.ts
│ │ │ │ │ ├── core.element.d.ts
│ │ │ │ │ ├── core.interaction.d.ts
│ │ │ │ │ ├── core.layouts.d.ts
│ │ │ │ │ ├── core.layouts.defaults.d.ts
│ │ │ │ │ ├── core.plugins.d.ts
│ │ │ │ │ ├── core.registry.d.ts
│ │ │ │ │ ├── core.scale.autoskip.d.ts
│ │ │ │ │ ├── core.scale.d.ts
│ │ │ │ │ ├── core.scale.defaults.d.ts
│ │ │ │ │ ├── core.ticks.d.ts
│ │ │ │ │ ├── core.typedRegistry.d.ts
│ │ │ │ │ └── index.d.ts
│ │ │ │ ├── elements/
│ │ │ │ │ ├── element.arc.d.ts
│ │ │ │ │ ├── element.bar.d.ts
│ │ │ │ │ ├── element.line.d.ts
│ │ │ │ │ ├── element.point.d.ts
│ │ │ │ │ └── index.d.ts
│ │ │ │ ├── helpers/
│ │ │ │ │ ├── helpers.canvas.d.ts
│ │ │ │ │ ├── helpers.collection.d.ts
│ │ │ │ │ ├── helpers.color.d.ts
│ │ │ │ │ ├── helpers.config.d.ts
│ │ │ │ │ ├── helpers.core.d.ts
│ │ │ │ │ ├── helpers.curve.d.ts
│ │ │ │ │ ├── helpers.dom.d.ts
│ │ │ │ │ ├── helpers.easing.d.ts
│ │ │ │ │ ├── helpers.extras.d.ts
│ │ │ │ │ ├── helpers.interpolation.d.ts
│ │ │ │ │ ├── helpers.intl.d.ts
│ │ │ │ │ ├── helpers.math.d.ts
│ │ │ │ │ ├── helpers.options.d.ts
│ │ │ │ │ ├── helpers.rtl.d.ts
│ │ │ │ │ ├── helpers.segment.d.ts
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ └── types.d.ts
│ │ │ │ ├── helpers.cjs
│ │ │ │ ├── helpers.js
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.umd.d.ts
│ │ │ │ ├── platform/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── platform.base.d.ts
│ │ │ │ │ ├── platform.basic.d.ts
│ │ │ │ │ └── platform.dom.d.ts
│ │ │ │ ├── plugins/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── plugin.colors.d.ts
│ │ │ │ │ ├── plugin.decimation.d.ts
│ │ │ │ │ ├── plugin.filler/
│ │ │ │ │ │ ├── filler.drawing.d.ts
│ │ │ │ │ │ ├── filler.helper.d.ts
│ │ │ │ │ │ ├── filler.options.d.ts
│ │ │ │ │ │ ├── filler.segment.d.ts
│ │ │ │ │ │ ├── filler.target.d.ts
│ │ │ │ │ │ ├── filler.target.stack.d.ts
│ │ │ │ │ │ ├── index.d.ts
│ │ │ │ │ │ └── simpleArc.d.ts
│ │ │ │ │ ├── plugin.legend.d.ts
│ │ │ │ │ ├── plugin.subtitle.d.ts
│ │ │ │ │ ├── plugin.title.d.ts
│ │ │ │ │ └── plugin.tooltip.d.ts
│ │ │ │ ├── scales/
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── scale.category.d.ts
│ │ │ │ │ ├── scale.linear.d.ts
│ │ │ │ │ ├── scale.linearbase.d.ts
│ │ │ │ │ ├── scale.logarithmic.d.ts
│ │ │ │ │ ├── scale.radialLinear.d.ts
│ │ │ │ │ ├── scale.time.d.ts
│ │ │ │ │ └── scale.timeseries.d.ts
│ │ │ │ ├── types/
│ │ │ │ │ ├── animation.d.ts
│ │ │ │ │ ├── basic.d.ts
│ │ │ │ │ ├── color.d.ts
│ │ │ │ │ ├── geometric.d.ts
│ │ │ │ │ ├── helpers/
│ │ │ │ │ │ ├── helpers.canvas.d.ts
│ │ │ │ │ │ ├── helpers.segment.d.ts
│ │ │ │ │ │ └── index.d.ts
│ │ │ │ │ ├── index.d.ts
│ │ │ │ │ ├── layout.d.ts
│ │ │ │ │ └── utils.d.ts
│ │ │ │ └── types.d.ts
│ │ │ ├── clipboard/
│ │ │ │ └── clipboard.js
│ │ │ ├── data-tables/
│ │ │ │ ├── css/
│ │ │ │ │ ├── dataTables.bootstrap.css
│ │ │ │ │ ├── dataTables.bootstrap4.css
│ │ │ │ │ ├── dataTables.bootstrap5.css
│ │ │ │ │ ├── dataTables.bulma.css
│ │ │ │ │ ├── dataTables.dataTables.css
│ │ │ │ │ ├── dataTables.foundation.css
│ │ │ │ │ ├── dataTables.jqueryui.css
│ │ │ │ │ ├── dataTables.semanticui.css
│ │ │ │ │ └── jquery.dataTables.css
│ │ │ │ ├── datatables.css
│ │ │ │ ├── datatables.js
│ │ │ │ ├── js/
│ │ │ │ │ ├── dataTables.bootstrap.js
│ │ │ │ │ ├── dataTables.bootstrap4.js
│ │ │ │ │ ├── dataTables.bootstrap5.js
│ │ │ │ │ ├── dataTables.bulma.js
│ │ │ │ │ ├── dataTables.dataTables.js
│ │ │ │ │ ├── dataTables.foundation.js
│ │ │ │ │ ├── dataTables.jqueryui.js
│ │ │ │ │ ├── dataTables.semanticui.js
│ │ │ │ │ └── jquery.dataTables.js
│ │ │ │ └── scrolling.js
│ │ │ ├── echarts/
│ │ │ │ ├── echarts.common.js
│ │ │ │ ├── echarts.esm.js
│ │ │ │ ├── echarts.js
│ │ │ │ ├── echarts.simple.js
│ │ │ │ └── extension/
│ │ │ │ ├── bmap.js
│ │ │ │ └── dataTool.js
│ │ │ ├── fonts/
│ │ │ │ └── fonts-googleapis-source-sans-pro.css
│ │ │ ├── highchart/
│ │ │ │ └── highcharts.js
│ │ │ ├── jquery/
│ │ │ │ └── jquery.md5.js
│ │ │ ├── paginator/
│ │ │ │ └── bootstrap-paginator.js
│ │ │ ├── php-email-form/
│ │ │ │ └── validate.js
│ │ │ ├── quill/
│ │ │ │ ├── quill.bubble.css
│ │ │ │ ├── quill.core.css
│ │ │ │ ├── quill.core.js
│ │ │ │ ├── quill.js
│ │ │ │ └── quill.snow.css
│ │ │ ├── remixicon/
│ │ │ │ ├── remixicon.css
│ │ │ │ └── remixicon.less
│ │ │ ├── simple-datatables/
│ │ │ │ ├── simple-datatables.js
│ │ │ │ └── style.css
│ │ │ └── tinymce/
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── bower.json
│ │ │ ├── composer.json
│ │ │ ├── icons/
│ │ │ │ └── default/
│ │ │ │ ├── icons.js
│ │ │ │ └── index.js
│ │ │ ├── license.txt
│ │ │ ├── models/
│ │ │ │ └── dom/
│ │ │ │ ├── index.js
│ │ │ │ └── model.js
│ │ │ ├── package.json
│ │ │ ├── plugins/
│ │ │ │ ├── advlist/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── anchor/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── autolink/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── autoresize/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── autosave/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── charmap/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── code/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── codesample/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── directionality/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── emoticons/
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── js/
│ │ │ │ │ │ ├── emojiimages.js
│ │ │ │ │ │ └── emojis.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── fullscreen/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── help/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── image/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── importcss/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── insertdatetime/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── link/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── lists/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── media/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── nonbreaking/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── pagebreak/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── preview/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── quickbars/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── save/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── searchreplace/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── table/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── template/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── visualblocks/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ ├── visualchars/
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── plugin.js
│ │ │ │ └── wordcount/
│ │ │ │ ├── index.js
│ │ │ │ └── plugin.js
│ │ │ ├── skins/
│ │ │ │ ├── content/
│ │ │ │ │ ├── dark/
│ │ │ │ │ │ └── content.css
│ │ │ │ │ ├── default/
│ │ │ │ │ │ └── content.css
│ │ │ │ │ ├── document/
│ │ │ │ │ │ └── content.css
│ │ │ │ │ ├── tinymce-5/
│ │ │ │ │ │ └── content.css
│ │ │ │ │ ├── tinymce-5-dark/
│ │ │ │ │ │ └── content.css
│ │ │ │ │ └── writer/
│ │ │ │ │ └── content.css
│ │ │ │ └── ui/
│ │ │ │ ├── oxide/
│ │ │ │ │ ├── content.css
│ │ │ │ │ ├── content.inline.css
│ │ │ │ │ ├── skin.css
│ │ │ │ │ └── skin.shadowdom.css
│ │ │ │ ├── oxide-dark/
│ │ │ │ │ ├── content.css
│ │ │ │ │ ├── content.inline.css
│ │ │ │ │ ├── skin.css
│ │ │ │ │ └── skin.shadowdom.css
│ │ │ │ ├── tinymce-5/
│ │ │ │ │ ├── content.css
│ │ │ │ │ ├── content.inline.css
│ │ │ │ │ ├── skin.css
│ │ │ │ │ └── skin.shadowdom.css
│ │ │ │ └── tinymce-5-dark/
│ │ │ │ ├── content.css
│ │ │ │ ├── content.inline.css
│ │ │ │ ├── skin.css
│ │ │ │ └── skin.shadowdom.css
│ │ │ ├── themes/
│ │ │ │ └── silver/
│ │ │ │ ├── index.js
│ │ │ │ └── theme.js
│ │ │ ├── tinymce.d.ts
│ │ │ └── tinymce.js
│ │ ├── cachecloud-web.conf
│ │ ├── logback-spring.xml
│ │ ├── mapper/
│ │ │ ├── AppAlertRecordDao.xml
│ │ │ ├── AppAuditDao.xml
│ │ │ ├── AppAuditLogDao.xml
│ │ │ ├── AppBizDao.xml
│ │ │ ├── AppCapacityMonitorDao.xml
│ │ │ ├── AppClientCommandStatisticsDao.xml
│ │ │ ├── AppClientCostTimeStatDao.xml
│ │ │ ├── AppClientCostTimeTotalStatDao.xml
│ │ │ ├── AppClientExceptionStatDao.xml
│ │ │ ├── AppClientExceptionStatisticsDao.xml
│ │ │ ├── AppClientLatencyCommandDao.xml
│ │ │ ├── AppClientReportDataSizeDao.xml
│ │ │ ├── AppClientStatisticGatherDao.xml
│ │ │ ├── AppClientVersionDao.xml
│ │ │ ├── AppDailyDao.xml
│ │ │ ├── AppDao.xml
│ │ │ ├── AppDataMigrateStatusDao.xml
│ │ │ ├── AppImportDao.xml
│ │ │ ├── AppInstanceClientRelationDao.xml
│ │ │ ├── AppStatsDao.xml
│ │ │ ├── AppToUserDao.xml
│ │ │ ├── AppUserDao.xml
│ │ │ ├── ConfigDao.xml
│ │ │ ├── ConfigRestartRecordDao.xml
│ │ │ ├── DiagnosticTaskRecordDao.xml
│ │ │ ├── InstanceAlertConfigDao.xml
│ │ │ ├── InstanceBigKeyDao.xml
│ │ │ ├── InstanceConfigDao.xml
│ │ │ ├── InstanceDao.xml
│ │ │ ├── InstanceFaultDao.xml
│ │ │ ├── InstanceLatencyHistoryDao.xml
│ │ │ ├── InstanceReshardProcessDao.xml
│ │ │ ├── InstanceSlowLogDao.xml
│ │ │ ├── InstanceStatsDao.xml
│ │ │ ├── MachineDao.xml
│ │ │ ├── MachineRelationDao.xml
│ │ │ ├── MachineStatsDao.xml
│ │ │ ├── QuartzDao.xml
│ │ │ ├── ResourceDao.xml
│ │ │ ├── ServerStatusDao.xml
│ │ │ ├── StandardStatsDao.xml
│ │ │ ├── TaskQueueDao.xml
│ │ │ ├── TaskStepFlowDao.xml
│ │ │ └── TaskStepMetaDao.xml
│ │ ├── mybatis-config.xml
│ │ ├── spring/
│ │ │ ├── spring-client-report.xml
│ │ │ ├── spring-data.xml
│ │ │ ├── spring-inspector.xml
│ │ │ ├── spring-mvc.xml
│ │ │ ├── spring-mybatis.xml
│ │ │ ├── spring-quartz.xml
│ │ │ └── spring.xml
│ │ ├── static/
│ │ │ └── wiki/
│ │ │ ├── access/
│ │ │ │ ├── client.md
│ │ │ │ ├── client.toc.md
│ │ │ │ ├── config.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── docker.toc.md
│ │ │ │ ├── index.md
│ │ │ │ ├── init.md
│ │ │ │ ├── init.toc.md
│ │ │ │ ├── resource.md
│ │ │ │ └── resource.toc.md
│ │ │ ├── architecture/
│ │ │ │ ├── index.md
│ │ │ │ ├── service.md
│ │ │ │ └── tech.md
│ │ │ ├── function/
│ │ │ │ ├── client-analysis.md
│ │ │ │ ├── client-appStats.md
│ │ │ │ ├── client-cmd.md
│ │ │ │ ├── client-cmdexe.md
│ │ │ │ ├── client-conn.md
│ │ │ │ ├── client-daily.md
│ │ │ │ ├── client-desc.md
│ │ │ │ ├── client-instances.md
│ │ │ │ ├── client-latency.md
│ │ │ │ ├── client-register.md
│ │ │ │ ├── client-statistic.md
│ │ │ │ ├── client.md
│ │ │ │ ├── index.md
│ │ │ │ ├── job.md
│ │ │ │ ├── operation-alert.md
│ │ │ │ ├── operation-app.md
│ │ │ │ ├── operation-diagnostic.md
│ │ │ │ ├── operation-import.md
│ │ │ │ ├── operation-instance.md
│ │ │ │ ├── operation-job.md
│ │ │ │ ├── operation-machine.md
│ │ │ │ ├── operation-migrate.md
│ │ │ │ ├── operation-module.md
│ │ │ │ ├── operation-resource.md
│ │ │ │ ├── operation-schedule.md
│ │ │ │ ├── operation-systemalert.md
│ │ │ │ ├── operation-task.md
│ │ │ │ ├── operation-template.md
│ │ │ │ ├── operation-user.md
│ │ │ │ ├── operations.md
│ │ │ │ ├── server-statistic.md
│ │ │ │ ├── server-statistic.toc.md
│ │ │ │ ├── statistics.md
│ │ │ │ └── system-alert.md
│ │ │ ├── intro/
│ │ │ │ ├── index.md
│ │ │ │ ├── redisVersion.md
│ │ │ │ ├── redisVersion.toc.md
│ │ │ │ ├── releaseNote.md
│ │ │ │ └── releaseNote.toc.md
│ │ │ ├── operate/
│ │ │ │ ├── appAlert.md
│ │ │ │ ├── appDeploy.md
│ │ │ │ ├── appMigrate.md
│ │ │ │ ├── appUpgrade.md
│ │ │ │ ├── baseConcept.md
│ │ │ │ ├── baseOperate.md
│ │ │ │ ├── baseOperate.toc.md
│ │ │ │ ├── baseOptimize.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrateTool.md
│ │ │ │ ├── redisVersion.toc.md
│ │ │ │ ├── rediscode.md
│ │ │ │ └── ssh.md
│ │ │ ├── quickstart/
│ │ │ │ ├── index.md
│ │ │ │ └── index.toc.md
│ │ │ └── troubleshooting/
│ │ │ ├── activefrag.md
│ │ │ ├── activefrag.toc.md
│ │ │ ├── bigkey.md
│ │ │ ├── cachecloud.md
│ │ │ ├── exception.md
│ │ │ ├── hotkey.md
│ │ │ ├── index.md
│ │ │ ├── jedispoolconfig.md
│ │ │ ├── jedispoolconfig.toc.md
│ │ │ ├── liunx.md
│ │ │ ├── liunx.toc.md
│ │ │ ├── memory.md
│ │ │ └── memory.toc.md
│ │ └── templates/
│ │ ├── 404.html
│ │ ├── OperationAlert.ftl
│ │ ├── analysis/
│ │ │ ├── appKey.html
│ │ │ └── keyAnalysis.html
│ │ ├── app/
│ │ │ ├── appClientList.html
│ │ │ ├── appCommand.html
│ │ │ ├── appCommandAnalysis.html
│ │ │ ├── appDaily.html
│ │ │ ├── appDetail.html
│ │ │ ├── appHitRatio.html
│ │ │ ├── appInstanceCpuStat.html
│ │ │ ├── appInstanceExpiredEvictedKeysStat.html
│ │ │ ├── appInstanceMemFragRatioStat.html
│ │ │ ├── appInstanceNetStat.html
│ │ │ ├── appLatencyInfoDetail.html
│ │ │ ├── appList.html
│ │ │ ├── appMachineInstancesTopology.html
│ │ │ ├── appStat.html
│ │ │ ├── appTopology.html
│ │ │ ├── jobIndex/
│ │ │ │ ├── appAlertConfig.html
│ │ │ │ ├── appAlterConfigIndex.html
│ │ │ │ ├── appCleanIndex.html
│ │ │ │ ├── appConfig.html
│ │ │ │ ├── appConfigIndex.html
│ │ │ │ ├── appDataMigrate.html
│ │ │ │ ├── appDataMigrateIndex.html
│ │ │ │ ├── appDel.html
│ │ │ │ ├── appDiagnostic.html
│ │ │ │ ├── appDiagnosticIndex.html
│ │ │ │ ├── appImport.html
│ │ │ │ ├── appImportIndex.html
│ │ │ │ ├── appInit.html
│ │ │ │ ├── appInitIndex.html
│ │ │ │ ├── appKeyAnalysis.html
│ │ │ │ ├── appKeyAnalysisIndex.html
│ │ │ │ ├── appOffline.html
│ │ │ │ ├── appOfflineIndex.html
│ │ │ │ ├── appScale.html
│ │ │ │ ├── appScaleIndex.html
│ │ │ │ ├── appScanClean.html
│ │ │ │ ├── appScanCleanIndex.html
│ │ │ │ ├── appTrailInit.html
│ │ │ │ ├── appTrailInitIndex.html
│ │ │ │ ├── head.html
│ │ │ │ ├── index.html
│ │ │ │ ├── myJobs.html
│ │ │ │ └── nav.html
│ │ │ ├── slowLog.html
│ │ │ └── userAppsIndex.html
│ │ ├── appAlert.ftl
│ │ ├── appAudit.ftl
│ │ ├── appDaily.ftl
│ │ ├── client/
│ │ │ ├── appClientIndex.html
│ │ │ ├── clientCommandStatistics.html
│ │ │ ├── clientExceptionStatistics.html
│ │ │ ├── cmdExceptionCommandDetail.html
│ │ │ ├── cmdExceptionStatisticsByClient.html
│ │ │ ├── commandStatisticsByClient.html
│ │ │ └── connExceptionStatisticsByClient.html
│ │ ├── error.html
│ │ ├── expAppsDaily.ftl
│ │ ├── inc/
│ │ │ ├── contact.html
│ │ │ ├── daily.html
│ │ │ ├── footer.html
│ │ │ ├── frontResources.html
│ │ │ ├── head.html
│ │ │ ├── page.html
│ │ │ ├── wikiHead.html
│ │ │ └── wikiLeft.html
│ │ ├── instance/
│ │ │ ├── instanceAdvancedAnalysis.html
│ │ │ ├── instanceClientList.html
│ │ │ ├── instanceCommand.html
│ │ │ ├── instanceConfigSelect.html
│ │ │ ├── instanceFault.html
│ │ │ ├── instanceIndex.html
│ │ │ ├── instanceSlowSelect.html
│ │ │ └── instanceStat.html
│ │ ├── instanceAlert.ftl
│ │ ├── instanceRecover.ftl
│ │ ├── instanceState.ftl
│ │ ├── manage/
│ │ │ ├── appAudit/
│ │ │ │ ├── appAudit.html
│ │ │ │ ├── appAuditList.html
│ │ │ │ ├── appConfigChangeDetail.html
│ │ │ │ ├── appIntanceReferList.html
│ │ │ │ ├── appScaleApplyDetail.html
│ │ │ │ ├── deploy/
│ │ │ │ │ ├── appDeployDetail.html
│ │ │ │ │ └── initAppDeploy.html
│ │ │ │ ├── handleHorizontalScale.html
│ │ │ │ ├── handleHorizontalScaleDetail.html
│ │ │ │ ├── horizontalScaleApplyDetail.html
│ │ │ │ ├── horizontalScaleProcessList.html
│ │ │ │ ├── initAppConfigChange.html
│ │ │ │ ├── initAppScaleApply.html
│ │ │ │ ├── initHorizontalScaleApply.html
│ │ │ │ ├── initInstanceConfigChange.html
│ │ │ │ ├── instanceConfig.html
│ │ │ │ ├── instanceConfigChangeDetail.html
│ │ │ │ └── list.html
│ │ │ ├── appImport/
│ │ │ │ ├── appImport.html
│ │ │ │ ├── index.html
│ │ │ │ └── list.html
│ │ │ ├── appOps/
│ │ │ │ ├── appCodeInit.html
│ │ │ │ ├── appInfoAndAudit.html
│ │ │ │ ├── appInstance.html
│ │ │ │ ├── appMachine.html
│ │ │ │ ├── appMigrate.html
│ │ │ │ └── appOpsIndex.html
│ │ │ ├── appStat/
│ │ │ │ ├── appStatList.html
│ │ │ │ ├── appStatListServer.html
│ │ │ │ ├── list.html
│ │ │ │ └── listServer.html
│ │ │ ├── appTool/
│ │ │ │ └── appKeysDealTool.html
│ │ │ ├── backendTemplate.html
│ │ │ ├── config/
│ │ │ │ ├── init.html
│ │ │ │ └── initConfigDetail.html
│ │ │ ├── diagnosticTool/
│ │ │ │ ├── diagnosticDelKey.html
│ │ │ │ ├── diagnosticHotKey.html
│ │ │ │ ├── diagnosticIdleKey.html
│ │ │ │ ├── diagnosticMemUsed.html
│ │ │ │ ├── diagnosticResult.html
│ │ │ │ ├── diagnosticSampleCompare.html
│ │ │ │ ├── diagnosticSampleCompareResult.html
│ │ │ │ ├── diagnosticScan.html
│ │ │ │ ├── diagnosticScanClean.html
│ │ │ │ ├── diagnosticSlot.html
│ │ │ │ ├── diagnosticTool.html
│ │ │ │ ├── index.html
│ │ │ │ ├── list.html
│ │ │ │ └── resultList.html
│ │ │ ├── fault/
│ │ │ │ ├── list.html
│ │ │ │ └── memFaultList.html
│ │ │ ├── inc/
│ │ │ │ ├── backendEndResources.html
│ │ │ │ ├── backendResources.html
│ │ │ │ ├── footer.html
│ │ │ │ ├── head.html
│ │ │ │ ├── left.html
│ │ │ │ └── page.html
│ │ │ ├── instance/
│ │ │ │ └── log.html
│ │ │ ├── instanceAlert/
│ │ │ │ ├── init.html
│ │ │ │ ├── initConfigDetail.html
│ │ │ │ └── tendisAlert/
│ │ │ │ ├── init.html
│ │ │ │ └── initConfigDetail.html
│ │ │ ├── instanceOps/
│ │ │ │ ├── instanceCommandCheckList.html
│ │ │ │ ├── instanceConfigCheckList.html
│ │ │ │ ├── instanceOpsIndex.html
│ │ │ │ ├── instanceOpsList.html
│ │ │ │ └── page.html
│ │ │ ├── login.html
│ │ │ ├── machine/
│ │ │ │ ├── addMachine.html
│ │ │ │ ├── addRoom.html
│ │ │ │ ├── downCrashMachine.html
│ │ │ │ ├── index.html
│ │ │ │ ├── list.html
│ │ │ │ ├── machineInstances.html
│ │ │ │ ├── machineInstancesDetail.html
│ │ │ │ ├── machineList.html
│ │ │ │ ├── roomList.html
│ │ │ │ ├── taskInfo.html
│ │ │ │ └── taskInfo_bak.html
│ │ │ ├── migrate/
│ │ │ │ ├── index.html
│ │ │ │ ├── list.html
│ │ │ │ ├── taskIndex.html
│ │ │ │ └── tasklist.html
│ │ │ ├── notice/
│ │ │ │ ├── initNotice.html
│ │ │ │ └── initNoticeDetail.html
│ │ │ ├── pod/
│ │ │ │ ├── changeList.html
│ │ │ │ └── list.html
│ │ │ ├── quartz/
│ │ │ │ ├── list.html
│ │ │ │ └── quartzList.html
│ │ │ ├── redisConfig/
│ │ │ │ ├── contrast.html
│ │ │ │ ├── init.html
│ │ │ │ ├── initConfigDetail.html
│ │ │ │ └── preview.html
│ │ │ ├── resource/
│ │ │ │ ├── addDir.html
│ │ │ │ ├── addRedis.html
│ │ │ │ ├── addScript.html
│ │ │ │ ├── addTool.html
│ │ │ │ ├── dir.html
│ │ │ │ ├── index.html
│ │ │ │ ├── list.html
│ │ │ │ ├── redis.html
│ │ │ │ ├── respo.html
│ │ │ │ ├── script.html
│ │ │ │ └── tool.html
│ │ │ ├── task/
│ │ │ │ ├── flowList.html
│ │ │ │ ├── queueList.html
│ │ │ │ ├── taskFlowList.html
│ │ │ │ └── taskQueueList.html
│ │ │ ├── total/
│ │ │ │ ├── list.html
│ │ │ │ ├── totalList.html
│ │ │ │ └── upgradeRedis.html
│ │ │ ├── totalstat/
│ │ │ │ ├── list.html
│ │ │ │ └── totalList.html
│ │ │ └── user/
│ │ │ ├── addBiz.html
│ │ │ ├── addUser.html
│ │ │ ├── list.html
│ │ │ ├── overUser.html
│ │ │ ├── updateUser.html
│ │ │ ├── updateUserPwd.html
│ │ │ └── userList.html
│ │ ├── migrate/
│ │ │ ├── checkData.html
│ │ │ ├── checkDataLog.html
│ │ │ ├── config.html
│ │ │ ├── init.html
│ │ │ ├── log.html
│ │ │ └── process.html
│ │ ├── noPower.html
│ │ ├── server/
│ │ │ ├── cpu.html
│ │ │ ├── disk.html
│ │ │ ├── index.html
│ │ │ ├── net.html
│ │ │ └── overview.html
│ │ ├── topologyExam.ftl
│ │ ├── user/
│ │ │ └── userRegister.html
│ │ ├── wikiAccessClientTemplate.html
│ │ └── wikiTemplate.html
│ └── webapp/
│ └── WEB-INF/
│ └── web.xml
├── pom.xml
└── redis-ecs/
├── help.md
└── script/
├── cachecloud-init.sh
├── redis-install.sh
├── redisShake-install.sh
└── ssh-keygen.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/maven.yml
================================================
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
================================================
FILE: .gitignore
================================================
.idea/
*.iml
.svn/*
target/
*.class
.settings
.classpath
.project
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
[中文](README_CN.md) | [EN](README_EN.md)

[![CI checks on main badge]][CI checks on main link] [![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link] [![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link] [![latest commit to main badge]][latest commit to main link]
[CI checks on main badge]: https://flat.badgen.net/github/checks/sohutv/cachecloud/main?label=CI%20status%20on%20main&cache=900&icon=github
[CI checks on main link]:https://github.com/sohutv/cachecloud/actions?query=branch%3Amain
[github forks badge]: https://flat.badgen.net/github/forks/sohutv/cachecloud?icon=github
[github forks link]: https://useful-forks.github.io/?repo=sohutv%2Fcachecloud
[github open issues badge]: https://flat.badgen.net/github/open-issues/sohutv/cachecloud?icon=github
[github open issues link]: https://github.com/sohutv/cachecloud/issues?q=is%3Aissue+is%3Aopen
[github open prs badge]: https://flat.badgen.net/github/open-prs/sohutv/cachecloud?icon=github
[github open prs link]: https://github.com/sohutv/cachecloud/pulls?q=is%3Apr+is%3Aopen
[github stars badge]: https://flat.badgen.net/github/stars/sohutv/cachecloud?icon=github
[github stars link]: https://github.com/sohutv/cachecloud/stargazers
[latest commit to main badge]: https://flat.badgen.net/github/last-commit/sohutv/cachecloud/main?icon=github&color=yellow&label=last%20dev%20commit&cache=900
[latest commit to main link]: https://github.com/sohutv/cachecloud/commits/main
[latest release badge]: https://flat.badgen.net/github/release/sohutv/cachecloud/development?icon=github
[latest release link]: https://github.com/sohutv/cachecloud/releases
## CacheCloud是什么?
CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、Sentinel、Cluster)高效管理、有效降低大规模redis运维成本,提升资源管控能力和利用率。平台提供快速搭建/迁移,运维管理,弹性伸缩,统计监控,客户端整合接入等功能。
## CacheCloud功能架构
+ Redis搭建:宿主环境初始化、实例部署安装、类型架构支持;
+ 运维管理:宿主环境、资源管理、应用审计、应用运维、质量监控、诊断分析;
+ 统计监控:日志采集、实例采集、机器采集、应用统计、监控告警、问题诊断;
+ 客户端接入:SDK接入、语言接入、客户端监控;
+ 弹性伸缩:资源收缩、应用伸缩、外部接入;
## CacheCloud使用规模
+ 800亿+ commands/day
+ 18T+ Memory Total
+ 420+ app Total / 4800+ Instances Total
+ 80+ Physical machine/ 360+ K8s Pod Total
## CacheCloud VS 云厂商

Redis 主从/集群部署成本
## 贡献成员
## 感谢支持者


## 联系我们
+ QQ群: 534429768(已满) / 2群:894022242 / 3群:908821300
+ 微信群:
+ 微信:如果大家有公网资源可以联系我,会加入到开源版本服务资源部署试用,提高大家的用户体验。
如果你觉得CacheCloud对你有帮助,欢迎Star⭐。
================================================
FILE: README_CN.md
================================================
[中文](README_CN.md) | [EN](README_EN.md)

[![CI checks on main badge]][CI checks on main link] [![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link] [![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link] [![latest commit to main badge]][latest commit to main link]
[CI checks on main badge]: https://flat.badgen.net/github/checks/sohutv/cachecloud/main?label=CI%20status%20on%20main&cache=900&icon=github
[CI checks on main link]:https://github.com/sohutv/cachecloud/actions?query=branch%3Amain
[github forks badge]: https://flat.badgen.net/github/forks/sohutv/cachecloud?icon=github
[github forks link]: https://useful-forks.github.io/?repo=sohutv%2Fcachecloud
[github open issues badge]: https://flat.badgen.net/github/open-issues/sohutv/cachecloud?icon=github
[github open issues link]: https://github.com/sohutv/cachecloud/issues?q=is%3Aissue+is%3Aopen
[github open prs badge]: https://flat.badgen.net/github/open-prs/sohutv/cachecloud?icon=github
[github open prs link]: https://github.com/sohutv/cachecloud/pulls?q=is%3Apr+is%3Aopen
[github stars badge]: https://flat.badgen.net/github/stars/sohutv/cachecloud?icon=github
[github stars link]: https://github.com/sohutv/cachecloud/stargazers
[latest commit to main badge]: https://flat.badgen.net/github/last-commit/sohutv/cachecloud/main?icon=github&color=yellow&label=last%20dev%20commit&cache=900
[latest commit to main link]: https://github.com/sohutv/cachecloud/commits/main
[latest release badge]: https://flat.badgen.net/github/release/sohutv/cachecloud/development?icon=github
[latest release link]: https://github.com/sohutv/cachecloud/releases
## CacheCloud是什么?
CacheCloud是一个Redis云管理平台:支持Redis多种架构(Standalone、Sentinel、Cluster)高效管理、有效降低大规模redis运维成本,提升资源管控能力和利用率。平台提供快速搭建/迁移,运维管理,弹性伸缩,统计监控,客户端整合接入等功能。
## CacheCloud功能架构
+ Redis搭建:宿主环境初始化、实例部署安装、类型架构支持;
+ 运维管理:宿主环境、资源管理、应用审计、应用运维、质量监控、诊断分析;
+ 统计监控:日志采集、实例采集、机器采集、应用统计、监控告警、问题诊断;
+ 客户端接入:SDK接入、语言接入、客户端监控;
+ 弹性伸缩:资源收缩、应用伸缩、外部接入;
## CacheCloud使用规模
+ 800亿+ commands/day
+ 18T+ Memory Total
+ 420+ app Total / 4800+ Instances Total
+ 80+ Physical machine/ 360+ K8s Pod Total
## CacheCloud VS 云厂商

Redis 主从/集群部署成本
## 贡献成员
## 感谢支持者
[](https://github.com/sohutv/cachecloud/stargazers)
[](https://github.com/sohutv/cachecloud/network/members)
## 联系我们
+ QQ群: 534429768(已满) / 2群:894022242 / 3群:908821300
+ 微信群:
+ 微信:如果大家有公网资源可以联系我,会加入到开源版本服务资源部署试用,提高大家的用户体验。
如果你觉得CacheCloud对你有帮助,欢迎Star⭐。
================================================
FILE: README_EN.md
================================================
[中文](README_CN.md) | [EN](README_EN.md)

[![CI checks on main badge]][CI checks on main link] [![latest release badge]][latest release link] [![github stars badge]][github stars link] [![github forks badge]][github forks link] [![github open issues badge]][github open issues link] [![github open prs badge]][github open prs link] [![latest commit to main badge]][latest commit to main link]
[CI checks on main badge]: https://flat.badgen.net/github/checks/sohutv/cachecloud/main?label=CI%20status%20on%20main&cache=900&icon=github
[CI checks on main link]:https://github.com/sohutv/cachecloud/actions?query=branch%3Amain
[github forks badge]: https://flat.badgen.net/github/forks/sohutv/cachecloud?icon=github
[github forks link]: https://useful-forks.github.io/?repo=sohutv%2Fcachecloud
[github open issues badge]: https://flat.badgen.net/github/open-issues/sohutv/cachecloud?icon=github
[github open issues link]: https://github.com/sohutv/cachecloud/issues?q=is%3Aissue+is%3Aopen
[github open prs badge]: https://flat.badgen.net/github/open-prs/sohutv/cachecloud?icon=github
[github open prs link]: https://github.com/sohutv/cachecloud/pulls?q=is%3Apr+is%3Aopen
[github stars badge]: https://flat.badgen.net/github/stars/sohutv/cachecloud?icon=github
[github stars link]: https://github.com/sohutv/cachecloud/stargazers
[latest commit to main badge]: https://flat.badgen.net/github/last-commit/sohutv/cachecloud/main?icon=github&color=yellow&label=last%20dev%20commit&cache=900
[latest commit to main link]: https://github.com/sohutv/cachecloud/commits/main
[latest release badge]: https://flat.badgen.net/github/release/sohutv/cachecloud/development?icon=github
[latest release link]: https://github.com/sohutv/cachecloud/releases
## What is CacheCloud?
CacheCloud is a Redis cloud management platform that supports efficient management of multiple Redis architectures (Standalone, Sentinel, and Cluster), effectively reduces large-scale redis Operation and Maintenance costs, and improves resource management capabilities and utilization. The platform provides functions such as rapid construction/migration, operation and maintenance management, elastic scaling, statistical monitoring, and client integration and access.
## CacheCloud Function Architecture
+ Redis build: Machine environment initialization, Instance deployment and installation, Redis architecture support;
+ DevOps: Machine environment, Resource management, Application audit, Application operation and maintenance, Quality monitoring, Diagnostic analysis;
+ Statistical monitoring: Redis log collection, Instance indicator collection, Machine indicator collection, Application statistics, Monitoring alarms, Problem diagnosis;
+ Client access: SDK access support, Language access support, Client monitoring;
+ Elastic scaling: Memory Resource shrinkage, Application scaling, External access;
## CacheCloud Scale
+ 800亿+ commands/day
+ 18T+ Memory Total
+ 420+ app Total / 4800+ Instances Total
+ 80+ Physical machine/ 360+ K8s Pod Total
## CacheCloud VS Cloud vendor

Redis Sentinel/Cluster deploy cost
## Contributing member
## Supporters
[](https://github.com/sohutv/cachecloud/stargazers)
[](https://github.com/sohutv/cachecloud/network/members)
## Contact us
+ QQ: 534429768(Full) / 2群:894022242 / 3群:908821300
+ Wechat Group:
+ Wechat:If you have public network resources can contact me, I will join the open source version service resource deployment trial, improve everyone's user experience.
If you find CacheCloud is helpful, welcome to Star⭐️.
================================================
FILE: cachecloud-custom/pom.xml
================================================
cachecloud-parent
com.sohu.tv
1.0-SNAPSHOT
4.0.0
com.sohu.tv.custom
cachecloud-custom
org.springframework.boot
spring-boot-dependencies
${spring.boot.version}
pom
import
org.springframework.cloud
spring-cloud-dependencies
${spring.cloud.version}
pom
import
org.springframework.boot
spring-boot-starter-web
compile
log4j-api
org.apache.logging.log4j
org.apache.commons
commons-lang3
org.apache.maven.plugins
maven-deploy-plugin
true
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/DefaultCustomConfiguration.java
================================================
package com.sohu.cache;
import com.sohu.cache.alert.EmailComponent;
import com.sohu.cache.alert.WeChatComponent;
import com.sohu.cache.alert.impl.DefaultEmailComponent;
import com.sohu.cache.alert.impl.DefaultWeChatComponent;
import com.sohu.cache.login.LoginComponent;
import com.sohu.cache.login.impl.DefaultLoginComponent;
import com.sohu.cache.report.ReportDataComponent;
import com.sohu.cache.report.impl.DefaultReportDataComponent;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by yijunzhang
*/
@Configuration
public class DefaultCustomConfiguration {
@Bean("emailComponent")
@ConditionalOnMissingBean
public EmailComponent emailComponent() {
return new DefaultEmailComponent();
}
@Bean("weChatComponent")
@ConditionalOnMissingBean
public WeChatComponent weChatComponent() {
return new DefaultWeChatComponent();
}
@Bean("loginComponent")
@ConditionalOnMissingBean
public LoginComponent loginComponent() {
return new DefaultLoginComponent();
}
@Bean("reportDataComponent")
@ConditionalOnMissingBean
public ReportDataComponent reportDataComponent() {
return new DefaultReportDataComponent();
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/alert/EmailComponent.java
================================================
package com.sohu.cache.alert;
import java.util.List;
/**
* 邮件服务
* @author leifu
*/
public interface EmailComponent {
/**
* 发送邮件
* @param title
* @param content
* @param emailList
* @param ccList(抄送)
* @return
*/
boolean sendMail(String title, String content, List emailList, List ccList);
boolean sendDailyMail(String title, String content, List emailList, List ccList);
/**
* 发送邮件
* @param title
* @param content
* @param emailList
* @return
*/
boolean sendMail(String title, String content, List emailList);
/**
* 发送管理员邮件
* @param title
* @param content
* @return
*/
boolean sendMailToAdmin(String title, String content);
/**
* 获取管理员邮件组
* @return
*/
String getAdminEmail();
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/alert/WeChatComponent.java
================================================
package com.sohu.cache.alert;
import java.util.List;
/**
* 微信报警
* Created by rucao
*/
public interface WeChatComponent {
/**
* 发送微信报警
* @param message
* @param weChatList
* @return
*/
boolean sendWeChat(String title, String message, List weChatList);
/**
* 发送微信报警给所有相关人员
* @param title
* @param message
* @param weChatList
* @return
*/
boolean sendWeChatToAll(String title, String message, List weChatList);
/**
* 发送微信报警给管理员
* @param message
* @return
*/
boolean sendWeChatToAdmin(String title, String message);
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/alert/impl/DefaultEmailComponent.java
================================================
package com.sohu.cache.alert.impl;
import com.sohu.cache.alert.EmailComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 邮件报警组件默认空实现
* Created by yijunzhang
*/
public class DefaultEmailComponent implements EmailComponent {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Override
public boolean sendMail(String title, String content, List emailList, List ccList) {
logger.warn("Please implement the sendMail logic.");
return true;
}
@Override
public boolean sendDailyMail(String title, String content, List emailList, List ccList) {
logger.warn("Please implement the sendDailyMail logic.");
return true;
}
@Override
public boolean sendMail(String title, String content, List emailList) {
logger.warn("Please implement the sendMail logic.");
return true;
}
@Override
public boolean sendMailToAdmin(String title, String content) {
logger.warn("Please implement the sendMailToAdmin logic.");
return true;
}
@Override
public String getAdminEmail() {
logger.warn("Please implement the getAdminEmail logic.");
return "";
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/alert/impl/DefaultWeChatComponent.java
================================================
package com.sohu.cache.alert.impl;
import com.sohu.cache.alert.WeChatComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* Created by yijunzhang
*/
public class DefaultWeChatComponent implements WeChatComponent {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Override
public boolean sendWeChat(String title, String message, List weChatList) {
logger.warn("Please implement the sendWeChat logic.");
return true;
}
@Override
public boolean sendWeChatToAll(String title, String message, List weChatList) {
logger.warn("Please implement the sendWeChatToAll logic.");
return true;
}
@Override
public boolean sendWeChatToAdmin(String title, String message) {
logger.warn("Please implement the sendWeChatToAdmin logic.");
return true;
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/alert/utils/AlertUtils.java
================================================
package com.sohu.cache.alert.utils;
/**
* Created by yijunzhang
*/
public class AlertUtils {
/**
* 邮箱报警接口
*/
public static String EMAIL_ALERT_INTERFACE;
/**
* 短信报警接口
*/
public static String MOBILE_ALERT_INTERFACE;
/**
* 微信报警接口
*/
public static String WECHAT_ALERT_INTERFACE;
/**
* 报警邮箱
*/
public static String EMAILS;
/**
* 报警电话
*/
public static String PHONES;
/**
* 报警微信
*/
public static String WECHAT;
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/configuration/DefaultRestTemplateConfig.java
================================================
package com.sohu.cache.configuration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
/**
* Created by rucao on 2020/4/2
*/
@Configuration
public class DefaultRestTemplateConfig {
private static int connectTimeout = 4000;
private static int readTimeout = 5000;
@ConditionalOnMissingBean(name = "restTemplate")
@Bean
RestTemplate restTemplate() {
HttpComponentsClientHttpRequestFactory f = new HttpComponentsClientHttpRequestFactory();
f.setConnectTimeout(connectTimeout);
f.setReadTimeout(readTimeout);
f.setConnectionRequestTimeout(connectTimeout);
RestTemplate restTemplate = new RestTemplate(f);
return restTemplate;
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/login/LoginComponent.java
================================================
package com.sohu.cache.login;
import javax.servlet.http.HttpServletRequest;
/**
* Created by yijunzhang
*/
public interface LoginComponent {
/**
* 检测登录状态
*
* @param userName
* @param password
* @return
*/
boolean passportCheck(String userName, String password);
/**
* 根据ticket获取email
* @param ticket
* @return
*/
String getEmail(String ticket);
/**
* 获取登录跳转地址
*
* @param request
* @return
* @throws Exception
*/
String getRedirectUrl(HttpServletRequest request);
/**
* SSO logout url
*
* @return
* @throws Exception
*/
String getLogoutUrl();
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/login/impl/DefaultLoginComponent.java
================================================
package com.sohu.cache.login.impl;
import com.sohu.cache.login.LoginComponent;
import com.sohu.cache.utils.EnvCustomUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Map;
/**
* Created by yijunzhang
*/
public class DefaultLoginComponent implements LoginComponent {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private RestTemplate restTemplate;
@Value(value = "${server.port:8080}")
private String serverPort;
private static final String RELATIVE_URL = "/manage/loginCheck";
/**
* it is open for change
* @param userName
* @param password
* @return
*/
@Override
public boolean passportCheck(String userName, String password) {
//default password login check
if(EnvCustomUtil.pwdswitch){
String url = getUrl() + RELATIVE_URL;
Map requestMap = new HashMap<>();
requestMap.put("name", userName);
requestMap.put("password", password);
Map map = restTemplate.postForObject(url, requestMap, Map.class);
if(map != null && map.get("status") != null && Integer.parseInt(map.get("status").toString()) == 200){
return true;
}
return false;
}
//todo need to implement by your own business
return true;
}
private String getUrl() {
InetAddress address = null;
try {
address = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
logger.error(e.getMessage(), e);
}
if(address != null){
return "http://" + address.getHostAddress() + ":" + this.serverPort;
}
return "http://127.0.0.1:" + this.serverPort;
}
@Override
public String getEmail(String ticket) {
return null;
}
@Override
public String getRedirectUrl(HttpServletRequest request) {
StringBuffer redirectUrl = new StringBuffer();
redirectUrl.append(request.getSession(true).getServletContext().getContextPath());
redirectUrl.append("/manage/login?");
// 跳转地址
redirectUrl.append("redirectUrl");
redirectUrl.append("=");
redirectUrl.append(request.getRequestURI());
// 跳转参数
String query = request.getQueryString();
if (StringUtils.isNotBlank(query)) {
redirectUrl.append("?");
try {
redirectUrl.append(URLEncoder.encode(request.getQueryString(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
logger.error(e.getMessage(), e);
}
}
return redirectUrl.toString();
}
@Override
public String getLogoutUrl() {
return null;
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/report/ReportDataComponent.java
================================================
package com.sohu.cache.report;
/**
* @Author: zengyizhao
* @DateTime: 2022/2/21 11:16
* @Description: 上报数据服务
*/
public interface ReportDataComponent {
//上报命令数据
void reportCommandData(Object msg);
//上报异常数据
void reportExceptionData(Object msg);
//上报redis info信息
void reportRedisInfoData(Object msg);
//上报慢查询数据
void reportSlowLogData(Object msg);
//上报延迟事件数据
void reportLatencyData(Object msg);
//上报机器监控数据
void reportMachineData(Object msg);
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/report/impl/DefaultReportDataComponent.java
================================================
package com.sohu.cache.report.impl;
import com.sohu.cache.report.ReportDataComponent;
/**
* @Author: zengyizhao
* @DateTime: 2022/2/21 11:22
* @Description: 上报数据默认实现
*/
public class DefaultReportDataComponent implements ReportDataComponent {
@Override
public void reportCommandData(Object msg) {
//todo
}
@Override
public void reportExceptionData(Object msg) {
//todo
}
@Override
public void reportRedisInfoData(Object msg) {
//todo
}
@Override
public void reportSlowLogData(Object msg) {
//todo
}
@Override
public void reportLatencyData(Object msg) {
//todo
}
@Override
public void reportMachineData(Object msg) {
//todo
}
}
================================================
FILE: cachecloud-custom/src/main/java/com/sohu/cache/utils/EnvCustomUtil.java
================================================
package com.sohu.cache.utils;
/**
* custom environment setting
*/
public class EnvCustomUtil {
//是否启用默认密码
public static boolean pwdswitch = false;
}
================================================
FILE: cachecloud-web/pom.xml
================================================
com.sohu.tv
cachecloud-parent
1.0-SNAPSHOT
4.0.0
cachecloud-web
com.sohu.tv
cachecloud-web
1.0-SNAPSHOT
war
org.springframework.boot
spring-boot-dependencies
${spring.boot.version}
pom
import
org.springframework.cloud
spring-cloud-dependencies
${spring.cloud.version}
pom
import
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-jdbc
org.springframework.boot
spring-boot-starter-test
org.springframework.boot
spring-boot-starter-logging
log4j-api
org.apache.logging.log4j
org.springframework.boot
spring-boot-starter-actuator
org.springframework.boot
spring-boot-starter-tomcat
provided
org.springframework.boot
spring-boot-starter-freemarker
org.apache.tomcat.embed
tomcat-embed-jasper
org.springframework
spring-context-support
javax.servlet
jstl
1.2
org.quartz-scheduler
quartz
slf4j-api
org.slf4j
HikariCP-java7
com.zaxxer
ch.qos.logback
logback-classic
mysql
mysql-connector-java
org.mybatis.spring.boot
mybatis-spring-boot-starter
org.jolokia
jolokia-core
redis.clients
jedis
${jedis.version}
com.dyuproject.protostuff
protostuff-runtime
${protostuff.version}
com.dyuproject.protostuff
protostuff-core
${protostuff.version}
org.apache.httpcomponents
httpclient
org.projectlombok
lombok
1.18.30
provided
org.apache.sshd
sshd-core
${ssh-version}
org.apache.sshd
sshd-scp
${ssh-version}
org.apache.commons
commons-collections4
com.zaxxer
HikariCP
3.3.1
net.sf.json-lib
json-lib
jdk15
commons-configuration
commons-configuration
org.apache.struts
struts-taglib
1.3.10
com.alibaba
fastjson
com.netflix.hystrix
hystrix-core
com.google.guava
guava
org.codehaus.janino
janino
${janino.version}
net.logstash.logback
logstash-logback-encoder
${logstash-logback-encoder.version}
com.vladsch.flexmark
flexmark
com.vladsch.flexmark
flexmark-ext-tables
com.sohu.tv.custom
cachecloud-custom
io.springfox
springfox-swagger2
io.springfox
springfox-swagger-ui
org.apache.ant
ant
cachecloud-web
org.apache.maven.plugins
maven-deploy-plugin
true
org.apache.maven.plugins
maven-surefire-plugin
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
com.sohu.cache.ApplicationStarter
false
true
false
repackage
1
org.apache.maven.plugins
maven-resources-plugin
UTF-8
true
ttf
woff
woff2
org.apache.maven.plugins
maven-compiler-plugin
1.8
1.8
src/main/resources
true
${project.basedir}/bin
${project.build.directory}
================================================
FILE: cachecloud-web/sql/2.0.sql
================================================
-- MySQL dump 10.15 Distrib 10.0.16-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: cachecloud_open
-- ------------------------------------------------------
-- Server version 10.0.16-MariaDB-log
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
--
-- Table structure for table `app_audit`
--
DROP TABLE IF EXISTS `app_audit`;
CREATE TABLE `app_audit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '申请人的id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`type` tinyint(4) NOT NULL COMMENT '申请类型:0:申请应用,1:应用扩容,2:修改配置',
`param1` varchar(600) DEFAULT NULL COMMENT '预留参数1',
`param2` varchar(600) DEFAULT NULL COMMENT '预留参数2',
`param3` varchar(600) DEFAULT NULL COMMENT '预留参数3',
`info` varchar(360) NOT NULL COMMENT '申请描述',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:等待审批; 1:审批通过; -1:驳回',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refuse_reason` varchar(360) DEFAULT NULL COMMENT '驳回理由',
`task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务id',
`operate_id` bigint(20) DEFAULT NULL COMMENT '工单处理人',
PRIMARY KEY (`id`),
KEY `idx_appid` (`app_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status_create_time` (`status`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用审核表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_audit_log`
--
DROP TABLE IF EXISTS `app_audit_log`;
CREATE TABLE `app_audit_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '审批操作人id',
`info` longtext NOT NULL COMMENT 'app审批的详细信息',
`type` tinyint(4) NOT NULL,
`create_time` datetime NOT NULL,
`app_audit_id` bigint(20) NOT NULL COMMENT '审批id',
PRIMARY KEY (`id`),
KEY `idx_audit_appid` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app审核日志表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_client_command_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_command_minute_statistics`;
CREATE TABLE `app_client_command_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`command` varchar(20) NOT NULL COMMENT '命令明文',
`cost` bigint(20) DEFAULT NULL COMMENT '命令累计毫秒耗时',
`bytes_in` bigint(20) DEFAULT NULL COMMENT '输入流量',
`bytes_out` bigint(20) DEFAULT NULL COMMENT '输出流量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx__appid_client_command_currentMin` (`app_id`,`client_ip`,`command`,`current_min`),
KEY `idx_currentmin_appid_count_cost` (`current_min`,`app_id`,`count`,`cost`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟命令调用上报数据';
--
-- Table structure for table `app_client_exception_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_exception_minute_statistics`;
CREATE TABLE `app_client_exception_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`type` tinyint(4) NOT NULL COMMENT '0:connect exception;1:command exception',
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`node` varchar(30) NOT NULL COMMENT '节点信息host:port',
`count` bigint(20) DEFAULT NULL COMMENT '累计连接失败次数',
`cost` bigint(20) DEFAULT NULL COMMENT '累计连接失败毫秒耗时',
`latency_commands` varchar(255) DEFAULT NULL COMMENT '统计命令topN id,逗号分隔',
`redis_pool_config` varchar(255) DEFAULT NULL COMMENT 'redis连接池配置信息',
PRIMARY KEY (`id`),
UNIQUE KEY `idx__client_node_type_currentMin` (`client_ip`,`node`,`type`,`current_min`),
KEY `idx_appid_current_min` (`app_id`,`current_min`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟异常上报数据';
--
-- Table structure for table `app_client_latency_command`
--
DROP TABLE IF EXISTS `app_client_latency_command`;
CREATE TABLE `app_client_latency_command` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`command` varchar(255) NOT NULL COMMENT '命令明文',
`size` bigint(20) DEFAULT NULL COMMENT '参数长度',
`args` varchar(255) DEFAULT NULL COMMENT '裁剪后参数明文',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`invoke_time` bigint(20) DEFAULT NULL COMMENT '命令调用时间戳',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端异常命令调用详情';
--
-- Table structure for table `app_client_statistic_gather`
--
DROP TABLE IF EXISTS `app_client_statistic_gather`;
CREATE TABLE `app_client_statistic_gather` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gather_time` varchar(20) NOT NULL COMMENT '统计时间,格式yyyy-mm-dd',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`cmd_count` bigint(20) DEFAULT '0' COMMENT '命令调用次数',
`conn_exp_count` bigint(20) DEFAULT '0' COMMENT '连接异常次数',
`avg_cmd_cost` double DEFAULT '0' COMMENT '命令调用平均耗时,单位毫秒',
`avg_cmd_exp_cost` double DEFAULT '0' COMMENT '命令超时平均耗时,单位毫秒',
`avg_conn_exp_cost` double DEFAULT '0' COMMENT '连接异常平均耗时,单位毫秒',
`cmd_exp_count` bigint(20) DEFAULT '0' COMMENT '命令超时次数',
`instance_count` int(11) DEFAULT NULL COMMENT '应用实例数',
`avg_mem_frag_ratio` double DEFAULT NULL COMMENT '平均碎片率',
`mem_used_ratio` double DEFAULT NULL COMMENT '内存使用率',
`exception_count` bigint(20) DEFAULT '0' COMMENT '异常数(旧,待下线)',
`slow_log_count` bigint(20) DEFAULT '0' COMMENT '慢查询次数',
`latency_count` bigint(20) DEFAULT '0' COMMENT '延迟事件次数',
`object_size` bigint(20) DEFAULT '0' COMMENT '存储对象数',
`used_memory` bigint(20) DEFAULT '0' COMMENT '内存占用 byte',
`used_memory_rss` bigint(20) DEFAULT '0' COMMENT '物理内存占用 byte',
`max_cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗(单位:秒)',
`max_cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗(单位:秒)',
`connected_clients` bigint(20) DEFAULT '0' COMMENT '应用客户端连接数',
`topology_exam_result` tinyint(4) DEFAULT NULL COMMENT '拓扑诊断结果,0:正常,1:异常',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_appid_gathertime` (`app_id`,`gather_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报数据全天统计';
--
-- Table structure for table `app_client_value_minute_stat`
--
DROP TABLE IF EXISTS `app_client_value_minute_stat`;
CREATE TABLE `app_client_value_minute_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用appid',
`collect_time` bigint(20) NOT NULL COMMENT '数据收集时间yyyyMMddHHmm00',
`update_time` datetime NOT NULL COMMENT '更新时间',
`command` varchar(20) NOT NULL COMMENT '执行命令',
`distribute_type` tinyint(4) NOT NULL COMMENT '值分布',
`count` int(11) NOT NULL COMMENT '命令执行次数',
PRIMARY KEY (`id`),
UNIQUE KEY `app_collect_command_dis` (`app_id`,`collect_time`,`command`,`distribute_type`),
KEY `idx_collect_time` (`collect_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟值分布上报数据统计';
--
-- Table structure for table `app_client_version_statistic`
--
DROP TABLE IF EXISTS `app_client_version_statistic`;
CREATE TABLE `app_client_version_statistic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip地址',
`client_version` varchar(20) NOT NULL COMMENT '客户端版本',
`report_time` datetime DEFAULT NULL COMMENT '上报时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_client_ip` (`app_id`,`client_ip`),
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报版本信息统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_daily`
--
DROP TABLE IF EXISTS `app_daily`;
CREATE TABLE `app_daily` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`date` date NOT NULL COMMENT '日期',
`create_time` datetime NOT NULL,
`slow_log_count` bigint(20) NOT NULL COMMENT '慢查询个数',
`client_exception_count` bigint(20) NOT NULL COMMENT '客户端异常个数',
`max_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟最大客户端连接数',
`avg_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟平均客户端连接数',
`max_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟最大命令数',
`avg_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟平均命令数',
`avg_hit_ratio` double NOT NULL COMMENT '平均命中率',
`min_minute_hit_ratio` double NOT NULL COMMENT '每分钟最小命中率',
`max_minute_hit_ratio` double NOT NULL COMMENT '每分钟最大命中率',
`avg_used_memory` bigint(20) NOT NULL COMMENT '最大内存使用量',
`max_used_memory` bigint(20) NOT NULL COMMENT '平均内存使用量',
`expired_keys_count` bigint(20) NOT NULL COMMENT '过期键个数',
`evicted_keys_count` bigint(20) NOT NULL COMMENT '剔除键个数',
`avg_minute_net_input_byte` double NOT NULL COMMENT '每分钟平均网络input量',
`max_minute_net_input_byte` double NOT NULL COMMENT '每分钟最大网络input量',
`avg_minute_net_output_byte` double NOT NULL COMMENT '每分钟平均网络output量',
`max_minute_net_output_byte` double NOT NULL COMMENT '每分钟最大网络output量',
`avg_object_size` bigint(20) NOT NULL COMMENT '键个数平均值',
`max_object_size` bigint(20) NOT NULL COMMENT '键个数最大值',
`big_key_times` bigint(20) NOT NULL COMMENT 'bigkey次数',
`big_key_info` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'bigkey详情',
`client_cmd_count` bigint(20) NOT NULL COMMENT '累计命令调用次数',
`client_avg_cmd_cost` double NOT NULL COMMENT '平均命令调用耗时',
`client_conn_exp_count` bigint(20) NOT NULL COMMENT '累计连接异常事件次数',
`client_avg_conn_exp_cost` double NOT NULL COMMENT '平均连接异常事件耗时',
`client_cmd_exp_count` bigint(20) NOT NULL COMMENT '累计命令超时事件次数',
`client_avg_cmd_exp_cost` double NOT NULL COMMENT '平均命令超时事件耗时',
PRIMARY KEY (`id`),
KEY `idx_appid_date` (`app_id`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='app日报';
--
-- Table structure for table `app_data_migrate_status`
--
DROP TABLE IF EXISTS `app_data_migrate_status`;
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int(11) NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
`end_time` datetime DEFAULT NULL COMMENT '迁移结束执行时间',
`log_path` varchar(255) NOT NULL COMMENT '日志文件路径',
`config_path` varchar(255) NOT NULL COMMENT '配置文件路径',
`migrate_id` varchar(50) DEFAULT NULL COMMENT 'migrate id',
`migrate_tool` tinyint(4) DEFAULT NULL COMMENT 'migrate_tool, 0:redis-shake,1:redis-migrate-tool',
`redis_source_version` varchar(20) DEFAULT NULL,
`redis_target_version` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用迁移记录详情';
--
-- Table structure for table `app_desc`
--
DROP TABLE IF EXISTS `app_desc`;
CREATE TABLE `app_desc` (
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用id',
`name` varchar(36) NOT NULL COMMENT '应用名',
`user_id` bigint(20) NOT NULL COMMENT '申请人id',
`status` tinyint(4) NOT NULL COMMENT '应用状态, 0未分配,1申请未审批,2审批并发布 3:应用下线',
`intro` varchar(255) NOT NULL COMMENT '应用描述',
`create_time` datetime NOT NULL COMMENT '创建时间',
`passed_time` datetime NOT NULL COMMENT '审批通过时间',
`type` int(10) NOT NULL DEFAULT '0' COMMENT 'cache类型,1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud ,5. redis-sentinel ,6.redis-standalone ',
`officer` varchar(32) NOT NULL COMMENT '负责人,中文',
`ver_id` int(11) NOT NULL COMMENT '版本',
`is_test` tinyint(4) DEFAULT '0' COMMENT '是否测试:1是0否',
`need_persistence` tinyint(4) DEFAULT '1' COMMENT '是否需要持久化: 1是0否',
`need_hot_back_up` tinyint(4) DEFAULT '1' COMMENT '是否需要热备: 1是0否',
`has_back_store` tinyint(4) DEFAULT '1' COMMENT '是否有后端数据源: 1是0否',
`forecase_qps` int(11) DEFAULT NULL COMMENT '预估qps',
`forecast_obj_num` int(11) DEFAULT NULL COMMENT '预估条目数',
`mem_alert_value` int(11) DEFAULT NULL COMMENT '内存报警阀值',
`client_machine_room` varchar(36) DEFAULT NULL COMMENT '客户端机房信息',
`client_conn_alert_value` int(11) DEFAULT '2000' COMMENT '客户端连接报警阀值',
`app_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`important_level` tinyint(4) NOT NULL DEFAULT '2' COMMENT '应用级别,1:最重要,2:一般重要,3:一般',
`password` varchar(255) DEFAULT '' COMMENT 'redis密码',
`hit_precent_alert_value` int(11) DEFAULT '0' COMMENT '命中率报警阀值 0:不报警 ',
`is_access_monitor` int(11) DEFAULT '0' COMMENT '是否接入全局监控报警 默认0,0:不接入监控 1:接入监控',
`app_fsync_value` int(11) DEFAULT '1' COMMENT '应用刷盘策略 1:主从节点appdendfsync=everysec 2:主从节点 appdendfsync=no',
`version_id` int(11) NOT NULL DEFAULT '1' COMMENT 'Redis版本表主键id',
PRIMARY KEY (`app_id`),
UNIQUE KEY `uidx_app_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app应用描述' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_command_statistics`
--
DROP TABLE IF EXISTS `app_hour_command_statistics`;
CREATE TABLE `app_hour_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHH',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`command_name`,`collect_time`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每小时命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_statistics`
--
DROP TABLE IF EXISTS `app_hour_statistics`;
CREATE TABLE `app_hour_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHH',
`hits` bigint(20) NOT NULL COMMENT '每小时命中数量和',
`misses` bigint(20) NOT NULL COMMENT '每小时未命中数量和',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '每小时内存占用最大值',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '每小时过期key数量和',
`evicted_keys` bigint(20) NOT NULL COMMENT '每小时驱逐key数量和',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '每小时客户端连接数最大值',
`object_size` bigint(20) NOT NULL COMMENT '每小时存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '每小时参与累加实例数最小值',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '每小时修改时间最大值',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用统计数据每小时统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_command_statistics`
--
DROP TABLE IF EXISTS `app_minute_command_statistics`;
CREATE TABLE `app_minute_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHHmm',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每分钟命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_statistics`
--
DROP TABLE IF EXISTS `app_minute_statistics`;
CREATE TABLE `app_minute_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`hits` bigint(20) NOT NULL COMMENT '命中数量',
`misses` bigint(20) NOT NULL COMMENT '未命中数量',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '内存占用',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '过期key数量',
`evicted_keys` bigint(20) NOT NULL COMMENT '驱逐key数量',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '客户端连接数',
`object_size` bigint(20) NOT NULL COMMENT '每分钟存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '参与累加实例数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_to_user`
--
DROP TABLE IF EXISTS `app_to_user`;
CREATE TABLE `app_to_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_user`
--
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '用户名',
`ch_name` varchar(255) NOT NULL COMMENT '中文名',
`email` varchar(64) NOT NULL COMMENT '邮箱',
`mobile` varchar(16) NOT NULL COMMENT '手机',
`type` int(4) NOT NULL DEFAULT '2' COMMENT '0管理员,1预留,2普通用户,-1无效',
`weChat` varchar(32) DEFAULT NULL COMMENT '微信号',
`isAlert` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户是否接收报警 0:不接收 1:接收',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_user_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表' /* `compression`='tokudb_zlib' */;
-- ----------------------------
-- Records of `app_user`
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1', 'admin', 'admin', 'admin@xxx.com', '13500000000', '0', null, '1');
COMMIT;
--
-- Table structure for table `brevity_schedule_resources`
--
DROP TABLE IF EXISTS `brevity_schedule_resources`;
CREATE TABLE `brevity_schedule_resources` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL COMMENT '类型,见:BrevityScheduleType',
`version` bigint(20) NOT NULL DEFAULT '0' COMMENT '时间版本',
`host` varchar(16) NOT NULL COMMENT '资源ip',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_type_host_port` (`type`,`host`,`port`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短频任务表';
--
-- Table structure for table `diagnostic_task_record`
--
DROP TABLE IF EXISTS `diagnostic_task_record`;
CREATE TABLE `diagnostic_task_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`type` int(11) DEFAULT NULL COMMENT '诊断类型:0scan 1bigkey 2idle key 3hotkey 4del key 5slot analysis 6topology exam',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务流id',
`audit_id` bigint(20) DEFAULT NULL COMMENT '审批id',
`status` int(11) DEFAULT NULL COMMENT '诊断状态:0开始 1结束 2异常',
`cost` bigint(20) DEFAULT NULL COMMENT '耗时,毫秒',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`redis_key` varchar(100) DEFAULT NULL COMMENT '结果的key',
`node` varchar(100) DEFAULT NULL COMMENT '实例,host:port',
`parent_task_id` bigint(20) DEFAULT NULL COMMENT '父任务id',
`diagnostic_condition` varchar(100) DEFAULT NULL COMMENT '诊断条件',
`param1` varchar(100) DEFAULT NULL COMMENT '备用参数1',
`param2` varchar(100) DEFAULT NULL COMMENT '备用参数2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用诊断记录';
--
-- Table structure for table `instance_alert_configs`
--
DROP TABLE IF EXISTS `instance_alert_configs`;
CREATE TABLE `instance_alert_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`alert_config` varchar(255) NOT NULL COMMENT '报警配置',
`alert_value` varchar(512) NOT NULL COMMENT '报警阀值',
`config_info` varchar(255) NOT NULL COMMENT '配置说明',
`type` tinyint(4) NOT NULL COMMENT '1:全局报警,2:实例报警',
`instance_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '0:全局配置,其他代表实例id',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`compare_type` tinyint(4) NOT NULL COMMENT '比较类型:1小于,2等于,3大于,4不等于',
`check_cycle` tinyint(4) NOT NULL COMMENT '1:一分钟,2:五分钟,3:半小时4:一个小时,5:一天',
`update_time` datetime NOT NULL COMMENT '报警配置更新时间',
`last_check_time` datetime NOT NULL COMMENT '上次检查时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`type`,`instance_id`,`alert_config`,`compare_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例报警阀值配置';
-- ----------------------------
-- Records of `instance_alert_configs`
-- ----------------------------
BEGIN;
INSERT INTO `instance_alert_configs` VALUES ('9', 'aof_current_size', '6000', 'aof当前尺寸(单位:MB)', '1', '0', '1', '3', '3', '2017-06-19 09:43:22', '2020-09-17 10:52:00'), ('10', 'aof_delayed_fsync', '3', '分钟aof阻塞个数', '1', '0', '1', '3', '1', '2017-06-19 10:38:19', '2020-09-17 11:09:00'), ('11', 'client_biggest_input_buf', '10', '输入缓冲区最大buffer大小(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 10:47:03', '2020-09-17 11:09:00'), ('12', 'client_longest_output_list', '50000', '输出缓冲区最大队列长度', '1', '0', '1', '3', '1', '2017-06-19 10:55:45', '2020-09-17 11:09:00'), ('13', 'instantaneous_ops_per_sec', '60000', '实时ops', '1', '0', '1', '3', '1', '2017-06-19 11:02:38', '2020-09-17 11:09:00'), ('14', 'latest_fork_usec', '400000', '上次fork所用时间(单位:微秒)', '1', '0', '1', '3', '5', '2017-06-19 11:21:35', '2020-09-16 16:51:00'), ('15', 'mem_fragmentation_ratio', '1.5', '内存碎片率(检测大于500MB)', '1', '0', '1', '3', '5', '2017-06-19 12:49:16', '2020-09-16 16:51:00'), ('16', 'rdb_last_bgsave_status', 'ok', '上一次bgsave状态', '1', '0', '1', '4', '4', '2017-06-19 14:15:21', '2020-09-17 10:19:00'), ('17', 'total_net_output_bytes', '5000', '分钟网络输出流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:39:44', '2020-09-17 11:09:00'), ('19', 'total_net_input_bytes', '1200', '分钟网络输入流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:45:44', '2020-09-17 11:09:00'), ('20', 'sync_partial_err', '0', '分钟部分复制失败次数', '1', '0', '1', '3', '1', '2017-06-19 18:34:41', '2020-09-17 11:09:00'), ('21', 'sync_partial_ok', '0', '分钟部分复制成功次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:01', '2020-09-17 11:09:00'), ('22', 'sync_full', '0', '分钟全量复制执行次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:17', '2020-09-17 11:09:00'), ('23', 'rejected_connections', '0', '分钟拒绝连接数', '1', '0', '1', '3', '1', '2017-06-19 18:35:36', '2020-09-17 11:09:00'), ('54', 'master_slave_offset_diff', '20000000', '主从节点偏移量差(单位:字节)', '1', '0', '1', '3', '2', '2017-06-20 18:58:56', '2020-09-17 11:06:00'), ('56', 'cluster_state', 'ok', '集群状态', '1', '0', '1', '4', '1', '2017-06-21 18:01:52', '2020-09-17 11:09:00'), ('57', 'cluster_slots_ok', '16384', '集群成功分配槽个数', '1', '0', '1', '4', '1', '2017-06-21 18:02:04', '2020-09-17 11:09:00');
COMMIT;
--
-- Table structure for table `instance_big_key`
--
DROP TABLE IF EXISTS `instance_big_key`;
CREATE TABLE `instance_big_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`audit_id` bigint(20) NOT NULL COMMENT 'audit id',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从,详见InstanceRoleEnum',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`big_key` varchar(255) NOT NULL COMMENT '键',
`type` varchar(16) NOT NULL COMMENT '类型:string,hash,list,set,zset',
`length` int(11) NOT NULL COMMENT '长度',
`create_time` datetime NOT NULL COMMENT '记录创建时间',
PRIMARY KEY (`id`),
KEY `idx_app_audit` (`app_id`,`audit_id`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例bigkey列表';
--
-- Table structure for table `instance_config`
--
DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Redis版本表主键id',
`refresh` mediumint(9) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例配置模板';
-- ----------------------------
-- Records of `instance_config`
-- ----------------------------
BEGIN;
INSERT INTO `instance_config` VALUES ('1', 'cluster-enabled', 'yes', '是否开启集群模式', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('2', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('3', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('4', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('5', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('6', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2016-07-05 15:08:31', '2', '1', '29', '0'), ('7', 'port', '%d', 'sentinel实例端口', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('8', 'dir', '%s', '工作目录', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('9', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('10', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('11', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('12', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('13', 'daemonize', 'no', '是否守护进程', '2016-07-14 14:00:05', '6', '1', '29', '0'), ('14', 'tcp-backlog', '511', 'TCP连接完成队列', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('15', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('16', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2016-12-06 11:40:46', '6', '1', '29', '0'), ('17', 'loglevel', 'notice', '日志级别', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('18', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('19', 'dir', '%s', 'redis工作目录', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('20', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('21', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('22', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('23', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('24', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('25', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('26', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('27', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('28', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('29', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('30', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('31', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('32', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('33', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('34', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('35', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('36', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('37', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('38', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('39', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('40', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('41', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2016-11-24 10:24:21', '6', '1', '29', '0'), ('42', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('43', 'hz', '10', '执行后台task数量,默认:10', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('44', 'port', '%d', '端口', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('45', 'maxmemory', '%dmb', '当前实例最大可用内存', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('46', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('47', 'appendonly', 'yes', '开启append only持久化模式', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('48', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('49', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('50', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('51', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('52', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('53', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('54', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('55', 'maxclients', '10000', '客户端最大连接数', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('126', 'cluster-enabled', 'yes', '是否开启集群模式', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('127', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('128', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('129', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('130', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('131', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('132', 'port', '%d', 'sentinel实例端口', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('133', 'dir', '%s', '工作目录', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('134', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('135', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('136', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('137', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('138', 'daemonize', 'no', '是否守护进程', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('139', 'tcp-backlog', '511', 'TCP连接完成队列', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('140', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('141', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('142', 'loglevel', 'notice', '日志级别', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('143', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('144', 'dir', '%s', 'redis工作目录', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('145', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('146', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('147', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('148', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('149', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('150', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('151', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('152', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('153', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('154', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('155', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('156', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('157', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('158', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('159', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2018-09-18 18:25:32', '6', '0', '31', '0'), ('160', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2018-09-18 18:25:40', '6', '0', '31', '0'), ('161', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('162', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('163', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('164', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('165', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('166', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('167', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('168', 'hz', '10', '执行后台task数量,默认:10', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('169', 'port', '%d', '端口', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('170', 'maxmemory', '%dmb', '当前实例最大可用内存', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('171', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('172', 'appendonly', 'yes', '开启append only持久化模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('173', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('174', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('175', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('176', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('177', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('178', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('179', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('180', 'maxclients', '10000', '客户端最大连接数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('181', 'protected-mode', 'yes', '开启保护模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('182', 'bind', '0.0.0.0', '默认客户端都可连接', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('185', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2018-09-18 18:26:32', '6', '1', '31', '0'), ('186', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2018-09-18 18:27:12', '6', '1', '31', '0'), ('253', 'protected-mode', 'no', '关闭保护模式', '2018-11-01 16:10:59', '5', '1', '31', '0'), ('354', 'cluster-enabled', 'yes', '是否开启集群模式', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('355', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('356', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('357', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('358', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('359', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('360', 'port', '%d', 'sentinel实例端口', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('361', 'dir', '%s', '工作目录', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('362', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('363', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('364', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('365', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('366', 'daemonize', 'no', '是否守护进程', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('367', 'tcp-backlog', '511', 'TCP连接完成队列', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('368', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('369', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('370', 'loglevel', 'notice', '日志级别', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('371', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('372', 'dir', '%s', 'redis工作目录', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('373', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('374', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('375', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('376', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('377', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('378', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('379', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('380', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('381', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('382', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('383', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('384', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('385', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('386', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('387', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('388', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('389', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('390', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('391', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('392', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('393', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('394', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('395', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('396', 'hz', '10', '执行后台task数量,默认:10', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('397', 'port', '%d', '端口', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('398', 'maxmemory', '%dmb', '当前实例最大可用内存', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('399', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('400', 'appendonly', 'yes', '开启append only持久化模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('401', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('402', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('403', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('404', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('405', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('406', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('407', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('408', 'maxclients', '10000', '客户端最大连接数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('409', 'protected-mode', 'yes', '开启保护模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('410', 'bind', '0.0.0.0', '默认客户端都可连接', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('411', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('412', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('413', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('414', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('415', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('416', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('417', 'slave-lazy-flush', 'yes', 'slave发起全量复制,是否采用flushall async清理老数据 默认值 no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('418', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2019-10-31 11:15:57', '6', '1', '12', '0'), ('419', 'protected-mode', 'no', '关闭sentinel保护模式', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('420', 'activedefrag', 'no', '碎片整理开启', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('421', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('422', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('423', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('424', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('425', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('506', 'cluster-enabled', 'yes', '是否开启集群模式', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('507', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('508', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('509', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('510', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('511', 'port', '%d', 'sentinel实例端口', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('512', 'dir', '%s', '工作目录', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('513', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('514', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('515', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('516', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('517', 'daemonize', 'no', '是否守护进程', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('518', 'tcp-backlog', '511', 'TCP连接完成队列', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('519', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('520', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('521', 'loglevel', 'notice', '日志级别', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('522', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('523', 'dir', '%s', 'redis工作目录', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('524', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('525', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('526', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('527', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('528', 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('529', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('530', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('531', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('532', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('533', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('534', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('535', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('536', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('537', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('538', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('539', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('540', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('541', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('542', 'hz', '10', '执行后台task数量,默认:10', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('543', 'port', '%d', '端口', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('544', 'maxmemory', '%dmb', '当前实例最大可用内存', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('545', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('546', 'appendonly', 'yes', '开启append only持久化模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('547', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('548', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('549', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('550', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('551', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('552', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('553', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('554', 'maxclients', '10000', '客户端最大连接数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('555', 'protected-mode', 'yes', '开启保护模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('556', 'bind', '0.0.0.0', '默认客户端都可连接', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('557', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('558', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('559', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('560', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('561', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('562', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('563', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('564', 'protected-mode', 'no', '关闭sentinel保护模式', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('565', 'activedefrag', 'yes', '碎片整理开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('566', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('567', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('568', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('569', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('570', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('571', 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('572', 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('573', 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('574', 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('575', 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('576', 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('577', 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('578', 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('579', 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('580', 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('581', 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('582', 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('583', 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('585', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:45:22', '6', '1', '37', '0'), ('587', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:18', '6', '1', '12', '0'), ('589', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:49', '6', '1', '31', '0'), ('590', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:49:47', '6', '1', '29', '0');
COMMIT;
--
-- Table structure for table `instance_fault`
--
DROP TABLE IF EXISTS `instance_fault`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `instance_fault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`inst_id` bigint(20) NOT NULL COMMENT '实例id',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0:心跳停止,1:心跳恢复',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` mediumint(4) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`reason` mediumtext NOT NULL COMMENT '故障原因描述',
PRIMARY KEY (`id`),
KEY `idx_ip_port` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8927 DEFAULT CHARSET=utf8 COMMENT='实例故障表' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `instance_host`
--
DROP TABLE IF EXISTS `instance_host`;
CREATE TABLE `instance_host` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`ssh_user` varchar(32) DEFAULT NULL COMMENT 'ssh用户',
`ssh_pwd` varchar(32) DEFAULT NULL COMMENT 'ssh密码',
`warn` int(5) DEFAULT '1' COMMENT '0不报警,1报警',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_host_ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_info`
--
DROP TABLE IF EXISTS `instance_info`;
CREATE TABLE `instance_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'memcached instance id',
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '对等实例的id',
`app_id` bigint(20) NOT NULL COMMENT '应用id,与app_desc关联',
`host_id` bigint(20) NOT NULL COMMENT '对应的主机id,与instance_host关联',
`ip` varchar(16) NOT NULL COMMENT '实例的ip',
`port` int(11) NOT NULL COMMENT '实例端口',
`status` tinyint(4) NOT NULL COMMENT '是否启用:0:节点异常,1:正常启用,2:节点下线',
`mem` int(11) NOT NULL COMMENT '内存大小',
`conn` int(11) NOT NULL COMMENT '连接数',
`cmd` varchar(255) NOT NULL COMMENT '启动实例的命令/redis-sentinel的masterName',
`type` mediumint(11) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_inst_ipport` (`ip`,`port`) USING BTREE,
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_latency_history`
--
DROP TABLE IF EXISTS `instance_latency_history`;
CREATE TABLE `instance_latency_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`event` varchar(255) NOT NULL COMMENT '事件名称',
`execute_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`execution_cost` bigint(20) NOT NULL COMMENT '耗时(微妙)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `latencyistorykey` (`instance_id`,`event`,`execute_date`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executedate` (`app_id`,`execute_date`),
KEY `idx_executedate` (`execute_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例延迟事件信息表';
--
-- Table structure for table `instance_minute_stats`
--
DROP TABLE IF EXISTS `instance_minute_stats`;
CREATE TABLE `instance_minute_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`json` text NOT NULL COMMENT '统计json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例分钟统计表';
--
-- Table structure for table `instance_reshard_process`
--
DROP TABLE IF EXISTS `instance_reshard_process`;
CREATE TABLE `instance_reshard_process` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`audit_id` bigint(20) NOT NULL COMMENT '审核id',
`source_instance_id` int(11) NOT NULL COMMENT '源实例id',
`target_instance_id` int(11) NOT NULL COMMENT '目标实例id',
`start_slot` int(11) NOT NULL COMMENT '开始slot',
`end_slot` int(11) NOT NULL COMMENT '结束slot',
`migrating_slot` int(11) NOT NULL COMMENT '正在迁移的slot',
`is_pipeline` tinyint(4) NOT NULL COMMENT '是否为pipeline,0:否,1:是',
`finish_slot_num` int(11) NOT NULL COMMENT '已经完成迁移的slot数量',
`status` tinyint(4) NOT NULL COMMENT '0:运行中 1:完成 2:出错',
`start_time` datetime NOT NULL COMMENT '迁移开始时间',
`end_time` datetime NOT NULL COMMENT '迁移结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_audit` (`audit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例Reshard进度';
--
-- Table structure for table `instance_slow_log`
--
DROP TABLE IF EXISTS `instance_slow_log`;
CREATE TABLE `instance_slow_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`slow_log_id` bigint(20) NOT NULL COMMENT '慢查询id',
`cost_time` int(11) NOT NULL COMMENT '耗时(微妙)',
`command` varchar(255) NOT NULL COMMENT '执行命令',
`execute_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `slowlogkey` (`instance_id`,`slow_log_id`,`execute_time`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executetime` (`app_id`,`execute_time`),
KEY `idx_executetime` (`execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢查询列表';
--
-- Table structure for table `instance_statistics`
--
DROP TABLE IF EXISTS `instance_statistics`;
CREATE TABLE `instance_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`inst_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`host_id` bigint(20) NOT NULL COMMENT '机器的id',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`port` int(255) NOT NULL COMMENT 'port',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从',
`max_memory` bigint(255) NOT NULL COMMENT '预分配内存,单位byte',
`used_memory` bigint(255) NOT NULL COMMENT '已使用内存,单位byte',
`curr_items` bigint(255) NOT NULL COMMENT '当前item数量',
`curr_connections` int(255) NOT NULL COMMENT '当前连接数',
`misses` bigint(255) NOT NULL COMMENT 'miss数',
`hits` bigint(255) NOT NULL COMMENT '命中数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mem_fragmentation_ratio` double DEFAULT '0' COMMENT '碎片率',
`aof_delayed_fsync` int(11) DEFAULT '0' COMMENT 'aof阻塞次数',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `machine_id` (`host_id`),
KEY `idx_inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='实例的最新统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_info`
--
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '机器的id',
`ssh_user` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh用户',
`ssh_passwd` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh密码',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`room` varchar(20) COLLATE utf8_bin NOT NULL COMMENT '所属机房',
`mem` int(11) unsigned NOT NULL COMMENT '内存大小,单位G',
`cpu` mediumint(24) unsigned NOT NULL COMMENT 'cpu数量',
`virtual` tinyint(8) unsigned NOT NULL DEFAULT '1' COMMENT '是否虚拟,0表示否,1表示是',
`real_ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '宿主机ip',
`service_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
`fault_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '故障次数',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`warn` tinyint(255) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用报警,0不启用,1启用',
`available` tinyint(255) NOT NULL COMMENT '表示机器是否可用,1表示可用,0表示不可用;',
`groupId` int(11) NOT NULL DEFAULT '0' COMMENT '机器分组,默认为0,表示原生资源,非0表示外部提供的资源(可扩展)',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '0原生 1 其他',
`extra_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '对于机器的额外说明(例如机器安装的其他服务(web,mysql,queue等等))',
`collect` int(11) DEFAULT '1' COMMENT 'switch of collect server status, 1:open, 0:close',
`version_install` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '机器安装redis版本状态',
`use_type` tinyint(4) DEFAULT '2' COMMENT '使用类型:Redis专用机器(0),Redis测试机器(1),混合部署机器(2),Redis-Sentinel机器(3)',
`k8s_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否k8s容器:0:不是 1:是',
`rack` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '机器所在机架信息',
`is_allocating` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否在分配中,1是0否',
`disk` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '磁盘空间:G',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='机器信息表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_relation`
--
DROP TABLE IF EXISTS `machine_relation`;
CREATE TABLE `machine_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ip` varchar(64) NOT NULL COMMENT '虚拟机ip',
`real_ip` varchar(64) NOT NULL COMMENT '宿主机ip',
`extra_desc` varchar(128) DEFAULT NULL COMMENT '实例描述信息',
`status` int(255) NOT NULL COMMENT '实例变更状态 0:offline ,1:online',
`is_sync` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据同步状态 0: 未同步数据 -1:同步中 1:数据已同步 -2:同步失败 ',
`sync_time` timestamp NULL DEFAULT NULL COMMENT '同步时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'pod最后更新时间',
`taskid` bigint(11) DEFAULT NULL COMMENT '任务id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `machine_room`
--
DROP TABLE IF EXISTS `machine_room`;
CREATE TABLE `machine_room` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '机房id',
`name` varchar(255) NOT NULL COMMENT '机房名称',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`desc` varchar(255) DEFAULT NULL COMMENT '机房描述信息',
`ip_network` varchar(32) NOT NULL DEFAULT '' COMMENT '机房网段信息',
`operator` varchar(255) DEFAULT NULL COMMENT '运营商',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `machine_room`
-- ----------------------------
BEGIN;
INSERT INTO `machine_room` VALUES ('1', '阿里云杭州', '1', '阿里云-杭州机房', '172.27.*.*', '阿里云');
COMMIT;
--
-- Table structure for table `machine_statistics`
--
DROP TABLE IF EXISTS `machine_statistics`;
CREATE TABLE `machine_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`host_id` bigint(20) NOT NULL COMMENT '机器id',
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`cpu_usage` varchar(120) NOT NULL COMMENT 'cpu使用率',
`load` varchar(120) NOT NULL COMMENT '机器负载',
`traffic` varchar(120) NOT NULL COMMENT 'io网络流量',
`memory_usage_ratio` varchar(120) NOT NULL COMMENT '内存使用率',
`memory_free` varchar(120) NOT NULL COMMENT '内存剩余',
`memory_total` varchar(120) NOT NULL COMMENT '总内存量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`max_memory` int(11) DEFAULT '0' COMMENT '机器分配内存,单位MB',
`instance_count` int(11) DEFAULT '0' COMMENT '机器实例数量',
`machine_memory` int(11) DEFAULT '0' COMMENT '机器入库总内存,单位MB',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_ip` (`ip`),
KEY `host_id` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器状态统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_blob_triggers`
--
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`BLOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_calendars`
--
DROP TABLE IF EXISTS `qrtz_calendars`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `qrtz_calendars` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`CALENDAR_NAME` varchar(200) NOT NULL COMMENT 'calendar名称',
`CALENDAR` blob NOT NULL COMMENT 'calendar信息',
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='以 Blob 类型存储 Quartz 的 Calendar 信息' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `qrtz_cron_triggers`
--
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`TRIGGER_NAME` varchar(200) NOT NULL COMMENT 'trigger名',
`TRIGGER_GROUP` varchar(200) NOT NULL COMMENT 'trigger组',
`CRON_EXPRESSION` varchar(120) NOT NULL COMMENT 'cron表达式',
`TIME_ZONE_ID` varchar(80) DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储 Cron Trigger,包括 Cron 表达式和时区信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_fired_triggers`
--
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`ENTRY_ID` varchar(195) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL,
`FIRED_TIME` bigint(13) NOT NULL,
`SCHED_TIME` bigint(13) NOT NULL,
`PRIORITY` int(11) NOT NULL,
`STATE` varchar(16) NOT NULL,
`JOB_NAME` varchar(200) DEFAULT NULL,
`JOB_GROUP` varchar(200) DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL COMMENT '是否非并行执行',
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL COMMENT '是否持久化',
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已触发的 Trigger相关的状态信息,以及关联 Job 的执行信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_job_details`
--
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
`SCHED_NAME` varchar(120) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) NOT NULL,
`IS_DURABLE` varchar(1) NOT NULL COMMENT '是否持久化,0不持久化,1持久化',
`IS_NONCONCURRENT` varchar(1) NOT NULL COMMENT '是否非并发,0非并发,1并发',
`IS_UPDATE_DATA` varchar(1) NOT NULL,
`REQUESTS_RECOVERY` varchar(1) NOT NULL COMMENT '是否可恢复,0不恢复,1恢复',
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储每一个已配置的 Job 的详细信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_locks`
--
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
`SCHED_NAME` varchar(120) NOT NULL,
`LOCK_NAME` varchar(40) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储程序的悲观锁的信息(假如使用了悲观锁)' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_paused_trigger_grps`
--
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已暂停的 Trigger 组的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_scheduler_state`
--
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
`SCHED_NAME` varchar(120) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL COMMENT '执行quartz实例的主机名',
`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT '实例将状态报告给集群中的其它实例的上一次时间',
`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT '实例间状态报告的时间频率',
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储少量的有关 Scheduler 的状态信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_simple_triggers`
--
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`REPEAT_COUNT` bigint(7) NOT NULL COMMENT '重复次数',
`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT '重复间隔',
`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT '已出发次数',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储简单的 Trigger,包括重复次数,间隔,以及已触的次数' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_simprop_triggers`
--
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`STR_PROP_1` varchar(512) DEFAULT NULL,
`STR_PROP_2` varchar(512) DEFAULT NULL,
`STR_PROP_3` varchar(512) DEFAULT NULL,
`INT_PROP_1` int(11) DEFAULT NULL,
`INT_PROP_2` int(11) DEFAULT NULL,
`LONG_PROP_1` bigint(20) DEFAULT NULL,
`LONG_PROP_2` bigint(20) DEFAULT NULL,
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_triggers`
--
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
`PRIORITY` int(11) DEFAULT NULL,
`TRIGGER_STATE` varchar(16) NOT NULL,
`TRIGGER_TYPE` varchar(8) NOT NULL,
`START_TIME` bigint(13) NOT NULL,
`END_TIME` bigint(13) DEFAULT NULL,
`CALENDAR_NAME` varchar(200) DEFAULT NULL,
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已配置的 Trigger 的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`host` varchar(255) DEFAULT NULL COMMENT 'host',
`nmon` varchar(255) DEFAULT NULL COMMENT 'nmon version',
`cpus` tinyint(4) DEFAULT NULL COMMENT 'logic cpu num',
`cpu_model` varchar(255) DEFAULT NULL COMMENT 'cpu 型号',
`dist` varchar(255) DEFAULT NULL COMMENT '发行版信息',
`kernel` varchar(255) DEFAULT NULL COMMENT '内核信息',
`ulimit` varchar(255) DEFAULT NULL COMMENT 'ulimit -n,ulimit -u',
`updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `server_stat`
--
DROP TABLE IF EXISTS `server_stat`;
CREATE TABLE `server_stat` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`cdate` date NOT NULL COMMENT '数据收集天',
`ctime` char(4) NOT NULL COMMENT '数据收集小时分钟',
`cuser` float DEFAULT NULL COMMENT '用户态占比',
`csys` float DEFAULT NULL COMMENT '内核态占比',
`cwio` float DEFAULT NULL COMMENT 'wio占比',
`c_ext` text COMMENT '子cpu占比',
`cload1` float DEFAULT NULL COMMENT '1分钟load',
`cload5` float DEFAULT NULL COMMENT '5分钟load',
`cload15` float DEFAULT NULL COMMENT '15分钟load',
`mtotal` float DEFAULT NULL COMMENT '总内存,单位M',
`mfree` float DEFAULT NULL COMMENT '空闲内存',
`mcache` float DEFAULT NULL COMMENT 'cache',
`mbuffer` float DEFAULT NULL COMMENT 'buffer',
`mswap` float DEFAULT NULL COMMENT 'cache',
`mswap_free` float DEFAULT NULL COMMENT 'cache',
`nin` float DEFAULT NULL COMMENT '网络入流量 单位K/s',
`nout` float DEFAULT NULL COMMENT '网络出流量 单位k/s',
`nin_ext` text COMMENT '各网卡入流量详情',
`nout_ext` text COMMENT '各网卡出流量详情',
`tuse` int(11) DEFAULT NULL COMMENT 'tcp estab连接数',
`torphan` int(11) DEFAULT NULL COMMENT 'tcp orphan连接数',
`twait` int(11) DEFAULT NULL COMMENT 'tcp time wait连接数',
`dread` float DEFAULT NULL COMMENT '磁盘读速率 单位K/s',
`dwrite` float DEFAULT NULL COMMENT '磁盘写速率 单位K/s',
`diops` float DEFAULT NULL COMMENT '磁盘io速率 交互次数/s',
`dbusy` float DEFAULT NULL COMMENT '磁盘io带宽使用百分比',
`d_ext` text COMMENT '磁盘各分区占比',
`dspace` text COMMENT '磁盘各分区空间使用率',
PRIMARY KEY (`ip`,`cdate`,`ctime`),
KEY `idx_cdate` (`cdate`),
KEY `idx_cdate_ctime` (`cdate`,`ctime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `system_config`
--
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
`config_key` varchar(255) NOT NULL COMMENT '配置key',
`config_value` varchar(512) NOT NULL COMMENT '配置value',
`info` varchar(255) NOT NULL COMMENT '配置说明',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`order_id` int(11) NOT NULL COMMENT '顺序',
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `system_config`
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES ('cachecloud.admin.user.name','admin','cachecloud-admin用户名',1,11),('cachecloud.admin.user.password','admin','cachelcoud-admin密码',1,12),('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,33),('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,31),('cachecloud.contact','user1:(xx@zz.com, user1:135xxxxxxxx)
user2: (user2@zz.com, user2:138xxxxxxxx)','值班联系人信息',1,14),('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,22),('cachecloud.email.alert.interface','','邮件报警接口(参考报警接口规范)',1,24),('cachecloud.machine.ssh.name','cachecloud-open','机器ssh用户名',1,2),('cachecloud.machine.ssh.password','cachecloud-open','机器ssh密码',1,3),('cachecloud.machine.ssh.port','22','机器ssh端口',1,10),('cachecloud.machine.stats.cron.minute','1','机器性能统计周期(分钟)',1,35),('cachecloud.nmon.dir','/opt/cachecloud','nmon安装目录',1,32),('cachecloud.owner.email','xx@sohu.com,yy@qq.com','邮件报警(逗号隔开)',1,21),('cachecloud.owner.phone','xxx,yyy','手机号报警(逗号隔开)',1,21),('cachecloud.owner.weChat','xxx,yyy','微信号报警(逗号隔开)',1,21),('cachecloud.public.key.pem','/opt/ssh/id_rsa','密钥路径',1,5),('cachecloud.public.user.name','cachecloud-open','公钥用户名',1,4),('cachecloud.ssh.auth.type','1','ssh授权方式',1,1),('cachecloud.superAdmin','admin,xx,yy','超级管理员组',1,13),('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,22),('cachecloud.weChat.alert.interface','','微信报警接口(参考报警接口规范)',1,23),('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,34),('machine.load.alert.ratio','8.0','机器负载报警阀值',1,32);
COMMIT;
-- ----------------------------
-- Table structure for `system_resource`
-- ----------------------------
DROP TABLE IF EXISTS `system_resource`;
CREATE TABLE `system_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '资源ID',
`name` varchar(64) NOT NULL COMMENT '资源名称',
`intro` varchar(255) DEFAULT NULL COMMENT '资源说明',
`type` tinyint(4) NOT NULL COMMENT '1:仓库地址 2:脚本 3:资源包 4:公钥/私钥 6:目录管理 7:迁移工具管理',
`lastmodify` datetime DEFAULT NULL COMMENT '最后更新时间',
`dir` varchar(128) DEFAULT NULL COMMENT '资源路径',
`url` varchar(128) DEFAULT NULL COMMENT '仓库地址',
`ispush` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:未推送 1:已推送',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`username` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`task_id` bigint(11) DEFAULT NULL COMMENT '迁移任务id',
`compile_info` varchar(255) DEFAULT NULL COMMENT '编译信息',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `system_resource`
-- ----------------------------
BEGIN;
INSERT INTO `system_resource` VALUES (1,'cachecloud-init.sh','容器初始化脚本',2,'2020-07-15 18:35:41','/script','',0,1,NULL,NULL,NULL),(2,'x.x.x.x',NULL,1,'2020-08-10 10:31:51','/opt/download/software/cachecloud/resource','http://x.x.x.x/software/cachecloud/resource',0,1,'admin',0,NULL),(4,'cachecloud-env.sh','宿主环境脚本',2,'2020-07-15 18:36:28','/script','',0,1,NULL,NULL,NULL),(5,'id_rsa','私钥文件',4,'2020-07-07 10:45:39','/ssh','',0,1,NULL,NULL,NULL),(6,'id_rsa.pub','公钥文件',4,'2020-07-07 10:45:45','/ssh','',0,1,NULL,NULL,NULL),(12,'redis-4.0.14','redis 4.0.14资源包',3,'2020-08-10 09:52:41','/redis','http://download.redis.io/releases/redis-4.0.14.tar.gz',0,1,'admin',532,NULL),(21,'/script','脚本目录管理',6,'2020-08-10 10:51:34','',NULL,0,1,'admin',0,NULL),(28,'/ssh','ssh目录',6,'2020-07-20 17:55:03',NULL,NULL,0,1,'admin',0,NULL),(29,'redis-3.0.7','redis3.0.7 资源包',3,'2020-08-10 09:53:32','/redis','http://download.redis.io/releases/redis-3.0.7.tar.gz',0,1,'admin',529,NULL),(31,'redis-3.2.12','redis 3.2.12 资源包',3,'2020-08-10 15:08:21','/redis','http://download.redis.io/releases/redis-3.2.12.tar.gz',0,1,'admin',530,NULL),(32,'/redis','redis资源包管理',6,'2020-07-20 17:54:59',NULL,NULL,0,1,'admin',0,NULL),(33,'/tool','迁移工具资源包',6,'2020-07-20 17:54:53',NULL,NULL,0,1,'admin',0,NULL),(37,'redis-5.0.9','redis5.0.9 资源包',3,'2020-08-10 09:51:41','/redis','http://download.redis.io/releases/redis-5.0.9.tar.gz',0,1,'admin',533,NULL),(40,'redis-shake-2.0.3','redis 2.0.3\n修复fix 5.0迁移类型问题',7,'2020-08-11 10:53:26','/tool','https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz',0,1,'admin',518,NULL);
COMMIT;
--
-- Table structure for table `task_queue`
--
DROP TABLE IF EXISTS `task_queue`;
CREATE TABLE `task_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`important_info` varchar(255) NOT NULL DEFAULT '' COMMENT '重要信息',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`param` longtext NOT NULL COMMENT '任务参数(json):随着任务变化',
`init_param` longtext NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2中断,3失败',
`parent_task_id` bigint(20) NOT NULL COMMENT '父任务id',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`error_code` int(11) NOT NULL COMMENT '错误代码',
`error_msg` varchar(255) NOT NULL COMMENT '错误消息',
`task_note` varchar(255) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
--
-- Table structure for table `task_step_flow`
--
DROP TABLE IF EXISTS `task_step_flow`;
CREATE TABLE `task_step_flow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`task_id` bigint(20) NOT NULL COMMENT '任务id',
`child_task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '子任务id',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`order_no` int(11) NOT NULL COMMENT '序号',
`status` tinyint(4) NOT NULL COMMENT '状态:0未开始、1成功、2中断、3跳过、4失败',
`log` text COMMENT '日志',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_class_step` (`task_id`,`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤流表';
--
-- Table structure for table `task_step_meta`
--
DROP TABLE IF EXISTS `task_step_meta`;
CREATE TABLE `task_step_meta` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`step_desc` varchar(255) NOT NULL COMMENT '步骤描述',
`ops_device` varchar(255) NOT NULL COMMENT '运维建议',
`timeout` int(11) NOT NULL COMMENT '超时时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`order_no` int(11) NOT NULL COMMENT '序号',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_class_step` (`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤元数据表';
/*!40101 SET character_set_client = @saved_cs_client */;
-- ----------------------------
-- Table structure for `standard_statistics`
-- ----------------------------
DROP TABLE IF EXISTS `standard_statistics`;
CREATE TABLE `standard_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`info_json` text NOT NULL COMMENT '收集的json数据',
`diff_json` text NOT NULL COMMENT '上一次收集差异的json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`cluster_info_json` varchar(20480) NOT NULL DEFAULT '' COMMENT '收集的cluster info json数据',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_create_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
================================================
FILE: cachecloud-web/sql/3.0.sql
================================================
-- MySQL dump 10.15 Distrib 10.0.16-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: cachecloud_open
-- ------------------------------------------------------
-- Server version 10.0.16-MariaDB-log
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
--
-- Table structure for table `app_audit`
--
DROP TABLE IF EXISTS `app_audit`;
CREATE TABLE `app_audit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '申请人的id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`type` tinyint(4) NOT NULL COMMENT '申请类型:0:申请应用,1:应用扩容,2:修改配置',
`param1` varchar(600) DEFAULT NULL COMMENT '预留参数1',
`param2` varchar(600) DEFAULT NULL COMMENT '预留参数2',
`param3` varchar(600) DEFAULT NULL COMMENT '预留参数3',
`info` varchar(360) NOT NULL COMMENT '申请描述',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:等待审批; 1:审批通过; -1:驳回',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refuse_reason` varchar(360) DEFAULT NULL COMMENT '驳回理由',
`task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务id',
`operate_id` bigint(20) DEFAULT NULL COMMENT '工单处理人',
PRIMARY KEY (`id`),
KEY `idx_appid` (`app_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status_create_time` (`status`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用审核表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_audit_log`
--
DROP TABLE IF EXISTS `app_audit_log`;
CREATE TABLE `app_audit_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '审批操作人id',
`info` longtext NOT NULL COMMENT 'app审批的详细信息',
`type` tinyint(4) NOT NULL,
`create_time` datetime NOT NULL,
`app_audit_id` bigint(20) NOT NULL COMMENT '审批id',
PRIMARY KEY (`id`),
KEY `idx_audit_appid` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app审核日志表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_client_command_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_command_minute_statistics`;
CREATE TABLE `app_client_command_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`command` varchar(20) NOT NULL COMMENT '命令明文',
`cost` bigint(20) DEFAULT NULL COMMENT '命令累计毫秒耗时',
`bytes_in` bigint(20) DEFAULT NULL COMMENT '输入流量',
`bytes_out` bigint(20) DEFAULT NULL COMMENT '输出流量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx__appid_client_command_currentMin` (`app_id`,`client_ip`,`command`,`current_min`),
KEY `idx_currentmin_appid_count_cost` (`current_min`,`app_id`,`count`,`cost`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟命令调用上报数据';
--
-- Table structure for table `app_client_exception_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_exception_minute_statistics`;
CREATE TABLE `app_client_exception_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`type` tinyint(4) NOT NULL COMMENT '0:connect exception;1:command exception',
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`node` varchar(30) NOT NULL COMMENT '节点信息host:port',
`count` bigint(20) DEFAULT NULL COMMENT '累计连接失败次数',
`cost` bigint(20) DEFAULT NULL COMMENT '累计连接失败毫秒耗时',
`latency_commands` varchar(255) DEFAULT NULL COMMENT '统计命令topN id,逗号分隔',
`redis_pool_config` varchar(255) DEFAULT NULL COMMENT 'redis连接池配置信息',
PRIMARY KEY (`id`),
UNIQUE KEY `idx__client_node_type_currentMin` (`client_ip`,`node`,`type`,`current_min`),
KEY `idx_appid_current_min` (`app_id`,`current_min`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟异常上报数据';
--
-- Table structure for table `app_client_latency_command`
--
DROP TABLE IF EXISTS `app_client_latency_command`;
CREATE TABLE `app_client_latency_command` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`command` varchar(255) NOT NULL COMMENT '命令明文',
`size` bigint(20) DEFAULT NULL COMMENT '参数长度',
`args` varchar(255) DEFAULT NULL COMMENT '裁剪后参数明文',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`invoke_time` bigint(20) DEFAULT NULL COMMENT '命令调用时间戳',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端异常命令调用详情';
--
-- Table structure for table `app_client_statistic_gather`
--
DROP TABLE IF EXISTS `app_client_statistic_gather`;
CREATE TABLE `app_client_statistic_gather` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gather_time` varchar(20) NOT NULL COMMENT '统计时间,格式yyyy-mm-dd',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`cmd_count` bigint(20) DEFAULT '0' COMMENT '命令调用次数',
`conn_exp_count` bigint(20) DEFAULT '0' COMMENT '连接异常次数',
`avg_cmd_cost` double DEFAULT '0' COMMENT '命令调用平均耗时,单位毫秒',
`avg_cmd_exp_cost` double DEFAULT '0' COMMENT '命令超时平均耗时,单位毫秒',
`avg_conn_exp_cost` double DEFAULT '0' COMMENT '连接异常平均耗时,单位毫秒',
`cmd_exp_count` bigint(20) DEFAULT '0' COMMENT '命令超时次数',
`instance_count` int(11) DEFAULT NULL COMMENT '应用实例数',
`avg_mem_frag_ratio` double DEFAULT NULL COMMENT '平均碎片率',
`mem_used_ratio` double DEFAULT NULL COMMENT '内存使用率',
`exception_count` bigint(20) DEFAULT '0' COMMENT '异常数(旧,待下线)',
`slow_log_count` bigint(20) DEFAULT '0' COMMENT '慢查询次数',
`latency_count` bigint(20) DEFAULT '0' COMMENT '延迟事件次数',
`object_size` bigint(20) DEFAULT '0' COMMENT '存储对象数',
`used_memory` bigint(20) DEFAULT '0' COMMENT '内存占用 byte',
`used_memory_rss` bigint(20) DEFAULT '0' COMMENT '物理内存占用 byte',
`max_cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗(单位:秒)',
`max_cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗(单位:秒)',
`connected_clients` bigint(20) DEFAULT '0' COMMENT '应用客户端连接数',
`topology_exam_result` tinyint(4) DEFAULT NULL COMMENT '拓扑诊断结果,0:正常,1:异常',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_appid_gathertime` (`app_id`,`gather_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报数据全天统计';
--
-- Table structure for table `app_client_value_minute_stat`
--
DROP TABLE IF EXISTS `app_client_value_minute_stat`;
CREATE TABLE `app_client_value_minute_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用appid',
`collect_time` bigint(20) NOT NULL COMMENT '数据收集时间yyyyMMddHHmm00',
`update_time` datetime NOT NULL COMMENT '更新时间',
`command` varchar(20) NOT NULL COMMENT '执行命令',
`distribute_type` tinyint(4) NOT NULL COMMENT '值分布',
`count` int(11) NOT NULL COMMENT '命令执行次数',
PRIMARY KEY (`id`),
UNIQUE KEY `app_collect_command_dis` (`app_id`,`collect_time`,`command`,`distribute_type`),
KEY `idx_collect_time` (`collect_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟值分布上报数据统计';
--
-- Table structure for table `app_client_version_statistic`
--
DROP TABLE IF EXISTS `app_client_version_statistic`;
CREATE TABLE `app_client_version_statistic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip地址',
`client_version` varchar(20) NOT NULL COMMENT '客户端版本',
`report_time` datetime DEFAULT NULL COMMENT '上报时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_client_ip` (`app_id`,`client_ip`),
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报版本信息统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_daily`
--
DROP TABLE IF EXISTS `app_daily`;
CREATE TABLE `app_daily` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`date` date NOT NULL COMMENT '日期',
`create_time` datetime NOT NULL,
`slow_log_count` bigint(20) NOT NULL COMMENT '慢查询个数',
`client_exception_count` bigint(20) NOT NULL COMMENT '客户端异常个数',
`max_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟最大客户端连接数',
`avg_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟平均客户端连接数',
`max_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟最大命令数',
`avg_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟平均命令数',
`avg_hit_ratio` double NOT NULL COMMENT '平均命中率',
`min_minute_hit_ratio` double NOT NULL COMMENT '每分钟最小命中率',
`max_minute_hit_ratio` double NOT NULL COMMENT '每分钟最大命中率',
`avg_used_memory` bigint(20) NOT NULL COMMENT '最大内存使用量',
`max_used_memory` bigint(20) NOT NULL COMMENT '平均内存使用量',
`expired_keys_count` bigint(20) NOT NULL COMMENT '过期键个数',
`evicted_keys_count` bigint(20) NOT NULL COMMENT '剔除键个数',
`avg_minute_net_input_byte` double NOT NULL COMMENT '每分钟平均网络input量',
`max_minute_net_input_byte` double NOT NULL COMMENT '每分钟最大网络input量',
`avg_minute_net_output_byte` double NOT NULL COMMENT '每分钟平均网络output量',
`max_minute_net_output_byte` double NOT NULL COMMENT '每分钟最大网络output量',
`avg_object_size` bigint(20) NOT NULL COMMENT '键个数平均值',
`max_object_size` bigint(20) NOT NULL COMMENT '键个数最大值',
`big_key_times` bigint(20) NOT NULL COMMENT 'bigkey次数',
`big_key_info` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'bigkey详情',
`client_cmd_count` bigint(20) NOT NULL COMMENT '累计命令调用次数',
`client_avg_cmd_cost` double NOT NULL COMMENT '平均命令调用耗时',
`client_conn_exp_count` bigint(20) NOT NULL COMMENT '累计连接异常事件次数',
`client_avg_conn_exp_cost` double NOT NULL COMMENT '平均连接异常事件耗时',
`client_cmd_exp_count` bigint(20) NOT NULL COMMENT '累计命令超时事件次数',
`client_avg_cmd_exp_cost` double NOT NULL COMMENT '平均命令超时事件耗时',
PRIMARY KEY (`id`),
KEY `idx_appid_date` (`app_id`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='app日报';
--
-- Table structure for table `app_data_migrate_status`
--
DROP TABLE IF EXISTS `app_data_migrate_status`;
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int(11) NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
`end_time` datetime DEFAULT NULL COMMENT '迁移结束执行时间',
`log_path` varchar(255) NOT NULL COMMENT '日志文件路径',
`config_path` varchar(255) NOT NULL COMMENT '配置文件路径',
`migrate_id` varchar(50) DEFAULT NULL COMMENT 'migrate id',
`migrate_tool` tinyint(4) DEFAULT NULL COMMENT 'migrate_tool, 0:redis-shake,1:redis-migrate-tool',
`redis_source_version` varchar(20) DEFAULT NULL,
`redis_target_version` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用迁移记录详情';
--
-- Table structure for table `app_desc`
--
DROP TABLE IF EXISTS `app_desc`;
CREATE TABLE `app_desc` (
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用id',
`name` varchar(36) NOT NULL COMMENT '应用名',
`user_id` bigint(20) NOT NULL COMMENT '申请人id',
`status` tinyint(4) NOT NULL COMMENT '应用状态, 0未分配,1申请未审批,2审批并发布 3:应用下线',
`intro` varchar(255) NOT NULL COMMENT '应用描述',
`create_time` datetime NOT NULL COMMENT '创建时间',
`passed_time` datetime NOT NULL COMMENT '审批通过时间',
`type` int(10) NOT NULL DEFAULT '0' COMMENT 'cache类型,1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud ,5. redis-sentinel ,6.redis-standalone ',
`officer` varchar(32) NOT NULL COMMENT '负责人,中文',
`ver_id` int(11) NOT NULL COMMENT '版本',
`is_test` tinyint(4) DEFAULT '0' COMMENT '是否测试:1是0否',
`need_persistence` tinyint(4) DEFAULT '1' COMMENT '是否需要持久化: 1是0否',
`need_hot_back_up` tinyint(4) DEFAULT '1' COMMENT '是否需要热备: 1是0否',
`has_back_store` tinyint(4) DEFAULT '1' COMMENT '是否有后端数据源: 1是0否',
`forecase_qps` int(11) DEFAULT NULL COMMENT '预估qps',
`forecast_obj_num` int(11) DEFAULT NULL COMMENT '预估条目数',
`mem_alert_value` int(11) DEFAULT NULL COMMENT '内存报警阀值',
`client_machine_room` varchar(36) DEFAULT NULL COMMENT '客户端机房信息',
`client_conn_alert_value` int(11) DEFAULT '2000' COMMENT '客户端连接报警阀值',
`app_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`important_level` tinyint(4) NOT NULL DEFAULT '2' COMMENT '应用级别,1:最重要,2:一般重要,3:一般',
`password` varchar(255) DEFAULT '' COMMENT 'redis密码',
`custom_password` varchar(255) DEFAULT NULL COMMENT '自定义密码',
`hit_precent_alert_value` int(11) DEFAULT '0' COMMENT '命中率报警阀值 0:不报警 ',
`is_access_monitor` int(11) DEFAULT '0' COMMENT '是否接入全局监控报警 默认0,0:不接入监控 1:接入监控',
`app_fsync_value` int(11) DEFAULT '1' COMMENT '应用刷盘策略 1:主从节点appdendfsync=everysec 2:主从节点 appdendfsync=no',
`version_id` int(11) NOT NULL DEFAULT '1' COMMENT 'Redis版本表主键id',
PRIMARY KEY (`app_id`),
UNIQUE KEY `uidx_app_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app应用描述' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_command_statistics`
--
DROP TABLE IF EXISTS `app_hour_command_statistics`;
CREATE TABLE `app_hour_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHH',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`command_name`,`collect_time`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每小时命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_statistics`
--
DROP TABLE IF EXISTS `app_hour_statistics`;
CREATE TABLE `app_hour_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHH',
`hits` bigint(20) NOT NULL COMMENT '每小时命中数量和',
`misses` bigint(20) NOT NULL COMMENT '每小时未命中数量和',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '每小时内存占用最大值',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '每小时过期key数量和',
`evicted_keys` bigint(20) NOT NULL COMMENT '每小时驱逐key数量和',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '每小时客户端连接数最大值',
`object_size` bigint(20) NOT NULL COMMENT '每小时存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '每小时参与累加实例数最小值',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '每小时修改时间最大值',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用统计数据每小时统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_command_statistics`
--
DROP TABLE IF EXISTS `app_minute_command_statistics`;
CREATE TABLE `app_minute_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHHmm',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每分钟命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_statistics`
--
DROP TABLE IF EXISTS `app_minute_statistics`;
CREATE TABLE `app_minute_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`hits` bigint(20) NOT NULL COMMENT '命中数量',
`misses` bigint(20) NOT NULL COMMENT '未命中数量',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '内存占用',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '过期key数量',
`evicted_keys` bigint(20) NOT NULL COMMENT '驱逐key数量',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '客户端连接数',
`object_size` bigint(20) NOT NULL COMMENT '每分钟存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '参与累加实例数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_to_user`
--
DROP TABLE IF EXISTS `app_to_user`;
CREATE TABLE `app_to_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_user`
--
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '用户名',
`ch_name` varchar(255) NOT NULL COMMENT '中文名',
`email` varchar(64) NOT NULL COMMENT '邮箱',
`mobile` varchar(16) NOT NULL COMMENT '手机',
`type` int(4) NOT NULL DEFAULT '2' COMMENT '0管理员,1预留,2普通用户,-1无效',
`weChat` varchar(32) DEFAULT NULL COMMENT '微信号',
`isAlert` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户是否接收报警 0:不接收 1:接收',
`password` varchar(64) DEFAULT NULL COMMENT '密码',
`register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
`purpose` varchar(255) DEFAULT NULL COMMENT '使用目的',
`company` varchar(255) DEFAULT NULL COMMENT '公司名称',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_user_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表' /* `compression`='tokudb_zlib' */;
-- ----------------------------
-- Records of `app_user`
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1', 'admin', 'admin', 'admin@xxx.com', '13500000000', '0', null, '1', NULL, current_timestamp(), NULL, NULL);
COMMIT;
--
-- Table structure for table `brevity_schedule_resources`
--
DROP TABLE IF EXISTS `brevity_schedule_resources`;
CREATE TABLE `brevity_schedule_resources` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL COMMENT '类型,见:BrevityScheduleType',
`version` bigint(20) NOT NULL DEFAULT '0' COMMENT '时间版本',
`host` varchar(16) NOT NULL COMMENT '资源ip',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_type_host_port` (`type`,`host`,`port`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短频任务表';
--
-- Table structure for table `diagnostic_task_record`
--
DROP TABLE IF EXISTS `diagnostic_task_record`;
CREATE TABLE `diagnostic_task_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`type` int(11) DEFAULT NULL COMMENT '诊断类型:0scan 1bigkey 2idle key 3hotkey 4del key 5slot analysis 6topology exam',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务流id',
`audit_id` bigint(20) DEFAULT NULL COMMENT '审批id',
`status` int(11) DEFAULT NULL COMMENT '诊断状态:0开始 1结束 2异常',
`cost` bigint(20) DEFAULT NULL COMMENT '耗时,毫秒',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`redis_key` varchar(100) DEFAULT NULL COMMENT '结果的key',
`node` varchar(100) DEFAULT NULL COMMENT '实例,host:port',
`parent_task_id` bigint(20) DEFAULT NULL COMMENT '父任务id',
`diagnostic_condition` varchar(100) DEFAULT NULL COMMENT '诊断条件',
`param1` varchar(100) DEFAULT NULL COMMENT '备用参数1',
`param2` varchar(100) DEFAULT NULL COMMENT '备用参数2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用诊断记录';
--
-- Table structure for table `instance_alert_configs`
--
DROP TABLE IF EXISTS `instance_alert_configs`;
CREATE TABLE `instance_alert_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`alert_config` varchar(255) NOT NULL COMMENT '报警配置',
`alert_value` varchar(512) NOT NULL COMMENT '报警阀值',
`config_info` varchar(255) NOT NULL COMMENT '配置说明',
`type` tinyint(4) NOT NULL COMMENT '1:全局报警,2:实例报警',
`instance_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '0:全局配置,其他代表实例id',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`compare_type` tinyint(4) NOT NULL COMMENT '比较类型:1小于,2等于,3大于,4不等于',
`check_cycle` tinyint(4) NOT NULL COMMENT '1:一分钟,2:五分钟,3:半小时4:一个小时,5:一天',
`update_time` datetime NOT NULL COMMENT '报警配置更新时间',
`last_check_time` datetime NOT NULL COMMENT '上次检查时间',
`important_level` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '重要程度(0:一般;1:重要;2:紧急)',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`type`,`instance_id`,`alert_config`,`compare_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例报警阀值配置';
-- ----------------------------
-- Records of `instance_alert_configs`
-- ----------------------------
BEGIN;
INSERT INTO `instance_alert_configs` VALUES ('9', 'aof_current_size', '6000', 'aof当前尺寸(单位:MB)', '1', '0', '1', '3', '3', '2017-06-19 09:43:22', '2020-09-17 10:52:00', 0), ('10', 'aof_delayed_fsync', '3', '分钟aof阻塞个数', '1', '0', '1', '3', '1', '2017-06-19 10:38:19', '2020-09-17 11:09:00', 1), ('11', 'client_biggest_input_buf', '10', '输入缓冲区最大buffer大小(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 10:47:03', '2020-09-17 11:09:00', 1), ('12', 'client_longest_output_list', '50000', '输出缓冲区最大队列长度', '1', '0', '1', '3', '1', '2017-06-19 10:55:45', '2020-09-17 11:09:00', 1), ('13', 'instantaneous_ops_per_sec', '60000', '实时ops', '1', '0', '1', '3', '1', '2017-06-19 11:02:38', '2020-09-17 11:09:00', 1),('14', 'latest_fork_usec', '400000', '上次fork所用时间(单位:微秒)', '1', '0', '1', '3', '5', '2017-06-19 11:21:35', '2020-09-16 16:51:00', 1), ('15', 'mem_fragmentation_ratio', '1.5', '内存碎片率(检测大于500MB)', '1', '0', '1', '3', '5', '2017-06-19 12:49:16', '2020-09-16 16:51:00', 0), ('16', 'rdb_last_bgsave_status', 'ok', '上一次bgsave状态', '1', '0', '1', '4', '4', '2017-06-19 14:15:21', '2020-09-17 10:19:00', 0), ('17', 'total_net_output_bytes', '5000', '分钟网络输出流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:39:44', '2020-09-17 11:09:00', 0), ('19', 'total_net_input_bytes', '1200', '分钟网络输入流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:45:44', '2020-09-17 11:09:00', 0), ('20', 'sync_partial_err', '0', '分钟部分复制失败次数', '1', '0', '1', '3', '1', '2017-06-19 18:34:41', '2020-09-17 11:09:00', 1), ('21', 'sync_partial_ok', '0', '分钟部分复制成功次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:01', '2020-09-17 11:09:00', 1), ('22', 'sync_full', '0', '分钟全量复制执行次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:17', '2020-09-17 11:09:00', 1), ('23', 'rejected_connections', '0', '分钟拒绝连接数', '1', '0', '1', '3', '1', '2017-06-19 18:35:36', '2020-09-17 11:09:00', 2), ('54', 'master_slave_offset_diff', '20000000', '主从节点偏移量差(单位:字节)', '1', '0', '1', '3', '2', '2017-06-20 18:58:56', '2020-09-17 11:06:00', 0), ('56', 'cluster_state', 'ok', '集群状态', '1', '0', '1', '4', '1', '2017-06-21 18:01:52', '2020-09-17 11:09:00', 2), ('57', 'cluster_slots_ok', '16384', '集群成功分配槽个数', '1', '0', '1', '4', '1', '2017-06-21 18:02:04', '2020-09-17 11:09:00', 2);
COMMIT;
--
-- Table structure for table `instance_big_key`
--
DROP TABLE IF EXISTS `instance_big_key`;
CREATE TABLE `instance_big_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`audit_id` bigint(20) NOT NULL COMMENT 'audit id',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从,详见InstanceRoleEnum',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`big_key` varchar(255) NOT NULL COMMENT '键',
`type` varchar(16) NOT NULL COMMENT '类型:string,hash,list,set,zset',
`length` int(11) NOT NULL COMMENT '长度',
`create_time` datetime NOT NULL COMMENT '记录创建时间',
PRIMARY KEY (`id`),
KEY `idx_app_audit` (`app_id`,`audit_id`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例bigkey列表';
--
-- Table structure for table `instance_config`
--
DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Redis版本表主键id',
`refresh` mediumint(9) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例配置模板';
-- ----------------------------
-- Records of `instance_config`
-- ----------------------------
BEGIN;
INSERT INTO `instance_config` VALUES ('1', 'cluster-enabled', 'yes', '是否开启集群模式', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('2', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('3', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('4', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('5', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('6', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2016-07-05 15:08:31', '2', '1', '29', '0'), ('7', 'port', '%d', 'sentinel实例端口', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('8', 'dir', '%s', '工作目录', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('9', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('10', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('11', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('12', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('13', 'daemonize', 'no', '是否守护进程', '2016-07-14 14:00:05', '6', '1', '29', '0'), ('14', 'tcp-backlog', '511', 'TCP连接完成队列', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('15', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('16', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2016-12-06 11:40:46', '6', '1', '29', '0'), ('17', 'loglevel', 'notice', '日志级别', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('18', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('19', 'dir', '%s', 'redis工作目录', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('20', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('21', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('22', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('23', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('24', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('25', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('26', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('27', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('28', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('29', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('30', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('31', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('32', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('33', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('34', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('35', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('36', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('37', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('38', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('39', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('40', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('41', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2016-11-24 10:24:21', '6', '1', '29', '0'), ('42', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('43', 'hz', '10', '执行后台task数量,默认:10', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('44', 'port', '%d', '端口', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('45', 'maxmemory', '%dmb', '当前实例最大可用内存', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('46', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('47', 'appendonly', 'yes', '开启append only持久化模式', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('48', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('49', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('50', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('51', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('52', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('53', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('54', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('55', 'maxclients', '10000', '客户端最大连接数', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('126', 'cluster-enabled', 'yes', '是否开启集群模式', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('127', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('128', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('129', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('130', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('131', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('132', 'port', '%d', 'sentinel实例端口', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('133', 'dir', '%s', '工作目录', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('134', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('135', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('136', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('137', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('138', 'daemonize', 'no', '是否守护进程', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('139', 'tcp-backlog', '511', 'TCP连接完成队列', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('140', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('141', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('142', 'loglevel', 'notice', '日志级别', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('143', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('144', 'dir', '%s', 'redis工作目录', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('145', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('146', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('147', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('148', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('149', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('150', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('151', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('152', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('153', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('154', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('155', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('156', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('157', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('158', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('159', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2018-09-18 18:25:32', '6', '0', '31', '0'), ('160', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2018-09-18 18:25:40', '6', '0', '31', '0'), ('161', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('162', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('163', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('164', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('165', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('166', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('167', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('168', 'hz', '10', '执行后台task数量,默认:10', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('169', 'port', '%d', '端口', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('170', 'maxmemory', '%dmb', '当前实例最大可用内存', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('171', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('172', 'appendonly', 'yes', '开启append only持久化模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('173', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('174', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('175', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('176', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('177', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('178', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('179', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('180', 'maxclients', '10000', '客户端最大连接数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('181', 'protected-mode', 'yes', '开启保护模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('182', 'bind', '0.0.0.0', '默认客户端都可连接', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('185', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2018-09-18 18:26:32', '6', '1', '31', '0'), ('186', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2018-09-18 18:27:12', '6', '1', '31', '0'), ('253', 'protected-mode', 'no', '关闭保护模式', '2018-11-01 16:10:59', '5', '1', '31', '0'), ('354', 'cluster-enabled', 'yes', '是否开启集群模式', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('355', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('356', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('357', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('358', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('359', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('360', 'port', '%d', 'sentinel实例端口', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('361', 'dir', '%s', '工作目录', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('362', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('363', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('364', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('365', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('366', 'daemonize', 'no', '是否守护进程', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('367', 'tcp-backlog', '511', 'TCP连接完成队列', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('368', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('369', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('370', 'loglevel', 'notice', '日志级别', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('371', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('372', 'dir', '%s', 'redis工作目录', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('373', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('374', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('375', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('376', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('377', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('378', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('379', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('380', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('381', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('382', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('383', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('384', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('385', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('386', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('387', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('388', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('389', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('390', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('391', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('392', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('393', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('394', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('395', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('396', 'hz', '10', '执行后台task数量,默认:10', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('397', 'port', '%d', '端口', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('398', 'maxmemory', '%dmb', '当前实例最大可用内存', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('399', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('400', 'appendonly', 'yes', '开启append only持久化模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('401', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('402', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('403', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('404', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('405', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('406', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('407', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('408', 'maxclients', '10000', '客户端最大连接数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('409', 'protected-mode', 'yes', '开启保护模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('410', 'bind', '0.0.0.0', '默认客户端都可连接', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('411', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('412', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('413', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('414', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('415', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('416', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('417', 'slave-lazy-flush', 'yes', 'slave发起全量复制,是否采用flushall async清理老数据 默认值 no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('418', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2019-10-31 11:15:57', '6', '1', '12', '0'), ('419', 'protected-mode', 'no', '关闭sentinel保护模式', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('420', 'activedefrag', 'no', '碎片整理开启', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('421', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('422', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('423', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('424', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('425', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('506', 'cluster-enabled', 'yes', '是否开启集群模式', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('507', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('508', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('509', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('510', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('511', 'port', '%d', 'sentinel实例端口', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('512', 'dir', '%s', '工作目录', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('513', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('514', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('515', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('516', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('517', 'daemonize', 'no', '是否守护进程', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('518', 'tcp-backlog', '511', 'TCP连接完成队列', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('519', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('520', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('521', 'loglevel', 'notice', '日志级别', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('522', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('523', 'dir', '%s', 'redis工作目录', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('524', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('525', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('526', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('527', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('528', 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('529', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('530', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('531', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('532', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('533', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('534', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('535', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('536', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('537', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('538', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('539', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('540', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('541', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('542', 'hz', '10', '执行后台task数量,默认:10', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('543', 'port', '%d', '端口', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('544', 'maxmemory', '%dmb', '当前实例最大可用内存', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('545', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('546', 'appendonly', 'yes', '开启append only持久化模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('547', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('548', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('549', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('550', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('551', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('552', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('553', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('554', 'maxclients', '10000', '客户端最大连接数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('555', 'protected-mode', 'yes', '开启保护模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('556', 'bind', '0.0.0.0', '默认客户端都可连接', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('557', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('558', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('559', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('560', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('561', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('562', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('563', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('564', 'protected-mode', 'no', '关闭sentinel保护模式', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('565', 'activedefrag', 'yes', '碎片整理开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('566', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('567', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('568', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('569', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('570', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('571', 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('572', 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('573', 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('574', 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('575', 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('576', 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('577', 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('578', 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('579', 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('580', 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('581', 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('582', 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('583', 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('585', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:45:22', '6', '1', '37', '0'), ('587', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:18', '6', '1', '12', '0'), ('589', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:49', '6', '1', '31', '0'), ('590', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:49:47', '6', '1', '29', '0');
COMMIT;
--
-- Table structure for table `instance_fault`
--
DROP TABLE IF EXISTS `instance_fault`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `instance_fault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`inst_id` bigint(20) NOT NULL COMMENT '实例id',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0:心跳停止,1:心跳恢复',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` mediumint(4) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`reason` mediumtext NOT NULL COMMENT '故障原因描述',
PRIMARY KEY (`id`),
KEY `idx_ip_port` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8927 DEFAULT CHARSET=utf8 COMMENT='实例故障表' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `instance_host`
--
DROP TABLE IF EXISTS `instance_host`;
CREATE TABLE `instance_host` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`ssh_user` varchar(32) DEFAULT NULL COMMENT 'ssh用户',
`ssh_pwd` varchar(32) DEFAULT NULL COMMENT 'ssh密码',
`warn` int(5) DEFAULT '1' COMMENT '0不报警,1报警',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_host_ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_info`
--
DROP TABLE IF EXISTS `instance_info`;
CREATE TABLE `instance_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'memcached instance id',
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '对等实例的id',
`app_id` bigint(20) NOT NULL COMMENT '应用id,与app_desc关联',
`host_id` bigint(20) NOT NULL COMMENT '对应的主机id,与instance_host关联',
`ip` varchar(16) NOT NULL COMMENT '实例的ip',
`port` int(11) NOT NULL COMMENT '实例端口',
`status` tinyint(4) NOT NULL COMMENT '是否启用:0:节点异常,1:正常启用,2:节点下线',
`mem` int(11) NOT NULL COMMENT '内存大小',
`conn` int(11) NOT NULL COMMENT '连接数',
`cmd` varchar(255) NOT NULL COMMENT '启动实例的命令/redis-sentinel的masterName',
`type` mediumint(11) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_inst_ipport` (`ip`,`port`) USING BTREE,
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_latency_history`
--
DROP TABLE IF EXISTS `instance_latency_history`;
CREATE TABLE `instance_latency_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`event` varchar(255) NOT NULL COMMENT '事件名称',
`execute_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`execution_cost` bigint(20) NOT NULL COMMENT '耗时(微妙)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `latencyistorykey` (`instance_id`,`event`,`execute_date`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executedate` (`app_id`,`execute_date`),
KEY `idx_executedate` (`execute_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例延迟事件信息表';
--
-- Table structure for table `instance_minute_stats`
--
DROP TABLE IF EXISTS `instance_minute_stats`;
CREATE TABLE `instance_minute_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`json` text NOT NULL COMMENT '统计json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例分钟统计表';
--
-- Table structure for table `instance_reshard_process`
--
DROP TABLE IF EXISTS `instance_reshard_process`;
CREATE TABLE `instance_reshard_process` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`audit_id` bigint(20) NOT NULL COMMENT '审核id',
`source_instance_id` int(11) NOT NULL COMMENT '源实例id',
`target_instance_id` int(11) NOT NULL COMMENT '目标实例id',
`start_slot` int(11) NOT NULL COMMENT '开始slot',
`end_slot` int(11) NOT NULL COMMENT '结束slot',
`migrating_slot` int(11) NOT NULL COMMENT '正在迁移的slot',
`is_pipeline` tinyint(4) NOT NULL COMMENT '是否为pipeline,0:否,1:是',
`finish_slot_num` int(11) NOT NULL COMMENT '已经完成迁移的slot数量',
`status` tinyint(4) NOT NULL COMMENT '0:运行中 1:完成 2:出错',
`start_time` datetime NOT NULL COMMENT '迁移开始时间',
`end_time` datetime NOT NULL COMMENT '迁移结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_audit` (`audit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例Reshard进度';
--
-- Table structure for table `instance_slow_log`
--
DROP TABLE IF EXISTS `instance_slow_log`;
CREATE TABLE `instance_slow_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`slow_log_id` bigint(20) NOT NULL COMMENT '慢查询id',
`cost_time` int(11) NOT NULL COMMENT '耗时(微妙)',
`command` varchar(255) NOT NULL COMMENT '执行命令',
`execute_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `slowlogkey` (`instance_id`,`slow_log_id`,`execute_time`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executetime` (`app_id`,`execute_time`),
KEY `idx_executetime` (`execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢查询列表';
--
-- Table structure for table `instance_statistics`
--
DROP TABLE IF EXISTS `instance_statistics`;
CREATE TABLE `instance_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`inst_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`host_id` bigint(20) NOT NULL COMMENT '机器的id',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`port` int(255) NOT NULL COMMENT 'port',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从',
`max_memory` bigint(255) NOT NULL COMMENT '预分配内存,单位byte',
`used_memory` bigint(255) NOT NULL COMMENT '已使用内存,单位byte',
`curr_items` bigint(255) NOT NULL COMMENT '当前item数量',
`curr_connections` int(255) NOT NULL COMMENT '当前连接数',
`misses` bigint(255) NOT NULL COMMENT 'miss数',
`hits` bigint(255) NOT NULL COMMENT '命中数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mem_fragmentation_ratio` double DEFAULT '0' COMMENT '碎片率',
`aof_delayed_fsync` int(11) DEFAULT '0' COMMENT 'aof阻塞次数',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `machine_id` (`host_id`),
KEY `idx_inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='实例的最新统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_info`
--
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '机器的id',
`ssh_user` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh用户',
`ssh_passwd` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh密码',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`room` varchar(20) COLLATE utf8_bin NOT NULL COMMENT '所属机房',
`mem` int(11) unsigned NOT NULL COMMENT '内存大小,单位G',
`cpu` mediumint(24) unsigned NOT NULL COMMENT 'cpu数量',
`virtual` tinyint(8) unsigned NOT NULL DEFAULT '1' COMMENT '是否虚拟,0表示否,1表示是',
`real_ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '宿主机ip',
`service_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
`fault_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '故障次数',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`warn` tinyint(255) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用报警,0不启用,1启用',
`available` tinyint(255) NOT NULL COMMENT '表示机器是否可用,1表示可用,0表示不可用;',
`groupId` int(11) NOT NULL DEFAULT '0' COMMENT '机器分组,默认为0,表示原生资源,非0表示外部提供的资源(可扩展)',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '0原生 1 其他',
`extra_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '对于机器的额外说明(例如机器安装的其他服务(web,mysql,queue等等))',
`collect` int(11) DEFAULT '1' COMMENT 'switch of collect server status, 1:open, 0:close',
`version_install` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '机器安装redis版本状态',
`use_type` tinyint(4) DEFAULT '2' COMMENT '使用类型:Redis专用机器(0),Redis测试机器(1),混合部署机器(2),Redis-Sentinel机器(3)',
`k8s_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否k8s容器:0:不是 1:是',
`rack` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '机器所在机架信息',
`is_allocating` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否在分配中,1是0否',
`disk` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '磁盘空间:G',
`dis_type` tinyint(4) DEFAULT 0 NOT NULL COMMENT '操作系统发行版本,0:centos;1:ubuntu',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='机器信息表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_relation`
--
DROP TABLE IF EXISTS `machine_relation`;
CREATE TABLE `machine_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ip` varchar(64) NOT NULL COMMENT '虚拟机ip',
`real_ip` varchar(64) NOT NULL COMMENT '宿主机ip',
`extra_desc` varchar(128) DEFAULT NULL COMMENT '实例描述信息',
`status` int(255) NOT NULL COMMENT '实例变更状态 0:offline ,1:online',
`is_sync` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据同步状态 0: 未同步数据 -1:同步中 1:数据已同步 -2:同步失败 ',
`sync_time` timestamp NULL DEFAULT NULL COMMENT '同步时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'pod最后更新时间',
`taskid` bigint(11) DEFAULT NULL COMMENT '任务id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `machine_room`
--
DROP TABLE IF EXISTS `machine_room`;
CREATE TABLE `machine_room` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '机房id',
`name` varchar(255) NOT NULL COMMENT '机房名称',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`desc` varchar(255) DEFAULT NULL COMMENT '机房描述信息',
`ip_network` varchar(32) NOT NULL DEFAULT '' COMMENT '机房网段信息',
`operator` varchar(255) DEFAULT NULL COMMENT '运营商',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `machine_room`
-- ----------------------------
BEGIN;
INSERT INTO `machine_room` VALUES ('1', '阿里云杭州', '1', '阿里云-杭州机房', '172.27.*.*', '阿里云');
COMMIT;
--
-- Table structure for table `machine_statistics`
--
DROP TABLE IF EXISTS `machine_statistics`;
CREATE TABLE `machine_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`host_id` bigint(20) NOT NULL COMMENT '机器id',
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`cpu_usage` varchar(120) NOT NULL COMMENT 'cpu使用率',
`load` varchar(120) NOT NULL COMMENT '机器负载',
`traffic` varchar(120) NOT NULL COMMENT 'io网络流量',
`memory_usage_ratio` varchar(120) NOT NULL COMMENT '内存使用率',
`memory_free` varchar(120) NOT NULL COMMENT '内存剩余',
`memory_total` varchar(120) NOT NULL COMMENT '总内存量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`max_memory` int(11) DEFAULT '0' COMMENT '机器分配内存,单位MB',
`instance_count` int(11) DEFAULT '0' COMMENT '机器实例数量',
`machine_memory` int(11) DEFAULT '0' COMMENT '机器入库总内存,单位MB',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_ip` (`ip`),
KEY `host_id` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器状态统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_blob_triggers`
--
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`BLOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_calendars`
--
DROP TABLE IF EXISTS `qrtz_calendars`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `qrtz_calendars` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`CALENDAR_NAME` varchar(200) NOT NULL COMMENT 'calendar名称',
`CALENDAR` blob NOT NULL COMMENT 'calendar信息',
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='以 Blob 类型存储 Quartz 的 Calendar 信息' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `qrtz_cron_triggers`
--
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`TRIGGER_NAME` varchar(200) NOT NULL COMMENT 'trigger名',
`TRIGGER_GROUP` varchar(200) NOT NULL COMMENT 'trigger组',
`CRON_EXPRESSION` varchar(120) NOT NULL COMMENT 'cron表达式',
`TIME_ZONE_ID` varchar(80) DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储 Cron Trigger,包括 Cron 表达式和时区信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_fired_triggers`
--
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`ENTRY_ID` varchar(195) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL,
`FIRED_TIME` bigint(13) NOT NULL,
`SCHED_TIME` bigint(13) NOT NULL,
`PRIORITY` int(11) NOT NULL,
`STATE` varchar(16) NOT NULL,
`JOB_NAME` varchar(200) DEFAULT NULL,
`JOB_GROUP` varchar(200) DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL COMMENT '是否非并行执行',
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL COMMENT '是否持久化',
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已触发的 Trigger相关的状态信息,以及关联 Job 的执行信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_job_details`
--
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
`SCHED_NAME` varchar(120) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) NOT NULL,
`IS_DURABLE` varchar(1) NOT NULL COMMENT '是否持久化,0不持久化,1持久化',
`IS_NONCONCURRENT` varchar(1) NOT NULL COMMENT '是否非并发,0非并发,1并发',
`IS_UPDATE_DATA` varchar(1) NOT NULL,
`REQUESTS_RECOVERY` varchar(1) NOT NULL COMMENT '是否可恢复,0不恢复,1恢复',
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储每一个已配置的 Job 的详细信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_locks`
--
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
`SCHED_NAME` varchar(120) NOT NULL,
`LOCK_NAME` varchar(40) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储程序的悲观锁的信息(假如使用了悲观锁)' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_paused_trigger_grps`
--
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已暂停的 Trigger 组的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_scheduler_state`
--
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
`SCHED_NAME` varchar(120) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL COMMENT '执行quartz实例的主机名',
`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT '实例将状态报告给集群中的其它实例的上一次时间',
`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT '实例间状态报告的时间频率',
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储少量的有关 Scheduler 的状态信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_simple_triggers`
--
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`REPEAT_COUNT` bigint(7) NOT NULL COMMENT '重复次数',
`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT '重复间隔',
`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT '已出发次数',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储简单的 Trigger,包括重复次数,间隔,以及已触的次数' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_simprop_triggers`
--
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`STR_PROP_1` varchar(512) DEFAULT NULL,
`STR_PROP_2` varchar(512) DEFAULT NULL,
`STR_PROP_3` varchar(512) DEFAULT NULL,
`INT_PROP_1` int(11) DEFAULT NULL,
`INT_PROP_2` int(11) DEFAULT NULL,
`LONG_PROP_1` bigint(20) DEFAULT NULL,
`LONG_PROP_2` bigint(20) DEFAULT NULL,
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `qrtz_triggers`
--
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
`PRIORITY` int(11) DEFAULT NULL,
`TRIGGER_STATE` varchar(16) NOT NULL,
`TRIGGER_TYPE` varchar(8) NOT NULL,
`START_TIME` bigint(13) NOT NULL,
`END_TIME` bigint(13) DEFAULT NULL,
`CALENDAR_NAME` varchar(200) DEFAULT NULL,
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已配置的 Trigger 的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`host` varchar(255) DEFAULT NULL COMMENT 'host',
`nmon` varchar(255) DEFAULT NULL COMMENT 'nmon version',
`cpus` tinyint(4) DEFAULT NULL COMMENT 'logic cpu num',
`cpu_model` varchar(255) DEFAULT NULL COMMENT 'cpu 型号',
`dist` varchar(255) DEFAULT NULL COMMENT '发行版信息',
`kernel` varchar(255) DEFAULT NULL COMMENT '内核信息',
`ulimit` varchar(255) DEFAULT NULL COMMENT 'ulimit -n,ulimit -u',
`updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `server_stat`
--
DROP TABLE IF EXISTS `server_stat`;
CREATE TABLE `server_stat` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`cdate` date NOT NULL COMMENT '数据收集天',
`ctime` char(4) NOT NULL COMMENT '数据收集小时分钟',
`cuser` float DEFAULT NULL COMMENT '用户态占比',
`csys` float DEFAULT NULL COMMENT '内核态占比',
`cwio` float DEFAULT NULL COMMENT 'wio占比',
`c_ext` text COMMENT '子cpu占比',
`cload1` float DEFAULT NULL COMMENT '1分钟load',
`cload5` float DEFAULT NULL COMMENT '5分钟load',
`cload15` float DEFAULT NULL COMMENT '15分钟load',
`mtotal` float DEFAULT NULL COMMENT '总内存,单位M',
`mfree` float DEFAULT NULL COMMENT '空闲内存',
`mcache` float DEFAULT NULL COMMENT 'cache',
`mbuffer` float DEFAULT NULL COMMENT 'buffer',
`mswap` float DEFAULT NULL COMMENT 'cache',
`mswap_free` float DEFAULT NULL COMMENT 'cache',
`nin` float DEFAULT NULL COMMENT '网络入流量 单位K/s',
`nout` float DEFAULT NULL COMMENT '网络出流量 单位k/s',
`nin_ext` text COMMENT '各网卡入流量详情',
`nout_ext` text COMMENT '各网卡出流量详情',
`tuse` int(11) DEFAULT NULL COMMENT 'tcp estab连接数',
`torphan` int(11) DEFAULT NULL COMMENT 'tcp orphan连接数',
`twait` int(11) DEFAULT NULL COMMENT 'tcp time wait连接数',
`dread` float DEFAULT NULL COMMENT '磁盘读速率 单位K/s',
`dwrite` float DEFAULT NULL COMMENT '磁盘写速率 单位K/s',
`diops` float DEFAULT NULL COMMENT '磁盘io速率 交互次数/s',
`dbusy` float DEFAULT NULL COMMENT '磁盘io带宽使用百分比',
`d_ext` text COMMENT '磁盘各分区占比',
`dspace` text COMMENT '磁盘各分区空间使用率',
PRIMARY KEY (`ip`,`cdate`,`ctime`),
KEY `idx_cdate` (`cdate`),
KEY `idx_cdate_ctime` (`cdate`,`ctime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `system_config`
--
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
`config_key` varchar(255) NOT NULL COMMENT '配置key',
`config_value` varchar(512) NOT NULL COMMENT '配置value',
`info` varchar(255) NOT NULL COMMENT '配置说明',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`order_id` int(11) NOT NULL COMMENT '顺序',
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `system_config`
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES ('cachecloud.admin.user.name','admin','cachecloud-admin用户名',1,11),('cachecloud.admin.user.password','admin','cachelcoud-admin密码',1,12),('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,33),('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,31),('cachecloud.contact','user1:(xx@zz.com, user1:135xxxxxxxx)
user2: (user2@zz.com, user2:138xxxxxxxx)','值班联系人信息',1,14),('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,22),('cachecloud.email.alert.interface','','邮件报警接口(参考报警接口规范)',1,24),('cachecloud.machine.ssh.name','cachecloud-open','机器ssh用户名',1,2),('cachecloud.machine.ssh.password','cachecloud-open','机器ssh密码',1,3),('cachecloud.machine.ssh.port','22','机器ssh端口',1,10),('cachecloud.machine.stats.cron.minute','1','机器性能统计周期(分钟)',1,35),('cachecloud.nmon.dir','/opt/cachecloud','nmon安装目录',1,32),('cachecloud.owner.email','xx@sohu.com,yy@qq.com','邮件报警(逗号隔开)',1,21),('cachecloud.owner.phone','xxx,yyy','手机号报警(逗号隔开)',1,21),('cachecloud.owner.weChat','xxx,yyy','微信号报警(逗号隔开)',1,21),('cachecloud.public.key.pem','/opt/ssh/id_rsa','密钥路径',1,5),('cachecloud.public.user.name','cachecloud-open','公钥用户名',1,4),('cachecloud.ssh.auth.type','1','ssh授权方式',1,1),('cachecloud.superAdmin','admin,xx,yy','超级管理员组',1,13),('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,22),('cachecloud.weChat.alert.interface','','微信报警接口(参考报警接口规范)',1,23),('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,34),('machine.load.alert.ratio','8.0','机器负载报警阀值',1,32);
COMMIT;
-- ----------------------------
-- Table structure for `system_resource`
-- ----------------------------
DROP TABLE IF EXISTS `system_resource`;
CREATE TABLE `system_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '资源ID',
`name` varchar(64) NOT NULL COMMENT '资源名称',
`intro` varchar(255) DEFAULT NULL COMMENT '资源说明',
`type` tinyint(4) NOT NULL COMMENT '1:仓库地址 2:脚本 3:资源包 4:公钥/私钥 6:目录管理 7:迁移工具管理',
`lastmodify` datetime DEFAULT NULL COMMENT '最后更新时间',
`dir` varchar(128) DEFAULT NULL COMMENT '资源路径',
`url` varchar(128) DEFAULT NULL COMMENT '仓库地址',
`ispush` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:未推送 1:已推送',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`username` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`task_id` bigint(11) DEFAULT NULL COMMENT '迁移任务id',
`compile_info` varchar(255) DEFAULT NULL COMMENT '编译信息',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `system_resource`
-- ----------------------------
BEGIN;
INSERT INTO `system_resource` VALUES (1,'cachecloud-init.sh','容器初始化脚本',2,'2020-07-15 18:35:41','/script','',0,1,NULL,NULL,NULL),(2,'x.x.x.x',NULL,1,'2020-08-10 10:31:51','/opt/download/software/cachecloud/resource','http://x.x.x.x/software/cachecloud/resource',0,1,'admin',0,NULL),(4,'cachecloud-env.sh','宿主环境脚本',2,'2020-07-15 18:36:28','/script','',0,1,NULL,NULL,NULL),(5,'id_rsa','私钥文件',4,'2020-07-07 10:45:39','/ssh','',0,1,NULL,NULL,NULL),(6,'id_rsa.pub','公钥文件',4,'2020-07-07 10:45:45','/ssh','',0,1,NULL,NULL,NULL),(12,'redis-4.0.14','redis 4.0.14资源包',3,'2020-08-10 09:52:41','/redis','http://download.redis.io/releases/redis-4.0.14.tar.gz',0,1,'admin',532,NULL),(21,'/script','脚本目录管理',6,'2020-08-10 10:51:34','',NULL,0,1,'admin',0,NULL),(28,'/ssh','ssh目录',6,'2020-07-20 17:55:03',NULL,NULL,0,1,'admin',0,NULL),(29,'redis-3.0.7','redis3.0.7 资源包',3,'2020-08-10 09:53:32','/redis','http://download.redis.io/releases/redis-3.0.7.tar.gz',0,1,'admin',529,NULL),(31,'redis-3.2.12','redis 3.2.12 资源包',3,'2020-08-10 15:08:21','/redis','http://download.redis.io/releases/redis-3.2.12.tar.gz',0,1,'admin',530,NULL),(32,'/redis','redis资源包管理',6,'2020-07-20 17:54:59',NULL,NULL,0,1,'admin',0,NULL),(33,'/tool','迁移工具资源包',6,'2020-07-20 17:54:53',NULL,NULL,0,1,'admin',0,NULL),(37,'redis-5.0.9','redis5.0.9 资源包',3,'2020-08-10 09:51:41','/redis','http://download.redis.io/releases/redis-5.0.9.tar.gz',0,1,'admin',533,NULL),(40,'redis-shake-2.0.3','redis 2.0.3\n修复fix 5.0迁移类型问题',7,'2020-08-11 10:53:26','/tool','https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz',0,1,'admin',518,NULL);
COMMIT;
--
-- Table structure for table `task_queue`
--
DROP TABLE IF EXISTS `task_queue`;
CREATE TABLE `task_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`important_info` varchar(255) NOT NULL DEFAULT '' COMMENT '重要信息',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`param` longtext NOT NULL COMMENT '任务参数(json):随着任务变化',
`init_param` longtext NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2中断,3失败',
`parent_task_id` bigint(20) NOT NULL COMMENT '父任务id',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`error_code` int(11) NOT NULL COMMENT '错误代码',
`error_msg` varchar(255) NOT NULL COMMENT '错误消息',
`task_note` varchar(255) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
--
-- Table structure for table `task_step_flow`
--
DROP TABLE IF EXISTS `task_step_flow`;
CREATE TABLE `task_step_flow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`task_id` bigint(20) NOT NULL COMMENT '任务id',
`child_task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '子任务id',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`order_no` int(11) NOT NULL COMMENT '序号',
`status` tinyint(4) NOT NULL COMMENT '状态:0未开始、1成功、2中断、3跳过、4失败',
`log` text COMMENT '日志',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_class_step` (`task_id`,`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤流表';
--
-- Table structure for table `task_step_meta`
--
DROP TABLE IF EXISTS `task_step_meta`;
CREATE TABLE `task_step_meta` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`step_desc` varchar(255) NOT NULL COMMENT '步骤描述',
`ops_device` varchar(255) NOT NULL COMMENT '运维建议',
`timeout` int(11) NOT NULL COMMENT '超时时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`order_no` int(11) NOT NULL COMMENT '序号',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_class_step` (`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤元数据表';
/*!40101 SET character_set_client = @saved_cs_client */;
-- ----------------------------
-- Table structure for `standard_statistics`
-- ----------------------------
DROP TABLE IF EXISTS `standard_statistics`;
CREATE TABLE `standard_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`info_json` text NOT NULL COMMENT '收集的json数据',
`diff_json` text NOT NULL COMMENT '上一次收集差异的json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`cluster_info_json` varchar(20480) NOT NULL DEFAULT '' COMMENT '收集的cluster info json数据',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_create_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_alert_record`
--
DROP TABLE IF EXISTS `app_alert_record`;
CREATE TABLE `app_alert_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`visible_type` int(1) NOT NULL COMMENT '可见类型(0:均可见;1:仅管理员可见;)',
`important_level` int(1) NOT NULL COMMENT '重要类型(0:一般;1:重要;2:紧急)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`app_id` bigint(20) DEFAULT NULL COMMENT 'app id',
`instance_id` bigint(20) DEFAULT NULL COMMENT '实例id',
`ip` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '机器ip',
`port` int(10) DEFAULT NULL COMMENT '端口号',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '报警标题',
`content` varchar(500) COLLATE utf8_bin NOT NULL COMMENT '报警内容',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`),
KEY `ip` (`ip`),
KEY `idx_inst_id` (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警记录表';
--
-- Table structure for table `config_restart_record`
--
DROP TABLE IF EXISTS `config_restart_record`;
CREATE TABLE `config_restart_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`app_name` varchar(36) NOT NULL COMMENT '应用名称',
`operate_type` char(1) NOT NULL COMMENT '操作类型(0:滚动重启,1:修改配置强制重启;2:修改配置)',
`param` varchar(2000) NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2成功,3失败,4配置修改待重启',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`log` longtext COMMENT '日志信息',
`user_name` varchar(64) DEFAULT NULL COMMENT '操作人员姓名',
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`instances` varchar(1000) DEFAULT NULL COMMENT '涉及实例id列表的json格式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='重启记录表';
--
-- Table structure for table `module_info`
--
DROP TABLE IF EXISTS `module_info`;
CREATE TABLE `module_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`git_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'git resource',
`info` varchar(128) DEFAULT NULL COMMENT '模块信息说明',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
PRIMARY KEY (`id`),
UNIQUE KEY `NAMEKEY` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块信息表';
--
-- Table structure for table `module_version`
--
DROP TABLE IF EXISTS `module_version`;
CREATE TABLE `module_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module_id` int(11) NOT NULL,
`version_id` int(11) NOT NULL COMMENT '关联版本号',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`so_path` varchar(255) DEFAULT NULL COMMENT '编译后so库的地址',
`tag` varchar(64) NOT NULL COMMENT '模块版本号',
`status` int(255) NOT NULL DEFAULT '0' COMMENT '是否可用(关联so地址):0 不可用 1:可用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块版本管理表';
--
-- Table structure for table `app_import`
--
DROP TABLE IF EXISTS `app_import`;
CREATE TABLE `app_import` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '目标应用id',
`instance_info` text COMMENT '源redis实例信息',
`redis_password` varchar(200) DEFAULT NULL COMMENT '源redis密码',
`status` int(11) DEFAULT NULL COMMENT '迁移状态:PREPARE(0, "准备", "应用导入-未开始"), START(1, "进行中...", "应用导入-开始"), ERROR(2, "error", "应用导入-出错"), VERSION_BUILD_START(11, "进行中...", "新建redis版本-进行中"), VERSION_BUILD_ERROR(12, "error", "新建redis版本-出错"), VERSION_BUILD_END(20, "成功", "新建redis版本-完成"), APP_BUILD_INIT(21, "准备就绪", "新建redis应用-准备就绪"), APP_BUILD_START(22, "进行中...", "新建redis应用-进行中"), APP_BUILD_ERROR(23, "error", "新建redis应用-出错"), APP_BUILD_END(30, "成功", "新建redis应用-完成"), MIGRATE_INIT(31, "准备就绪", "数据迁移-准备就绪"), MIGRATE_START(32, "进行中...", "数据迁移-进行中"), MIGRATE_ERROR(33, "error", "数据迁移-出错"), MIGRATE_END(3, "成功", "应用导入-成功")',
`step` int(11) DEFAULT NULL COMMENT '导入阶段',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`migrate_id` bigint(20) DEFAULT NULL COMMENT '数据迁移id',
`mem_size` int(11) DEFAULT NULL COMMENT '目标应用内存大小,单位G',
`redis_version_name` varchar(20) DEFAULT NULL COMMENT '目标应用redis版本,格式:redis-x.x.x',
`app_build_task_id` bigint(20) DEFAULT NULL COMMENT '目标应用部署任务id',
`source_type` int(11) DEFAULT NULL COMMENT '源redis类型:7:cluster, 6:sentinel, 5:standalone',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- redis_module_config definition
CREATE TABLE `redis_module_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Module version版本表主键id',
`refresh` tinyint(4) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
`module_id` int(11) NOT NULL DEFAULT '7' COMMENT 'Module 信息表id',
`config_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配置类型,0:加载和运行配置;1:加载时配置;2:运行时配置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='redis模块配置表';
-- app_to_module definition
CREATE TABLE `app_to_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`module_id` int(11) NOT NULL COMMENT '模块info id',
`module_version_id` int(11) NOT NULL COMMENT '模块版本id',
PRIMARY KEY (`id`),
UNIQUE KEY `app_to_module_un` (`app_id`,`module_id`,`module_version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='应用与模块关系表';
================================================
FILE: cachecloud-web/sql/3.1.sql
================================================
-- MySQL dump 10.15 Distrib 10.0.16-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: cachecloud_open
-- ------------------------------------------------------
-- Server version 10.0.16-MariaDB-log
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
--
-- Table structure for table `app_audit`
--
DROP TABLE IF EXISTS `app_audit`;
CREATE TABLE `app_audit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '申请人的id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`type` tinyint(4) NOT NULL COMMENT '申请类型:0:申请应用,1:应用扩容,2:修改配置',
`param1` varchar(600) DEFAULT NULL COMMENT '预留参数1',
`param2` varchar(600) DEFAULT NULL COMMENT '预留参数2',
`param3` varchar(600) DEFAULT NULL COMMENT '预留参数3',
`info` varchar(360) NOT NULL COMMENT '申请描述',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:等待审批; 1:审批通过; -1:驳回',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refuse_reason` varchar(360) DEFAULT NULL COMMENT '驳回理由',
`task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务id',
`operate_id` bigint(20) DEFAULT NULL COMMENT '工单处理人',
PRIMARY KEY (`id`),
KEY `idx_appid` (`app_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status_create_time` (`status`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用审核表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_audit_log`
--
DROP TABLE IF EXISTS `app_audit_log`;
CREATE TABLE `app_audit_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '审批操作人id',
`info` longtext NOT NULL COMMENT 'app审批的详细信息',
`type` tinyint(4) NOT NULL,
`create_time` datetime NOT NULL,
`app_audit_id` bigint(20) NOT NULL COMMENT '审批id',
PRIMARY KEY (`id`),
KEY `idx_audit_appid` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app审核日志表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_client_command_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_command_minute_statistics`;
CREATE TABLE `app_client_command_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`command` varchar(20) NOT NULL COMMENT '命令明文',
`cost` bigint(20) DEFAULT NULL COMMENT '命令累计毫秒耗时',
`bytes_in` bigint(20) DEFAULT NULL COMMENT '输入流量',
`bytes_out` bigint(20) DEFAULT NULL COMMENT '输出流量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx__appid_client_command_currentMin` (`app_id`,`client_ip`,`command`,`current_min`),
KEY `idx_currentmin_appid_count_cost` (`current_min`,`app_id`,`count`,`cost`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟命令调用上报数据';
--
-- Table structure for table `app_client_exception_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_exception_minute_statistics`;
CREATE TABLE `app_client_exception_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`type` tinyint(4) NOT NULL COMMENT '0:connect exception;1:command exception',
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`node` varchar(30) NOT NULL COMMENT '节点信息host:port',
`count` bigint(20) DEFAULT NULL COMMENT '累计连接失败次数',
`cost` bigint(20) DEFAULT NULL COMMENT '累计连接失败毫秒耗时',
`latency_commands` varchar(255) DEFAULT NULL COMMENT '统计命令topN id,逗号分隔',
`redis_pool_config` varchar(255) DEFAULT NULL COMMENT 'redis连接池配置信息',
PRIMARY KEY (`id`),
UNIQUE KEY `idx__client_node_type_currentMin` (`client_ip`,`node`,`type`,`current_min`),
KEY `idx_appid_current_min` (`app_id`,`current_min`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟异常上报数据';
--
-- Table structure for table `app_client_latency_command`
--
DROP TABLE IF EXISTS `app_client_latency_command`;
CREATE TABLE `app_client_latency_command` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`command` varchar(255) NOT NULL COMMENT '命令明文',
`size` bigint(20) DEFAULT NULL COMMENT '参数长度',
`args` varchar(255) DEFAULT NULL COMMENT '裁剪后参数明文',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`invoke_time` bigint(20) DEFAULT NULL COMMENT '命令调用时间戳',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端异常命令调用详情';
--
-- Table structure for table `app_client_statistic_gather`
--
DROP TABLE IF EXISTS `app_client_statistic_gather`;
CREATE TABLE `app_client_statistic_gather` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gather_time` varchar(20) NOT NULL COMMENT '统计时间,格式yyyy-mm-dd',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`cmd_count` bigint(20) DEFAULT '0' COMMENT '命令调用次数',
`conn_exp_count` bigint(20) DEFAULT '0' COMMENT '连接异常次数',
`avg_cmd_cost` double DEFAULT '0' COMMENT '命令调用平均耗时,单位毫秒',
`avg_cmd_exp_cost` double DEFAULT '0' COMMENT '命令超时平均耗时,单位毫秒',
`avg_conn_exp_cost` double DEFAULT '0' COMMENT '连接异常平均耗时,单位毫秒',
`cmd_exp_count` bigint(20) DEFAULT '0' COMMENT '命令超时次数',
`instance_count` int(11) DEFAULT NULL COMMENT '应用实例数',
`avg_mem_frag_ratio` double DEFAULT NULL COMMENT '平均碎片率',
`mem_used_ratio` double DEFAULT NULL COMMENT '内存使用率',
`exception_count` bigint(20) DEFAULT '0' COMMENT '异常数(旧,待下线)',
`slow_log_count` bigint(20) DEFAULT '0' COMMENT '慢查询次数',
`latency_count` bigint(20) DEFAULT '0' COMMENT '延迟事件次数',
`object_size` bigint(20) DEFAULT '0' COMMENT '存储对象数',
`used_memory` bigint(20) DEFAULT '0' COMMENT '内存占用 byte',
`used_memory_rss` bigint(20) DEFAULT '0' COMMENT '物理内存占用 byte',
`max_cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗(单位:秒)',
`max_cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗(单位:秒)',
`connected_clients` bigint(20) DEFAULT '0' COMMENT '应用客户端连接数',
`topology_exam_result` tinyint(4) DEFAULT NULL COMMENT '拓扑诊断结果,0:正常,1:异常',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_appid_gathertime` (`app_id`,`gather_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报数据全天统计';
--
-- Table structure for table `app_client_value_minute_stat`
--
DROP TABLE IF EXISTS `app_client_value_minute_stat`;
CREATE TABLE `app_client_value_minute_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用appid',
`collect_time` bigint(20) NOT NULL COMMENT '数据收集时间yyyyMMddHHmm00',
`update_time` datetime NOT NULL COMMENT '更新时间',
`command` varchar(20) NOT NULL COMMENT '执行命令',
`distribute_type` tinyint(4) NOT NULL COMMENT '值分布',
`count` int(11) NOT NULL COMMENT '命令执行次数',
PRIMARY KEY (`id`),
UNIQUE KEY `app_collect_command_dis` (`app_id`,`collect_time`,`command`,`distribute_type`),
KEY `idx_collect_time` (`collect_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟值分布上报数据统计';
--
-- Table structure for table `app_client_version_statistic`
--
DROP TABLE IF EXISTS `app_client_version_statistic`;
CREATE TABLE `app_client_version_statistic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip地址',
`client_version` varchar(20) NOT NULL COMMENT '客户端版本',
`report_time` datetime DEFAULT NULL COMMENT '上报时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_client_ip` (`app_id`,`client_ip`),
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报版本信息统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_daily`
--
DROP TABLE IF EXISTS `app_daily`;
CREATE TABLE `app_daily` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`date` date NOT NULL COMMENT '日期',
`create_time` datetime NOT NULL,
`slow_log_count` bigint(20) NOT NULL COMMENT '慢查询个数',
`client_exception_count` bigint(20) NOT NULL COMMENT '客户端异常个数',
`max_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟最大客户端连接数',
`avg_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟平均客户端连接数',
`max_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟最大命令数',
`avg_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟平均命令数',
`avg_hit_ratio` double NOT NULL COMMENT '平均命中率',
`min_minute_hit_ratio` double NOT NULL COMMENT '每分钟最小命中率',
`max_minute_hit_ratio` double NOT NULL COMMENT '每分钟最大命中率',
`avg_used_memory` bigint(20) NOT NULL COMMENT '最大内存使用量',
`max_used_memory` bigint(20) NOT NULL COMMENT '平均内存使用量',
`expired_keys_count` bigint(20) NOT NULL COMMENT '过期键个数',
`evicted_keys_count` bigint(20) NOT NULL COMMENT '剔除键个数',
`avg_minute_net_input_byte` double NOT NULL COMMENT '每分钟平均网络input量',
`max_minute_net_input_byte` double NOT NULL COMMENT '每分钟最大网络input量',
`avg_minute_net_output_byte` double NOT NULL COMMENT '每分钟平均网络output量',
`max_minute_net_output_byte` double NOT NULL COMMENT '每分钟最大网络output量',
`avg_object_size` bigint(20) NOT NULL COMMENT '键个数平均值',
`max_object_size` bigint(20) NOT NULL COMMENT '键个数最大值',
`big_key_times` bigint(20) NOT NULL COMMENT 'bigkey次数',
`big_key_info` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'bigkey详情',
`client_cmd_count` bigint(20) NOT NULL COMMENT '累计命令调用次数',
`client_avg_cmd_cost` double NOT NULL COMMENT '平均命令调用耗时',
`client_conn_exp_count` bigint(20) NOT NULL COMMENT '累计连接异常事件次数',
`client_avg_conn_exp_cost` double NOT NULL COMMENT '平均连接异常事件耗时',
`client_cmd_exp_count` bigint(20) NOT NULL COMMENT '累计命令超时事件次数',
`client_avg_cmd_exp_cost` double NOT NULL COMMENT '平均命令超时事件耗时',
PRIMARY KEY (`id`),
KEY `idx_appid_date` (`app_id`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='app日报';
--
-- Table structure for table `app_data_migrate_status`
--
DROP TABLE IF EXISTS `app_data_migrate_status`;
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int(11) NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
`end_time` datetime DEFAULT NULL COMMENT '迁移结束执行时间',
`log_path` varchar(255) NOT NULL COMMENT '日志文件路径',
`config_path` varchar(255) NOT NULL COMMENT '配置文件路径',
`migrate_id` varchar(50) DEFAULT NULL COMMENT 'migrate id',
`migrate_tool` tinyint(4) DEFAULT NULL COMMENT 'migrate_tool, 0:redis-shake,1:redis-migrate-tool',
`redis_source_version` varchar(20) DEFAULT NULL,
`redis_target_version` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用迁移记录详情';
--
-- Table structure for table `app_desc`
--
DROP TABLE IF EXISTS `app_desc`;
CREATE TABLE `app_desc` (
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用id',
`name` varchar(36) NOT NULL COMMENT '应用名',
`user_id` bigint(20) NOT NULL COMMENT '申请人id',
`status` tinyint(4) NOT NULL COMMENT '应用状态, 0未分配,1申请未审批,2审批并发布 3:应用下线',
`intro` varchar(255) NOT NULL COMMENT '应用描述',
`create_time` datetime NOT NULL COMMENT '创建时间',
`passed_time` datetime NOT NULL COMMENT '审批通过时间',
`type` int(10) NOT NULL DEFAULT '0' COMMENT 'cache类型,1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud ,5. redis-sentinel ,6.redis-standalone ',
`officer` varchar(32) NOT NULL COMMENT '负责人,中文',
`ver_id` int(11) NOT NULL COMMENT '版本',
`is_test` tinyint(4) DEFAULT '0' COMMENT '是否测试:1是0否',
`need_persistence` tinyint(4) DEFAULT '1' COMMENT '是否需要持久化: 1是0否',
`need_hot_back_up` tinyint(4) DEFAULT '1' COMMENT '是否需要热备: 1是0否',
`has_back_store` tinyint(4) DEFAULT '1' COMMENT '是否有后端数据源: 1是0否',
`forecase_qps` int(11) DEFAULT NULL COMMENT '预估qps',
`forecast_obj_num` int(11) DEFAULT NULL COMMENT '预估条目数',
`mem_alert_value` int(11) DEFAULT NULL COMMENT '内存报警阀值',
`client_machine_room` varchar(36) DEFAULT NULL COMMENT '客户端机房信息',
`client_conn_alert_value` int(11) DEFAULT '2000' COMMENT '客户端连接报警阀值',
`app_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`important_level` tinyint(4) NOT NULL DEFAULT '2' COMMENT '应用级别,1:最重要,2:一般重要,3:一般',
`password` varchar(255) DEFAULT '' COMMENT 'redis密码',
`custom_password` varchar(255) DEFAULT NULL COMMENT '自定义密码',
`hit_precent_alert_value` int(11) DEFAULT '0' COMMENT '命中率报警阀值 0:不报警 ',
`is_access_monitor` int(11) DEFAULT '0' COMMENT '是否接入全局监控报警 默认0,0:不接入监控 1:接入监控',
`app_fsync_value` int(11) DEFAULT '1' COMMENT '应用刷盘策略 1:主从节点appdendfsync=everysec 2:主从节点 appdendfsync=no',
`version_id` int(11) NOT NULL DEFAULT '1' COMMENT 'Redis版本表主键id',
PRIMARY KEY (`app_id`),
UNIQUE KEY `uidx_app_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app应用描述' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_command_statistics`
--
DROP TABLE IF EXISTS `app_hour_command_statistics`;
CREATE TABLE `app_hour_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHH',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`command_name`,`collect_time`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每小时命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_statistics`
--
DROP TABLE IF EXISTS `app_hour_statistics`;
CREATE TABLE `app_hour_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHH',
`hits` bigint(20) NOT NULL COMMENT '每小时命中数量和',
`misses` bigint(20) NOT NULL COMMENT '每小时未命中数量和',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '每小时内存占用最大值',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '每小时过期key数量和',
`evicted_keys` bigint(20) NOT NULL COMMENT '每小时驱逐key数量和',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '每小时客户端连接数最大值',
`object_size` bigint(20) NOT NULL COMMENT '每小时存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '每小时参与累加实例数最小值',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '每小时修改时间最大值',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用统计数据每小时统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_command_statistics`
--
DROP TABLE IF EXISTS `app_minute_command_statistics`;
CREATE TABLE `app_minute_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHHmm',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每分钟命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_statistics`
--
DROP TABLE IF EXISTS `app_minute_statistics`;
CREATE TABLE `app_minute_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`hits` bigint(20) NOT NULL COMMENT '命中数量',
`misses` bigint(20) NOT NULL COMMENT '未命中数量',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '内存占用',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '过期key数量',
`evicted_keys` bigint(20) NOT NULL COMMENT '驱逐key数量',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '客户端连接数',
`object_size` bigint(20) NOT NULL COMMENT '每分钟存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '参与累加实例数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_to_user`
--
DROP TABLE IF EXISTS `app_to_user`;
CREATE TABLE `app_to_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_user`
--
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '用户名',
`ch_name` varchar(255) NOT NULL COMMENT '中文名',
`email` varchar(64) NOT NULL COMMENT '邮箱',
`mobile` varchar(16) NOT NULL COMMENT '手机',
`type` int(4) NOT NULL DEFAULT '2' COMMENT '0管理员,1预留,2普通用户,-1无效',
`weChat` varchar(32) DEFAULT NULL COMMENT '微信号',
`isAlert` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户是否接收报警 0:不接收 1:接收',
`password` varchar(64) DEFAULT NULL COMMENT '密码',
`register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
`purpose` varchar(255) DEFAULT NULL COMMENT '使用目的',
`company` varchar(255) DEFAULT NULL COMMENT '公司名称',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_user_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表' /* `compression`='tokudb_zlib' */;
-- ----------------------------
-- Records of `app_user`
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1', 'admin', 'admin', 'admin@xxx.com', '13500000000', '0', null, '1', NULL, current_timestamp(), NULL, NULL);
COMMIT;
--
-- Table structure for table `brevity_schedule_resources`
--
DROP TABLE IF EXISTS `brevity_schedule_resources`;
CREATE TABLE `brevity_schedule_resources` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL COMMENT '类型,见:BrevityScheduleType',
`version` bigint(20) NOT NULL DEFAULT '0' COMMENT '时间版本',
`host` varchar(16) NOT NULL COMMENT '资源ip',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_type_host_port` (`type`,`host`,`port`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短频任务表';
--
-- Table structure for table `diagnostic_task_record`
--
DROP TABLE IF EXISTS `diagnostic_task_record`;
CREATE TABLE `diagnostic_task_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`type` int(11) DEFAULT NULL COMMENT '诊断类型:0scan 1bigkey 2idle key 3hotkey 4del key 5slot analysis 6topology exam',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务流id',
`audit_id` bigint(20) DEFAULT NULL COMMENT '审批id',
`status` int(11) DEFAULT NULL COMMENT '诊断状态:0开始 1结束 2异常',
`cost` bigint(20) DEFAULT NULL COMMENT '耗时,毫秒',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`redis_key` varchar(100) DEFAULT NULL COMMENT '结果的key',
`node` varchar(100) DEFAULT NULL COMMENT '实例,host:port',
`parent_task_id` bigint(20) DEFAULT NULL COMMENT '父任务id',
`diagnostic_condition` varchar(100) DEFAULT NULL COMMENT '诊断条件',
`param1` varchar(100) DEFAULT NULL COMMENT '备用参数1',
`param2` varchar(100) DEFAULT NULL COMMENT '备用参数2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用诊断记录';
--
-- Table structure for table `instance_alert_configs`
--
DROP TABLE IF EXISTS `instance_alert_configs`;
CREATE TABLE `instance_alert_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`alert_config` varchar(255) NOT NULL COMMENT '报警配置',
`alert_value` varchar(512) NOT NULL COMMENT '报警阀值',
`config_info` varchar(255) NOT NULL COMMENT '配置说明',
`type` tinyint(4) NOT NULL COMMENT '1:全局报警,2:实例报警',
`instance_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '0:全局配置,其他代表实例id',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`compare_type` tinyint(4) NOT NULL COMMENT '比较类型:1小于,2等于,3大于,4不等于',
`check_cycle` tinyint(4) NOT NULL COMMENT '1:一分钟,2:五分钟,3:半小时4:一个小时,5:一天',
`update_time` datetime NOT NULL COMMENT '报警配置更新时间',
`last_check_time` datetime NOT NULL COMMENT '上次检查时间',
`important_level` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '重要程度(0:一般;1:重要;2:紧急)',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`type`,`instance_id`,`alert_config`,`compare_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例报警阀值配置';
-- ----------------------------
-- Records of `instance_alert_configs`
-- ----------------------------
BEGIN;
INSERT INTO `instance_alert_configs` VALUES ('9', 'aof_current_size', '6000', 'aof当前尺寸(单位:MB)', '1', '0', '1', '3', '3', '2017-06-19 09:43:22', '2020-09-17 10:52:00', 0), ('10', 'aof_delayed_fsync', '3', '分钟aof阻塞个数', '1', '0', '1', '3', '1', '2017-06-19 10:38:19', '2020-09-17 11:09:00', 1), ('11', 'client_biggest_input_buf', '10', '输入缓冲区最大buffer大小(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 10:47:03', '2020-09-17 11:09:00', 1), ('12', 'client_longest_output_list', '50000', '输出缓冲区最大队列长度', '1', '0', '1', '3', '1', '2017-06-19 10:55:45', '2020-09-17 11:09:00', 1), ('13', 'instantaneous_ops_per_sec', '60000', '实时ops', '1', '0', '1', '3', '1', '2017-06-19 11:02:38', '2020-09-17 11:09:00', 1),('14', 'latest_fork_usec', '400000', '上次fork所用时间(单位:微秒)', '1', '0', '1', '3', '5', '2017-06-19 11:21:35', '2020-09-16 16:51:00', 1), ('15', 'mem_fragmentation_ratio', '1.5', '内存碎片率(检测大于500MB)', '1', '0', '1', '3', '5', '2017-06-19 12:49:16', '2020-09-16 16:51:00', 0), ('16', 'rdb_last_bgsave_status', 'ok', '上一次bgsave状态', '1', '0', '1', '4', '4', '2017-06-19 14:15:21', '2020-09-17 10:19:00', 0), ('17', 'total_net_output_bytes', '5000', '分钟网络输出流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:39:44', '2020-09-17 11:09:00', 0), ('19', 'total_net_input_bytes', '1200', '分钟网络输入流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:45:44', '2020-09-17 11:09:00', 0), ('20', 'sync_partial_err', '0', '分钟部分复制失败次数', '1', '0', '1', '3', '1', '2017-06-19 18:34:41', '2020-09-17 11:09:00', 1), ('21', 'sync_partial_ok', '0', '分钟部分复制成功次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:01', '2020-09-17 11:09:00', 1), ('22', 'sync_full', '0', '分钟全量复制执行次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:17', '2020-09-17 11:09:00', 1), ('23', 'rejected_connections', '0', '分钟拒绝连接数', '1', '0', '1', '3', '1', '2017-06-19 18:35:36', '2020-09-17 11:09:00', 2), ('54', 'master_slave_offset_diff', '20000000', '主从节点偏移量差(单位:字节)', '1', '0', '1', '3', '2', '2017-06-20 18:58:56', '2020-09-17 11:06:00', 0), ('56', 'cluster_state', 'ok', '集群状态', '1', '0', '1', '4', '1', '2017-06-21 18:01:52', '2020-09-17 11:09:00', 2), ('57', 'cluster_slots_ok', '16384', '集群成功分配槽个数', '1', '0', '1', '4', '1', '2017-06-21 18:02:04', '2020-09-17 11:09:00', 2);
COMMIT;
--
-- Table structure for table `instance_big_key`
--
DROP TABLE IF EXISTS `instance_big_key`;
CREATE TABLE `instance_big_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`audit_id` bigint(20) NOT NULL COMMENT 'audit id',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从,详见InstanceRoleEnum',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`big_key` varchar(255) NOT NULL COMMENT '键',
`type` varchar(16) NOT NULL COMMENT '类型:string,hash,list,set,zset',
`length` int(11) NOT NULL COMMENT '长度',
`create_time` datetime NOT NULL COMMENT '记录创建时间',
PRIMARY KEY (`id`),
KEY `idx_app_audit` (`app_id`,`audit_id`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例bigkey列表';
--
-- Table structure for table `instance_config`
--
DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Redis版本表主键id',
`refresh` mediumint(9) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例配置模板';
-- ----------------------------
-- Records of `instance_config`
-- ----------------------------
BEGIN;
INSERT INTO `instance_config` VALUES ('1', 'cluster-enabled', 'yes', '是否开启集群模式', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('2', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('3', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('4', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('5', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('6', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2016-07-05 15:08:31', '2', '1', '29', '0'), ('7', 'port', '%d', 'sentinel实例端口', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('8', 'dir', '%s', '工作目录', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('9', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('10', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('11', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('12', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('13', 'daemonize', 'no', '是否守护进程', '2016-07-14 14:00:05', '6', '1', '29', '0'), ('14', 'tcp-backlog', '511', 'TCP连接完成队列', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('15', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('16', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2016-12-06 11:40:46', '6', '1', '29', '0'), ('17', 'loglevel', 'notice', '日志级别', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('18', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('19', 'dir', '%s', 'redis工作目录', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('20', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('21', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('22', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('23', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('24', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('25', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('26', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('27', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('28', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('29', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('30', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('31', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('32', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('33', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('34', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('35', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('36', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('37', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('38', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('39', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('40', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('41', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2016-11-24 10:24:21', '6', '1', '29', '0'), ('42', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('43', 'hz', '10', '执行后台task数量,默认:10', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('44', 'port', '%d', '端口', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('45', 'maxmemory', '%dmb', '当前实例最大可用内存', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('46', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('47', 'appendonly', 'yes', '开启append only持久化模式', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('48', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('49', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('50', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('51', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('52', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('53', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('54', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('55', 'maxclients', '10000', '客户端最大连接数', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('126', 'cluster-enabled', 'yes', '是否开启集群模式', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('127', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('128', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('129', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('130', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('131', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('132', 'port', '%d', 'sentinel实例端口', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('133', 'dir', '%s', '工作目录', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('134', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('135', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('136', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('137', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('138', 'daemonize', 'no', '是否守护进程', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('139', 'tcp-backlog', '511', 'TCP连接完成队列', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('140', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('141', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('142', 'loglevel', 'notice', '日志级别', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('143', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('144', 'dir', '%s', 'redis工作目录', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('145', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('146', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('147', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('148', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('149', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('150', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('151', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('152', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('153', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('154', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('155', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('156', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('157', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('158', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('159', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2018-09-18 18:25:32', '6', '0', '31', '0'), ('160', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2018-09-18 18:25:40', '6', '0', '31', '0'), ('161', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('162', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('163', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('164', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('165', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('166', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('167', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('168', 'hz', '10', '执行后台task数量,默认:10', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('169', 'port', '%d', '端口', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('170', 'maxmemory', '%dmb', '当前实例最大可用内存', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('171', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('172', 'appendonly', 'yes', '开启append only持久化模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('173', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('174', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('175', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('176', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('177', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('178', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('179', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('180', 'maxclients', '10000', '客户端最大连接数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('181', 'protected-mode', 'yes', '开启保护模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('182', 'bind', '0.0.0.0', '默认客户端都可连接', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('185', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2018-09-18 18:26:32', '6', '1', '31', '0'), ('186', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2018-09-18 18:27:12', '6', '1', '31', '0'), ('253', 'protected-mode', 'no', '关闭保护模式', '2018-11-01 16:10:59', '5', '1', '31', '0'), ('354', 'cluster-enabled', 'yes', '是否开启集群模式', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('355', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('356', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('357', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('358', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('359', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('360', 'port', '%d', 'sentinel实例端口', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('361', 'dir', '%s', '工作目录', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('362', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('363', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('364', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('365', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('366', 'daemonize', 'no', '是否守护进程', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('367', 'tcp-backlog', '511', 'TCP连接完成队列', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('368', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('369', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('370', 'loglevel', 'notice', '日志级别', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('371', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('372', 'dir', '%s', 'redis工作目录', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('373', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('374', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('375', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('376', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('377', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('378', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('379', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('380', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('381', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('382', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('383', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('384', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('385', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('386', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('387', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('388', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('389', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('390', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('391', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('392', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('393', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('394', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('395', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('396', 'hz', '10', '执行后台task数量,默认:10', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('397', 'port', '%d', '端口', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('398', 'maxmemory', '%dmb', '当前实例最大可用内存', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('399', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('400', 'appendonly', 'yes', '开启append only持久化模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('401', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('402', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('403', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('404', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('405', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('406', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('407', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('408', 'maxclients', '10000', '客户端最大连接数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('409', 'protected-mode', 'yes', '开启保护模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('410', 'bind', '0.0.0.0', '默认客户端都可连接', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('411', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('412', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('413', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('414', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('415', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('416', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('417', 'slave-lazy-flush', 'yes', 'slave发起全量复制,是否采用flushall async清理老数据 默认值 no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('418', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2019-10-31 11:15:57', '6', '1', '12', '0'), ('419', 'protected-mode', 'no', '关闭sentinel保护模式', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('420', 'activedefrag', 'no', '碎片整理开启', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('421', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('422', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('423', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('424', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('425', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('506', 'cluster-enabled', 'yes', '是否开启集群模式', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('507', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('508', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('509', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('510', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('511', 'port', '%d', 'sentinel实例端口', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('512', 'dir', '%s', '工作目录', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('513', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('514', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('515', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('516', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('517', 'daemonize', 'no', '是否守护进程', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('518', 'tcp-backlog', '511', 'TCP连接完成队列', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('519', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('520', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('521', 'loglevel', 'notice', '日志级别', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('522', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('523', 'dir', '%s', 'redis工作目录', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('524', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('525', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('526', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('527', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('528', 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('529', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('530', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('531', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('532', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('533', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('534', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('535', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('536', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('537', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('538', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('539', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('540', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('541', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('542', 'hz', '10', '执行后台task数量,默认:10', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('543', 'port', '%d', '端口', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('544', 'maxmemory', '%dmb', '当前实例最大可用内存', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('545', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('546', 'appendonly', 'yes', '开启append only持久化模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('547', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('548', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('549', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('550', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('551', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('552', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('553', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('554', 'maxclients', '10000', '客户端最大连接数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('555', 'protected-mode', 'yes', '开启保护模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('556', 'bind', '0.0.0.0', '默认客户端都可连接', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('557', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('558', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('559', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('560', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('561', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('562', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('563', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('564', 'protected-mode', 'no', '关闭sentinel保护模式', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('565', 'activedefrag', 'yes', '碎片整理开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('566', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('567', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('568', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('569', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('570', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('571', 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('572', 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('573', 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('574', 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('575', 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('576', 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('577', 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('578', 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('579', 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('580', 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('581', 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('582', 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('583', 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('585', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:45:22', '6', '1', '37', '0'), ('587', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:18', '6', '1', '12', '0'), ('589', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:49', '6', '1', '31', '0'), ('590', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:49:47', '6', '1', '29', '0');
COMMIT;
--
-- Table structure for table `instance_fault`
--
DROP TABLE IF EXISTS `instance_fault`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `instance_fault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`inst_id` bigint(20) NOT NULL COMMENT '实例id',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0:心跳停止,1:心跳恢复',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` mediumint(4) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`reason` mediumtext NOT NULL COMMENT '故障原因描述',
PRIMARY KEY (`id`),
KEY `idx_ip_port` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8927 DEFAULT CHARSET=utf8 COMMENT='实例故障表' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `instance_host`
--
DROP TABLE IF EXISTS `instance_host`;
CREATE TABLE `instance_host` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`ssh_user` varchar(32) DEFAULT NULL COMMENT 'ssh用户',
`ssh_pwd` varchar(32) DEFAULT NULL COMMENT 'ssh密码',
`warn` int(5) DEFAULT '1' COMMENT '0不报警,1报警',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_host_ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_info`
--
DROP TABLE IF EXISTS `instance_info`;
CREATE TABLE `instance_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'memcached instance id',
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '对等实例的id',
`app_id` bigint(20) NOT NULL COMMENT '应用id,与app_desc关联',
`host_id` bigint(20) NOT NULL COMMENT '对应的主机id,与instance_host关联',
`ip` varchar(16) NOT NULL COMMENT '实例的ip',
`port` int(11) NOT NULL COMMENT '实例端口',
`status` tinyint(4) NOT NULL COMMENT '是否启用:0:节点异常,1:正常启用,2:节点下线',
`mem` int(11) NOT NULL COMMENT '内存大小',
`conn` int(11) NOT NULL COMMENT '连接数',
`cmd` varchar(255) NOT NULL COMMENT '启动实例的命令/redis-sentinel的masterName',
`type` mediumint(11) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_inst_ipport` (`ip`,`port`) USING BTREE,
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_latency_history`
--
DROP TABLE IF EXISTS `instance_latency_history`;
CREATE TABLE `instance_latency_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`event` varchar(255) NOT NULL COMMENT '事件名称',
`execute_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`execution_cost` bigint(20) NOT NULL COMMENT '耗时(微妙)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `latencyistorykey` (`instance_id`,`event`,`execute_date`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executedate` (`app_id`,`execute_date`),
KEY `idx_executedate` (`execute_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例延迟事件信息表';
--
-- Table structure for table `instance_minute_stats`
--
DROP TABLE IF EXISTS `instance_minute_stats`;
CREATE TABLE `instance_minute_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`json` text NOT NULL COMMENT '统计json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例分钟统计表';
--
-- Table structure for table `instance_reshard_process`
--
DROP TABLE IF EXISTS `instance_reshard_process`;
CREATE TABLE `instance_reshard_process` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`audit_id` bigint(20) NOT NULL COMMENT '审核id',
`source_instance_id` int(11) NOT NULL COMMENT '源实例id',
`target_instance_id` int(11) NOT NULL COMMENT '目标实例id',
`start_slot` int(11) NOT NULL COMMENT '开始slot',
`end_slot` int(11) NOT NULL COMMENT '结束slot',
`migrating_slot` int(11) NOT NULL COMMENT '正在迁移的slot',
`is_pipeline` tinyint(4) NOT NULL COMMENT '是否为pipeline,0:否,1:是',
`finish_slot_num` int(11) NOT NULL COMMENT '已经完成迁移的slot数量',
`status` tinyint(4) NOT NULL COMMENT '0:运行中 1:完成 2:出错',
`start_time` datetime NOT NULL COMMENT '迁移开始时间',
`end_time` datetime NOT NULL COMMENT '迁移结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_audit` (`audit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例Reshard进度';
--
-- Table structure for table `instance_slow_log`
--
DROP TABLE IF EXISTS `instance_slow_log`;
CREATE TABLE `instance_slow_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`slow_log_id` bigint(20) NOT NULL COMMENT '慢查询id',
`cost_time` int(11) NOT NULL COMMENT '耗时(微妙)',
`command` varchar(255) NOT NULL COMMENT '执行命令',
`execute_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `slowlogkey` (`instance_id`,`slow_log_id`,`execute_time`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executetime` (`app_id`,`execute_time`),
KEY `idx_executetime` (`execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢查询列表';
--
-- Table structure for table `instance_statistics`
--
DROP TABLE IF EXISTS `instance_statistics`;
CREATE TABLE `instance_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`inst_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`host_id` bigint(20) NOT NULL COMMENT '机器的id',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`port` int(255) NOT NULL COMMENT 'port',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从',
`max_memory` bigint(255) NOT NULL COMMENT '预分配内存,单位byte',
`used_memory` bigint(255) NOT NULL COMMENT '已使用内存,单位byte',
`curr_items` bigint(255) NOT NULL COMMENT '当前item数量',
`curr_connections` int(255) NOT NULL COMMENT '当前连接数',
`misses` bigint(255) NOT NULL COMMENT 'miss数',
`hits` bigint(255) NOT NULL COMMENT '命中数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mem_fragmentation_ratio` double DEFAULT '0' COMMENT '碎片率',
`aof_delayed_fsync` int(11) DEFAULT '0' COMMENT 'aof阻塞次数',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `machine_id` (`host_id`),
KEY `idx_inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='实例的最新统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_info`
--
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '机器的id',
`ssh_user` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh用户',
`ssh_passwd` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh密码',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`room` varchar(20) COLLATE utf8_bin NOT NULL COMMENT '所属机房',
`mem` int(11) unsigned NOT NULL COMMENT '内存大小,单位G',
`cpu` mediumint(24) unsigned NOT NULL COMMENT 'cpu数量',
`virtual` tinyint(8) unsigned NOT NULL DEFAULT '1' COMMENT '是否虚拟,0表示否,1表示是',
`real_ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '宿主机ip',
`service_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
`fault_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '故障次数',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`warn` tinyint(255) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用报警,0不启用,1启用',
`available` tinyint(255) NOT NULL COMMENT '表示机器是否可用,1表示可用,0表示不可用;',
`groupId` int(11) NOT NULL DEFAULT '0' COMMENT '机器分组,默认为0,表示原生资源,非0表示外部提供的资源(可扩展)',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '0原生 1 其他',
`extra_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '对于机器的额外说明(例如机器安装的其他服务(web,mysql,queue等等))',
`collect` int(11) DEFAULT '1' COMMENT 'switch of collect server status, 1:open, 0:close',
`version_install` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '机器安装redis版本状态',
`use_type` tinyint(4) DEFAULT '2' COMMENT '使用类型:Redis专用机器(0),Redis测试机器(1),混合部署机器(2),Redis-Sentinel机器(3)',
`k8s_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否k8s容器:0:不是 1:是',
`rack` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '机器所在机架信息',
`is_allocating` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否在分配中,1是0否',
`disk` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '磁盘空间:G',
`dis_type` tinyint(4) DEFAULT 0 NOT NULL COMMENT '操作系统发行版本,0:centos;1:ubuntu',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='机器信息表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_relation`
--
DROP TABLE IF EXISTS `machine_relation`;
CREATE TABLE `machine_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ip` varchar(64) NOT NULL COMMENT '虚拟机ip',
`real_ip` varchar(64) NOT NULL COMMENT '宿主机ip',
`extra_desc` varchar(128) DEFAULT NULL COMMENT '实例描述信息',
`status` int(255) NOT NULL COMMENT '实例变更状态 0:offline ,1:online',
`is_sync` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据同步状态 0: 未同步数据 -1:同步中 1:数据已同步 -2:同步失败 ',
`sync_time` timestamp NULL DEFAULT NULL COMMENT '同步时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'pod最后更新时间',
`taskid` bigint(11) DEFAULT NULL COMMENT '任务id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `machine_room`
--
DROP TABLE IF EXISTS `machine_room`;
CREATE TABLE `machine_room` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '机房id',
`name` varchar(255) NOT NULL COMMENT '机房名称',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`desc` varchar(255) DEFAULT NULL COMMENT '机房描述信息',
`ip_network` varchar(32) NOT NULL DEFAULT '' COMMENT '机房网段信息',
`operator` varchar(255) DEFAULT NULL COMMENT '运营商',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `machine_room`
-- ----------------------------
BEGIN;
INSERT INTO `machine_room` VALUES ('1', '阿里云杭州', '1', '阿里云-杭州机房', '172.27.*.*', '阿里云');
COMMIT;
--
-- Table structure for table `machine_statistics`
--
DROP TABLE IF EXISTS `machine_statistics`;
CREATE TABLE `machine_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`host_id` bigint(20) NOT NULL COMMENT '机器id',
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`cpu_usage` varchar(120) NOT NULL COMMENT 'cpu使用率',
`load` varchar(120) NOT NULL COMMENT '机器负载',
`traffic` varchar(120) NOT NULL COMMENT 'io网络流量',
`memory_usage_ratio` varchar(120) NOT NULL COMMENT '内存使用率',
`memory_free` varchar(120) NOT NULL COMMENT '内存剩余',
`memory_total` varchar(120) NOT NULL COMMENT '总内存量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`max_memory` int(11) DEFAULT '0' COMMENT '机器分配内存,单位MB',
`instance_count` int(11) DEFAULT '0' COMMENT '机器实例数量',
`machine_memory` int(11) DEFAULT '0' COMMENT '机器入库总内存,单位MB',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_ip` (`ip`),
KEY `host_id` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器状态统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_BLOB_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`BLOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_CALENDARS`
--
DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `QRTZ_CALENDARS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`CALENDAR_NAME` varchar(200) NOT NULL COMMENT 'calendar名称',
`CALENDAR` blob NOT NULL COMMENT 'calendar信息',
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='以 Blob 类型存储 Quartz 的 Calendar 信息' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `QRTZ_CRON_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
CREATE TABLE `QRTZ_CRON_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`TRIGGER_NAME` varchar(200) NOT NULL COMMENT 'trigger名',
`TRIGGER_GROUP` varchar(200) NOT NULL COMMENT 'trigger组',
`CRON_EXPRESSION` varchar(120) NOT NULL COMMENT 'cron表达式',
`TIME_ZONE_ID` varchar(80) DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储 Cron Trigger,包括 Cron 表达式和时区信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_FIRED_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`ENTRY_ID` varchar(195) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL,
`FIRED_TIME` bigint(13) NOT NULL,
`SCHED_TIME` bigint(13) NOT NULL,
`PRIORITY` int(11) NOT NULL,
`STATE` varchar(16) NOT NULL,
`JOB_NAME` varchar(200) DEFAULT NULL,
`JOB_GROUP` varchar(200) DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL COMMENT '是否非并行执行',
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL COMMENT '是否持久化',
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已触发的 Trigger相关的状态信息,以及关联 Job 的执行信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_JOB_DETAILS`
--
DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
CREATE TABLE `QRTZ_JOB_DETAILS` (
`SCHED_NAME` varchar(120) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) NOT NULL,
`IS_DURABLE` varchar(1) NOT NULL COMMENT '是否持久化,0不持久化,1持久化',
`IS_NONCONCURRENT` varchar(1) NOT NULL COMMENT '是否非并发,0非并发,1并发',
`IS_UPDATE_DATA` varchar(1) NOT NULL,
`REQUESTS_RECOVERY` varchar(1) NOT NULL COMMENT '是否可恢复,0不恢复,1恢复',
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储每一个已配置的 Job 的详细信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_LOCKS`
--
DROP TABLE IF EXISTS `QRTZ_LOCKS`;
CREATE TABLE `QRTZ_LOCKS` (
`SCHED_NAME` varchar(120) NOT NULL,
`LOCK_NAME` varchar(40) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储程序的悲观锁的信息(假如使用了悲观锁)' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_PAUSED_TRIGGER_GRPS`
--
DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已暂停的 Trigger 组的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SCHEDULER_STATE`
--
DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
CREATE TABLE `QRTZ_SCHEDULER_STATE` (
`SCHED_NAME` varchar(120) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL COMMENT '执行quartz实例的主机名',
`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT '实例将状态报告给集群中的其它实例的上一次时间',
`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT '实例间状态报告的时间频率',
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储少量的有关 Scheduler 的状态信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPLE_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`REPEAT_COUNT` bigint(7) NOT NULL COMMENT '重复次数',
`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT '重复间隔',
`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT '已出发次数',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储简单的 Trigger,包括重复次数,间隔,以及已触的次数' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPROP_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`STR_PROP_1` varchar(512) DEFAULT NULL,
`STR_PROP_2` varchar(512) DEFAULT NULL,
`STR_PROP_3` varchar(512) DEFAULT NULL,
`INT_PROP_1` int(11) DEFAULT NULL,
`INT_PROP_2` int(11) DEFAULT NULL,
`LONG_PROP_1` bigint(20) DEFAULT NULL,
`LONG_PROP_2` bigint(20) DEFAULT NULL,
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
CREATE TABLE `QRTZ_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
`PRIORITY` int(11) DEFAULT NULL,
`TRIGGER_STATE` varchar(16) NOT NULL,
`TRIGGER_TYPE` varchar(8) NOT NULL,
`START_TIME` bigint(13) NOT NULL,
`END_TIME` bigint(13) DEFAULT NULL,
`CALENDAR_NAME` varchar(200) DEFAULT NULL,
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已配置的 Trigger 的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`host` varchar(255) DEFAULT NULL COMMENT 'host',
`nmon` varchar(255) DEFAULT NULL COMMENT 'nmon version',
`cpus` tinyint(4) DEFAULT NULL COMMENT 'logic cpu num',
`cpu_model` varchar(255) DEFAULT NULL COMMENT 'cpu 型号',
`dist` varchar(255) DEFAULT NULL COMMENT '发行版信息',
`kernel` varchar(255) DEFAULT NULL COMMENT '内核信息',
`ulimit` varchar(255) DEFAULT NULL COMMENT 'ulimit -n,ulimit -u',
`updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `server_stat`
--
DROP TABLE IF EXISTS `server_stat`;
CREATE TABLE `server_stat` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`cdate` date NOT NULL COMMENT '数据收集天',
`ctime` char(4) NOT NULL COMMENT '数据收集小时分钟',
`cuser` float DEFAULT NULL COMMENT '用户态占比',
`csys` float DEFAULT NULL COMMENT '内核态占比',
`cwio` float DEFAULT NULL COMMENT 'wio占比',
`c_ext` text COMMENT '子cpu占比',
`cload1` float DEFAULT NULL COMMENT '1分钟load',
`cload5` float DEFAULT NULL COMMENT '5分钟load',
`cload15` float DEFAULT NULL COMMENT '15分钟load',
`mtotal` float DEFAULT NULL COMMENT '总内存,单位M',
`mfree` float DEFAULT NULL COMMENT '空闲内存',
`mcache` float DEFAULT NULL COMMENT 'cache',
`mbuffer` float DEFAULT NULL COMMENT 'buffer',
`mswap` float DEFAULT NULL COMMENT 'cache',
`mswap_free` float DEFAULT NULL COMMENT 'cache',
`nin` float DEFAULT NULL COMMENT '网络入流量 单位K/s',
`nout` float DEFAULT NULL COMMENT '网络出流量 单位k/s',
`nin_ext` text COMMENT '各网卡入流量详情',
`nout_ext` text COMMENT '各网卡出流量详情',
`tuse` int(11) DEFAULT NULL COMMENT 'tcp estab连接数',
`torphan` int(11) DEFAULT NULL COMMENT 'tcp orphan连接数',
`twait` int(11) DEFAULT NULL COMMENT 'tcp time wait连接数',
`dread` float DEFAULT NULL COMMENT '磁盘读速率 单位K/s',
`dwrite` float DEFAULT NULL COMMENT '磁盘写速率 单位K/s',
`diops` float DEFAULT NULL COMMENT '磁盘io速率 交互次数/s',
`dbusy` float DEFAULT NULL COMMENT '磁盘io带宽使用百分比',
`d_ext` text COMMENT '磁盘各分区占比',
`dspace` text COMMENT '磁盘各分区空间使用率',
PRIMARY KEY (`ip`,`cdate`,`ctime`),
KEY `idx_cdate` (`cdate`),
KEY `idx_cdate_ctime` (`cdate`,`ctime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `system_config`
--
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
`config_key` varchar(255) NOT NULL COMMENT '配置key',
`config_value` varchar(512) NOT NULL COMMENT '配置value',
`info` varchar(255) NOT NULL COMMENT '配置说明',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`order_id` int(11) NOT NULL COMMENT '顺序',
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `system_config`
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES ('cachecloud.admin.user.name','admin','cachecloud-admin用户名',1,11),('cachecloud.admin.user.password','admin','cachelcoud-admin密码',1,12),('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,33),('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,31),('cachecloud.contact','user1:(xx@zz.com, user1:135xxxxxxxx)
user2: (user2@zz.com, user2:138xxxxxxxx)','值班联系人信息',1,14),('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,22),('cachecloud.email.alert.interface','','邮件报警接口(参考报警接口规范)',1,24),('cachecloud.machine.ssh.name','cachecloud-open','机器ssh用户名',1,2),('cachecloud.machine.ssh.password','cachecloud-open','机器ssh密码',1,3),('cachecloud.machine.ssh.port','22','机器ssh端口',1,10),('cachecloud.machine.stats.cron.minute','1','机器性能统计周期(分钟)',1,35),('cachecloud.nmon.dir','/opt/cachecloud','nmon安装目录',1,32),('cachecloud.owner.email','xx@sohu.com,yy@qq.com','邮件报警(逗号隔开)',1,21),('cachecloud.owner.phone','xxx,yyy','手机号报警(逗号隔开)',1,21),('cachecloud.owner.weChat','xxx,yyy','微信号报警(逗号隔开)',1,21),('cachecloud.public.key.pem','/opt/ssh/id_rsa','密钥路径',1,5),('cachecloud.public.user.name','cachecloud-open','公钥用户名',1,4),('cachecloud.ssh.auth.type','1','ssh授权方式',1,1),('cachecloud.superAdmin','admin,xx,yy','超级管理员组',1,13),('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,22),('cachecloud.weChat.alert.interface','','微信报警接口(参考报警接口规范)',1,23),('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,34),('machine.load.alert.ratio','8.0','机器负载报警阀值',1,32);
COMMIT;
-- ----------------------------
-- Table structure for `system_resource`
-- ----------------------------
DROP TABLE IF EXISTS `system_resource`;
CREATE TABLE `system_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '资源ID',
`name` varchar(64) NOT NULL COMMENT '资源名称',
`intro` varchar(255) DEFAULT NULL COMMENT '资源说明',
`type` tinyint(4) NOT NULL COMMENT '1:仓库地址 2:脚本 3:资源包 4:公钥/私钥 6:目录管理 7:迁移工具管理',
`lastmodify` datetime DEFAULT NULL COMMENT '最后更新时间',
`dir` varchar(128) DEFAULT NULL COMMENT '资源路径',
`url` varchar(128) DEFAULT NULL COMMENT '仓库地址',
`ispush` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:未推送 1:已推送',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`username` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`task_id` bigint(11) DEFAULT NULL COMMENT '迁移任务id',
`compile_info` varchar(255) DEFAULT NULL COMMENT '编译信息',
`order_num` int(6) NOT NULL DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `system_resource`
-- ----------------------------
BEGIN;
INSERT INTO `system_resource` VALUES (1,'cachecloud-init.sh','容器初始化脚本',2,'2020-07-15 18:35:41','/script','',0,1,NULL,NULL,NULL,0),(2,'x.x.x.x',NULL,1,'2020-08-10 10:31:51','/opt/download/software/cachecloud/resource','http://x.x.x.x/software/cachecloud/resource',0,1,'admin',0,NULL,0),(4,'cachecloud-env.sh','宿主环境脚本',2,'2020-07-15 18:36:28','/script','',0,1,NULL,NULL,NULL,0),(5,'id_rsa','私钥文件',4,'2020-07-07 10:45:39','/ssh','',0,1,NULL,NULL,NULL,0),(6,'id_rsa.pub','公钥文件',4,'2020-07-07 10:45:45','/ssh','',0,1,NULL,NULL,NULL,0),(12,'redis-4.0.14','redis 4.0.14资源包',3,'2020-08-10 09:52:41','/redis','http://download.redis.io/releases/redis-4.0.14.tar.gz',0,1,'admin',532,NULL,0),(21,'/script','脚本目录管理',6,'2020-08-10 10:51:34','',NULL,0,1,'admin',0,NULL,0),(28,'/ssh','ssh目录',6,'2020-07-20 17:55:03',NULL,NULL,0,1,'admin',0,NULL,0),(29,'redis-3.0.7','redis3.0.7 资源包',3,'2020-08-10 09:53:32','/redis','http://download.redis.io/releases/redis-3.0.7.tar.gz',0,1,'admin',529,NULL,0),(31,'redis-3.2.12','redis 3.2.12 资源包',3,'2020-08-10 15:08:21','/redis','http://download.redis.io/releases/redis-3.2.12.tar.gz',0,1,'admin',530,NULL,0),(32,'/redis','redis资源包管理',6,'2020-07-20 17:54:59',NULL,NULL,0,1,'admin',0,NULL,0),(33,'/tool','迁移工具资源包',6,'2020-07-20 17:54:53',NULL,NULL,0,1,'admin',0,NULL,0),(37,'redis-5.0.9','redis5.0.9 资源包',3,'2020-08-10 09:51:41','/redis','http://download.redis.io/releases/redis-5.0.9.tar.gz',0,1,'admin',533,NULL,0),(40,'redis-shake-2.0.3','redis 2.0.3\n修复fix 5.0迁移类型问题',7,'2020-08-11 10:53:26','/tool','https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz',0,1,'admin',518,NULL,0);
COMMIT;
--
-- Table structure for table `task_queue`
--
DROP TABLE IF EXISTS `task_queue`;
CREATE TABLE `task_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`important_info` varchar(255) NOT NULL DEFAULT '' COMMENT '重要信息',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`param` longtext NOT NULL COMMENT '任务参数(json):随着任务变化',
`init_param` longtext NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2中断,3失败',
`parent_task_id` bigint(20) NOT NULL COMMENT '父任务id',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`error_code` int(11) NOT NULL COMMENT '错误代码',
`error_msg` varchar(255) NOT NULL COMMENT '错误消息',
`task_note` varchar(255) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
--
-- Table structure for table `task_step_flow`
--
DROP TABLE IF EXISTS `task_step_flow`;
CREATE TABLE `task_step_flow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`task_id` bigint(20) NOT NULL COMMENT '任务id',
`child_task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '子任务id',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`order_no` int(11) NOT NULL COMMENT '序号',
`status` tinyint(4) NOT NULL COMMENT '状态:0未开始、1成功、2中断、3跳过、4失败',
`log` text COMMENT '日志',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_class_step` (`task_id`,`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤流表';
--
-- Table structure for table `task_step_meta`
--
DROP TABLE IF EXISTS `task_step_meta`;
CREATE TABLE `task_step_meta` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`step_desc` varchar(255) NOT NULL COMMENT '步骤描述',
`ops_device` varchar(255) NOT NULL COMMENT '运维建议',
`timeout` int(11) NOT NULL COMMENT '超时时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`order_no` int(11) NOT NULL COMMENT '序号',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_class_step` (`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤元数据表';
/*!40101 SET character_set_client = @saved_cs_client */;
-- ----------------------------
-- Table structure for `standard_statistics`
-- ----------------------------
DROP TABLE IF EXISTS `standard_statistics`;
CREATE TABLE `standard_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`info_json` text NOT NULL COMMENT '收集的json数据',
`diff_json` text NOT NULL COMMENT '上一次收集差异的json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`cluster_info_json` varchar(20480) NOT NULL DEFAULT '' COMMENT '收集的cluster info json数据',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_create_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_alert_record`
--
DROP TABLE IF EXISTS `app_alert_record`;
CREATE TABLE `app_alert_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`visible_type` int(1) NOT NULL COMMENT '可见类型(0:均可见;1:仅管理员可见;)',
`important_level` int(1) NOT NULL COMMENT '重要类型(0:一般;1:重要;2:紧急)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`app_id` bigint(20) DEFAULT NULL COMMENT 'app id',
`instance_id` bigint(20) DEFAULT NULL COMMENT '实例id',
`ip` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '机器ip',
`port` int(10) DEFAULT NULL COMMENT '端口号',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '报警标题',
`content` varchar(500) COLLATE utf8_bin NOT NULL COMMENT '报警内容',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`),
KEY `ip` (`ip`),
KEY `idx_inst_id` (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警记录表';
--
-- Table structure for table `config_restart_record`
--
DROP TABLE IF EXISTS `config_restart_record`;
CREATE TABLE `config_restart_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`app_name` varchar(36) NOT NULL COMMENT '应用名称',
`operate_type` char(1) NOT NULL COMMENT '操作类型(0:滚动重启,1:修改配置强制重启;2:修改配置)',
`param` varchar(2000) NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2成功,3失败,4配置修改待重启',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`log` longtext COMMENT '日志信息',
`user_name` varchar(64) DEFAULT NULL COMMENT '操作人员姓名',
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`instances` varchar(1000) DEFAULT NULL COMMENT '涉及实例id列表的json格式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='重启记录表';
--
-- Table structure for table `module_info`
--
DROP TABLE IF EXISTS `module_info`;
CREATE TABLE `module_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`git_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'git resource',
`info` varchar(128) DEFAULT NULL COMMENT '模块信息说明',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
PRIMARY KEY (`id`),
UNIQUE KEY `NAMEKEY` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块信息表';
--
-- Table structure for table `module_version`
--
DROP TABLE IF EXISTS `module_version`;
CREATE TABLE `module_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module_id` int(11) NOT NULL,
`version_id` int(11) NOT NULL COMMENT '关联版本号',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`so_path` varchar(255) DEFAULT NULL COMMENT '编译后so库的地址',
`tag` varchar(64) NOT NULL COMMENT '模块版本号',
`status` int(255) NOT NULL DEFAULT '0' COMMENT '是否可用(关联so地址):0 不可用 1:可用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块版本管理表';
--
-- Table structure for table `app_import`
--
DROP TABLE IF EXISTS `app_import`;
CREATE TABLE `app_import` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '目标应用id',
`instance_info` text COMMENT '源redis实例信息',
`redis_password` varchar(200) DEFAULT NULL COMMENT '源redis密码',
`status` int(11) DEFAULT NULL COMMENT '迁移状态:PREPARE(0, "准备", "应用导入-未开始"), START(1, "进行中...", "应用导入-开始"), ERROR(2, "error", "应用导入-出错"), VERSION_BUILD_START(11, "进行中...", "新建redis版本-进行中"), VERSION_BUILD_ERROR(12, "error", "新建redis版本-出错"), VERSION_BUILD_END(20, "成功", "新建redis版本-完成"), APP_BUILD_INIT(21, "准备就绪", "新建redis应用-准备就绪"), APP_BUILD_START(22, "进行中...", "新建redis应用-进行中"), APP_BUILD_ERROR(23, "error", "新建redis应用-出错"), APP_BUILD_END(30, "成功", "新建redis应用-完成"), MIGRATE_INIT(31, "准备就绪", "数据迁移-准备就绪"), MIGRATE_START(32, "进行中...", "数据迁移-进行中"), MIGRATE_ERROR(33, "error", "数据迁移-出错"), MIGRATE_END(3, "成功", "应用导入-成功")',
`step` int(11) DEFAULT NULL COMMENT '导入阶段',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`migrate_id` bigint(20) DEFAULT NULL COMMENT '数据迁移id',
`mem_size` int(11) DEFAULT NULL COMMENT '目标应用内存大小,单位G',
`redis_version_name` varchar(20) DEFAULT NULL COMMENT '目标应用redis版本,格式:redis-x.x.x',
`app_build_task_id` bigint(20) DEFAULT NULL COMMENT '目标应用部署任务id',
`source_type` int(11) DEFAULT NULL COMMENT '源redis类型:7:cluster, 6:sentinel, 5:standalone',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- redis_module_config definition
CREATE TABLE `redis_module_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Module version版本表主键id',
`refresh` tinyint(4) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
`module_id` int(11) NOT NULL DEFAULT '7' COMMENT 'Module 信息表id',
`config_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配置类型,0:加载和运行配置;1:加载时配置;2:运行时配置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='redis模块配置表';
-- app_to_module definition
CREATE TABLE `app_to_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`module_id` int(11) NOT NULL COMMENT '模块info id',
`module_version_id` int(11) NOT NULL COMMENT '模块版本id',
PRIMARY KEY (`id`),
UNIQUE KEY `app_to_module_un` (`app_id`,`module_id`,`module_version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='应用与模块关系表';
================================================
FILE: cachecloud-web/sql/3.2.sql
================================================
-- MySQL dump 10.15 Distrib 10.0.16-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: cachecloud_open
-- ------------------------------------------------------
-- Server version 10.0.16-MariaDB-log
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
--
-- Table structure for table `app_audit`
--
DROP TABLE IF EXISTS `app_audit`;
CREATE TABLE `app_audit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '申请人的id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`type` tinyint(4) NOT NULL COMMENT '申请类型:0:申请应用,1:应用扩容,2:修改配置',
`param1` varchar(600) DEFAULT NULL COMMENT '预留参数1',
`param2` varchar(600) DEFAULT NULL COMMENT '预留参数2',
`param3` varchar(600) DEFAULT NULL COMMENT '预留参数3',
`info` varchar(360) NOT NULL COMMENT '申请描述',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:等待审批; 1:审批通过; -1:驳回',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refuse_reason` varchar(360) DEFAULT NULL COMMENT '驳回理由',
`task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务id',
`operate_id` bigint(20) DEFAULT NULL COMMENT '工单处理人',
PRIMARY KEY (`id`),
KEY `idx_appid` (`app_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status_create_time` (`status`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用审核表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_audit_log`
--
DROP TABLE IF EXISTS `app_audit_log`;
CREATE TABLE `app_audit_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '审批操作人id',
`info` longtext NOT NULL COMMENT 'app审批的详细信息',
`type` tinyint(4) NOT NULL,
`create_time` datetime NOT NULL,
`app_audit_id` bigint(20) NOT NULL COMMENT '审批id',
PRIMARY KEY (`id`),
KEY `idx_audit_appid` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app审核日志表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_client_command_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_command_minute_statistics`;
CREATE TABLE `app_client_command_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`command` varchar(20) NOT NULL COMMENT '命令明文',
`cost` bigint(20) DEFAULT NULL COMMENT '命令累计毫秒耗时',
`bytes_in` bigint(20) DEFAULT NULL COMMENT '输入流量',
`bytes_out` bigint(20) DEFAULT NULL COMMENT '输出流量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx__appid_client_command_currentMin` (`app_id`,`client_ip`,`command`,`current_min`),
KEY `idx_currentmin_appid_count_cost` (`current_min`,`app_id`,`count`,`cost`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟命令调用上报数据';
--
-- Table structure for table `app_client_exception_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_exception_minute_statistics`;
CREATE TABLE `app_client_exception_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`type` tinyint(4) NOT NULL COMMENT '0:connect exception;1:command exception',
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`node` varchar(30) NOT NULL COMMENT '节点信息host:port',
`count` bigint(20) DEFAULT NULL COMMENT '累计连接失败次数',
`cost` bigint(20) DEFAULT NULL COMMENT '累计连接失败毫秒耗时',
`latency_commands` varchar(255) DEFAULT NULL COMMENT '统计命令topN id,逗号分隔',
`redis_pool_config` varchar(255) DEFAULT NULL COMMENT 'redis连接池配置信息',
PRIMARY KEY (`id`),
UNIQUE KEY `idx__client_node_type_currentMin` (`client_ip`,`node`,`type`,`current_min`),
KEY `idx_appid_current_min` (`app_id`,`current_min`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟异常上报数据';
--
-- Table structure for table `app_client_latency_command`
--
DROP TABLE IF EXISTS `app_client_latency_command`;
CREATE TABLE `app_client_latency_command` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`command` varchar(255) NOT NULL COMMENT '命令明文',
`size` bigint(20) DEFAULT NULL COMMENT '参数长度',
`args` varchar(255) DEFAULT NULL COMMENT '裁剪后参数明文',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`invoke_time` bigint(20) DEFAULT NULL COMMENT '命令调用时间戳',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端异常命令调用详情';
--
-- Table structure for table `app_client_statistic_gather`
--
DROP TABLE IF EXISTS `app_client_statistic_gather`;
CREATE TABLE `app_client_statistic_gather` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gather_time` varchar(20) NOT NULL COMMENT '统计时间,格式yyyy-mm-dd',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`cmd_count` bigint(20) DEFAULT '0' COMMENT '命令调用次数',
`conn_exp_count` bigint(20) DEFAULT '0' COMMENT '连接异常次数',
`avg_cmd_cost` double DEFAULT '0' COMMENT '命令调用平均耗时,单位毫秒',
`avg_cmd_exp_cost` double DEFAULT '0' COMMENT '命令超时平均耗时,单位毫秒',
`avg_conn_exp_cost` double DEFAULT '0' COMMENT '连接异常平均耗时,单位毫秒',
`cmd_exp_count` bigint(20) DEFAULT '0' COMMENT '命令超时次数',
`instance_count` int(11) DEFAULT NULL COMMENT '应用实例数',
`avg_mem_frag_ratio` double DEFAULT NULL COMMENT '平均碎片率',
`mem_used_ratio` double DEFAULT NULL COMMENT '内存使用率',
`exception_count` bigint(20) DEFAULT '0' COMMENT '异常数(旧,待下线)',
`slow_log_count` bigint(20) DEFAULT '0' COMMENT '慢查询次数',
`latency_count` bigint(20) DEFAULT '0' COMMENT '延迟事件次数',
`object_size` bigint(20) DEFAULT '0' COMMENT '存储对象数',
`used_memory` bigint(20) DEFAULT '0' COMMENT '内存占用 byte',
`used_memory_rss` bigint(20) DEFAULT '0' COMMENT '物理内存占用 byte',
`max_cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗(单位:秒)',
`max_cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗(单位:秒)',
`connected_clients` bigint(20) DEFAULT '0' COMMENT '应用客户端连接数',
`topology_exam_result` tinyint(4) DEFAULT NULL COMMENT '拓扑诊断结果,0:正常,1:异常',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_appid_gathertime` (`app_id`,`gather_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报数据全天统计';
--
-- Table structure for table `app_client_value_minute_stat`
--
DROP TABLE IF EXISTS `app_client_value_minute_stat`;
CREATE TABLE `app_client_value_minute_stat` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用appid',
`collect_time` bigint(20) NOT NULL COMMENT '数据收集时间yyyyMMddHHmm00',
`update_time` datetime NOT NULL COMMENT '更新时间',
`command` varchar(20) NOT NULL COMMENT '执行命令',
`distribute_type` tinyint(4) NOT NULL COMMENT '值分布',
`count` int(11) NOT NULL COMMENT '命令执行次数',
PRIMARY KEY (`id`),
UNIQUE KEY `app_collect_command_dis` (`app_id`,`collect_time`,`command`,`distribute_type`),
KEY `idx_collect_time` (`collect_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟值分布上报数据统计';
--
-- Table structure for table `app_client_version_statistic`
--
DROP TABLE IF EXISTS `app_client_version_statistic`;
CREATE TABLE `app_client_version_statistic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip地址',
`client_version` varchar(20) NOT NULL COMMENT '客户端版本',
`report_time` datetime DEFAULT NULL COMMENT '上报时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_client_ip` (`app_id`,`client_ip`),
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报版本信息统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_daily`
--
DROP TABLE IF EXISTS `app_daily`;
CREATE TABLE `app_daily` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`date` date NOT NULL COMMENT '日期',
`create_time` datetime NOT NULL,
`slow_log_count` bigint(20) NOT NULL COMMENT '慢查询个数',
`client_exception_count` bigint(20) NOT NULL COMMENT '客户端异常个数',
`max_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟最大客户端连接数',
`avg_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟平均客户端连接数',
`max_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟最大命令数',
`avg_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟平均命令数',
`avg_hit_ratio` double NOT NULL COMMENT '平均命中率',
`min_minute_hit_ratio` double NOT NULL COMMENT '每分钟最小命中率',
`max_minute_hit_ratio` double NOT NULL COMMENT '每分钟最大命中率',
`avg_used_memory` bigint(20) NOT NULL COMMENT '最大内存使用量',
`max_used_memory` bigint(20) NOT NULL COMMENT '平均内存使用量',
`expired_keys_count` bigint(20) NOT NULL COMMENT '过期键个数',
`evicted_keys_count` bigint(20) NOT NULL COMMENT '剔除键个数',
`avg_minute_net_input_byte` double NOT NULL COMMENT '每分钟平均网络input量',
`max_minute_net_input_byte` double NOT NULL COMMENT '每分钟最大网络input量',
`avg_minute_net_output_byte` double NOT NULL COMMENT '每分钟平均网络output量',
`max_minute_net_output_byte` double NOT NULL COMMENT '每分钟最大网络output量',
`avg_object_size` bigint(20) NOT NULL COMMENT '键个数平均值',
`max_object_size` bigint(20) NOT NULL COMMENT '键个数最大值',
`big_key_times` bigint(20) NOT NULL COMMENT 'bigkey次数',
`big_key_info` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'bigkey详情',
`client_cmd_count` bigint(20) NOT NULL COMMENT '累计命令调用次数',
`client_avg_cmd_cost` double NOT NULL COMMENT '平均命令调用耗时',
`client_conn_exp_count` bigint(20) NOT NULL COMMENT '累计连接异常事件次数',
`client_avg_conn_exp_cost` double NOT NULL COMMENT '平均连接异常事件耗时',
`client_cmd_exp_count` bigint(20) NOT NULL COMMENT '累计命令超时事件次数',
`client_avg_cmd_exp_cost` double NOT NULL COMMENT '平均命令超时事件耗时',
PRIMARY KEY (`id`),
KEY `idx_appid_date` (`app_id`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='app日报';
--
-- Table structure for table `app_data_migrate_status`
--
DROP TABLE IF EXISTS `app_data_migrate_status`;
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int(11) NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
`end_time` datetime DEFAULT NULL COMMENT '迁移结束执行时间',
`log_path` varchar(255) NOT NULL COMMENT '日志文件路径',
`config_path` varchar(255) NOT NULL COMMENT '配置文件路径',
`migrate_id` varchar(50) DEFAULT NULL COMMENT 'migrate id',
`migrate_tool` tinyint(4) DEFAULT NULL COMMENT 'migrate_tool, 0:redis-shake,1:redis-migrate-tool',
`redis_source_version` varchar(20) DEFAULT NULL,
`redis_target_version` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用迁移记录详情';
--
-- Table structure for table `app_desc`
--
DROP TABLE IF EXISTS `app_desc`;
CREATE TABLE `app_desc` (
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用id',
`name` varchar(36) NOT NULL COMMENT '应用名',
`user_id` bigint(20) NOT NULL COMMENT '申请人id',
`status` tinyint(4) NOT NULL COMMENT '应用状态, 0未分配,1申请未审批,2审批并发布 3:应用下线',
`intro` varchar(255) NOT NULL COMMENT '应用描述',
`create_time` datetime NOT NULL COMMENT '创建时间',
`passed_time` datetime NOT NULL COMMENT '审批通过时间',
`type` int(10) NOT NULL DEFAULT '0' COMMENT 'cache类型,1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud ,5. redis-sentinel ,6.redis-standalone ',
`officer` varchar(32) NOT NULL COMMENT '负责人,中文',
`ver_id` int(11) NOT NULL COMMENT '版本',
`is_test` tinyint(4) DEFAULT '0' COMMENT '是否测试:1是0否',
`need_persistence` tinyint(4) DEFAULT '1' COMMENT '是否需要持久化: 1是0否',
`need_hot_back_up` tinyint(4) DEFAULT '1' COMMENT '是否需要热备: 1是0否',
`has_back_store` tinyint(4) DEFAULT '1' COMMENT '是否有后端数据源: 1是0否',
`forecase_qps` int(11) DEFAULT NULL COMMENT '预估qps',
`forecast_obj_num` int(11) DEFAULT NULL COMMENT '预估条目数',
`mem_alert_value` int(11) DEFAULT NULL COMMENT '内存报警阀值',
`client_machine_room` varchar(36) DEFAULT NULL COMMENT '客户端机房信息',
`client_conn_alert_value` int(11) DEFAULT '2000' COMMENT '客户端连接报警阀值',
`app_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`important_level` tinyint(4) NOT NULL DEFAULT '2' COMMENT '应用级别,1:最重要,2:一般重要,3:一般',
`password` varchar(255) DEFAULT '' COMMENT 'redis密码',
`custom_password` varchar(255) DEFAULT NULL COMMENT '自定义密码',
`hit_precent_alert_value` int(11) DEFAULT '0' COMMENT '命中率报警阀值 0:不报警 ',
`is_access_monitor` int(11) DEFAULT '0' COMMENT '是否接入全局监控报警 默认0,0:不接入监控 1:接入监控',
`app_fsync_value` int(11) DEFAULT '1' COMMENT '应用刷盘策略 1:主从节点appdendfsync=everysec 2:主从节点 appdendfsync=no',
`version_id` int(11) NOT NULL DEFAULT '1' COMMENT 'Redis版本表主键id',
`maxmemory_policy` tinyint(4) DEFAULT NULL COMMENT '淘汰策略(0:noeviction; 1:allkeys-lru;2:allkeys-lfu;3:volatile-lru;4:volatile-lfu;5:allkeys-random;6:volatile-random;7:volatile-ttl)',
PRIMARY KEY (`app_id`),
UNIQUE KEY `uidx_app_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app应用描述' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_command_statistics`
--
DROP TABLE IF EXISTS `app_hour_command_statistics`;
CREATE TABLE `app_hour_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHH',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`command_name`,`collect_time`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每小时命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_statistics`
--
DROP TABLE IF EXISTS `app_hour_statistics`;
CREATE TABLE `app_hour_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHH',
`hits` bigint(20) NOT NULL COMMENT '每小时命中数量和',
`misses` bigint(20) NOT NULL COMMENT '每小时未命中数量和',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '每小时内存占用最大值',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '每小时过期key数量和',
`evicted_keys` bigint(20) NOT NULL COMMENT '每小时驱逐key数量和',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '每小时客户端连接数最大值',
`object_size` bigint(20) NOT NULL COMMENT '每小时存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '每小时参与累加实例数最小值',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '每小时修改时间最大值',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用统计数据每小时统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_command_statistics`
--
DROP TABLE IF EXISTS `app_minute_command_statistics`;
CREATE TABLE `app_minute_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHHmm',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每分钟命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_statistics`
--
DROP TABLE IF EXISTS `app_minute_statistics`;
CREATE TABLE `app_minute_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`hits` bigint(20) NOT NULL COMMENT '命中数量',
`misses` bigint(20) NOT NULL COMMENT '未命中数量',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '内存占用',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '过期key数量',
`evicted_keys` bigint(20) NOT NULL COMMENT '驱逐key数量',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '客户端连接数',
`object_size` bigint(20) NOT NULL COMMENT '每分钟存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '参与累加实例数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_to_user`
--
DROP TABLE IF EXISTS `app_to_user`;
CREATE TABLE `app_to_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_user`
--
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '用户名',
`ch_name` varchar(255) NOT NULL COMMENT '中文名',
`email` varchar(64) NOT NULL COMMENT '邮箱',
`mobile` varchar(16) NOT NULL COMMENT '手机',
`type` int(4) NOT NULL DEFAULT '2' COMMENT '0管理员,1预留,2普通用户,-1无效',
`weChat` varchar(32) DEFAULT NULL COMMENT '微信号',
`isAlert` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户是否接收报警 0:不接收 1:接收',
`password` varchar(64) DEFAULT NULL COMMENT '密码',
`register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
`purpose` varchar(255) DEFAULT NULL COMMENT '使用目的',
`company` varchar(255) DEFAULT NULL COMMENT '公司名称',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_user_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表' /* `compression`='tokudb_zlib' */;
-- ----------------------------
-- Records of `app_user`
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1', 'admin', 'admin', 'admin@xxx.com', '13500000000', '0', null, '1', NULL, current_timestamp(), NULL, NULL);
COMMIT;
--
-- Table structure for table `brevity_schedule_resources`
--
DROP TABLE IF EXISTS `brevity_schedule_resources`;
CREATE TABLE `brevity_schedule_resources` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL COMMENT '类型,见:BrevityScheduleType',
`version` bigint(20) NOT NULL DEFAULT '0' COMMENT '时间版本',
`host` varchar(16) NOT NULL COMMENT '资源ip',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_type_host_port` (`type`,`host`,`port`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短频任务表';
--
-- Table structure for table `diagnostic_task_record`
--
DROP TABLE IF EXISTS `diagnostic_task_record`;
CREATE TABLE `diagnostic_task_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`type` int(11) DEFAULT NULL COMMENT '诊断类型:0scan 1bigkey 2idle key 3hotkey 4del key 5slot analysis 6topology exam',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务流id',
`audit_id` bigint(20) DEFAULT NULL COMMENT '审批id',
`status` int(11) DEFAULT NULL COMMENT '诊断状态:0开始 1结束 2异常',
`cost` bigint(20) DEFAULT NULL COMMENT '耗时,毫秒',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`redis_key` varchar(100) DEFAULT NULL COMMENT '结果的key',
`node` varchar(100) DEFAULT NULL COMMENT '实例,host:port',
`parent_task_id` bigint(20) DEFAULT NULL COMMENT '父任务id',
`diagnostic_condition` varchar(100) DEFAULT NULL COMMENT '诊断条件',
`param1` varchar(100) DEFAULT NULL COMMENT '备用参数1',
`param2` varchar(100) DEFAULT NULL COMMENT '备用参数2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用诊断记录';
--
-- Table structure for table `instance_alert_configs`
--
DROP TABLE IF EXISTS `instance_alert_configs`;
CREATE TABLE `instance_alert_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`alert_config` varchar(255) NOT NULL COMMENT '报警配置',
`alert_value` varchar(512) NOT NULL COMMENT '报警阀值',
`config_info` varchar(255) NOT NULL COMMENT '配置说明',
`type` tinyint(4) NOT NULL COMMENT '1:全局报警,2:实例报警',
`instance_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '0:全局配置,其他代表实例id',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`compare_type` tinyint(4) NOT NULL COMMENT '比较类型:1小于,2等于,3大于,4不等于',
`check_cycle` tinyint(4) NOT NULL COMMENT '1:一分钟,2:五分钟,3:半小时4:一个小时,5:一天',
`update_time` datetime NOT NULL COMMENT '报警配置更新时间',
`last_check_time` datetime NOT NULL COMMENT '上次检查时间',
`important_level` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '重要程度(0:一般;1:重要;2:紧急)',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`type`,`instance_id`,`alert_config`,`compare_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例报警阀值配置';
-- ----------------------------
-- Records of `instance_alert_configs`
-- ----------------------------
BEGIN;
INSERT INTO `instance_alert_configs` VALUES ('9', 'aof_current_size', '6000', 'aof当前尺寸(单位:MB)', '1', '0', '1', '3', '3', '2017-06-19 09:43:22', '2020-09-17 10:52:00', 0), ('10', 'aof_delayed_fsync', '3', '分钟aof阻塞个数', '1', '0', '1', '3', '1', '2017-06-19 10:38:19', '2020-09-17 11:09:00', 1), ('11', 'client_biggest_input_buf', '10', '输入缓冲区最大buffer大小(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 10:47:03', '2020-09-17 11:09:00', 1), ('12', 'client_longest_output_list', '50000', '输出缓冲区最大队列长度', '1', '0', '1', '3', '1', '2017-06-19 10:55:45', '2020-09-17 11:09:00', 1), ('13', 'instantaneous_ops_per_sec', '60000', '实时ops', '1', '0', '1', '3', '1', '2017-06-19 11:02:38', '2020-09-17 11:09:00', 1),('14', 'latest_fork_usec', '400000', '上次fork所用时间(单位:微秒)', '1', '0', '1', '3', '5', '2017-06-19 11:21:35', '2020-09-16 16:51:00', 1), ('15', 'mem_fragmentation_ratio', '1.5', '内存碎片率(检测大于500MB)', '1', '0', '1', '3', '5', '2017-06-19 12:49:16', '2020-09-16 16:51:00', 0), ('16', 'rdb_last_bgsave_status', 'ok', '上一次bgsave状态', '1', '0', '1', '4', '4', '2017-06-19 14:15:21', '2020-09-17 10:19:00', 0), ('17', 'total_net_output_bytes', '5000', '分钟网络输出流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:39:44', '2020-09-17 11:09:00', 0), ('19', 'total_net_input_bytes', '1200', '分钟网络输入流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:45:44', '2020-09-17 11:09:00', 0), ('20', 'sync_partial_err', '0', '分钟部分复制失败次数', '1', '0', '1', '3', '1', '2017-06-19 18:34:41', '2020-09-17 11:09:00', 1), ('21', 'sync_partial_ok', '0', '分钟部分复制成功次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:01', '2020-09-17 11:09:00', 1), ('22', 'sync_full', '0', '分钟全量复制执行次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:17', '2020-09-17 11:09:00', 1), ('23', 'rejected_connections', '0', '分钟拒绝连接数', '1', '0', '1', '3', '1', '2017-06-19 18:35:36', '2020-09-17 11:09:00', 2), ('54', 'master_slave_offset_diff', '20000000', '主从节点偏移量差(单位:字节)', '1', '0', '1', '3', '2', '2017-06-20 18:58:56', '2020-09-17 11:06:00', 0), ('56', 'cluster_state', 'ok', '集群状态', '1', '0', '1', '4', '1', '2017-06-21 18:01:52', '2020-09-17 11:09:00', 2), ('57', 'cluster_slots_ok', '16384', '集群成功分配槽个数', '1', '0', '1', '4', '1', '2017-06-21 18:02:04', '2020-09-17 11:09:00', 2);
COMMIT;
--
-- Table structure for table `instance_big_key`
--
DROP TABLE IF EXISTS `instance_big_key`;
CREATE TABLE `instance_big_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`audit_id` bigint(20) NOT NULL COMMENT 'audit id',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从,详见InstanceRoleEnum',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`big_key` varchar(255) NOT NULL COMMENT '键',
`type` varchar(16) NOT NULL COMMENT '类型:string,hash,list,set,zset',
`length` int(11) NOT NULL COMMENT '长度',
`create_time` datetime NOT NULL COMMENT '记录创建时间',
PRIMARY KEY (`id`),
KEY `idx_app_audit` (`app_id`,`audit_id`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例bigkey列表';
--
-- Table structure for table `instance_config`
--
DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Redis版本表主键id',
`refresh` mediumint(9) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例配置模板';
-- ----------------------------
-- Records of `instance_config`
-- ----------------------------
BEGIN;
INSERT INTO `instance_config` VALUES ('1', 'cluster-enabled', 'yes', '是否开启集群模式', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('2', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('3', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('4', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('5', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2016-07-05 15:08:30', '2', '1', '29', '0'), ('6', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2016-07-05 15:08:31', '2', '1', '29', '0'), ('7', 'port', '%d', 'sentinel实例端口', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('8', 'dir', '%s', '工作目录', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('9', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('10', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('11', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('12', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2016-07-05 15:08:31', '5', '1', '29', '0'), ('13', 'daemonize', 'no', '是否守护进程', '2016-07-14 14:00:05', '6', '1', '29', '0'), ('14', 'tcp-backlog', '511', 'TCP连接完成队列', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('15', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('16', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2016-12-06 11:40:46', '6', '1', '29', '0'), ('17', 'loglevel', 'notice', '日志级别', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('18', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('19', 'dir', '%s', 'redis工作目录', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('20', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('21', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('22', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('23', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('24', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('25', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('26', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('27', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('28', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('29', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('30', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('31', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('32', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('33', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('34', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('35', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('36', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('37', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('38', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('39', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('40', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('41', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2016-11-24 10:24:21', '6', '1', '29', '0'), ('42', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('43', 'hz', '10', '执行后台task数量,默认:10', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('44', 'port', '%d', '端口', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('45', 'maxmemory', '%dmb', '当前实例最大可用内存', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('46', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2016-07-05 15:08:31', '6', '1', '29', '0'), ('47', 'appendonly', 'yes', '开启append only持久化模式', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('48', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('49', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('50', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('51', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('52', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('53', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('54', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('55', 'maxclients', '10000', '客户端最大连接数', '2016-07-05 15:08:32', '6', '1', '29', '0'), ('126', 'cluster-enabled', 'yes', '是否开启集群模式', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('127', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('128', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('129', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('130', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('131', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2018-09-18 18:23:03', '2', '1', '31', '0'), ('132', 'port', '%d', 'sentinel实例端口', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('133', 'dir', '%s', '工作目录', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('134', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('135', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('136', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('137', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2018-09-18 18:23:03', '5', '1', '31', '0'), ('138', 'daemonize', 'no', '是否守护进程', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('139', 'tcp-backlog', '511', 'TCP连接完成队列', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('140', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('141', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('142', 'loglevel', 'notice', '日志级别', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('143', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('144', 'dir', '%s', 'redis工作目录', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('145', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('146', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('147', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('148', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('149', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('150', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('151', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('152', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('153', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('154', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('155', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('156', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('157', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('158', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('159', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2018-09-18 18:25:32', '6', '0', '31', '0'), ('160', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2018-09-18 18:25:40', '6', '0', '31', '0'), ('161', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('162', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('163', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('164', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('165', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('166', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('167', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('168', 'hz', '10', '执行后台task数量,默认:10', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('169', 'port', '%d', '端口', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('170', 'maxmemory', '%dmb', '当前实例最大可用内存', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('171', 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('172', 'appendonly', 'yes', '开启append only持久化模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('173', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('174', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('175', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('176', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('177', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('178', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('179', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('180', 'maxclients', '10000', '客户端最大连接数', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('181', 'protected-mode', 'yes', '开启保护模式', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('182', 'bind', '0.0.0.0', '默认客户端都可连接', '2018-09-18 18:23:03', '6', '1', '31', '0'), ('185', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2018-09-18 18:26:32', '6', '1', '31', '0'), ('186', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2018-09-18 18:27:12', '6', '1', '31', '0'), ('253', 'protected-mode', 'no', '关闭保护模式', '2018-11-01 16:10:59', '5', '1', '31', '0'), ('354', 'cluster-enabled', 'yes', '是否开启集群模式', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('355', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('356', 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('357', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('358', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('359', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2019-10-24 17:33:26', '2', '1', '12', '0'), ('360', 'port', '%d', 'sentinel实例端口', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('361', 'dir', '%s', '工作目录', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('362', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('363', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('364', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('365', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('366', 'daemonize', 'no', '是否守护进程', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('367', 'tcp-backlog', '511', 'TCP连接完成队列', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('368', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('369', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('370', 'loglevel', 'notice', '日志级别', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('371', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('372', 'dir', '%s', 'redis工作目录', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('373', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('374', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('375', 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('376', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('377', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('378', 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('379', 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('380', 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('381', 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('382', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('383', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('384', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('385', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('386', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('387', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('388', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2019-10-24 17:33:26', '6', '0', '12', '0'), ('389', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('390', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('391', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('392', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('393', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('394', 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('395', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('396', 'hz', '10', '执行后台task数量,默认:10', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('397', 'port', '%d', '端口', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('398', 'maxmemory', '%dmb', '当前实例最大可用内存', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('399', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('400', 'appendonly', 'yes', '开启append only持久化模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('401', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('402', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('403', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('404', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('405', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('406', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('407', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('408', 'maxclients', '10000', '客户端最大连接数', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('409', 'protected-mode', 'yes', '开启保护模式', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('410', 'bind', '0.0.0.0', '默认客户端都可连接', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('411', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('412', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('413', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('414', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('415', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('416', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('417', 'slave-lazy-flush', 'yes', 'slave发起全量复制,是否采用flushall async清理老数据 默认值 no', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('418', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2019-10-31 11:15:57', '6', '1', '12', '0'), ('419', 'protected-mode', 'no', '关闭sentinel保护模式', '2019-10-24 17:33:26', '5', '1', '12', '0'), ('420', 'activedefrag', 'no', '碎片整理开启', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('421', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('422', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('423', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('424', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('425', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2019-10-24 17:33:26', '6', '1', '12', '0'), ('506', 'cluster-enabled', 'yes', '是否开启集群模式', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('507', 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('508', 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('509', 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('510', 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('511', 'port', '%d', 'sentinel实例端口', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('512', 'dir', '%s', '工作目录', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('513', 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('514', 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('515', 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('516', 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('517', 'daemonize', 'no', '是否守护进程', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('518', 'tcp-backlog', '511', 'TCP连接完成队列', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('519', 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('520', 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('521', 'loglevel', 'notice', '日志级别', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('522', 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('523', 'dir', '%s', 'redis工作目录', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('524', 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('525', 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('526', 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('527', 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('528', 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('529', 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('530', 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('531', 'slowlog-max-len', '128', '最多记录慢查询的条数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('532', 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('533', 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('534', 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('535', 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2020-04-26 18:12:55', '6', '0', '37', '0'), ('536', 'set-max-intset-entries', '512', 'set数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('537', 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('538', 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('539', 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('540', 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('541', 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('542', 'hz', '10', '执行后台task数量,默认:10', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('543', 'port', '%d', '端口', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('544', 'maxmemory', '%dmb', '当前实例最大可用内存', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('545', 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('546', 'appendonly', 'yes', '开启append only持久化模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('547', 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('548', 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('549', 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('550', 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('551', 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('552', 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('553', 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('554', 'maxclients', '10000', '客户端最大连接数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('555', 'protected-mode', 'yes', '开启保护模式', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('556', 'bind', '0.0.0.0', '默认客户端都可连接', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('557', 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('558', 'list-compress-depth', '0', '压缩方式,0:不压缩', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('559', 'always-show-logo', 'yes', 'redis启动是否显示logo', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('560', 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('561', 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('562', 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('563', 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('564', 'protected-mode', 'no', '关闭sentinel保护模式', '2020-04-26 18:12:55', '5', '1', '37', '0'), ('565', 'activedefrag', 'yes', '碎片整理开启', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('566', 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('567', 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('568', 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('569', 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('570', 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('571', 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('572', 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('573', 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2020-04-26 18:12:55', '2', '1', '37', '0'), ('574', 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('575', 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('576', 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('577', 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('578', 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('579', 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('580', 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('581', 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('582', 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('583', 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2020-04-26 18:12:55', '6', '1', '37', '0'), ('585', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:45:22', '6', '1', '37', '0'), ('587', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:18', '6', '1', '12', '0'), ('589', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:49', '6', '1', '31', '0'), ('590', 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:49:47', '6', '1', '29', '0');
COMMIT;
--
-- Table structure for table `instance_fault`
--
DROP TABLE IF EXISTS `instance_fault`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `instance_fault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`inst_id` bigint(20) NOT NULL COMMENT '实例id',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0:心跳停止,1:心跳恢复',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` mediumint(4) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`reason` mediumtext NOT NULL COMMENT '故障原因描述',
PRIMARY KEY (`id`),
KEY `idx_ip_port` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8927 DEFAULT CHARSET=utf8 COMMENT='实例故障表' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `instance_host`
--
DROP TABLE IF EXISTS `instance_host`;
CREATE TABLE `instance_host` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`ssh_user` varchar(32) DEFAULT NULL COMMENT 'ssh用户',
`ssh_pwd` varchar(32) DEFAULT NULL COMMENT 'ssh密码',
`warn` int(5) DEFAULT '1' COMMENT '0不报警,1报警',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_host_ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_info`
--
DROP TABLE IF EXISTS `instance_info`;
CREATE TABLE `instance_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'memcached instance id',
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '对等实例的id',
`app_id` bigint(20) NOT NULL COMMENT '应用id,与app_desc关联',
`host_id` bigint(20) NOT NULL COMMENT '对应的主机id,与instance_host关联',
`ip` varchar(16) NOT NULL COMMENT '实例的ip',
`port` int(11) NOT NULL COMMENT '实例端口',
`status` tinyint(4) NOT NULL COMMENT '是否启用:0:节点异常,1:正常启用,2:节点下线',
`mem` int(11) NOT NULL COMMENT '内存大小',
`conn` int(11) NOT NULL COMMENT '连接数',
`cmd` varchar(255) NOT NULL COMMENT '启动实例的命令/redis-sentinel的masterName',
`type` mediumint(11) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_inst_ipport` (`ip`,`port`) USING BTREE,
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_latency_history`
--
DROP TABLE IF EXISTS `instance_latency_history`;
CREATE TABLE `instance_latency_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`event` varchar(255) NOT NULL COMMENT '事件名称',
`execute_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`execution_cost` bigint(20) NOT NULL COMMENT '耗时(微妙)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `latencyistorykey` (`instance_id`,`event`,`execute_date`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executedate` (`app_id`,`execute_date`),
KEY `idx_executedate` (`execute_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例延迟事件信息表';
--
-- Table structure for table `instance_minute_stats`
--
DROP TABLE IF EXISTS `instance_minute_stats`;
CREATE TABLE `instance_minute_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`json` text NOT NULL COMMENT '统计json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例分钟统计表';
--
-- Table structure for table `instance_reshard_process`
--
DROP TABLE IF EXISTS `instance_reshard_process`;
CREATE TABLE `instance_reshard_process` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`audit_id` bigint(20) NOT NULL COMMENT '审核id',
`source_instance_id` int(11) NOT NULL COMMENT '源实例id',
`target_instance_id` int(11) NOT NULL COMMENT '目标实例id',
`start_slot` int(11) NOT NULL COMMENT '开始slot',
`end_slot` int(11) NOT NULL COMMENT '结束slot',
`migrating_slot` int(11) NOT NULL COMMENT '正在迁移的slot',
`is_pipeline` tinyint(4) NOT NULL COMMENT '是否为pipeline,0:否,1:是',
`finish_slot_num` int(11) NOT NULL COMMENT '已经完成迁移的slot数量',
`status` tinyint(4) NOT NULL COMMENT '0:运行中 1:完成 2:出错',
`start_time` datetime NOT NULL COMMENT '迁移开始时间',
`end_time` datetime NOT NULL COMMENT '迁移结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_audit` (`audit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例Reshard进度';
--
-- Table structure for table `instance_slow_log`
--
DROP TABLE IF EXISTS `instance_slow_log`;
CREATE TABLE `instance_slow_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`slow_log_id` bigint(20) NOT NULL COMMENT '慢查询id',
`cost_time` int(11) NOT NULL COMMENT '耗时(微妙)',
`command` varchar(255) NOT NULL COMMENT '执行命令',
`execute_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `slowlogkey` (`instance_id`,`slow_log_id`,`execute_time`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executetime` (`app_id`,`execute_time`),
KEY `idx_executetime` (`execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢查询列表';
--
-- Table structure for table `instance_statistics`
--
DROP TABLE IF EXISTS `instance_statistics`;
CREATE TABLE `instance_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`inst_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`host_id` bigint(20) NOT NULL COMMENT '机器的id',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`port` int(255) NOT NULL COMMENT 'port',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从',
`max_memory` bigint(255) NOT NULL COMMENT '预分配内存,单位byte',
`used_memory` bigint(255) NOT NULL COMMENT '已使用内存,单位byte',
`curr_items` bigint(255) NOT NULL COMMENT '当前item数量',
`curr_connections` int(255) NOT NULL COMMENT '当前连接数',
`misses` bigint(255) NOT NULL COMMENT 'miss数',
`hits` bigint(255) NOT NULL COMMENT '命中数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mem_fragmentation_ratio` double DEFAULT '0' COMMENT '碎片率',
`aof_delayed_fsync` int(11) DEFAULT '0' COMMENT 'aof阻塞次数',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `machine_id` (`host_id`),
KEY `idx_inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='实例的最新统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_info`
--
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '机器的id',
`ssh_user` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh用户',
`ssh_passwd` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh密码',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`room` varchar(20) COLLATE utf8_bin NOT NULL COMMENT '所属机房',
`mem` int(11) unsigned NOT NULL COMMENT '内存大小,单位G',
`cpu` mediumint(24) unsigned NOT NULL COMMENT 'cpu数量',
`virtual` tinyint(8) unsigned NOT NULL DEFAULT '1' COMMENT '是否虚拟,0表示否,1表示是',
`real_ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '宿主机ip',
`service_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
`fault_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '故障次数',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`warn` tinyint(255) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用报警,0不启用,1启用',
`available` tinyint(255) NOT NULL COMMENT '表示机器是否可用,1表示可用,0表示不可用;',
`groupId` int(11) NOT NULL DEFAULT '0' COMMENT '机器分组,默认为0,表示原生资源,非0表示外部提供的资源(可扩展)',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '0原生 1 其他',
`extra_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '对于机器的额外说明(例如机器安装的其他服务(web,mysql,queue等等))',
`collect` int(11) DEFAULT '1' COMMENT 'switch of collect server status, 1:open, 0:close',
`version_install` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '机器安装redis版本状态',
`use_type` tinyint(4) DEFAULT '2' COMMENT '使用类型:Redis专用机器(0),Redis测试机器(1),混合部署机器(2),Redis-Sentinel机器(3)',
`k8s_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否k8s容器:0:不是 1:是',
`rack` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '机器所在机架信息',
`is_allocating` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否在分配中,1是0否',
`disk` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '磁盘空间:G',
`dis_type` tinyint(4) DEFAULT 0 NOT NULL COMMENT '操作系统发行版本,0:centos;1:ubuntu',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='机器信息表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_relation`
--
DROP TABLE IF EXISTS `machine_relation`;
CREATE TABLE `machine_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ip` varchar(64) NOT NULL COMMENT '虚拟机ip',
`real_ip` varchar(64) NOT NULL COMMENT '宿主机ip',
`extra_desc` varchar(128) DEFAULT NULL COMMENT '实例描述信息',
`status` int(255) NOT NULL COMMENT '实例变更状态 0:offline ,1:online',
`is_sync` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据同步状态 0: 未同步数据 -1:同步中 1:数据已同步 -2:同步失败 ',
`sync_time` timestamp NULL DEFAULT NULL COMMENT '同步时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'pod最后更新时间',
`taskid` bigint(11) DEFAULT NULL COMMENT '任务id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `machine_room`
--
DROP TABLE IF EXISTS `machine_room`;
CREATE TABLE `machine_room` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '机房id',
`name` varchar(255) NOT NULL COMMENT '机房名称',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`desc` varchar(255) DEFAULT NULL COMMENT '机房描述信息',
`ip_network` varchar(32) NOT NULL DEFAULT '' COMMENT '机房网段信息',
`operator` varchar(255) DEFAULT NULL COMMENT '运营商',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `machine_room`
-- ----------------------------
BEGIN;
INSERT INTO `machine_room` VALUES ('1', '阿里云杭州', '1', '阿里云-杭州机房', '172.27.*.*', '阿里云');
COMMIT;
--
-- Table structure for table `machine_statistics`
--
DROP TABLE IF EXISTS `machine_statistics`;
CREATE TABLE `machine_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`host_id` bigint(20) NOT NULL COMMENT '机器id',
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`cpu_usage` varchar(120) NOT NULL COMMENT 'cpu使用率',
`load` varchar(120) NOT NULL COMMENT '机器负载',
`traffic` varchar(120) NOT NULL COMMENT 'io网络流量',
`memory_usage_ratio` varchar(120) NOT NULL COMMENT '内存使用率',
`memory_free` varchar(120) NOT NULL COMMENT '内存剩余',
`memory_total` varchar(120) NOT NULL COMMENT '总内存量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`max_memory` int(11) DEFAULT '0' COMMENT '机器分配内存,单位MB',
`instance_count` int(11) DEFAULT '0' COMMENT '机器实例数量',
`machine_memory` int(11) DEFAULT '0' COMMENT '机器入库总内存,单位MB',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_ip` (`ip`),
KEY `host_id` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器状态统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_BLOB_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`BLOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_CALENDARS`
--
DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `QRTZ_CALENDARS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`CALENDAR_NAME` varchar(200) NOT NULL COMMENT 'calendar名称',
`CALENDAR` blob NOT NULL COMMENT 'calendar信息',
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='以 Blob 类型存储 Quartz 的 Calendar 信息' /* `compression`='tokudb_zlib' */;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `QRTZ_CRON_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
CREATE TABLE `QRTZ_CRON_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`TRIGGER_NAME` varchar(200) NOT NULL COMMENT 'trigger名',
`TRIGGER_GROUP` varchar(200) NOT NULL COMMENT 'trigger组',
`CRON_EXPRESSION` varchar(120) NOT NULL COMMENT 'cron表达式',
`TIME_ZONE_ID` varchar(80) DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储 Cron Trigger,包括 Cron 表达式和时区信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_FIRED_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`ENTRY_ID` varchar(195) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL,
`FIRED_TIME` bigint(13) NOT NULL,
`SCHED_TIME` bigint(13) NOT NULL,
`PRIORITY` int(11) NOT NULL,
`STATE` varchar(16) NOT NULL,
`JOB_NAME` varchar(200) DEFAULT NULL,
`JOB_GROUP` varchar(200) DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL COMMENT '是否非并行执行',
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL COMMENT '是否持久化',
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已触发的 Trigger相关的状态信息,以及关联 Job 的执行信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_JOB_DETAILS`
--
DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
CREATE TABLE `QRTZ_JOB_DETAILS` (
`SCHED_NAME` varchar(120) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) NOT NULL,
`IS_DURABLE` varchar(1) NOT NULL COMMENT '是否持久化,0不持久化,1持久化',
`IS_NONCONCURRENT` varchar(1) NOT NULL COMMENT '是否非并发,0非并发,1并发',
`IS_UPDATE_DATA` varchar(1) NOT NULL,
`REQUESTS_RECOVERY` varchar(1) NOT NULL COMMENT '是否可恢复,0不恢复,1恢复',
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储每一个已配置的 Job 的详细信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_LOCKS`
--
DROP TABLE IF EXISTS `QRTZ_LOCKS`;
CREATE TABLE `QRTZ_LOCKS` (
`SCHED_NAME` varchar(120) NOT NULL,
`LOCK_NAME` varchar(40) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储程序的悲观锁的信息(假如使用了悲观锁)' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_PAUSED_TRIGGER_GRPS`
--
DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已暂停的 Trigger 组的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SCHEDULER_STATE`
--
DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
CREATE TABLE `QRTZ_SCHEDULER_STATE` (
`SCHED_NAME` varchar(120) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL COMMENT '执行quartz实例的主机名',
`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT '实例将状态报告给集群中的其它实例的上一次时间',
`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT '实例间状态报告的时间频率',
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储少量的有关 Scheduler 的状态信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPLE_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`REPEAT_COUNT` bigint(7) NOT NULL COMMENT '重复次数',
`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT '重复间隔',
`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT '已出发次数',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储简单的 Trigger,包括重复次数,间隔,以及已触的次数' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPROP_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`STR_PROP_1` varchar(512) DEFAULT NULL,
`STR_PROP_2` varchar(512) DEFAULT NULL,
`STR_PROP_3` varchar(512) DEFAULT NULL,
`INT_PROP_1` int(11) DEFAULT NULL,
`INT_PROP_2` int(11) DEFAULT NULL,
`LONG_PROP_1` bigint(20) DEFAULT NULL,
`LONG_PROP_2` bigint(20) DEFAULT NULL,
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
CREATE TABLE `QRTZ_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
`PRIORITY` int(11) DEFAULT NULL,
`TRIGGER_STATE` varchar(16) NOT NULL,
`TRIGGER_TYPE` varchar(8) NOT NULL,
`START_TIME` bigint(13) NOT NULL,
`END_TIME` bigint(13) DEFAULT NULL,
`CALENDAR_NAME` varchar(200) DEFAULT NULL,
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已配置的 Trigger 的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`host` varchar(255) DEFAULT NULL COMMENT 'host',
`nmon` varchar(255) DEFAULT NULL COMMENT 'nmon version',
`cpus` tinyint(4) DEFAULT NULL COMMENT 'logic cpu num',
`cpu_model` varchar(255) DEFAULT NULL COMMENT 'cpu 型号',
`dist` varchar(255) DEFAULT NULL COMMENT '发行版信息',
`kernel` varchar(255) DEFAULT NULL COMMENT '内核信息',
`ulimit` varchar(255) DEFAULT NULL COMMENT 'ulimit -n,ulimit -u',
`updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `server_stat`
--
DROP TABLE IF EXISTS `server_stat`;
CREATE TABLE `server_stat` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`cdate` date NOT NULL COMMENT '数据收集天',
`ctime` char(4) NOT NULL COMMENT '数据收集小时分钟',
`cuser` float DEFAULT NULL COMMENT '用户态占比',
`csys` float DEFAULT NULL COMMENT '内核态占比',
`cwio` float DEFAULT NULL COMMENT 'wio占比',
`c_ext` text COMMENT '子cpu占比',
`cload1` float DEFAULT NULL COMMENT '1分钟load',
`cload5` float DEFAULT NULL COMMENT '5分钟load',
`cload15` float DEFAULT NULL COMMENT '15分钟load',
`mtotal` float DEFAULT NULL COMMENT '总内存,单位M',
`mfree` float DEFAULT NULL COMMENT '空闲内存',
`mcache` float DEFAULT NULL COMMENT 'cache',
`mbuffer` float DEFAULT NULL COMMENT 'buffer',
`mswap` float DEFAULT NULL COMMENT 'cache',
`mswap_free` float DEFAULT NULL COMMENT 'cache',
`nin` float DEFAULT NULL COMMENT '网络入流量 单位K/s',
`nout` float DEFAULT NULL COMMENT '网络出流量 单位k/s',
`nin_ext` text COMMENT '各网卡入流量详情',
`nout_ext` text COMMENT '各网卡出流量详情',
`tuse` int(11) DEFAULT NULL COMMENT 'tcp estab连接数',
`torphan` int(11) DEFAULT NULL COMMENT 'tcp orphan连接数',
`twait` int(11) DEFAULT NULL COMMENT 'tcp time wait连接数',
`dread` float DEFAULT NULL COMMENT '磁盘读速率 单位K/s',
`dwrite` float DEFAULT NULL COMMENT '磁盘写速率 单位K/s',
`diops` float DEFAULT NULL COMMENT '磁盘io速率 交互次数/s',
`dbusy` float DEFAULT NULL COMMENT '磁盘io带宽使用百分比',
`d_ext` text COMMENT '磁盘各分区占比',
`dspace` text COMMENT '磁盘各分区空间使用率',
PRIMARY KEY (`ip`,`cdate`,`ctime`),
KEY `idx_cdate` (`cdate`),
KEY `idx_cdate_ctime` (`cdate`,`ctime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `system_config`
--
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
`config_key` varchar(255) NOT NULL COMMENT '配置key',
`config_value` varchar(512) NOT NULL COMMENT '配置value',
`info` varchar(255) NOT NULL COMMENT '配置说明',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`order_id` int(11) NOT NULL COMMENT '顺序',
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `system_config`
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES ('cachecloud.admin.user.name','admin','cachecloud-admin用户名',1,11),('cachecloud.admin.user.password','admin','cachelcoud-admin密码',1,12),('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,33),('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,31),('cachecloud.contact','user1:(xx@zz.com, user1:135xxxxxxxx)
user2: (user2@zz.com, user2:138xxxxxxxx)','值班联系人信息',1,14),('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,22),('cachecloud.email.alert.interface','','邮件报警接口(参考报警接口规范)',1,24),('cachecloud.machine.ssh.name','cachecloud-open','机器ssh用户名',1,2),('cachecloud.machine.ssh.password','cachecloud-open','机器ssh密码',1,3),('cachecloud.machine.ssh.port','22','机器ssh端口',1,10),('cachecloud.machine.stats.cron.minute','1','机器性能统计周期(分钟)',1,35),('cachecloud.nmon.dir','/opt/cachecloud','nmon安装目录',1,32),('cachecloud.owner.email','xx@sohu.com,yy@qq.com','邮件报警(逗号隔开)',1,21),('cachecloud.owner.phone','xxx,yyy','手机号报警(逗号隔开)',1,21),('cachecloud.owner.weChat','xxx,yyy','微信号报警(逗号隔开)',1,21),('cachecloud.public.key.pem','/opt/ssh/id_rsa','密钥路径',1,5),('cachecloud.public.user.name','cachecloud-open','公钥用户名',1,4),('cachecloud.ssh.auth.type','1','ssh授权方式',1,1),('cachecloud.superAdmin','admin,xx,yy','超级管理员组',1,13),('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,22),('cachecloud.weChat.alert.interface','','微信报警接口(参考报警接口规范)',1,23),('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,34),('machine.load.alert.ratio','8.0','机器负载报警阀值',1,32);
COMMIT;
-- ----------------------------
-- Table structure for `system_resource`
-- ----------------------------
DROP TABLE IF EXISTS `system_resource`;
CREATE TABLE `system_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '资源ID',
`name` varchar(64) NOT NULL COMMENT '资源名称',
`intro` varchar(255) DEFAULT NULL COMMENT '资源说明',
`type` tinyint(4) NOT NULL COMMENT '1:仓库地址 2:脚本 3:资源包 4:公钥/私钥 6:目录管理 7:迁移工具管理',
`lastmodify` datetime DEFAULT NULL COMMENT '最后更新时间',
`dir` varchar(128) DEFAULT NULL COMMENT '资源路径',
`url` varchar(128) DEFAULT NULL COMMENT '仓库地址',
`ispush` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:未推送 1:已推送',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`username` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`task_id` bigint(11) DEFAULT NULL COMMENT '迁移任务id',
`compile_info` varchar(255) DEFAULT NULL COMMENT '编译信息',
`order_num` int(6) NOT NULL DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `system_resource`
-- ----------------------------
BEGIN;
INSERT INTO `system_resource` VALUES (1,'cachecloud-init.sh','容器初始化脚本',2,'2020-07-15 18:35:41','/script','',0,1,NULL,NULL,NULL,0),(2,'x.x.x.x',NULL,1,'2020-08-10 10:31:51','/opt/download/software/cachecloud/resource','http://x.x.x.x/software/cachecloud/resource',0,1,'admin',0,NULL,0),(4,'cachecloud-env.sh','宿主环境脚本',2,'2020-07-15 18:36:28','/script','',0,1,NULL,NULL,NULL,0),(5,'id_rsa','私钥文件',4,'2020-07-07 10:45:39','/ssh','',0,1,NULL,NULL,NULL,0),(6,'id_rsa.pub','公钥文件',4,'2020-07-07 10:45:45','/ssh','',0,1,NULL,NULL,NULL,0),(12,'redis-4.0.14','redis 4.0.14资源包',3,'2020-08-10 09:52:41','/redis','http://download.redis.io/releases/redis-4.0.14.tar.gz',0,1,'admin',532,NULL,0),(21,'/script','脚本目录管理',6,'2020-08-10 10:51:34','',NULL,0,1,'admin',0,NULL,0),(28,'/ssh','ssh目录',6,'2020-07-20 17:55:03',NULL,NULL,0,1,'admin',0,NULL,0),(29,'redis-3.0.7','redis3.0.7 资源包',3,'2020-08-10 09:53:32','/redis','http://download.redis.io/releases/redis-3.0.7.tar.gz',0,1,'admin',529,NULL,0),(31,'redis-3.2.12','redis 3.2.12 资源包',3,'2020-08-10 15:08:21','/redis','http://download.redis.io/releases/redis-3.2.12.tar.gz',0,1,'admin',530,NULL,0),(32,'/redis','redis资源包管理',6,'2020-07-20 17:54:59',NULL,NULL,0,1,'admin',0,NULL,0),(33,'/tool','迁移工具资源包',6,'2020-07-20 17:54:53',NULL,NULL,0,1,'admin',0,NULL,0),(37,'redis-5.0.9','redis5.0.9 资源包',3,'2020-08-10 09:51:41','/redis','http://download.redis.io/releases/redis-5.0.9.tar.gz',0,1,'admin',533,NULL,0),(40,'redis-shake-2.0.3','redis 2.0.3\n修复fix 5.0迁移类型问题',7,'2020-08-11 10:53:26','/tool','https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz',0,1,'admin',518,NULL,0);
COMMIT;
--
-- Table structure for table `task_queue`
--
DROP TABLE IF EXISTS `task_queue`;
CREATE TABLE `task_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`important_info` varchar(255) NOT NULL DEFAULT '' COMMENT '重要信息',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`param` longtext NOT NULL COMMENT '任务参数(json):随着任务变化',
`init_param` longtext NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2中断,3失败',
`parent_task_id` bigint(20) NOT NULL COMMENT '父任务id',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`error_code` int(11) NOT NULL COMMENT '错误代码',
`error_msg` varchar(255) NOT NULL COMMENT '错误消息',
`task_note` varchar(255) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
--
-- Table structure for table `task_step_flow`
--
DROP TABLE IF EXISTS `task_step_flow`;
CREATE TABLE `task_step_flow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`task_id` bigint(20) NOT NULL COMMENT '任务id',
`child_task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '子任务id',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`order_no` int(11) NOT NULL COMMENT '序号',
`status` tinyint(4) NOT NULL COMMENT '状态:0未开始、1成功、2中断、3跳过、4失败',
`log` text COMMENT '日志',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_class_step` (`task_id`,`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤流表';
--
-- Table structure for table `task_step_meta`
--
DROP TABLE IF EXISTS `task_step_meta`;
CREATE TABLE `task_step_meta` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`step_desc` varchar(255) NOT NULL COMMENT '步骤描述',
`ops_device` varchar(255) NOT NULL COMMENT '运维建议',
`timeout` int(11) NOT NULL COMMENT '超时时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`order_no` int(11) NOT NULL COMMENT '序号',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_class_step` (`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤元数据表';
/*!40101 SET character_set_client = @saved_cs_client */;
-- ----------------------------
-- Table structure for `standard_statistics`
-- ----------------------------
DROP TABLE IF EXISTS `standard_statistics`;
CREATE TABLE `standard_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`info_json` text NOT NULL COMMENT '收集的json数据',
`diff_json` text NOT NULL COMMENT '上一次收集差异的json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`cluster_info_json` varchar(20480) NOT NULL DEFAULT '' COMMENT '收集的cluster info json数据',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_create_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_alert_record`
--
DROP TABLE IF EXISTS `app_alert_record`;
CREATE TABLE `app_alert_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`visible_type` int(1) NOT NULL COMMENT '可见类型(0:均可见;1:仅管理员可见;)',
`important_level` int(1) NOT NULL COMMENT '重要类型(0:一般;1:重要;2:紧急)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`app_id` bigint(20) DEFAULT NULL COMMENT 'app id',
`instance_id` bigint(20) DEFAULT NULL COMMENT '实例id',
`ip` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '机器ip',
`port` int(10) DEFAULT NULL COMMENT '端口号',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '报警标题',
`content` varchar(500) COLLATE utf8_bin NOT NULL COMMENT '报警内容',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`),
KEY `ip` (`ip`),
KEY `idx_inst_id` (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警记录表';
--
-- Table structure for table `config_restart_record`
--
DROP TABLE IF EXISTS `config_restart_record`;
CREATE TABLE `config_restart_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`app_name` varchar(36) NOT NULL COMMENT '应用名称',
`operate_type` char(1) NOT NULL COMMENT '操作类型(0:滚动重启,1:修改配置强制重启;2:修改配置)',
`param` varchar(2000) NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2成功,3失败,4配置修改待重启',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`log` longtext COMMENT '日志信息',
`user_name` varchar(64) DEFAULT NULL COMMENT '操作人员姓名',
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`instances` varchar(1000) DEFAULT NULL COMMENT '涉及实例id列表的json格式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='重启记录表';
--
-- Table structure for table `module_info`
--
DROP TABLE IF EXISTS `module_info`;
CREATE TABLE `module_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`git_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'git resource',
`info` varchar(128) DEFAULT NULL COMMENT '模块信息说明',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
PRIMARY KEY (`id`),
UNIQUE KEY `NAMEKEY` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块信息表';
--
-- Table structure for table `module_version`
--
DROP TABLE IF EXISTS `module_version`;
CREATE TABLE `module_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module_id` int(11) NOT NULL,
`version_id` int(11) NOT NULL COMMENT '关联版本号',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`so_path` varchar(255) DEFAULT NULL COMMENT '编译后so库的地址',
`tag` varchar(64) NOT NULL COMMENT '模块版本号',
`status` int(255) NOT NULL DEFAULT '0' COMMENT '是否可用(关联so地址):0 不可用 1:可用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redis模块版本管理表';
--
-- Table structure for table `app_import`
--
DROP TABLE IF EXISTS `app_import`;
CREATE TABLE `app_import` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '目标应用id',
`instance_info` text COMMENT '源redis实例信息',
`redis_password` varchar(200) DEFAULT NULL COMMENT '源redis密码',
`status` int(11) DEFAULT NULL COMMENT '迁移状态:PREPARE(0, "准备", "应用导入-未开始"), START(1, "进行中...", "应用导入-开始"), ERROR(2, "error", "应用导入-出错"), VERSION_BUILD_START(11, "进行中...", "新建redis版本-进行中"), VERSION_BUILD_ERROR(12, "error", "新建redis版本-出错"), VERSION_BUILD_END(20, "成功", "新建redis版本-完成"), APP_BUILD_INIT(21, "准备就绪", "新建redis应用-准备就绪"), APP_BUILD_START(22, "进行中...", "新建redis应用-进行中"), APP_BUILD_ERROR(23, "error", "新建redis应用-出错"), APP_BUILD_END(30, "成功", "新建redis应用-完成"), MIGRATE_INIT(31, "准备就绪", "数据迁移-准备就绪"), MIGRATE_START(32, "进行中...", "数据迁移-进行中"), MIGRATE_ERROR(33, "error", "数据迁移-出错"), MIGRATE_END(3, "成功", "应用导入-成功")',
`step` int(11) DEFAULT NULL COMMENT '导入阶段',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`migrate_id` bigint(20) DEFAULT NULL COMMENT '数据迁移id',
`mem_size` int(11) DEFAULT NULL COMMENT '目标应用内存大小,单位G',
`redis_version_name` varchar(20) DEFAULT NULL COMMENT '目标应用redis版本,格式:redis-x.x.x',
`app_build_task_id` bigint(20) DEFAULT NULL COMMENT '目标应用部署任务id',
`source_type` int(11) DEFAULT NULL COMMENT '源redis类型:7:cluster, 6:sentinel, 5:standalone',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- redis_module_config definition
CREATE TABLE `redis_module_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Module version版本表主键id',
`refresh` tinyint(4) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
`module_id` int(11) NOT NULL DEFAULT '7' COMMENT 'Module 信息表id',
`config_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配置类型,0:加载和运行配置;1:加载时配置;2:运行时配置',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='redis模块配置表';
-- app_to_module definition
CREATE TABLE `app_to_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`module_id` int(11) NOT NULL COMMENT '模块info id',
`module_version_id` int(11) NOT NULL COMMENT '模块版本id',
PRIMARY KEY (`id`),
UNIQUE KEY `app_to_module_un` (`app_id`,`module_id`,`module_version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='应用与模块关系表';
================================================
FILE: cachecloud-web/sql/3.3.sql
================================================
-- MySQL dump 10.15
-- Database: cachecloud_open
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
--
-- Table structure for table `app_audit`
--
DROP TABLE IF EXISTS `app_audit`;
CREATE TABLE `app_audit` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '申请人的id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`type` tinyint(4) NOT NULL COMMENT '申请类型:0:申请应用,1:应用扩容,2:修改配置',
`param1` varchar(600) DEFAULT NULL COMMENT '预留参数1',
`param2` varchar(600) DEFAULT NULL COMMENT '预留参数2',
`param3` varchar(600) DEFAULT NULL COMMENT '预留参数3',
`info` varchar(360) NOT NULL COMMENT '申请描述',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:等待审批; 1:审批通过; -1:驳回',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refuse_reason` varchar(360) DEFAULT NULL COMMENT '驳回理由',
`task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '任务id',
`operate_id` bigint(20) DEFAULT NULL COMMENT '工单处理人',
PRIMARY KEY (`id`),
KEY `idx_appid` (`app_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_status_create_time` (`status`,`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用审核表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_audit_log`
--
DROP TABLE IF EXISTS `app_audit_log`;
CREATE TABLE `app_audit_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`user_id` bigint(20) NOT NULL COMMENT '审批操作人id',
`info` longtext NOT NULL COMMENT 'app审批的详细信息',
`type` tinyint(4) NOT NULL,
`create_time` datetime NOT NULL,
`app_audit_id` bigint(20) NOT NULL COMMENT '审批id',
PRIMARY KEY (`id`),
KEY `idx_audit_appid` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app审核日志表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_client_command_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_command_minute_statistics`;
CREATE TABLE `app_client_command_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`command` varchar(20) NOT NULL COMMENT '命令明文',
`cost` bigint(20) DEFAULT NULL COMMENT '命令累计毫秒耗时',
`bytes_in` bigint(20) DEFAULT NULL COMMENT '输入流量',
`bytes_out` bigint(20) DEFAULT NULL COMMENT '输出流量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx__appid_client_command_currentMin` (`app_id`,`client_ip`,`command`,`current_min`),
KEY `idx_currentmin_appid_count_cost` (`current_min`,`app_id`,`count`,`cost`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟命令调用上报数据';
--
-- Table structure for table `app_client_exception_minute_statistics`
--
DROP TABLE IF EXISTS `app_client_exception_minute_statistics`;
CREATE TABLE `app_client_exception_minute_statistics` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`current_min` bigint(20) NOT NULL COMMENT '统计时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip',
`type` tinyint(4) NOT NULL COMMENT '0:connect exception;1:command exception',
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`node` varchar(30) NOT NULL COMMENT '节点信息host:port',
`count` bigint(20) DEFAULT NULL COMMENT '累计连接失败次数',
`cost` bigint(20) DEFAULT NULL COMMENT '累计连接失败毫秒耗时',
`latency_commands` varchar(255) DEFAULT NULL COMMENT '统计命令topN id,逗号分隔',
`redis_pool_config` varchar(255) DEFAULT NULL COMMENT 'redis连接池配置信息',
PRIMARY KEY (`id`),
UNIQUE KEY `idx__client_node_type_currentMin` (`client_ip`,`node`,`type`,`current_min`),
KEY `idx_appid_current_min` (`app_id`,`current_min`),
KEY `idx_current_min` (`current_min`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端每分钟异常上报数据';
--
-- Table structure for table `app_client_latency_command`
--
DROP TABLE IF EXISTS `app_client_latency_command`;
CREATE TABLE `app_client_latency_command` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`command` varchar(255) NOT NULL COMMENT '命令明文',
`size` bigint(20) DEFAULT NULL COMMENT '参数长度',
`args` varchar(255) DEFAULT NULL COMMENT '裁剪后参数明文',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`invoke_time` bigint(20) DEFAULT NULL COMMENT '命令调用时间戳',
PRIMARY KEY (`id`),
KEY `idx_createtime` (`create_time`),
KEY `idx_command` (`command`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端异常命令调用详情';
--
-- Table structure for table `app_client_statistic_gather`
--
DROP TABLE IF EXISTS `app_client_statistic_gather`;
CREATE TABLE `app_client_statistic_gather` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gather_time` varchar(20) NOT NULL COMMENT '统计时间,格式yyyy-mm-dd',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`cmd_count` bigint(20) DEFAULT '0' COMMENT '命令调用次数',
`conn_exp_count` bigint(20) DEFAULT '0' COMMENT '连接异常次数',
`avg_cmd_cost` double DEFAULT '0' COMMENT '命令调用平均耗时,单位毫秒',
`avg_cmd_exp_cost` double DEFAULT '0' COMMENT '命令超时平均耗时,单位毫秒',
`avg_conn_exp_cost` double DEFAULT '0' COMMENT '连接异常平均耗时,单位毫秒',
`cmd_exp_count` bigint(20) DEFAULT '0' COMMENT '命令超时次数',
`instance_count` int(11) DEFAULT NULL COMMENT '应用实例数',
`avg_mem_frag_ratio` double DEFAULT NULL COMMENT '平均碎片率',
`mem_used_ratio` double DEFAULT NULL COMMENT '内存使用率',
`exception_count` bigint(20) DEFAULT '0' COMMENT '异常数(旧,待下线)',
`slow_log_count` bigint(20) DEFAULT '0' COMMENT '慢查询次数',
`latency_count` bigint(20) DEFAULT '0' COMMENT '延迟事件次数',
`object_size` bigint(20) DEFAULT '0' COMMENT '存储对象数',
`used_memory` bigint(20) DEFAULT '0' COMMENT '内存占用 byte',
`used_memory_rss` bigint(20) DEFAULT '0' COMMENT '物理内存占用 byte',
`max_cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗(单位:秒)',
`max_cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗(单位:秒)',
`connected_clients` bigint(20) DEFAULT '0' COMMENT '应用客户端连接数',
`topology_exam_result` tinyint(4) DEFAULT NULL COMMENT '拓扑诊断结果,0:正常,1:异常',
`used_disk` bigint(20) DEFAULT '0' COMMENT '磁盘占用byte',
`server_cmd_count` bigint(20) NOT NULL DEFAULT '0' COMMENT 'server端统计的命令调用次数',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_appid_gathertime` (`app_id`,`gather_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报数据全天统计';
--
-- Table structure for table `app_client_version_statistic`
--
DROP TABLE IF EXISTS `app_client_version_statistic`;
CREATE TABLE `app_client_version_statistic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`client_ip` varchar(20) NOT NULL COMMENT '客户端ip地址',
`client_version` varchar(20) NOT NULL COMMENT '客户端版本',
`report_time` datetime DEFAULT NULL COMMENT '上报时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_client_ip` (`app_id`,`client_ip`),
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户端上报版本信息统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_daily`
--
DROP TABLE IF EXISTS `app_daily`;
CREATE TABLE `app_daily` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`date` date NOT NULL COMMENT '日期',
`create_time` datetime NOT NULL,
`slow_log_count` bigint(20) NOT NULL COMMENT '慢查询个数',
`client_exception_count` bigint(20) NOT NULL COMMENT '客户端异常个数',
`max_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟最大客户端连接数',
`avg_minute_client_count` bigint(20) NOT NULL COMMENT '每分钟平均客户端连接数',
`max_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟最大命令数',
`avg_minute_command_count` bigint(20) NOT NULL COMMENT '每分钟平均命令数',
`avg_hit_ratio` double NOT NULL COMMENT '平均命中率',
`min_minute_hit_ratio` double NOT NULL COMMENT '每分钟最小命中率',
`max_minute_hit_ratio` double NOT NULL COMMENT '每分钟最大命中率',
`avg_used_memory` bigint(20) NOT NULL COMMENT '最大内存使用量',
`max_used_memory` bigint(20) NOT NULL COMMENT '平均内存使用量',
`expired_keys_count` bigint(20) NOT NULL COMMENT '过期键个数',
`evicted_keys_count` bigint(20) NOT NULL COMMENT '剔除键个数',
`avg_minute_net_input_byte` double NOT NULL COMMENT '每分钟平均网络input量',
`max_minute_net_input_byte` double NOT NULL COMMENT '每分钟最大网络input量',
`avg_minute_net_output_byte` double NOT NULL COMMENT '每分钟平均网络output量',
`max_minute_net_output_byte` double NOT NULL COMMENT '每分钟最大网络output量',
`avg_object_size` bigint(20) NOT NULL COMMENT '键个数平均值',
`max_object_size` bigint(20) NOT NULL COMMENT '键个数最大值',
`big_key_times` bigint(20) NOT NULL COMMENT 'bigkey次数',
`big_key_info` varchar(512) COLLATE utf8_bin NOT NULL COMMENT 'bigkey详情',
`client_cmd_count` bigint(20) NOT NULL COMMENT '累计命令调用次数',
`client_avg_cmd_cost` double NOT NULL COMMENT '平均命令调用耗时',
`client_conn_exp_count` bigint(20) NOT NULL COMMENT '累计连接异常事件次数',
`client_avg_conn_exp_cost` double NOT NULL COMMENT '平均连接异常事件耗时',
`client_cmd_exp_count` bigint(20) NOT NULL COMMENT '累计命令超时事件次数',
`client_avg_cmd_exp_cost` double NOT NULL COMMENT '平均命令超时事件耗时',
`avg_used_disk` bigint(20) NOT NULL COMMENT '平均磁盘使用量',
`max_used_disk` bigint(20) NOT NULL COMMENT '最大磁盘使用量',
PRIMARY KEY (`id`),
KEY `idx_appid_date` (`app_id`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='app日报';
--
-- Table structure for table `app_data_migrate_status`
--
DROP TABLE IF EXISTS `app_data_migrate_status`;
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int(11) NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
`end_time` datetime DEFAULT NULL COMMENT '迁移结束执行时间',
`log_path` varchar(255) NOT NULL COMMENT '日志文件路径',
`config_path` varchar(255) NOT NULL COMMENT '配置文件路径',
`migrate_id` varchar(50) DEFAULT NULL COMMENT 'migrate id',
`migrate_tool` tinyint(4) DEFAULT NULL COMMENT 'migrate_tool, 0:redis-shake,1:redis-migrate-tool',
`redis_source_version` varchar(20) DEFAULT NULL,
`redis_target_version` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用迁移记录详情';
--
-- Table structure for table `app_desc`
--
DROP TABLE IF EXISTS `app_desc`;
CREATE TABLE `app_desc` (
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用id',
`name` varchar(36) NOT NULL COMMENT '应用名',
`user_id` bigint(20) NOT NULL COMMENT '申请人id',
`status` tinyint(4) NOT NULL COMMENT '应用状态, 0未分配,1申请未审批,2审批并发布 3:应用下线',
`intro` varchar(255) NOT NULL COMMENT '应用描述',
`create_time` datetime NOT NULL COMMENT '创建时间',
`passed_time` datetime NOT NULL COMMENT '审批通过时间',
`type` int(10) NOT NULL DEFAULT '0' COMMENT 'cache类型,1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud ,5. redis-sentinel ,6.redis-standalone ',
`officer` varchar(32) NOT NULL COMMENT '负责人,中文',
`ver_id` int(11) NOT NULL COMMENT '版本',
`is_test` tinyint(4) DEFAULT '0' COMMENT '是否测试:1是0否',
`need_persistence` tinyint(4) DEFAULT '1' COMMENT '是否需要持久化: 1是0否',
`need_hot_back_up` tinyint(4) DEFAULT '1' COMMENT '是否需要热备: 1是0否',
`has_back_store` tinyint(4) DEFAULT '1' COMMENT '是否有后端数据源: 1是0否',
`forecase_qps` int(11) DEFAULT NULL COMMENT '预估qps',
`forecast_obj_num` int(11) DEFAULT NULL COMMENT '预估条目数',
`mem_alert_value` int(11) DEFAULT NULL COMMENT '内存报警阀值',
`client_machine_room` varchar(36) DEFAULT NULL COMMENT '客户端机房信息',
`client_conn_alert_value` int(11) DEFAULT '2000' COMMENT '客户端连接报警阀值',
`app_key` varchar(255) DEFAULT NULL COMMENT '应用秘钥',
`important_level` tinyint(4) NOT NULL DEFAULT '2' COMMENT '应用级别,1:最重要,2:一般重要,3:一般',
`password` varchar(255) DEFAULT '' COMMENT 'redis密码',
`custom_password` varchar(255) DEFAULT NULL COMMENT '自定义密码',
`hit_precent_alert_value` int(11) DEFAULT '0' COMMENT '命中率报警阀值 0:不报警 ',
`is_access_monitor` int(11) DEFAULT '0' COMMENT '是否接入全局监控报警 默认0,0:不接入监控 1:接入监控',
`app_fsync_value` int(11) DEFAULT '1' COMMENT '应用刷盘策略 1:主从节点appdendfsync=everysec 2:主从节点 appdendfsync=no',
`version_id` int(11) NOT NULL DEFAULT '1' COMMENT 'Redis版本表主键id',
`maxmemory_policy` tinyint(4) DEFAULT NULL COMMENT '淘汰策略(0:noeviction; 1:allkeys-lru;2:allkeys-lfu;3:volatile-lru;4:volatile-lfu;5:allkeys-random;6:volatile-random;7:volatile-ttl)',
`persistence_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '持久化类型(0:常规;1:主aof自动刷盘;从常规;2:主关闭aof,从常规)',
PRIMARY KEY (`app_id`),
UNIQUE KEY `uidx_app_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='app应用描述' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_command_statistics`
--
DROP TABLE IF EXISTS `app_hour_command_statistics`;
CREATE TABLE `app_hour_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHH',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`command_name`,`collect_time`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每小时命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_hour_statistics`
--
DROP TABLE IF EXISTS `app_hour_statistics`;
CREATE TABLE `app_hour_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHH',
`hits` bigint(20) NOT NULL COMMENT '每小时命中数量和',
`misses` bigint(20) NOT NULL COMMENT '每小时未命中数量和',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '每小时内存占用最大值',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '每小时过期key数量和',
`evicted_keys` bigint(20) NOT NULL COMMENT '每小时驱逐key数量和',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '每小时客户端连接数最大值',
`object_size` bigint(20) NOT NULL COMMENT '每小时存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '每小时参与累加实例数最小值',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '每小时修改时间最大值',
`used_disk` bigint(20) NOT NULL DEFAULT '0' COMMENT '磁盘占用(字节)',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用统计数据每小时统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_command_statistics`
--
DROP TABLE IF EXISTS `app_minute_command_statistics`;
CREATE TABLE `app_minute_command_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '统计时间:格式yyyyMMddHHmm',
`command_name` varchar(60) NOT NULL COMMENT '命令名称',
`command_count` bigint(20) NOT NULL COMMENT '命令执行次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`),
KEY `idx_create_time` (`create_time`),
KEY `idx_modify_time` (`modify_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用的每分钟命令统计' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_minute_statistics`
--
DROP TABLE IF EXISTS `app_minute_statistics`;
CREATE TABLE `app_minute_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`hits` bigint(20) NOT NULL COMMENT '命中数量',
`misses` bigint(20) NOT NULL COMMENT '未命中数量',
`command_count` bigint(20) DEFAULT '0' COMMENT '命令总数',
`used_memory` bigint(20) NOT NULL COMMENT '内存占用',
`used_memory_rss` bigint(20) NOT NULL DEFAULT '0' COMMENT '物理内存占用',
`expired_keys` bigint(20) NOT NULL COMMENT '过期key数量',
`evicted_keys` bigint(20) NOT NULL COMMENT '驱逐key数量',
`net_input_byte` bigint(20) DEFAULT '0' COMMENT '网络输入字节',
`net_output_byte` bigint(20) DEFAULT '0' COMMENT '网络输出字节',
`connected_clients` int(10) NOT NULL COMMENT '客户端连接数',
`object_size` bigint(20) NOT NULL COMMENT '每分钟存储对象数最大值',
`cpu_sys` bigint(20) DEFAULT '0' COMMENT '进程系统态消耗',
`cpu_user` bigint(20) DEFAULT '0' COMMENT '进程用户态消耗',
`cpu_sys_children` bigint(20) DEFAULT '0' COMMENT '子进程系统态消耗',
`cpu_user_children` bigint(20) DEFAULT '0' COMMENT '子进程用户态消耗',
`accumulation` int(10) NOT NULL DEFAULT '0' COMMENT '参与累加实例数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`used_disk` bigint(20) NOT NULL DEFAULT '0' COMMENT '磁盘占用(字节)',
PRIMARY KEY (`id`),
UNIQUE KEY `app_id` (`app_id`,`collect_time`),
KEY `idx_create_time` (`create_time`) USING BTREE,
KEY `idx_modify_time` (`modify_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
--
-- Table structure for table `app_to_user`
--
DROP TABLE IF EXISTS `app_to_user`;
CREATE TABLE `app_to_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `app_user`
--
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '用户名',
`ch_name` varchar(255) NOT NULL COMMENT '中文名',
`email` varchar(64) NOT NULL COMMENT '邮箱',
`mobile` varchar(16) NOT NULL COMMENT '手机',
`type` int(4) NOT NULL DEFAULT '2' COMMENT '0管理员,1预留,2普通用户,-1无效',
`weChat` varchar(32) DEFAULT NULL COMMENT '微信号',
`isAlert` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用户是否接收报警 0:不接收 1:接收',
`password` varchar(64) DEFAULT NULL COMMENT '密码',
`register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
`purpose` varchar(255) DEFAULT NULL COMMENT '使用目的',
`company` varchar(255) DEFAULT NULL COMMENT '公司名称',
`biz_id` bigint(20) DEFAULT NULL COMMENT '所属业务组id(app_biz)',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_user_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表' /* `compression`='tokudb_zlib' */;
-- ----------------------------
-- Records of `app_user`
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1', 'admin', 'admin', 'admin@xxx.com', '13500000000', '0', null, '1', NULL, current_timestamp(), NULL, NULL, NULL);
COMMIT;
--
-- Table structure for table `brevity_schedule_resources`
--
DROP TABLE IF EXISTS `brevity_schedule_resources`;
CREATE TABLE `brevity_schedule_resources` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL COMMENT '类型,见:BrevityScheduleType',
`version` bigint(20) NOT NULL DEFAULT '0' COMMENT '时间版本',
`host` varchar(16) NOT NULL COMMENT '资源ip',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_type_host_port` (`type`,`host`,`port`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短频任务表';
--
-- Table structure for table `diagnostic_task_record`
--
DROP TABLE IF EXISTS `diagnostic_task_record`;
CREATE TABLE `diagnostic_task_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '应用id',
`type` int(11) DEFAULT NULL COMMENT '诊断类型:0scan 1bigkey 2idle key 3hotkey 4del key 5slot analysis 6topology exam',
`task_id` bigint(20) DEFAULT NULL COMMENT '任务流id',
`audit_id` bigint(20) DEFAULT NULL COMMENT '审批id',
`status` int(11) DEFAULT NULL COMMENT '诊断状态:0开始 1结束 2异常',
`cost` bigint(20) DEFAULT NULL COMMENT '耗时,毫秒',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`redis_key` varchar(100) DEFAULT NULL COMMENT '结果的key',
`node` varchar(100) DEFAULT NULL COMMENT '实例,host:port',
`parent_task_id` bigint(20) DEFAULT NULL COMMENT '父任务id',
`diagnostic_condition` varchar(1000) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '诊断条件',
`param1` varchar(100) DEFAULT NULL COMMENT '备用参数1',
`param2` varchar(100) DEFAULT NULL COMMENT '备用参数2',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用诊断记录';
--
-- Table structure for table `instance_alert_configs`
--
DROP TABLE IF EXISTS `instance_alert_configs`;
CREATE TABLE `instance_alert_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`alert_config` varchar(255) NOT NULL COMMENT '报警配置',
`alert_value` varchar(512) NOT NULL COMMENT '报警阀值',
`config_info` varchar(255) NOT NULL COMMENT '配置说明',
`type` tinyint(4) NOT NULL COMMENT '1:全局报警,2:实例报警',
`instance_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '0:全局配置,其他代表实例id',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`compare_type` tinyint(4) NOT NULL COMMENT '比较类型:1小于,2等于,3大于,4不等于',
`check_cycle` tinyint(4) NOT NULL COMMENT '1:一分钟,2:五分钟,3:半小时4:一个小时,5:一天',
`update_time` datetime NOT NULL COMMENT '报警配置更新时间',
`last_check_time` datetime NOT NULL COMMENT '上次检查时间',
`important_level` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '重要程度(0:一般;1:重要;2:紧急)',
`app_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '应用类型(0:redis;)',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`type`,`instance_id`,`alert_config`,`compare_type`,`app_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例报警阀值配置';
-- ----------------------------
-- Records of `instance_alert_configs`
-- ----------------------------
BEGIN;
INSERT INTO `instance_alert_configs` VALUES
('9', 'aof_current_size', '6000', 'aof当前尺寸(单位:MB)', '1', '0', '1', '3', '3', '2017-06-19 09:43:22', '2020-09-17 10:52:00', 0, 0),
('10', 'aof_delayed_fsync', '3', '分钟aof阻塞个数', '1', '0', '1', '3', '1', '2017-06-19 10:38:19', '2020-09-17 11:09:00', 1, 0),
('11', 'client_biggest_input_buf', '10', '输入缓冲区最大buffer大小(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 10:47:03', '2020-09-17 11:09:00', 1, 0),
('12', 'client_longest_output_list', '50000', '输出缓冲区最大队列长度', '1', '0', '1', '3', '1', '2017-06-19 10:55:45', '2020-09-17 11:09:00', 1, 0),
('13', 'instantaneous_ops_per_sec', '60000', '实时ops', '1', '0', '1', '3', '1', '2017-06-19 11:02:38', '2020-09-17 11:09:00', 1, 0),
('14', 'latest_fork_usec', '400000', '上次fork所用时间(单位:微秒)', '1', '0', '1', '3', '5', '2017-06-19 11:21:35', '2020-09-16 16:51:00', 1, 0),
('15', 'mem_fragmentation_ratio', '1.5', '内存碎片率(检测大于500MB)', '1', '0', '1', '3', '5', '2017-06-19 12:49:16', '2020-09-16 16:51:00', 0, 0),
('16', 'rdb_last_bgsave_status', 'ok', '上一次bgsave状态', '1', '0', '1', '4', '4', '2017-06-19 14:15:21', '2020-09-17 10:19:00', 0, 0),
('17', 'total_net_output_bytes', '5000', '分钟网络输出流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:39:44', '2020-09-17 11:09:00', 0, 0),
('19', 'total_net_input_bytes', '1200', '分钟网络输入流量(单位:MB)', '1', '0', '1', '3', '1', '2017-06-19 16:45:44', '2020-09-17 11:09:00', 0, 0),
('20', 'sync_partial_err', '0', '分钟部分复制失败次数', '1', '0', '1', '3', '1', '2017-06-19 18:34:41', '2020-09-17 11:09:00', 1, 0),
('21', 'sync_partial_ok', '0', '分钟部分复制成功次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:01', '2020-09-17 11:09:00', 1, 0),
('22', 'sync_full', '0', '分钟全量复制执行次数', '1', '0', '1', '3', '1', '2017-06-19 18:35:17', '2020-09-17 11:09:00', 1, 0),
('23', 'rejected_connections', '0', '分钟拒绝连接数', '1', '0', '1', '3', '1', '2017-06-19 18:35:36', '2020-09-17 11:09:00', 2, 0),
('54', 'master_slave_offset_diff', '20000000', '主从节点偏移量差(单位:字节)', '1', '0', '1', '3', '2', '2017-06-20 18:58:56', '2020-09-17 11:06:00', 0, 0),
('56', 'cluster_state', 'ok', '集群状态', '1', '0', '1', '4', '1', '2017-06-21 18:01:52', '2020-09-17 11:09:00', 2, 0),
('57', 'cluster_slots_ok', '16384', '集群成功分配槽个数', '1', '0', '1', '4', '1', '2017-06-21 18:02:04', '2020-09-17 11:09:00', 2, 0);
COMMIT;
--
-- Table structure for table `instance_big_key`
--
DROP TABLE IF EXISTS `instance_big_key`;
CREATE TABLE `instance_big_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`audit_id` bigint(20) NOT NULL COMMENT 'audit id',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从,详见InstanceRoleEnum',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`big_key` varchar(255) NOT NULL COMMENT '键',
`type` varchar(16) NOT NULL COMMENT '类型:string,hash,list,set,zset',
`length` int(11) NOT NULL COMMENT '长度',
`create_time` datetime NOT NULL COMMENT '记录创建时间',
PRIMARY KEY (`id`),
KEY `idx_app_audit` (`app_id`,`audit_id`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例bigkey列表';
--
-- Table structure for table `instance_config`
--
DROP TABLE IF EXISTS `instance_config`;
CREATE TABLE `instance_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '配置名',
`config_value` varchar(512) NOT NULL COMMENT '配置值',
`info` varchar(512) NOT NULL COMMENT '配置说明',
`update_time` datetime NOT NULL COMMENT '更新时间',
`type` mediumint(9) NOT NULL COMMENT '类型:2.cluster节点特殊配置, 5:sentinel节点配置, 6:redis普通节点',
`status` tinyint(4) NOT NULL COMMENT '1有效,0无效',
`version_id` int(11) NOT NULL COMMENT 'Redis版本表主键id',
`refresh` mediumint(9) DEFAULT '0' COMMENT '是否可重置:0不可,1可重置',
`value_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '取值类型(0:默认值 config_value;1:从主节点拷贝)',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例配置模板';
-- ----------------------------
-- Records of `instance_config`
-- ----------------------------
BEGIN;
INSERT INTO instance_config (id, config_key, config_value, info, update_time, `type`, status, version_id, refresh, value_type) VALUES
(1, 'cluster-enabled', 'yes', '是否开启集群模式', '2016-07-05 15:08:30', 2, 1, 29, 0, 0)
,(2, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2016-07-05 15:08:30', 2, 1, 29, 0, 1)
,(3, 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2016-07-05 15:08:30', 2, 1, 29, 0, 0)
,(4, 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2016-07-05 15:08:30', 2, 1, 29, 0, 0)
,(5, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2016-07-05 15:08:30', 2, 1, 29, 0, 0)
,(6, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2016-07-05 15:08:31', 2, 1, 29, 0, 1)
,(7, 'port', '%d', 'sentinel实例端口', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(8, 'dir', '%s', '工作目录', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(9, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(10, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(11, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(12, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2016-07-05 15:08:31', 5, 1, 29, 0, 0)
,(13, 'daemonize', 'no', '是否守护进程', '2016-07-14 14:00:05', 6, 1, 29, 0, 0)
,(14, 'tcp-backlog', '511', 'TCP连接完成队列', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(15, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(16, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2016-12-06 11:40:46', 6, 1, 29, 0, 1)
,(17, 'loglevel', 'notice', '日志级别', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(18, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(19, 'dir', '%s', 'redis工作目录', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(20, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(21, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(22, 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(23, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(24, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(25, 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(26, 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(27, 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(28, 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(29, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(30, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(31, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(32, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(33, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(34, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(35, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(36, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(37, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(38, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(39, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(40, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(41, 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2016-11-24 10:24:21', 6, 1, 29, 0, 0)
,(42, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(43, 'hz', '10', '执行后台task数量,默认:10', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(44, 'port', '%d', '端口', '2016-07-05 15:08:31', 6, 1, 29, 0, 0)
,(45, 'maxmemory', '%dmb', '当前实例最大可用内存', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(46, 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2016-07-05 15:08:31', 6, 1, 29, 0, 1)
,(47, 'appendonly', 'yes', '开启append only持久化模式', '2016-07-05 15:08:32', 6, 1, 29, 0, 1)
,(48, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(49, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(50, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(51, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(52, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(53, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(54, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(55, 'maxclients', '10000', '客户端最大连接数', '2016-07-05 15:08:32', 6, 1, 29, 0, 0)
,(126, 'cluster-enabled', 'yes', '是否开启集群模式', '2018-09-18 18:23:03', 2, 1, 31, 0, 0)
,(127, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2018-09-18 18:23:03', 2, 1, 31, 0, 1)
,(128, 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2018-09-18 18:23:03', 2, 1, 31, 0, 0)
,(129, 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2018-09-18 18:23:03', 2, 1, 31, 0, 0)
,(130, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2018-09-18 18:23:03', 2, 1, 31, 0, 0)
,(131, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2018-09-18 18:23:03', 2, 1, 31, 0, 1)
,(132, 'port', '%d', 'sentinel实例端口', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(133, 'dir', '%s', '工作目录', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(134, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(135, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(136, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(137, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2018-09-18 18:23:03', 5, 1, 31, 0, 0)
,(138, 'daemonize', 'no', '是否守护进程', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(139, 'tcp-backlog', '511', 'TCP连接完成队列', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(140, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(141, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(142, 'loglevel', 'notice', '日志级别', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(143, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(144, 'dir', '%s', 'redis工作目录', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(145, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(146, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(147, 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(148, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(149, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(150, 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(151, 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(152, 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(153, 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(154, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(155, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(156, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(157, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(158, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(159, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2018-09-18 18:25:32', 6, 0, 31, 0, 1)
,(160, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2018-09-18 18:25:40', 6, 0, 31, 0, 1)
,(161, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(162, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(163, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(164, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(165, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(166, 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(167, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(168, 'hz', '10', '执行后台task数量,默认:10', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(169, 'port', '%d', '端口', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(170, 'maxmemory', '%dmb', '当前实例最大可用内存', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(171, 'maxmemory-policy', 'volatile-lru', '内存不够时,淘汰策略,默认:volatile-lru', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(172, 'appendonly', 'yes', '开启append only持久化模式', '2018-09-18 18:23:03', 6, 1, 31, 0, 1)
,(173, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(174, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(175, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(176, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(177, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(178, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(179, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(180, 'maxclients', '10000', '客户端最大连接数', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(181, 'protected-mode', 'yes', '开启保护模式', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(182, 'bind', '0.0.0.0', '默认客户端都可连接', '2018-09-18 18:23:03', 6, 1, 31, 0, 0)
,(185, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2018-09-18 18:26:32', 6, 1, 31, 0, 0)
,(186, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2018-09-18 18:27:12', 6, 1, 31, 0, 0)
,(253, 'protected-mode', 'no', '关闭保护模式', '2018-11-01 16:10:59', 5, 1, 31, 0, 0)
,(354, 'cluster-enabled', 'yes', '是否开启集群模式', '2019-10-24 17:33:26', 2, 1, 12, 0, 0)
,(355, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2019-10-24 17:33:26', 2, 1, 12, 0, 1)
,(356, 'cluster-slave-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2019-10-24 17:33:26', 2, 1, 12, 0, 0)
,(357, 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2019-10-24 17:33:26', 2, 1, 12, 0, 0)
,(358, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2019-10-24 17:33:26', 2, 1, 12, 0, 0)
,(359, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2019-10-24 17:33:26', 2, 1, 12, 0, 1)
,(360, 'port', '%d', 'sentinel实例端口', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(361, 'dir', '%s', '工作目录', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(362, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(363, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(364, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(365, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(366, 'daemonize', 'no', '是否守护进程', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(367, 'tcp-backlog', '511', 'TCP连接完成队列', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(368, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(369, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(370, 'loglevel', 'notice', '日志级别', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(371, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(372, 'dir', '%s', 'redis工作目录', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(373, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(374, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(375, 'repl-ping-slave-period', '10', '指定slave定期ping master的周期,默认:10秒', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(376, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(377, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(378, 'repl-backlog-ttl', '7200', 'master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(379, 'slave-serve-stale-data', 'yes', '当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(380, 'slave-read-only', 'yes', 'slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(381, 'slave-priority', '100', 'slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(382, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(383, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(384, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(385, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(386, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(387, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2019-10-24 17:33:26', 6, 0, 12, 0, 1)
,(388, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2019-10-24 17:33:26', 6, 0, 12, 0, 1)
,(389, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(390, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(391, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(392, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(393, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(394, 'client-output-buffer-limit slave', '512mb 256mb 60', '客户端输出缓冲区限制(复制)', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(395, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(396, 'hz', '10', '执行后台task数量,默认:10', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(397, 'port', '%d', '端口', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(398, 'maxmemory', '%dmb', '当前实例最大可用内存', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(399, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(400, 'appendonly', 'yes', '开启append only持久化模式', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(401, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(402, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(403, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(404, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(405, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(406, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(407, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(408, 'maxclients', '10000', '客户端最大连接数', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(409, 'protected-mode', 'yes', '开启保护模式', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(410, 'bind', '0.0.0.0', '默认客户端都可连接', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(411, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(412, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(413, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(414, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(415, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(416, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(417, 'slave-lazy-flush', 'yes', 'slave发起全量复制,是否采用flushall async清理老数据 默认值 no', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(418, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2019-10-31 11:15:57', 6, 1, 12, 0, 0)
,(419, 'protected-mode', 'no', '关闭sentinel保护模式', '2019-10-24 17:33:26', 5, 1, 12, 0, 0)
,(420, 'activedefrag', 'no', '碎片整理开启', '2019-10-24 17:33:26', 6, 1, 12, 0, 1)
,(421, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(422, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(423, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(424, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(425, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2019-10-24 17:33:26', 6, 1, 12, 0, 0)
,(506, 'cluster-enabled', 'yes', '是否开启集群模式', '2020-04-26 18:12:55', 2, 1, 37, 0, 0)
,(507, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2020-04-26 18:12:55', 2, 1, 37, 0, 1)
,(508, 'cluster-migration-barrier', '1', '主从迁移至少需要的从节点数,默认1个', '2020-04-26 18:12:55', 2, 1, 37, 0, 0)
,(509, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2020-04-26 18:12:55', 2, 1, 37, 0, 0)
,(510, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2020-04-26 18:12:55', 2, 1, 37, 0, 1)
,(511, 'port', '%d', 'sentinel实例端口', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(512, 'dir', '%s', '工作目录', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(513, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(514, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(515, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(516, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(517, 'daemonize', 'no', '是否守护进程', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(518, 'tcp-backlog', '511', 'TCP连接完成队列', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(519, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(520, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(521, 'loglevel', 'notice', '日志级别', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(522, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(523, 'dir', '%s', 'redis工作目录', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(524, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(525, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(526, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(527, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(528, 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(529, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(530, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(531, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(532, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(533, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(534, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2020-04-26 18:12:55', 6, 0, 37, 0, 1)
,(535, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2020-04-26 18:12:55', 6, 0, 37, 0, 1)
,(536, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(537, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(538, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(539, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(540, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(541, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(542, 'hz', '10', '执行后台task数量,默认:10', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(543, 'port', '%d', '端口', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(544, 'maxmemory', '%dmb', '当前实例最大可用内存', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(545, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(546, 'appendonly', 'yes', '开启append only持久化模式', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(547, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(548, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(549, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(550, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(551, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(552, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(553, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(554, 'maxclients', '10000', '客户端最大连接数', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(555, 'protected-mode', 'yes', '开启保护模式', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(556, 'bind', '0.0.0.0', '默认客户端都可连接', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(557, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(558, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(559, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(560, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(561, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(562, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(563, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(564, 'protected-mode', 'no', '关闭sentinel保护模式', '2020-04-26 18:12:55', 5, 1, 37, 0, 0)
,(565, 'activedefrag', 'yes', '碎片整理开启', '2020-04-26 18:12:55', 6, 1, 37, 0, 1)
,(566, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(567, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(568, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(569, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(570, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(571, 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(572, 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(573, 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2020-04-26 18:12:55', 2, 1, 37, 0, 0)
,(574, 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(575, 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(576, 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(577, 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(578, 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(579, 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(580, 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(581, 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(582, 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(583, 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2020-04-26 18:12:55', 6, 1, 37, 0, 0)
,(585, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:45:22', 6, 1, 37, 0, 0)
,(587, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:18', 6, 1, 12, 0, 0)
,(589, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:46:49', 6, 1, 31, 0, 0)
,(590, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2020-05-26 15:49:47', 6, 1, 29, 0, 0)
,(868, 'cluster-enabled', 'yes', '是否开启集群模式', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(869, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2021-06-09 10:12:50', 2, 1, 51, 0, 1)
,(870, 'cluster-migration-barrier', '3', '从节点自动迁移至少需要的可用节点数,默认1个', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(871, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(872, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2021-06-09 10:12:50', 2, 1, 51, 0, 1)
,(873, 'port', '%d', 'sentinel实例端口', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(874, 'dir', '%s', '工作目录', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(875, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(876, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(877, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(878, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(879, 'daemonize', 'no', '是否守护进程', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(880, 'tcp-backlog', '511', 'TCP连接完成队列', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(881, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(882, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(883, 'loglevel', 'notice', '日志级别', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(884, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(885, 'dir', '%s', 'redis工作目录', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(886, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(887, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(888, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(889, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(890, 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(891, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(892, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(893, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(894, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(895, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(896, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2021-06-09 10:12:50', 6, 0, 51, 0, 1)
,(897, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2021-06-09 10:12:50', 6, 0, 51, 0, 1)
,(898, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(899, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(900, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(901, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(902, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(903, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(904, 'hz', '10', '执行后台task数量,默认:10', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(905, 'port', '%d', '端口', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(906, 'maxmemory', '%dmb', '当前实例最大可用内存', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(907, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(908, 'appendonly', 'yes', '开启append only持久化模式', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(909, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(910, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(911, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(912, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(913, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(914, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(915, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(916, 'maxclients', '10000', '客户端最大连接数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(917, 'protected-mode', 'yes', '开启保护模式', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(918, 'bind', '0.0.0.0', '默认客户端都可连接', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(919, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(920, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(921, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(922, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(923, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(924, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(925, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(926, 'protected-mode', 'no', '关闭sentinel保护模式', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(927, 'activedefrag', 'no', '碎片整理开启', '2022-06-07 10:16:26', 6, 1, 51, 0, 1)
,(928, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(929, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(930, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(931, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(932, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(933, 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(934, 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(935, 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(936, 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(937, 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(938, 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(939, 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(940, 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(941, 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(942, 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(943, 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(944, 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(945, 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(946, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(947, 'repl-diskless-load', 'on-empty-db', '完全安全的情况下才使用无磁盘加载', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(948, 'tracking-table-max-keys', '1000000', '无效表键的最大填充数量', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(949, 'rdb-del-sync-files', 'yes', '默认:no 不删除rdb文件,删除实例中复制使用的不持久的RDB文件', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(950, 'lazyfree-lazy-user-del', 'yes', '默认值no,设置del操作命令同unlink一致', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(951, 'io-threads', '1', '读写io线程数量', '2021-06-09 15:22:48', 6, 1, 51, 0, 0)
,(952, 'io-threads-do-reads', 'no', '开启io读线程', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(953, 'jemalloc-bg-thread', 'yes', '启用Jemalloc后台线程清理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(954, 'server_cpulist', '0-7:2', '设置redis服务器/io线程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(955, 'bio_cpulist', '1,3', '设置bio线程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(956, 'aof_rewrite_cpulist', '8-11', '设置aof重写子进程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(957, 'bgsave_cpulist', '1,10-11', '设置bgsave子进程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(959, 'save', '', '关闭同步操作', '2021-07-01 10:31:11', 6, 1, 51, 0, 0)
,(1579, 'enable-module-command', 'yes', '是否支持module命令', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1582, 'save', '', '关闭同步操作', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1584, 'cluster-enabled', 'yes', '是否开启集群模式', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1585, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2024-01-17 10:23:00', 2, 1, 62, 0, 1)
,(1586, 'cluster-migration-barrier', '3', '从节点自动迁移至少需要的可用节点数,默认1个', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1587, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1588, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2024-01-17 10:23:00', 2, 1, 62, 0, 1)
,(1589, 'port', '%d', 'sentinel实例端口', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1590, 'dir', '%s', '工作目录', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1591, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1592, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1593, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1594, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1595, 'daemonize', 'no', '是否守护进程', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1596, 'tcp-backlog', '511', 'TCP连接完成队列', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1597, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1598, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1599, 'loglevel', 'notice', '日志级别', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1600, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1601, 'dir', '%s', 'redis工作目录', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1602, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1603, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1604, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1605, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1606, 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1607, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1608, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1609, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1610, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1611, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1612, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2024-01-17 10:23:00', 6, 0, 62, 0, 1)
,(1613, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2024-01-17 10:23:00', 6, 0, 62, 0, 1)
,(1614, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1615, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1616, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1617, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1618, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1619, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1620, 'hz', '10', '执行后台task数量,默认:10', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1621, 'port', '%d', '端口', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1622, 'maxmemory', '%dmb', '当前实例最大可用内存', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1623, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1624, 'appendonly', 'yes', '开启append only持久化模式', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1625, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1626, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1627, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1628, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1629, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1630, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1631, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1632, 'maxclients', '10000', '客户端最大连接数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1633, 'protected-mode', 'no', '开启保护模式', '2024-06-05 11:55:57', 6, 1, 62, 0, 0)
,(1634, 'bind', '0.0.0.0 -::*', '默认客户端都可连接', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1635, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1636, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1637, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1638, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1639, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1640, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1641, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1642, 'protected-mode', 'no', '关闭sentinel保护模式', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1643, 'activedefrag', 'no', '碎片整理开启', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1644, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1645, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1646, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1647, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1648, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1649, 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1650, 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1651, 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1652, 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1653, 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1654, 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1655, 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1656, 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1657, 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1658, 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1659, 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1660, 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1661, 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1662, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1663, 'repl-diskless-load', 'on-empty-db', '完全安全的情况下才使用无磁盘加载', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1664, 'tracking-table-max-keys', '1000000', '无效表键的最大填充数量', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1665, 'rdb-del-sync-files', 'yes', '默认:no 不删除rdb文件,删除实例中复制使用的不持久的RDB文件', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1666, 'lazyfree-lazy-user-del', 'yes', '默认值no,设置del操作命令同unlink一致', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1667, 'io-threads', '1', '读写io线程数量', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1668, 'io-threads-do-reads', 'no', '开启io读线程', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1669, 'jemalloc-bg-thread', 'yes', '启用Jemalloc后台线程清理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1670, 'server_cpulist', '0-7:2', '设置redis服务器/io线程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1671, 'bio_cpulist', '1,3', '设置bio线程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1672, 'aof_rewrite_cpulist', '8-11', '设置aof重写子进程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1673, 'bgsave_cpulist', '1,10-11', '设置bgsave子进程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0);
COMMIT;
--
-- Table structure for table `instance_fault`
--
DROP TABLE IF EXISTS `instance_fault`;
CREATE TABLE `instance_fault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`inst_id` bigint(20) NOT NULL COMMENT '实例id',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0:心跳停止,1:心跳恢复',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` mediumint(4) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`reason` mediumtext NOT NULL COMMENT '故障原因描述',
PRIMARY KEY (`id`),
KEY `idx_ip_port` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例故障表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_info`
--
DROP TABLE IF EXISTS `instance_info`;
CREATE TABLE `instance_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'memcached instance id',
`parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '对等实例的id',
`app_id` bigint(20) NOT NULL COMMENT '应用id,与app_desc关联',
`host_id` bigint(20) NOT NULL COMMENT '对应的主机id,与instance_host关联',
`ip` varchar(16) NOT NULL COMMENT '实例的ip',
`port` int(11) NOT NULL COMMENT '实例端口',
`status` tinyint(4) NOT NULL COMMENT '是否启用:0:节点异常,1:正常启用,2:节点下线',
`mem` int(11) NOT NULL COMMENT '内存大小',
`conn` int(11) NOT NULL COMMENT '连接数',
`cmd` varchar(255) NOT NULL COMMENT '启动实例的命令/redis-sentinel的masterName',
`type` mediumint(11) NOT NULL COMMENT '类型:1. memcached, 2. redis-cluster, 3. memcacheq, 4. 非cache-cloud 5. redis-sentinel 6.redis-standalone',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_inst_ipport` (`ip`,`port`) USING BTREE,
KEY `app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `instance_latency_history`
--
DROP TABLE IF EXISTS `instance_latency_history`;
CREATE TABLE `instance_latency_history` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`event` varchar(255) NOT NULL COMMENT '事件名称',
`execute_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`execution_cost` bigint(20) NOT NULL COMMENT '耗时(微妙)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `latencyistorykey` (`instance_id`,`event`,`execute_date`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executedate` (`app_id`,`execute_date`),
KEY `idx_executedate` (`execute_date`),
KEY `idx_executedate_app` (`execute_date`,`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢延迟事件信息列表';
--
-- Table structure for table `instance_minute_stats`
--
DROP TABLE IF EXISTS `instance_minute_stats`;
CREATE TABLE `instance_minute_stats` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`json` text NOT NULL COMMENT '统计json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例分钟统计表';
--
-- Table structure for table `instance_reshard_process`
--
DROP TABLE IF EXISTS `instance_reshard_process`;
CREATE TABLE `instance_reshard_process` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`audit_id` bigint(20) NOT NULL COMMENT '审核id',
`source_instance_id` int(11) NOT NULL COMMENT '源实例id',
`target_instance_id` int(11) NOT NULL COMMENT '目标实例id',
`start_slot` int(11) NOT NULL COMMENT '开始slot',
`end_slot` int(11) NOT NULL COMMENT '结束slot',
`migrating_slot` int(11) NOT NULL COMMENT '正在迁移的slot',
`is_pipeline` tinyint(4) NOT NULL COMMENT '是否为pipeline,0:否,1:是',
`finish_slot_num` int(11) NOT NULL COMMENT '已经完成迁移的slot数量',
`status` tinyint(4) NOT NULL COMMENT '0:运行中 1:完成 2:出错',
`start_time` datetime NOT NULL COMMENT '迁移开始时间',
`end_time` datetime NOT NULL COMMENT '迁移结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_audit` (`audit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例Reshard进度';
--
-- Table structure for table `instance_slow_log`
--
DROP TABLE IF EXISTS `instance_slow_log`;
CREATE TABLE `instance_slow_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`instance_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`ip` varchar(32) NOT NULL COMMENT 'ip',
`port` int(11) NOT NULL COMMENT 'port',
`slow_log_id` bigint(20) NOT NULL COMMENT '慢查询id',
`cost_time` int(11) NOT NULL COMMENT '耗时(微妙)',
`command` varchar(255) NOT NULL COMMENT '执行命令',
`execute_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '执行时间点',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `slowlogkey` (`instance_id`,`slow_log_id`,`execute_time`),
KEY `idx_app_create_time` (`app_id`,`create_time`),
KEY `idx_app_executetime` (`app_id`,`execute_time`),
KEY `idx_executetime` (`execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='实例慢查询列表';
--
-- Table structure for table `instance_statistics`
--
DROP TABLE IF EXISTS `instance_statistics`;
CREATE TABLE `instance_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`inst_id` bigint(20) NOT NULL COMMENT '实例的id',
`app_id` bigint(20) NOT NULL COMMENT 'app id',
`host_id` bigint(20) NOT NULL COMMENT '机器的id',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`port` int(255) NOT NULL COMMENT 'port',
`role` tinyint(255) NOT NULL COMMENT '主从,1主2从',
`max_memory` bigint(255) NOT NULL COMMENT '预分配内存,单位byte',
`used_memory` bigint(255) NOT NULL COMMENT '已使用内存,单位byte',
`curr_items` bigint(255) NOT NULL COMMENT '当前item数量',
`curr_connections` int(255) NOT NULL COMMENT '当前连接数',
`misses` bigint(255) NOT NULL COMMENT 'miss数',
`hits` bigint(255) NOT NULL COMMENT '命中数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mem_fragmentation_ratio` double DEFAULT '0' COMMENT '碎片率',
`aof_delayed_fsync` int(11) DEFAULT '0' COMMENT 'aof阻塞次数',
`used_disk` bigint(255) NOT NULL DEFAULT '0' COMMENT '已使用磁盘,单位byte',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`,`port`),
KEY `app_id` (`app_id`),
KEY `machine_id` (`host_id`),
KEY `idx_inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='实例的最新统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_info`
--
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '机器的id',
`ssh_user` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh用户',
`ssh_passwd` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT 'cachecloud' COMMENT 'ssh密码',
`ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT 'ip',
`room` varchar(20) COLLATE utf8_bin NOT NULL COMMENT '所属机房',
`mem` int(11) unsigned NOT NULL COMMENT '内存大小,单位G',
`cpu` mediumint(24) unsigned NOT NULL COMMENT 'cpu数量',
`virtual` tinyint(8) unsigned NOT NULL DEFAULT '1' COMMENT '是否虚拟,0表示否,1表示是',
`real_ip` varchar(16) COLLATE utf8_bin NOT NULL COMMENT '宿主机ip',
`service_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上线时间',
`fault_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '故障次数',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`warn` tinyint(255) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用报警,0不启用,1启用',
`available` tinyint(255) NOT NULL COMMENT '表示机器是否可用,1表示可用,0表示不可用;',
`groupId` int(11) NOT NULL DEFAULT '0' COMMENT '机器分组,默认为0,表示原生资源,非0表示外部提供的资源(可扩展)',
`type` int(11) NOT NULL DEFAULT '0' COMMENT '0原生 1 其他',
`extra_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '对于机器的额外说明(例如机器安装的其他服务(web,mysql,queue等等))',
`collect` int(11) DEFAULT '1' COMMENT 'switch of collect server status, 1:open, 0:close',
`version_install` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '机器安装redis版本状态',
`use_type` tinyint(4) DEFAULT '2' COMMENT '使用类型:Redis专用机器(0),Redis测试机器(1),混合部署机器(2),Redis-Sentinel机器(3)',
`k8s_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否k8s容器:0:不是 1:是',
`rack` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '机器所在机架信息',
`is_allocating` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否在分配中,1是0否',
`disk` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '磁盘空间:G',
`dis_type` tinyint(4) DEFAULT 0 NOT NULL COMMENT '操作系统发行版本,0:centos;1:ubuntu',
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='机器信息表' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `machine_relation`
--
DROP TABLE IF EXISTS `machine_relation`;
CREATE TABLE `machine_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`ip` varchar(64) NOT NULL COMMENT '虚拟机ip',
`real_ip` varchar(64) NOT NULL COMMENT '宿主机ip',
`extra_desc` varchar(128) DEFAULT NULL COMMENT '实例描述信息',
`status` int(255) NOT NULL COMMENT '实例变更状态 0:offline ,1:online',
`is_sync` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据同步状态 0: 未同步数据 -1:同步中 1:数据已同步 -2:同步失败 ',
`sync_time` timestamp NULL DEFAULT NULL COMMENT '同步时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'pod最后更新时间',
`taskid` bigint(11) DEFAULT NULL COMMENT '任务id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `machine_room`
--
DROP TABLE IF EXISTS `machine_room`;
CREATE TABLE `machine_room` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '机房id',
`name` varchar(255) NOT NULL COMMENT '机房名称',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`desc` varchar(255) DEFAULT NULL COMMENT '机房描述信息',
`ip_network` varchar(32) NOT NULL DEFAULT '' COMMENT '机房网段信息',
`operator` varchar(255) DEFAULT NULL COMMENT '运营商',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `machine_room`
-- ----------------------------
BEGIN;
INSERT INTO `machine_room` VALUES ('1', '阿里云杭州', '1', '阿里云-杭州机房', '172.27.*.*', '阿里云');
COMMIT;
--
-- Table structure for table `machine_statistics`
--
DROP TABLE IF EXISTS `machine_statistics`;
CREATE TABLE `machine_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`host_id` bigint(20) NOT NULL COMMENT '机器id',
`ip` varchar(16) NOT NULL COMMENT '机器ip',
`cpu_usage` varchar(120) NOT NULL COMMENT 'cpu使用率',
`load` varchar(120) NOT NULL COMMENT '机器负载',
`traffic` varchar(120) NOT NULL COMMENT 'io网络流量',
`memory_usage_ratio` varchar(120) NOT NULL COMMENT '内存使用率',
`memory_free` varchar(120) NOT NULL COMMENT '内存剩余',
`memory_total` varchar(120) NOT NULL COMMENT '总内存量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`max_memory` int(11) DEFAULT '0' COMMENT '机器分配内存,单位MB',
`instance_count` int(11) DEFAULT '0' COMMENT '机器实例数量',
`machine_memory` int(11) DEFAULT '0' COMMENT '机器入库总内存,单位MB',
`disk_total` varchar(120) DEFAULT NULL COMMENT '机器分配磁盘,单位MB',
`disk_available` varchar(120) DEFAULT NULL COMMENT '机器空闲磁盘,单位MB',
`disk_usage_ratio` varchar(15) DEFAULT NULL COMMENT '机器磁盘使用率,百分比(无需乘100)',
PRIMARY KEY (`id`),
UNIQUE KEY `uidx_ip` (`ip`),
KEY `host_id` (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机器状态统计信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_BLOB_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_BLOB_TRIGGERS`;
CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`BLOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_CALENDARS`
--
DROP TABLE IF EXISTS `QRTZ_CALENDARS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `QRTZ_CALENDARS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`CALENDAR_NAME` varchar(200) NOT NULL COMMENT 'calendar名称',
`CALENDAR` blob NOT NULL COMMENT 'calendar信息',
PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='以 Blob 类型存储 Quartz 的 Calendar 信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_CRON_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_CRON_TRIGGERS`;
CREATE TABLE `QRTZ_CRON_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL COMMENT 'scheduler名称',
`TRIGGER_NAME` varchar(200) NOT NULL COMMENT 'trigger名',
`TRIGGER_GROUP` varchar(200) NOT NULL COMMENT 'trigger组',
`CRON_EXPRESSION` varchar(120) NOT NULL COMMENT 'cron表达式',
`TIME_ZONE_ID` varchar(80) DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储 Cron Trigger,包括 Cron 表达式和时区信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_FIRED_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_FIRED_TRIGGERS`;
CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`ENTRY_ID` varchar(195) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL,
`FIRED_TIME` bigint(13) NOT NULL,
`SCHED_TIME` bigint(13) NOT NULL,
`PRIORITY` int(11) NOT NULL,
`STATE` varchar(16) NOT NULL,
`JOB_NAME` varchar(200) DEFAULT NULL,
`JOB_GROUP` varchar(200) DEFAULT NULL,
`IS_NONCONCURRENT` varchar(1) DEFAULT NULL COMMENT '是否非并行执行',
`REQUESTS_RECOVERY` varchar(1) DEFAULT NULL COMMENT '是否持久化',
PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`),
KEY `IDX_QRTZ_FT_TRIG_INST_NAME` (`SCHED_NAME`,`INSTANCE_NAME`),
KEY `IDX_QRTZ_FT_INST_JOB_REQ_RCVRY` (`SCHED_NAME`,`INSTANCE_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_FT_J_G` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已触发的 Trigger相关的状态信息,以及关联 Job 的执行信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_JOB_DETAILS`
--
DROP TABLE IF EXISTS `QRTZ_JOB_DETAILS`;
CREATE TABLE `QRTZ_JOB_DETAILS` (
`SCHED_NAME` varchar(120) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`JOB_CLASS_NAME` varchar(250) NOT NULL,
`IS_DURABLE` varchar(1) NOT NULL COMMENT '是否持久化,0不持久化,1持久化',
`IS_NONCONCURRENT` varchar(1) NOT NULL COMMENT '是否非并发,0非并发,1并发',
`IS_UPDATE_DATA` varchar(1) NOT NULL,
`REQUESTS_RECOVERY` varchar(1) NOT NULL COMMENT '是否可恢复,0不恢复,1恢复',
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储每一个已配置的 Job 的详细信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_LOCKS`
--
DROP TABLE IF EXISTS `QRTZ_LOCKS`;
CREATE TABLE `QRTZ_LOCKS` (
`SCHED_NAME` varchar(120) NOT NULL,
`LOCK_NAME` varchar(40) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储程序的悲观锁的信息(假如使用了悲观锁)' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_PAUSED_TRIGGER_GRPS`
--
DROP TABLE IF EXISTS `QRTZ_PAUSED_TRIGGER_GRPS`;
CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已暂停的 Trigger 组的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SCHEDULER_STATE`
--
DROP TABLE IF EXISTS `QRTZ_SCHEDULER_STATE`;
CREATE TABLE `QRTZ_SCHEDULER_STATE` (
`SCHED_NAME` varchar(120) NOT NULL,
`INSTANCE_NAME` varchar(200) NOT NULL COMMENT '执行quartz实例的主机名',
`LAST_CHECKIN_TIME` bigint(13) NOT NULL COMMENT '实例将状态报告给集群中的其它实例的上一次时间',
`CHECKIN_INTERVAL` bigint(13) NOT NULL COMMENT '实例间状态报告的时间频率',
PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储少量的有关 Scheduler 的状态信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPLE_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPLE_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`REPEAT_COUNT` bigint(7) NOT NULL COMMENT '重复次数',
`REPEAT_INTERVAL` bigint(12) NOT NULL COMMENT '重复间隔',
`TIMES_TRIGGERED` bigint(10) NOT NULL COMMENT '已出发次数',
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储简单的 Trigger,包括重复次数,间隔,以及已触的次数' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_SIMPROP_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_SIMPROP_TRIGGERS`;
CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`STR_PROP_1` varchar(512) DEFAULT NULL,
`STR_PROP_2` varchar(512) DEFAULT NULL,
`STR_PROP_3` varchar(512) DEFAULT NULL,
`INT_PROP_1` int(11) DEFAULT NULL,
`INT_PROP_2` int(11) DEFAULT NULL,
`LONG_PROP_1` bigint(20) DEFAULT NULL,
`LONG_PROP_2` bigint(20) DEFAULT NULL,
`DEC_PROP_1` decimal(13,4) DEFAULT NULL,
`DEC_PROP_2` decimal(13,4) DEFAULT NULL,
`BOOL_PROP_1` varchar(1) DEFAULT NULL,
`BOOL_PROP_2` varchar(1) DEFAULT NULL,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `QRTZ_TRIGGERS`
--
DROP TABLE IF EXISTS `QRTZ_TRIGGERS`;
CREATE TABLE `QRTZ_TRIGGERS` (
`SCHED_NAME` varchar(120) NOT NULL,
`TRIGGER_NAME` varchar(200) NOT NULL,
`TRIGGER_GROUP` varchar(200) NOT NULL,
`JOB_NAME` varchar(200) NOT NULL,
`JOB_GROUP` varchar(200) NOT NULL,
`DESCRIPTION` varchar(250) DEFAULT NULL,
`NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
`PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
`PRIORITY` int(11) DEFAULT NULL,
`TRIGGER_STATE` varchar(16) NOT NULL,
`TRIGGER_TYPE` varchar(8) NOT NULL,
`START_TIME` bigint(13) NOT NULL,
`END_TIME` bigint(13) DEFAULT NULL,
`CALENDAR_NAME` varchar(200) DEFAULT NULL,
`MISFIRE_INSTR` smallint(2) DEFAULT NULL,
`JOB_DATA` blob,
PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_J` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_JG` (`SCHED_NAME`,`JOB_GROUP`),
KEY `IDX_QRTZ_T_C` (`SCHED_NAME`,`CALENDAR_NAME`),
KEY `IDX_QRTZ_T_G` (`SCHED_NAME`,`TRIGGER_GROUP`),
KEY `IDX_QRTZ_T_STATE` (`SCHED_NAME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_STATE` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_N_G_STATE` (`SCHED_NAME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NEXT_FIRE_TIME` (`SCHED_NAME`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST` (`SCHED_NAME`,`TRIGGER_STATE`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='存储已配置的 Trigger 的信息' /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE `server` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`host` varchar(255) DEFAULT NULL COMMENT 'host',
`nmon` varchar(255) DEFAULT NULL COMMENT 'nmon version',
`cpus` tinyint(4) DEFAULT NULL COMMENT 'logic cpu num',
`cpu_model` varchar(255) DEFAULT NULL COMMENT 'cpu 型号',
`dist` varchar(255) DEFAULT NULL COMMENT '发行版信息',
`kernel` varchar(255) DEFAULT NULL COMMENT '内核信息',
`ulimit` varchar(255) DEFAULT NULL COMMENT 'ulimit -n,ulimit -u',
`updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `server_stat`
--
DROP TABLE IF EXISTS `server_stat`;
CREATE TABLE `server_stat` (
`ip` varchar(16) NOT NULL COMMENT 'ip',
`cdate` date NOT NULL COMMENT '数据收集天',
`ctime` char(4) NOT NULL COMMENT '数据收集小时分钟',
`cuser` float DEFAULT NULL COMMENT '用户态占比',
`csys` float DEFAULT NULL COMMENT '内核态占比',
`cwio` float DEFAULT NULL COMMENT 'wio占比',
`c_ext` text COMMENT '子cpu占比',
`cload1` float DEFAULT NULL COMMENT '1分钟load',
`cload5` float DEFAULT NULL COMMENT '5分钟load',
`cload15` float DEFAULT NULL COMMENT '15分钟load',
`mtotal` float DEFAULT NULL COMMENT '总内存,单位M',
`mfree` float DEFAULT NULL COMMENT '空闲内存',
`mcache` float DEFAULT NULL COMMENT 'cache',
`mbuffer` float DEFAULT NULL COMMENT 'buffer',
`mswap` float DEFAULT NULL COMMENT 'cache',
`mswap_free` float DEFAULT NULL COMMENT 'cache',
`nin` float DEFAULT NULL COMMENT '网络入流量 单位K/s',
`nout` float DEFAULT NULL COMMENT '网络出流量 单位k/s',
`nin_ext` text COMMENT '各网卡入流量详情',
`nout_ext` text COMMENT '各网卡出流量详情',
`tuse` int(11) DEFAULT NULL COMMENT 'tcp estab连接数',
`torphan` int(11) DEFAULT NULL COMMENT 'tcp orphan连接数',
`twait` int(11) DEFAULT NULL COMMENT 'tcp time wait连接数',
`dread` float DEFAULT NULL COMMENT '磁盘读速率 单位K/s',
`dwrite` float DEFAULT NULL COMMENT '磁盘写速率 单位K/s',
`diops` float DEFAULT NULL COMMENT '磁盘io速率 交互次数/s',
`dbusy` float DEFAULT NULL COMMENT '磁盘io带宽使用百分比',
`d_ext` text COMMENT '磁盘各分区占比',
`dspace` text COMMENT '磁盘各分区空间使用率',
PRIMARY KEY (`ip`,`cdate`,`ctime`),
KEY `idx_cdate` (`cdate`),
KEY `idx_cdate_ctime` (`cdate`,`ctime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `standard_statistics`
--
CREATE TABLE `standard_statistics` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`collect_time` bigint(20) NOT NULL COMMENT '收集时间:格式yyyyMMddHHmm',
`ip` varchar(16) NOT NULL COMMENT 'ip地址',
`port` int(11) NOT NULL COMMENT '端口/hostId',
`db_type` varchar(16) NOT NULL COMMENT '收集的数据类型',
`info_json` text NOT NULL COMMENT '收集的json数据',
`diff_json` text NOT NULL COMMENT '上一次收集差异的json数据',
`cluster_info_json` varchar(20480) NOT NULL DEFAULT '' COMMENT '收集的cluster info json数据',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_index` (`ip`,`port`,`db_type`,`collect_time`),
KEY `idx_collect_time` (`collect_time`),
KEY `idx_created_time` (`created_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */;
--
-- Table structure for table `system_config`
--
DROP TABLE IF EXISTS `system_config`;
CREATE TABLE `system_config` (
`config_key` varchar(255) NOT NULL COMMENT '配置key',
`config_value` varchar(512) NOT NULL COMMENT '配置value',
`info` varchar(255) NOT NULL COMMENT '配置说明',
`status` tinyint(4) NOT NULL COMMENT '1:可用,0:不可用',
`order_id` int(11) NOT NULL COMMENT '顺序',
PRIMARY KEY (`config_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置';
-- ----------------------------
-- Records of `system_config`
-- ----------------------------
BEGIN;
INSERT INTO `system_config` VALUES ('cachecloud.admin.user.name','admin','cachecloud-admin用户名',1,11),('cachecloud.admin.user.password','admin','cachelcoud-admin密码',1,12),('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,33),('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,31),('cachecloud.contact','user1:(xx@zz.com, user1:135xxxxxxxx)
user2: (user2@zz.com, user2:138xxxxxxxx)','值班联系人信息',1,14),('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,22),('cachecloud.email.alert.interface','','邮件报警接口(参考报警接口规范)',1,24),('cachecloud.machine.ssh.name','cachecloud-open','机器ssh用户名',1,2),('cachecloud.machine.ssh.password','cachecloud-open','机器ssh密码',1,3),('cachecloud.machine.ssh.port','22','机器ssh端口',1,10),('cachecloud.machine.stats.cron.minute','1','机器性能统计周期(分钟)',1,35),('cachecloud.nmon.dir','/opt/cachecloud','nmon安装目录',1,32),('cachecloud.owner.email','xx@sohu.com,yy@qq.com','邮件报警(逗号隔开)',1,21),('cachecloud.owner.phone','xxx,yyy','手机号报警(逗号隔开)',1,21),('cachecloud.owner.weChat','xxx,yyy','微信号报警(逗号隔开)',1,21),('cachecloud.public.key.pem','/opt/ssh/id_rsa','密钥路径',1,5),('cachecloud.public.user.name','cachecloud-open','公钥用户名',1,4),('cachecloud.ssh.auth.type','1','ssh授权方式',1,1),('cachecloud.superAdmin','admin,xx,yy','超级管理员组',1,13),('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,22),('cachecloud.weChat.alert.interface','','微信报警接口(参考报警接口规范)',1,23),('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,34),('machine.load.alert.ratio','8.0','机器负载报警阀值',1,32);
COMMIT;
-- ----------------------------
-- Table structure for `system_resource`
-- ----------------------------
DROP TABLE IF EXISTS `system_resource`;
CREATE TABLE `system_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '资源ID',
`name` varchar(64) NOT NULL COMMENT '资源名称',
`intro` varchar(255) DEFAULT NULL COMMENT '资源说明',
`type` tinyint(4) NOT NULL COMMENT '1:仓库地址 2:脚本 3:资源包 4:公钥/私钥 6:目录管理 7:迁移工具管理',
`lastmodify` datetime DEFAULT NULL COMMENT '最后更新时间',
`dir` varchar(128) DEFAULT NULL COMMENT '资源路径',
`url` varchar(128) DEFAULT NULL COMMENT '仓库地址',
`ispush` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:未推送 1:已推送',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:无效 1:有效',
`username` varchar(255) DEFAULT NULL COMMENT '最后修改人',
`task_id` bigint(11) DEFAULT NULL COMMENT '迁移任务id',
`compile_info` varchar(255) DEFAULT NULL COMMENT '编译信息',
`order_num` int(6) NOT NULL DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of `system_resource`
-- ----------------------------
BEGIN;
INSERT INTO `system_resource` VALUES
(1,'cachecloud-init.sh','容器初始化脚本',2,'2020-07-15 18:35:41','/script','',0,1,NULL,NULL,NULL,0),
(2,'x.x.x.x',NULL,1,'2020-08-10 10:31:51','/opt/download/software/cachecloud/resource','http://x.x.x.x/software/cachecloud/resource',0,1,'admin',0,NULL,0),
(4,'cachecloud-env.sh','宿主环境脚本',2,'2020-07-15 18:36:28','/script','',0,1,NULL,NULL,NULL,0),
(5,'id_rsa','私钥文件',4,'2020-07-07 10:45:39','/ssh','',0,1,NULL,NULL,NULL,0),
(6,'id_rsa.pub','公钥文件',4,'2020-07-07 10:45:45','/ssh','',0,1,NULL,NULL,NULL,0),
(12,'redis-4.0.14','redis 4.0.14资源包',3,'2020-08-10 09:52:41','/redis','http://download.redis.io/releases/redis-4.0.14.tar.gz',0,1,'admin',532,NULL,0),
(21,'/script','脚本目录管理',6,'2020-08-10 10:51:34','',NULL,0,1,'admin',0,NULL,0),
(28,'/ssh','ssh目录',6,'2020-07-20 17:55:03',NULL,NULL,0,1,'admin',0,NULL,0),
(29,'redis-3.0.7','redis3.0.7 资源包',3,'2020-08-10 09:53:32','/redis','http://download.redis.io/releases/redis-3.0.7.tar.gz',0,1,'admin',529,NULL,0),
(31,'redis-3.2.12','redis 3.2.12 资源包',3,'2020-08-10 15:08:21','/redis','http://download.redis.io/releases/redis-3.2.12.tar.gz',0,1,'admin',530,NULL,0),
(32,'/redis','redis资源包管理',6,'2020-07-20 17:54:59',NULL,NULL,0,1,'admin',0,NULL,0),
(33,'/tool','迁移工具资源包',6,'2020-07-20 17:54:53',NULL,NULL,0,1,'admin',0,NULL,0),
(37,'redis-5.0.9','redis5.0.9 资源包',3,'2020-08-10 09:51:41','/redis','http://download.redis.io/releases/redis-5.0.9.tar.gz',0,1,'admin',533,NULL,0),
(40,'redis-shake-2.0.3','redis 2.0.3\n修复fix 5.0迁移类型问题',7,'2020-08-11 10:53:26','/tool','https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz',0,1,'admin',518,NULL,0),
(51, 'redis-6.2.4', 'redis-6.2.4 资源包', 3, '2023-02-09 10:24:16', '/redis', 'http://download.redis.io/releases/redis-6.2.4.tar.gz', 1, 1, 'admin', 3507, NULL, 0),
(62, 'redis-7.2.4', 'redis 7.2.4 资源包', 3, '2024-01-18 15:26:02', '/redis', 'http://download.redis.io/releases/redis-7.2.4.tar.gz', 1, 1, 'admin', 11687, NULL, 700);
COMMIT;
--
-- Table structure for table `task_queue`
--
DROP TABLE IF EXISTS `task_queue`;
CREATE TABLE `task_queue` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`important_info` varchar(255) NOT NULL DEFAULT '' COMMENT '重要信息',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`param` longtext NOT NULL COMMENT '任务参数(json):随着任务变化',
`init_param` longtext NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2中断,3失败',
`parent_task_id` bigint(20) NOT NULL COMMENT '父任务id',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`error_code` int(11) NOT NULL COMMENT '错误代码',
`error_msg` varchar(255) NOT NULL COMMENT '错误消息',
`task_note` varchar(255) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`),
KEY `idx_app_id` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务表';
--
-- Table structure for table `task_step_flow`
--
DROP TABLE IF EXISTS `task_step_flow`;
CREATE TABLE `task_step_flow` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`task_id` bigint(20) NOT NULL COMMENT '任务id',
`child_task_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '子任务id',
`execute_ip_port` varchar(255) DEFAULT '' COMMENT '执行任务的ip:port',
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`order_no` int(11) NOT NULL COMMENT '序号',
`status` tinyint(4) NOT NULL COMMENT '状态:0未开始、1成功、2中断、3跳过、4失败',
`log` text COMMENT '日志',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_task_class_step` (`task_id`,`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤流表';
--
-- Table structure for table `task_step_meta`
--
DROP TABLE IF EXISTS `task_step_meta`;
CREATE TABLE `task_step_meta` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`class_name` varchar(255) NOT NULL COMMENT '类名',
`step_name` varchar(255) NOT NULL COMMENT '步骤名',
`step_desc` varchar(255) NOT NULL COMMENT '步骤描述',
`ops_device` varchar(255) NOT NULL COMMENT '运维建议',
`timeout` int(11) NOT NULL COMMENT '超时时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`order_no` int(11) NOT NULL COMMENT '序号',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_class_step` (`class_name`,`step_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务步骤元数据表';
--
-- Table structure for table `app_alert_record`
--
DROP TABLE IF EXISTS `app_alert_record`;
CREATE TABLE `app_alert_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`visible_type` int(1) NOT NULL COMMENT '可见类型(0:均可见;1:仅管理员可见;)',
`important_level` int(1) NOT NULL COMMENT '重要类型(0:一般;1:重要;2:紧急)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`app_id` bigint(20) DEFAULT NULL COMMENT 'app id',
`instance_id` bigint(20) DEFAULT NULL COMMENT '实例id',
`ip` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '机器ip',
`port` int(10) DEFAULT NULL COMMENT '端口号',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '报警标题',
`content` varchar(500) COLLATE utf8_bin NOT NULL COMMENT '报警内容',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`),
KEY `ip` (`ip`),
KEY `idx_inst_id` (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警记录表';
--
-- Table structure for table `config_restart_record`
--
DROP TABLE IF EXISTS `config_restart_record`;
CREATE TABLE `config_restart_record` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`app_name` varchar(36) NOT NULL COMMENT '应用名称',
`operate_type` char(1) NOT NULL COMMENT '操作类型(0:滚动重启,1:修改配置强制重启;2:修改配置)',
`param` varchar(2000) NOT NULL COMMENT '初始化任务参数(json):不变',
`status` tinyint(4) NOT NULL COMMENT '状态:0等待,1运行,2成功,3失败,4配置修改待重启,5修改配置后重启,6被停止',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '修改时间',
`log` longtext COMMENT '日志信息',
`user_name` varchar(64) DEFAULT NULL COMMENT '操作人员姓名',
`user_id` bigint(20) NOT NULL COMMENT '用户id',
`instances` varchar(1000) DEFAULT NULL COMMENT '涉及实例id列表的json格式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='重启记录表';
--
-- Table structure for table `app_import`
--
DROP TABLE IF EXISTS `app_import`;
CREATE TABLE `app_import` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT '目标应用id',
`instance_info` text COMMENT '源redis实例信息',
`redis_password` varchar(200) DEFAULT NULL COMMENT '源redis密码',
`status` int(11) DEFAULT NULL COMMENT '迁移状态:PREPARE(0, "准备", "应用导入-未开始"), START(1, "进行中...", "应用导入-开始"), ERROR(2, "error", "应用导入-出错"), VERSION_BUILD_START(11, "进行中...", "新建redis版本-进行中"), VERSION_BUILD_ERROR(12, "error", "新建redis版本-出错"), VERSION_BUILD_END(20, "成功", "新建redis版本-完成"), APP_BUILD_INIT(21, "准备就绪", "新建redis应用-准备就绪"), APP_BUILD_START(22, "进行中...", "新建redis应用-进行中"), APP_BUILD_ERROR(23, "error", "新建redis应用-出错"), APP_BUILD_END(30, "成功", "新建redis应用-完成"), MIGRATE_INIT(31, "准备就绪", "数据迁移-准备就绪"), MIGRATE_START(32, "进行中...", "数据迁移-进行中"), MIGRATE_ERROR(33, "error", "数据迁移-出错"), MIGRATE_END(3, "成功", "应用导入-成功")',
`step` int(11) DEFAULT NULL COMMENT '导入阶段',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`migrate_id` bigint(20) DEFAULT NULL COMMENT '数据迁移id',
`mem_size` int(11) DEFAULT NULL COMMENT '目标应用内存大小,单位G',
`redis_version_name` varchar(20) DEFAULT NULL COMMENT '目标应用redis版本,格式:redis-x.x.x',
`app_build_task_id` bigint(20) DEFAULT NULL COMMENT '目标应用部署任务id',
`source_type` int(11) DEFAULT NULL COMMENT '源redis类型:7:cluster, 6:sentinel, 5:standalone',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------新增加的表---------------------------
--
-- Table structure for table `app_biz`
--
CREATE TABLE `app_biz` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '业务组名称',
`biz_desc` varchar(255) NOT NULL COMMENT '业务组描述',
PRIMARY KEY (`id`),
UNIQUE KEY `bidx_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='业务组表';
--
-- Table structure for table `app_capacity_monitor`
--
CREATE TABLE `app_capacity_monitor` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`sharding_master_num` int(10) NOT NULL DEFAULT '0' COMMENT '主分片数',
`mem` bigint(20) NOT NULL COMMENT '应用初始内存(字节)',
`cur_mem` bigint(20) NOT NULL COMMENT '应用当前内存(字节)',
`mem_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '应用已使用内存(字节)',
`mem_used_history` bigint(20) DEFAULT '0' COMMENT '应用已使用内存(历史最大值)',
`sharding_mem` bigint(20) NOT NULL COMMENT '应用分片初始内存(字节)',
`cur_sharding_mem` bigint(20) NOT NULL COMMENT '应用分片当前内存(字节)',
`sharding_mem_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '分片已使用内存(最大值)',
`expand_mem_percent` tinyint(4) NOT NULL COMMENT '应用扩容内存使用百分比',
`expand_ratio` tinyint(4) NOT NULL COMMENT '扩容比率',
`expand_ratio_total` int(10) NOT NULL COMMENT '当日最大扩容比率(超出不可扩容)',
`is_expand` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否可扩容:0否;1是',
`is_reduce` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否可缩容: 0否,1是',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`expand_time` datetime DEFAULT NULL COMMENT '上次扩容时间',
`schedule_status` tinyint(4) DEFAULT '0' COMMENT '计划状态:0:无意义;1:待缩容;2:待扩容',
`schedule_time` date DEFAULT NULL COMMENT '计划处理时间',
`reduce_ratio_min` tinyint(4) NOT NULL DEFAULT '40' COMMENT '缩容内存使用率最小值',
`reduce_ratio_max` tinyint(4) NOT NULL DEFAULT '60' COMMENT '缩容内存使用率最大值',
`expand_count` int(10) NOT NULL DEFAULT '0' COMMENT '当日自动扩容次数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=596 DEFAULT CHARSET=utf8 COMMENT='app应用容量监控';
================================================
FILE: cachecloud-web/sql/function-support_custom_password.sql
================================================
-- app_desc change
ALTER TABLE app_desc ADD custom_password varchar(255) DEFAULT NULL COMMENT '自定义密码';
================================================
FILE: cachecloud-web/sql/update 2.0 to 3.0.sql
================================================
CREATE TABLE `app_alert_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`visible_type` int(1) NOT NULL COMMENT 'ɼͣ0ɼ1Աɼ',
`important_level` int(1) NOT NULL COMMENT 'Ҫͣ0һ㣻1Ҫ2',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`app_id` bigint(20) DEFAULT NULL COMMENT 'app id',
`instance_id` bigint(20) DEFAULT NULL COMMENT 'ʵid',
`ip` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT 'ip',
`port` int(10) DEFAULT NULL COMMENT '˿ں',
`title` varchar(255) COLLATE utf8_bin NOT NULL COMMENT '',
`content` varchar(500) COLLATE utf8_bin NOT NULL COMMENT '',
PRIMARY KEY (`id`),
KEY `app_id` (`app_id`),
KEY `ip` (`ip`),
KEY `idx_inst_id` (`instance_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='¼';
CREATE TABLE `config_restart_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT 'Ӧid',
`app_name` varchar(36) NOT NULL COMMENT 'Ӧ',
`operate_type` char(1) NOT NULL COMMENT 'ͣ0:1:ǿ2ã',
`param` varchar(2000) NOT NULL COMMENT 'ʼ(json):',
`status` tinyint(4) NOT NULL COMMENT '״̬0ȴ1У2ɹ3ʧܣ4Ĵ',
`start_time` datetime NOT NULL COMMENT 'ʼʱ',
`end_time` datetime NOT NULL COMMENT 'ʱ',
`create_time` datetime NOT NULL COMMENT 'ʱ',
`update_time` datetime NOT NULL COMMENT 'ʱ',
`log` longtext COMMENT '־Ϣ',
`user_name` varchar(64) DEFAULT NULL COMMENT 'Ա',
`user_id` bigint(20) NOT NULL COMMENT 'ûid',
`instances` varchar(1000) DEFAULT NULL COMMENT '漰ʵidбjsonʽ',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='¼';
CREATE TABLE `module_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`git_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'git resource',
`info` varchar(128) DEFAULT NULL COMMENT 'ģϢ˵',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0:Ч 1:Ч',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='RedisģϢ';
CREATE TABLE `module_version` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module_id` int(11) NOT NULL,
`version_id` int(11) NOT NULL COMMENT '汾',
`create_time` datetime DEFAULT NULL COMMENT 'ʱ',
`so_path` varchar(255) DEFAULT NULL COMMENT 'soĵַ',
`tag` varchar(64) NOT NULL COMMENT 'ģ汾',
`status` int(255) NOT NULL DEFAULT '0' COMMENT 'Ƿ(soַ)0 1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Redisģ汾';
CREATE TABLE `app_import` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) DEFAULT NULL COMMENT 'ĿӦid',
`instance_info` text COMMENT 'ԴredisʵϢ',
`redis_password` varchar(200) DEFAULT NULL COMMENT 'Դredis',
`status` int(11) DEFAULT NULL COMMENT 'Ǩ״̬PREPARE(0, "", "Ӧõ-δʼ"), START(1, "...", "Ӧõ-ʼ"), ERROR(2, "error", "Ӧõ-"), VERSION_BUILD_START(11, "...", "½redis汾-"), VERSION_BUILD_ERROR(12, "error", "½redis汾-"), VERSION_BUILD_END(20, "ɹ", "½redis汾-"), APP_BUILD_INIT(21, "", "½redisӦ-"), APP_BUILD_START(22, "...", "½redisӦ-"), APP_BUILD_ERROR(23, "error", "½redisӦ-"), APP_BUILD_END(30, "ɹ", "½redisӦ-"), MIGRATE_INIT(31, "", "Ǩ-"), MIGRATE_START(32, "...", "Ǩ-"), MIGRATE_ERROR(33, "error", "Ǩ-"), MIGRATE_END(3, "ɹ", "Ӧõ-ɹ")',
`step` int(11) DEFAULT NULL COMMENT '',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`migrate_id` bigint(20) DEFAULT NULL COMMENT 'Ǩid',
`mem_size` int(11) DEFAULT NULL COMMENT 'ĿӦڴСλG',
`redis_version_name` varchar(20) DEFAULT NULL COMMENT 'ĿӦredis汾ʽredis-x.x.x',
`app_build_task_id` bigint(20) DEFAULT NULL COMMENT 'ĿӦòid',
`source_type` int(11) DEFAULT NULL COMMENT 'Դredisͣ7:cluster, 6:sentinel, 5:standalone',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- instance_alert_configs change
ALTER TABLE instance_alert_configs ADD important_level TINYINT(4) DEFAULT 0 NOT NULL COMMENT 'Ҫ̶ȣ0һ㣻1Ҫ2';
-- app_user change
ALTER TABLE app_user ADD password varchar(64) NULL COMMENT '';
ALTER TABLE app_user ADD register_time DATETIME DEFAULT CURRENT_TIMESTAMP NULL COMMENT 'עʱ';
ALTER TABLE app_user ADD purpose varchar(255) NULL COMMENT 'ʹĿ';
ALTER TABLE app_user ADD company varchar(255) NULL COMMENT '˾';
-- module_info change
ALTER TABLE module_info ADD CONSTRAINT `NAMEKEY` UNIQUE KEY (name);
-- app_desc change
ALTER TABLE app_desc ADD custom_password varchar(255) DEFAULT NULL COMMENT 'Զ';
-- redis_module_config definition
CREATE TABLE `redis_module_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_key` varchar(128) NOT NULL COMMENT '',
`config_value` varchar(512) NOT NULL COMMENT 'ֵ',
`info` varchar(512) NOT NULL COMMENT '˵',
`update_time` datetime NOT NULL COMMENT 'ʱ',
`type` mediumint(9) NOT NULL COMMENT 'ͣ2.clusterڵ, 5:sentinelڵ, 6:redisͨڵ',
`status` tinyint(4) NOT NULL COMMENT '1Ч,0Ч',
`version_id` int(11) NOT NULL COMMENT 'Module version汾id',
`refresh` tinyint(4) DEFAULT '0' COMMENT 'Ƿã0ɣ1',
`module_id` int(11) NOT NULL DEFAULT '7' COMMENT 'Module Ϣid',
`config_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'ͣ0غã1ʱã2ʱ',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_configkey_type_version_id` (`config_key`,`type`,`version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='redisģñ';
-- app_to_module definition
CREATE TABLE `app_to_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '',
`app_id` bigint(20) NOT NULL COMMENT 'Ӧid',
`module_id` int(11) NOT NULL COMMENT 'ģinfo id',
`module_version_id` int(11) NOT NULL COMMENT 'ģ汾id',
PRIMARY KEY (`id`),
UNIQUE KEY `app_to_module_un` (`app_id`,`module_id`,`module_version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Ӧģϵ';
ALTER TABLE machine_info ADD dis_type tinyint(4) DEFAULT 0 NOT NULL COMMENT 'ϵͳа汾0:centos;1:ubuntu';
================================================
FILE: cachecloud-web/sql/update 3.0 to 3.1.sql
================================================
-- system_resource change
ALTER TABLE system_resource ADD order_num int(6) NOT NULL DEFAULT '0' COMMENT '排序';
================================================
FILE: cachecloud-web/sql/update 3.1 to 3.2.sql
================================================
-- app_desc change
ALTER TABLE app_desc ADD maxmemory_policy tinyint(4) DEFAULT NULL COMMENT '淘汰策略(0:noeviction; 1:allkeys-lru;2:allkeys-lfu;3:volatile-lru;4:volatile-lfu;5:allkeys-random;6:volatile-random;7:volatile-ttl)';
================================================
FILE: cachecloud-web/sql/update 3.2 to 3.3.sql
================================================
ALTER TABLE instance_config ADD value_type TINYINT(4) DEFAULT 0 NOT NULL COMMENT '取值类型(0:默认值 config_value;1:从主节点拷贝)';
ALTER TABLE app_client_statistic_gather ADD used_disk BIGINT(20) DEFAULT 0 NULL COMMENT '磁盘占用byte';
ALTER TABLE app_client_statistic_gather ADD server_cmd_count bigint(20) DEFAULT 0 NOT NULL COMMENT 'server端统计的命令调用次数';
ALTER TABLE instance_statistics ADD used_disk bigint(255) DEFAULT 0 NOT NULL COMMENT '已使用磁盘,单位byte';
ALTER TABLE app_minute_statistics ADD used_disk bigint(20) DEFAULT 0 NOT NULL COMMENT '磁盘占用(字节)';
ALTER TABLE app_hour_statistics ADD used_disk bigint(20) DEFAULT 0 NOT NULL COMMENT '磁盘占用(字节)';
ALTER TABLE machine_statistics ADD disk_total varchar(120) NULL COMMENT '机器分配磁盘,单位MB';
ALTER TABLE machine_statistics ADD disk_available varchar(120) NULL COMMENT '机器空闲磁盘,单位MB';
ALTER TABLE machine_statistics ADD disk_usage_ratio varchar(15) NULL COMMENT '机器磁盘使用率,百分比(无需乘100)';
ALTER TABLE app_daily ADD avg_used_disk BIGINT(20) NOT NULL COMMENT '平均磁盘使用量';
ALTER TABLE app_daily ADD max_used_disk BIGINT(20) NOT NULL COMMENT '最大磁盘使用量';
ALTER TABLE app_desc ADD persistence_type TINYINT(4) DEFAULT 0 NOT NULL COMMENT '持久化类型(0:常规;1:主aof自动刷盘;从常规;2:主关闭aof,从常规)';
ALTER TABLE app_user ADD biz_id BIGINT(20) DEFAULT NULL COMMENT '所属业务组id(app_biz)';
ALTER TABLE instance_alert_configs ADD app_type TINYINT(4) DEFAULT 0 NOT NULL COMMENT '应用类型(0:redis;)';
ALTER TABLE instance_alert_configs DROP KEY uniq_index;
ALTER TABLE instance_alert_configs ADD CONSTRAINT uniq_index UNIQUE KEY (`type`,instance_id,alert_config,compare_type,app_type);
--
-- Table structure for table `app_biz`
--
CREATE TABLE `app_biz` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL COMMENT '业务组名称',
`biz_desc` varchar(255) NOT NULL COMMENT '业务组描述',
PRIMARY KEY (`id`),
UNIQUE KEY `bidx_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='业务组表';
--
-- Table structure for table `app_capacity_monitor`
--
CREATE TABLE `app_capacity_monitor` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`app_id` bigint(20) NOT NULL COMMENT '应用id',
`sharding_master_num` int(10) NOT NULL DEFAULT '0' COMMENT '主分片数',
`mem` bigint(20) NOT NULL COMMENT '应用初始内存(字节)',
`cur_mem` bigint(20) NOT NULL COMMENT '应用当前内存(字节)',
`mem_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '应用已使用内存(字节)',
`mem_used_history` bigint(20) DEFAULT '0' COMMENT '应用已使用内存(历史最大值)',
`sharding_mem` bigint(20) NOT NULL COMMENT '应用分片初始内存(字节)',
`cur_sharding_mem` bigint(20) NOT NULL COMMENT '应用分片当前内存(字节)',
`sharding_mem_used` bigint(20) NOT NULL DEFAULT '0' COMMENT '分片已使用内存(最大值)',
`expand_mem_percent` tinyint(4) NOT NULL COMMENT '应用扩容内存使用百分比',
`expand_ratio` tinyint(4) NOT NULL COMMENT '扩容比率',
`expand_ratio_total` int(10) NOT NULL COMMENT '当日最大扩容比率(超出不可扩容)',
`is_expand` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否可扩容:0否;1是',
`is_reduce` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否可缩容: 0否,1是',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`expand_time` datetime DEFAULT NULL COMMENT '上次扩容时间',
`schedule_status` tinyint(4) DEFAULT '0' COMMENT '计划状态:0:无意义;1:待缩容;2:待扩容',
`schedule_time` date DEFAULT NULL COMMENT '计划处理时间',
`reduce_ratio_min` tinyint(4) NOT NULL DEFAULT '40' COMMENT '缩容内存使用率最小值',
`reduce_ratio_max` tinyint(4) NOT NULL DEFAULT '60' COMMENT '缩容内存使用率最大值',
`expand_count` int(10) NOT NULL DEFAULT '0' COMMENT '当日自动扩容次数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=596 DEFAULT CHARSET=utf8 COMMENT='app应用容量监控';
------------------------------- add for redis 6.2 and 7.2----------------------------------------------------------
# below two insert sql are related, note the ids related, system_resource.id and instance_config.version_id
# 注意两个表之间的id相关联,system_resource表id字段 和 instance_config表version_id字段
BEGIN;
INSERT INTO `system_resource` VALUES
(51, 'redis-6.2.4', 'redis-6.2.4 资源包', 3, '2023-02-09 10:24:16', '/redis', 'http://download.redis.io/releases/redis-6.2.4.tar.gz', 1, 1, 'admin', 3507, NULL, 0),
(62, 'redis-7.2.4', 'redis 7.2.4 资源包', 3, '2024-01-18 15:26:02', '/redis', 'http://download.redis.io/releases/redis-7.2.4.tar.gz', 1, 1, 'admin', 11687, NULL, 700);
COMMIT;
BEGIN;
INSERT INTO instance_config (id, config_key, config_value, info, update_time, `type`, status, version_id, refresh, value_type) VALUES
(868, 'cluster-enabled', 'yes', '是否开启集群模式', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(869, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2021-06-09 10:12:50', 2, 1, 51, 0, 1)
,(870, 'cluster-migration-barrier', '3', '从节点自动迁移至少需要的可用节点数,默认1个', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(871, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(872, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2021-06-09 10:12:50', 2, 1, 51, 0, 1)
,(873, 'port', '%d', 'sentinel实例端口', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(874, 'dir', '%s', '工作目录', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(875, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(876, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(877, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(878, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(879, 'daemonize', 'no', '是否守护进程', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(880, 'tcp-backlog', '511', 'TCP连接完成队列', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(881, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(882, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(883, 'loglevel', 'notice', '日志级别', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(884, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(885, 'dir', '%s', 'redis工作目录', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(886, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(887, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(888, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(889, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(890, 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(891, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(892, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(893, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(894, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(895, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(896, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2021-06-09 10:12:50', 6, 0, 51, 0, 1)
,(897, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2021-06-09 10:12:50', 6, 0, 51, 0, 1)
,(898, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(899, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(900, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(901, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(902, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(903, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(904, 'hz', '10', '执行后台task数量,默认:10', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(905, 'port', '%d', '端口', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(906, 'maxmemory', '%dmb', '当前实例最大可用内存', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(907, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(908, 'appendonly', 'yes', '开启append only持久化模式', '2021-06-09 10:12:50', 6, 1, 51, 0, 1)
,(909, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(910, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(911, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(912, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(913, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(914, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(915, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(916, 'maxclients', '10000', '客户端最大连接数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(917, 'protected-mode', 'yes', '开启保护模式', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(918, 'bind', '0.0.0.0', '默认客户端都可连接', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(919, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(920, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(921, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(922, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(923, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(924, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(925, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(926, 'protected-mode', 'no', '关闭sentinel保护模式', '2021-06-09 10:12:50', 5, 1, 51, 0, 0)
,(927, 'activedefrag', 'no', '碎片整理开启', '2022-06-07 10:16:26', 6, 1, 51, 0, 1)
,(928, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(929, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(930, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(931, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(932, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(933, 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(934, 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(935, 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2021-06-09 10:12:50', 2, 1, 51, 0, 0)
,(936, 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(937, 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(938, 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(939, 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(940, 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(941, 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(942, 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(943, 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(944, 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(945, 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(946, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(947, 'repl-diskless-load', 'on-empty-db', '完全安全的情况下才使用无磁盘加载', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(948, 'tracking-table-max-keys', '1000000', '无效表键的最大填充数量', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(949, 'rdb-del-sync-files', 'yes', '默认:no 不删除rdb文件,删除实例中复制使用的不持久的RDB文件', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(950, 'lazyfree-lazy-user-del', 'yes', '默认值no,设置del操作命令同unlink一致', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(951, 'io-threads', '1', '读写io线程数量', '2021-06-09 15:22:48', 6, 1, 51, 0, 0)
,(952, 'io-threads-do-reads', 'no', '开启io读线程', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(953, 'jemalloc-bg-thread', 'yes', '启用Jemalloc后台线程清理', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(954, 'server_cpulist', '0-7:2', '设置redis服务器/io线程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(955, 'bio_cpulist', '1,3', '设置bio线程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(956, 'aof_rewrite_cpulist', '8-11', '设置aof重写子进程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(957, 'bgsave_cpulist', '1,10-11', '设置bgsave子进程的cpu使用权重', '2021-06-09 10:12:50', 6, 1, 51, 0, 0)
,(959, 'save', '', '关闭同步操作', '2021-07-01 10:31:11', 6, 1, 51, 0, 0)
,(1579, 'enable-module-command', 'yes', '是否支持module命令', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1582, 'save', '', '关闭同步操作', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1584, 'cluster-enabled', 'yes', '是否开启集群模式', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1585, 'cluster-node-timeout', '15000', '集群节点超时时间,默认15秒', '2024-01-17 10:23:00', 2, 1, 62, 0, 1)
,(1586, 'cluster-migration-barrier', '3', '从节点自动迁移至少需要的可用节点数,默认1个', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1587, 'cluster-config-file', 'nodes-%d.conf', '集群配置文件名称,格式:nodes-{port}.conf', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1588, 'cluster-require-full-coverage', 'no', '节点部分失败期间,其他节点是否继续工作', '2024-01-17 10:23:00', 2, 1, 62, 0, 1)
,(1589, 'port', '%d', 'sentinel实例端口', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1590, 'dir', '%s', '工作目录', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1591, 'sentinel monitor', '%s %s %d 1', 'master名称定义和最少参与监控的sentinel数,格式:masterName ip port num', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1592, 'sentinel down-after-milliseconds', '%s 20000', 'Sentinel判定服务器断线的毫秒数', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1593, 'sentinel failover-timeout', '%s 180000', '故障迁移超时时间,默认:3分钟', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1594, 'sentinel parallel-syncs', '%s 1', '在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1595, 'daemonize', 'no', '是否守护进程', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1596, 'tcp-backlog', '511', 'TCP连接完成队列', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1597, 'timeout', '0', '客户端闲置多少秒后关闭连接,默认为0,永不关闭', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1598, 'tcp-keepalive', '60', '检测客户端是否健康周期,默认关闭', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1599, 'loglevel', 'notice', '日志级别', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1600, 'databases', '16', '可用的数据库数,默认值为16个,默认数据库为0', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1601, 'dir', '%s', 'redis工作目录', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1602, 'stop-writes-on-bgsave-error', 'no', 'bgsave出错了不停写', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1603, 'repl-timeout', '60', 'master批量数据传输时间或者ping回复时间间隔,默认:60秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1604, 'repl-disable-tcp-nodelay', 'no', '是否禁用socket的NO_DELAY,默认关闭,影响主从延迟', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1605, 'repl-backlog-size', '10M', '复制缓存区,默认:1mb,配置为:10Mb', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1606, 'repl-backlog-ttl', '7200', 'master在没有从节点的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1607, 'lua-time-limit', '5000', 'Lua脚本最长的执行时间,单位为毫秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1608, 'slowlog-log-slower-than', '10000', '慢查询被记录的阀值,默认10毫秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1609, 'slowlog-max-len', '128', '最多记录慢查询的条数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1610, 'hash-max-ziplist-entries', '512', 'hash数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1611, 'hash-max-ziplist-value', '64', 'hash数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1612, 'list-max-ziplist-entries', '512', 'list数据结构优化参数', '2024-01-17 10:23:00', 6, 0, 62, 0, 1)
,(1613, 'list-max-ziplist-value', '64', 'list数据结构优化参数', '2024-01-17 10:23:00', 6, 0, 62, 0, 1)
,(1614, 'set-max-intset-entries', '512', 'set数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1615, 'zset-max-ziplist-entries', '128', 'zset数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1616, 'zset-max-ziplist-value', '64', 'zset数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1617, 'activerehashing', 'yes', '是否激活重置哈希,默认:yes', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1618, 'client-output-buffer-limit normal', '0 0 0', '客户端输出缓冲区限制(客户端)', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1619, 'client-output-buffer-limit pubsub', '32mb 8mb 60', '客户端输出缓冲区限制(发布订阅)', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1620, 'hz', '10', '执行后台task数量,默认:10', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1621, 'port', '%d', '端口', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1622, 'maxmemory', '%dmb', '当前实例最大可用内存', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1623, 'maxmemory-policy', 'volatile-lfu', '内存不够时,淘汰策略,默认:volatile-lfu', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1624, 'appendonly', 'yes', '开启append only持久化模式', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1625, 'appendfsync', 'everysec', '默认:aof每秒同步一次', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1626, 'appendfilename', 'appendonly-%d.aof', 'aof文件名称,默认:appendonly-{port}.aof', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1627, 'dbfilename', 'dump-%d.rdb', 'RDB文件默认名称,默认dump-{port}.rdb', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1628, 'aof-rewrite-incremental-fsync', 'yes', 'aof rewrite过程中,是否采取增量文件同步策略,默认:yes', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1629, 'no-appendfsync-on-rewrite', 'yes', '是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1630, 'auto-aof-rewrite-min-size', '64m', '触发rewrite的aof文件最小阀值,默认64m', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1631, 'auto-aof-rewrite-percentage', '%d', 'Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1632, 'maxclients', '10000', '客户端最大连接数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1633, 'protected-mode', 'no', '开启保护模式', '2024-06-05 11:55:57', 6, 1, 62, 0, 0)
,(1634, 'bind', '0.0.0.0 -::*', '默认客户端都可连接', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1635, 'list-max-ziplist-size', '-2', '8Kb对象以内采用ziplist', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1636, 'list-compress-depth', '0', '压缩方式,0:不压缩', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1637, 'always-show-logo', 'yes', 'redis启动是否显示logo', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1638, 'lazyfree-lazy-eviction', 'yes', '在被动淘汰键时,是否采用lazy free机制,默认:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1639, 'lazyfree-lazy-expire', 'yes', 'TTL的键过期是否采用lazyfree机制 默认值:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1640, 'lazyfree-lazy-server-del', 'yes', '隐式的DEL键(rename)是否采用lazyfree机制 默认值:no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1641, 'aof-use-rdb-preamble', 'yes', '是否开启混合持久化,默认值 no 不开启', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1642, 'protected-mode', 'no', '关闭sentinel保护模式', '2024-01-17 10:23:00', 5, 1, 62, 0, 0)
,(1643, 'activedefrag', 'no', '碎片整理开启', '2024-01-17 10:23:00', 6, 1, 62, 0, 1)
,(1644, 'active-defrag-threshold-lower', '10', '碎片率达到百分之多少开启整理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1645, 'active-defrag-threshold-upper', '100', '碎片率小余多少百分比开启整理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1646, 'active-defrag-ignore-bytes', '300mb', '内存碎片达到多少兆开启碎片', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1647, 'active-defrag-cycle-min', '10', '碎片整理最小cpu百分比', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1648, 'active-defrag-cycle-max', '30', '碎片整理最大cpu百分比', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1649, 'active-defrag-max-scan-fields', '1000', '内存碎片处理set/hash/zset/list 中的最大数量的项', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1650, 'replica-serve-stale-data', 'yes', '从节点与master断连或复制命令响应:yes 继续响应 no:相关命令返回异常信息', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1651, 'cluster-replica-validity-factor', '10', '从节点延迟有效性判断因子,默认10秒', '2024-01-17 10:23:00', 2, 1, 62, 0, 0)
,(1652, 'replica-priority', '100', '从节点的优先级,影响sentinel/cluster晋升master操作,0永远不晋升', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1653, 'replica-read-only', 'yes', '从节点是否只读: yes 只读', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1654, 'replica-lazy-flush', 'yes', '从节点发起全量复制,是否采用flushall async清理老数据 默认值 no', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1655, 'client-output-buffer-limit replica', '512mb 256mb 60', '客户端输出缓冲区限制', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1656, 'replica-ignore-maxmemory', 'yes', '从节点是否开启最大内存,避免一些过大缓冲区导致oom', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1657, 'stream-node-max-bytes', '4096', 'stream数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1658, 'stream-node-max-entries', '100', 'stream数据结构优化参数', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1659, 'dynamic-hz', 'yes', '自适应平衡空闲CPU的使用率和响应', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1660, 'rdb-save-incremental-fsync', 'yes', 'rdb同步刷盘是否采用增量fsync,每32MB执行一次fsync', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1661, 'repl-ping-replica-period', '10', '指定从节点定期ping master的周期,默认:10秒', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1662, 'latency-monitor-threshold', '30', '延迟事件阀值,单位ms', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1663, 'repl-diskless-load', 'on-empty-db', '完全安全的情况下才使用无磁盘加载', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1664, 'tracking-table-max-keys', '1000000', '无效表键的最大填充数量', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1665, 'rdb-del-sync-files', 'yes', '默认:no 不删除rdb文件,删除实例中复制使用的不持久的RDB文件', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1666, 'lazyfree-lazy-user-del', 'yes', '默认值no,设置del操作命令同unlink一致', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1667, 'io-threads', '1', '读写io线程数量', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1668, 'io-threads-do-reads', 'no', '开启io读线程', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1669, 'jemalloc-bg-thread', 'yes', '启用Jemalloc后台线程清理', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1670, 'server_cpulist', '0-7:2', '设置redis服务器/io线程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1671, 'bio_cpulist', '1,3', '设置bio线程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1672, 'aof_rewrite_cpulist', '8-11', '设置aof重写子进程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0)
,(1673, 'bgsave_cpulist', '1,10-11', '设置bgsave子进程的cpu使用权重', '2024-01-17 10:23:00', 6, 1, 62, 0, 0);
================================================
FILE: cachecloud-web/sql/update-system_resource.sql
================================================
-- system_resource change
ALTER TABLE system_resource ADD order_num int(6) NOT NULL DEFAULT '0' COMMENT '排序';
================================================
FILE: cachecloud-web/sql/update2.0-2.1.sql
================================================
create or replace table app_import(
id bigint auto_increment
primary key,
app_id bigint null comment '目标应用id',
instance_info text null comment '源redis实例信息',
redis_password varchar (200) null comment '源redis密码',
status int null comment '迁移状态:PREPARE(0, "准备", "应用导入-未开始"),
START(1, "进行中...", "应用导入-开始"),
ERROR(2, "error", "应用导入-出错"),
VERSION_BUILD_START(11, "进行中...", "新建redis版本-进行中"),
VERSION_BUILD_ERROR(12, "error", "新建redis版本-出错"),
VERSION_BUILD_END(20, "成功", "新建redis版本-完成"),
APP_BUILD_INIT(21, "准备就绪", "新建redis应用-准备就绪"),
APP_BUILD_START(22, "进行中...", "新建redis应用-进行中"),
APP_BUILD_ERROR(23, "error", "新建redis应用-出错"),
APP_BUILD_END(30, "成功", "新建redis应用-完成"),
MIGRATE_INIT(31, "准备就绪", "数据迁移-准备就绪"),
MIGRATE_START(32, "进行中...", "数据迁移-进行中"),
MIGRATE_ERROR(33, "error", "数据迁移-出错"),
MIGRATE_END(3, "成功", "应用导入-成功")',
step int null comment '导入阶段',
create_time timestamp default CURRENT_TIMESTAMP not null,
update_time timestamp default CURRENT_TIMESTAMP null,
migrate_id bigint null comment '数据迁移id',
mem_size int null comment '目标应用内存大小,单位G',
redis_version_name varchar (20) null comment '目标应用redis版本,格式:redis-x.x.x',
app_build_task_id bigint null comment '目标应用部署任务id',
source_type int null comment '源redis类型:7:cluster, 6:sentinel, 5:standalone'
);
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/ApplicationStarter.java
================================================
package com.sohu.cache;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
/**
* Created by zhangyijun
*/
@SpringBootApplication
@EnableAutoConfiguration(exclude = {MybatisAutoConfiguration.class})
@ImportResource("${spring.application.import}")
@EnableAsync
public class ApplicationStarter {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(ApplicationStarter.class);
app.setAdditionalProfiles();
app.setBannerMode(Banner.Mode.LOG);
app.run(args);
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/InstanceAlertService.java
================================================
package com.sohu.cache.alert;
import com.sohu.cache.entity.InstanceFault;
import java.util.List;
/**
* 实例报警检测
* @author leifu
* @Date 2014年12月16日
* @Time 下午1:56:35
*/
public interface InstanceAlertService {
/**
* 实例故障列表
*
* @param instId
* @return
*/
List getListByInstId(int instId);
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/bean/AlertConfigBaseData.java
================================================
package com.sohu.cache.alert.bean;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.entity.StandardStats;
/**
* 报警基础数据
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:19:10
*/
public class AlertConfigBaseData {
/**
* 基准数据
*/
private StandardStats standardStats;
/**
* 实例信息
*/
private InstanceInfo instanceInfo;
public StandardStats getStandardStats() {
return standardStats;
}
public void setStandardStats(StandardStats standardStats) {
this.standardStats = standardStats;
}
public InstanceInfo getInstanceInfo() {
return instanceInfo;
}
public void setInstanceInfo(InstanceInfo instanceInfo) {
this.instanceInfo = instanceInfo;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/impl/BaseAlertService.java
================================================
package com.sohu.cache.alert.impl;
import com.sohu.cache.alert.EmailComponent;
import com.sohu.cache.alert.WeChatComponent;
import com.sohu.cache.web.service.AppAlertRecordService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 报警基类
*
* @author leifu
* @Date 2014年12月16日
* @Time 下午4:15:11
*/
public class BaseAlertService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* 邮箱报警
*/
@Autowired(required = false)
protected EmailComponent emailComponent;
/**
* 报警记录
*/
@Autowired(required = false)
protected AppAlertRecordService appAlertRecordService;
/**
* 微信报警
*/
@Autowired(required = false)
protected WeChatComponent weChatComponent;
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/impl/InstanceAlertServiceImpl.java
================================================
package com.sohu.cache.alert.impl;
import com.sohu.cache.alert.InstanceAlertService;
import com.sohu.cache.dao.InstanceFaultDao;
import com.sohu.cache.entity.InstanceFault;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 实例报警
*
* @author leifu
*/
@Service
public class InstanceAlertServiceImpl implements InstanceAlertService {
@Autowired
private InstanceFaultDao instanceFaultDao;
@Override
public List getListByInstId(int instId) {
return instanceFaultDao.getListByInstId(instId);
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/AlertConfigStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.StandardStats;
import com.sohu.cache.redis.enums.InstanceAlertCompareTypeEnum;
import com.sohu.cache.util.JsonUtil;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.math.NumberUtils;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
* @author leifu
* @Date 2017年6月2日
* @Time 下午3:24:53
*/
public abstract class AlertConfigStrategy {
protected final static String MB_STRING = "MB";
protected final static String EMPTY = "";
/**
* 检查配置
*
* @param instanceAlertConfig
* @param alertConfigBaseData
*/
public abstract List checkConfig(InstanceAlertConfig instanceAlertConfig,
AlertConfigBaseData alertConfigBaseData);
/**
* 比较long类型
*
* @param instanceAlertConfig 报警配置
* @param currentValue 当前值
* @return
*/
protected boolean isCompareLongRight(InstanceAlertConfig instanceAlertConfig, long currentValue) {
long alertValue = NumberUtils.toLong(instanceAlertConfig.getAlertValue());
int compareType = instanceAlertConfig.getCompareType();
if (compareType == InstanceAlertCompareTypeEnum.LESS_THAN.getValue() && currentValue < alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.MORE_THAN.getValue() && currentValue > alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.EQUAL.getValue() && currentValue == alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.NOT_EQUAL.getValue() && currentValue != alertValue) {
return false;
}
return true;
}
/**
* 比较int类型
*
* @param instanceAlertConfig 报警配置
* @param currentValue 当前值
* @return
*/
protected boolean isCompareIntRight(InstanceAlertConfig instanceAlertConfig, int currentValue) {
int alertValue = NumberUtils.toInt(instanceAlertConfig.getAlertValue());
int compareType = instanceAlertConfig.getCompareType();
if (compareType == InstanceAlertCompareTypeEnum.LESS_THAN.getValue() && currentValue < alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.MORE_THAN.getValue() && currentValue > alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.EQUAL.getValue() && currentValue == alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.NOT_EQUAL.getValue() && currentValue != alertValue) {
return false;
}
return true;
}
/**
* 比较double类型
*
* @param instanceAlertConfig 报警配置
* @param currentValue 当前值
* @return
*/
protected boolean isCompareDoubleRight(InstanceAlertConfig instanceAlertConfig, double currentValue) {
double alertValue = NumberUtils.toDouble(instanceAlertConfig.getAlertValue());
int compareType = instanceAlertConfig.getCompareType();
if (compareType == InstanceAlertCompareTypeEnum.LESS_THAN.getValue() && currentValue < alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.MORE_THAN.getValue() && currentValue > alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.EQUAL.getValue() && currentValue == alertValue) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.NOT_EQUAL.getValue() && currentValue != alertValue) {
return false;
}
return true;
}
/**
* 比较字符串类型
*
* @param instanceAlertConfig 报警配置
* @param currentValue 当期值
* @return
*/
protected boolean isCompareStringRight(InstanceAlertConfig instanceAlertConfig, String currentValue) {
String alertValue = instanceAlertConfig.getAlertValue();
int compareType = instanceAlertConfig.getCompareType();
if (compareType == InstanceAlertCompareTypeEnum.EQUAL.getValue() && currentValue.equals(alertValue)) {
return false;
} else if (compareType == InstanceAlertCompareTypeEnum.NOT_EQUAL.getValue()
&& !currentValue.equals(alertValue)) {
return false;
}
return true;
}
/**
* 获取全量统计项中的内容
*/
protected static Object getValueFromRedisInfo(StandardStats standardStats, String attribute) {
if (standardStats == null) {
return null;
}
// 转换成Map
Map infoMap = JsonUtil.fromJson(standardStats.getInfoJson(), Map.class);
if (MapUtils.isEmpty(infoMap)) {
return null;
}
for (Entry entry : infoMap.entrySet()) {
Object object = entry.getValue();
// 转换成Map>
if (!(object instanceof Map)) {
continue;
}
Map sectionInfoMap = (Map) object;
if (sectionInfoMap.containsKey(attribute)) {
return MapUtils.getObject(sectionInfoMap, attribute);
}
}
return null;
}
/**
* 获取差值统计项中的内容
* @param redisInfo
* @param attribute
* @return
*/
protected static Object getValueFromDiffInfo(StandardStats standardStats, String attribute) {
if (standardStats == null) {
return null;
}
Map diffInfoMap = JsonUtil.fromJson(standardStats.getDiffJson(), Map.class);
if (MapUtils.isEmpty(diffInfoMap)) {
return null;
}
return MapUtils.getObject(diffInfoMap, attribute);
}
/**
* 获取cluster info统计项中的内容
* @param redisInfo
* @param attribute
* @return
*/
protected static Object getValueFromClusterInfo(StandardStats standardStats, String attribute) {
if (standardStats == null) {
return null;
}
Map clusterInfoMap = JsonUtil.fromJson(standardStats.getClusterInfoJson(), Map.class);
if (MapUtils.isEmpty(clusterInfoMap)) {
return null;
}
return MapUtils.getObject(clusterInfoMap, attribute);
}
/**
* 把字节变为兆
* @param value
* @return
*/
protected long changeByteToMB(long value) {
return value / 1024 / 1024;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/AofCurrentSizeAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* aof当前尺寸检测
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class AofCurrentSizeAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.aof_current_size.getValue());
// 没有配置Aof
if (object == null) {
return null;
}
long aofCurrentSize = NumberUtils.toLong(object.toString());
aofCurrentSize = changeByteToMB(aofCurrentSize);
boolean compareRight = isCompareLongRight(instanceAlertConfig, aofCurrentSize);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(aofCurrentSize),
instanceInfo.getAppId(), MB_STRING));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/ClientBiggestInputBufAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 客户端输入缓冲区最大buffer
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class ClientBiggestInputBufAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.client_biggest_input_buf.getValue());
if (object == null) {
return null;
}
// 关系比对
long clientBiggestInputBuf = NumberUtils.toLong(object.toString()) ;
clientBiggestInputBuf = changeByteToMB(clientBiggestInputBuf);
boolean compareRight = isCompareLongRight(instanceAlertConfig, clientBiggestInputBuf);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(clientBiggestInputBuf),
instanceInfo.getAppId(), MB_STRING));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/ClientLongestOutputListAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 客户端输出缓冲区最大队列长度
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class ClientLongestOutputListAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.client_longest_output_list.getValue());
if (object == null) {
return null;
}
// 关系比对
long clientLongestOutputList = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, clientLongestOutputList);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(clientLongestOutputList),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/ClusterSlotsOkAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisClusterInfoEnum;
/**
* 集群成功分配槽个数监控
* @author leifu
* @Date 2017年6月21日
* @Time 下午3:01:21
*/
public class ClusterSlotsOkAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromClusterInfo(alertConfigBaseData.getStandardStats(), RedisClusterInfoEnum.cluster_slots_ok.getValue());
if (object == null) {
return null;
}
// 关系比对
int clusterSlotsOk = NumberUtils.toInt(object.toString());
boolean compareRight = isCompareIntRight(instanceAlertConfig, clusterSlotsOk);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(clusterSlotsOk),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/ClusterStateAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisClusterInfoEnum;
/**
* 集群状态监控
* @author leifu
* @Date 2017年6月21日
* @Time 下午3:01:21
*/
public class ClusterStateAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromClusterInfo(alertConfigBaseData.getStandardStats(), RedisClusterInfoEnum.cluster_state.getValue());
if (object == null) {
return null;
}
// 关系比对
String clusterState = object.toString();
boolean compareRight = isCompareStringRight(instanceAlertConfig, clusterState);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(clusterState),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/DefaultCommonAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import org.apache.commons.lang.math.NumberUtils;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* aof当前尺寸检测
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class DefaultCommonAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), instanceAlertConfig.getAlertConfig());
if (object == null) {
return null;
}
if(judgeNumber(object)){
if(judegNumberIsDouble(object)){
double currentValue= NumberUtils.toDouble(object.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, currentValue);
if (compareRight) {
return null;
}
}else{
long currentValue = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, currentValue);
if (compareRight) {
return null;
}
}
}else{
String currentValue = object.toString();
boolean compareRight = isCompareStringRight(instanceAlertConfig, currentValue);
if (compareRight) {
return null;
}
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, object.toString(),
instanceInfo.getAppId(), EMPTY));
}
private boolean judgeNumber(Object object){
Pattern numberPattern = Pattern.compile("^-?(([0-9]|([1-9][0-9]*))(\\.[0-9]+)?)$");
Matcher matcher = numberPattern.matcher(object.toString());
return matcher.matches();
}
private boolean judegNumberIsDouble(Object object){
return object.toString().contains(".");
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/InstantaneousOpsPerSecAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 实时ops
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class InstantaneousOpsPerSecAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.instantaneous_ops_per_sec.getValue());
if (object == null) {
return null;
}
// 关系比对
long instantaneousOpsPerSec = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, instantaneousOpsPerSec);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(instantaneousOpsPerSec),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/LatestForkUsecAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 上一次fork的微秒
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class LatestForkUsecAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.latest_fork_usec.getValue());
if (object == null) {
return null;
}
// 关系比对
long latestForkUsec = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, latestForkUsec);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(latestForkUsec),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MasterSlaveOffsetAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 主从偏移量监控
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MasterSlaveOffsetAlertStrategy extends AlertConfigStrategy {
/**
* 格式:
* connected_slaves:2
* slave0:ip=x.x.x.x,port=6380,state=online,offset=33119690469561,lag=1
* slave1:ip=x.x.x.x,port=6380,state=online,offset=33119690513578,lag=0
* master_repl_offset:33119653194425
*/
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object connectedSlavesObject = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.connected_slaves.getValue());
if (connectedSlavesObject == null) {
return null;
}
int connectedSlaves = NumberUtils.toInt(connectedSlavesObject.toString());
if (connectedSlaves == 0) {
return null;
}
Object masterReplOffsetObject = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.master_repl_offset.getValue());
if (masterReplOffsetObject == null) {
return null;
}
List instanceAlertValueResultList = new ArrayList();
for (int i = 0; i < connectedSlaves; i++) {
Object slaveInfo = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), "slave" + i);
if (slaveInfo == null) {
continue;
}
String[] arr = slaveInfo.toString().split(",");
if (arr.length < 5) {
continue;
}
String state = arr[2];
if (!"state=online".equals(state)) {
continue;
}
String slaveHostPort = arr[0] + "," + arr[1];
String slaveOffsetStr = arr[3];
String[] slaveOffsetArr = slaveOffsetStr.split("=");
if (slaveOffsetArr.length != 2) {
continue;
}
String slaveOffset = slaveOffsetArr[1];
long diffOffset = Math.abs(NumberUtils.toLong(masterReplOffsetObject.toString()) - NumberUtils.toLong(slaveOffset));
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, diffOffset);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
InstanceAlertValueResult instanceAlertValueResult = new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(diffOffset),
instanceInfo.getAppId(), EMPTY);
String otherInfo = String.format("masterOffset is %s
slaveOffset is %s
%s", masterReplOffsetObject.toString(), slaveOffset, slaveHostPort);
instanceAlertValueResult.setOtherInfo(otherInfo);
instanceAlertValueResultList.add(instanceAlertValueResult);
}
return instanceAlertValueResultList;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MemFragmentationRatioAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 内存碎片率
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MemFragmentationRatioAlertStrategy extends AlertConfigStrategy {
/**
* 实例最小500MB才进行内存碎片率检查,否则价值不是很大
*/
private final static long MIN_CHECK_MEMORY = 500L * 1024 * 1024;
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
// 检查内存
Object usedMemoryObject = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.used_memory.getValue());
long usedMemory = NumberUtils.toLong(usedMemoryObject.toString());
if (usedMemory < MIN_CHECK_MEMORY) {
return null;
}
// 内存碎片率
Object memFragmentationRatioObject = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.mem_fragmentation_ratio.getValue());
if (memFragmentationRatioObject == null) {
return null;
}
// 关系比对
double memFragmentationRatio = NumberUtils.toDouble(memFragmentationRatioObject.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, memFragmentationRatio);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
InstanceAlertValueResult instanceAlertValueResult = new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(memFragmentationRatio),
instanceInfo.getAppId(), EMPTY);
instanceAlertValueResult.setOtherInfo(String.format("内存使用为%s MB", String.valueOf(changeByteToMB(usedMemory))));
return Arrays.asList(instanceAlertValueResult);
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteAofDelayedFsyncAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟aof delay fsync检测
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteAofDelayedFsyncAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.aof_delayed_fsync.getValue());
if (object == null) {
return null;
}
long aofDelayedFsync = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, aofDelayedFsync);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(aofDelayedFsync),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteRejectedConnectionsAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟拒绝客户端连接数
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteRejectedConnectionsAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.rejected_connections.getValue());
if (object == null) {
return null;
}
long minuteRejectedConnections = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, minuteRejectedConnections);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(minuteRejectedConnections),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteSyncFullAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟全量复制次数
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteSyncFullAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.sync_full.getValue());
if (object == null) {
return null;
}
long minuteSyncFull = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, minuteSyncFull);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(minuteSyncFull),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteSyncPartialErrAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟部分复制失败次数
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteSyncPartialErrAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.sync_partial_err.getValue());
if (object == null) {
return null;
}
long minuteSyncPartialErr = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, minuteSyncPartialErr);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(minuteSyncPartialErr),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteSyncPartialOkAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟部分复制成功次数
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteSyncPartialOkAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.sync_partial_ok.getValue());
if (object == null) {
return null;
}
long minuteSyncPartialOk = NumberUtils.toLong(object.toString());
boolean compareRight = isCompareLongRight(instanceAlertConfig, minuteSyncPartialOk);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(minuteSyncPartialOk),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteTotalNetInputMBytesAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟输入网络流量
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteTotalNetInputMBytesAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object totalNetInputBytesObject = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.total_net_input_bytes.getValue());
if (totalNetInputBytesObject == null) {
return null;
}
// 关系比对
long totalNetInputBytes = NumberUtils.toLong(totalNetInputBytesObject.toString()) ;
totalNetInputBytes = changeByteToMB(totalNetInputBytes);
boolean compareRight = isCompareLongRight(instanceAlertConfig, totalNetInputBytes);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(totalNetInputBytes),
instanceInfo.getAppId(), MB_STRING));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteTotalNetOutputMBytesAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* 分钟输出网络流量
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class MinuteTotalNetOutputMBytesAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object totalNetOutputBytesObject = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.total_net_output_bytes.getValue());
if (totalNetOutputBytesObject == null) {
return null;
}
// 关系比对
long totalNetOutputBytes = NumberUtils.toLong(totalNetOutputBytesObject.toString());
totalNetOutputBytes = changeByteToMB(totalNetOutputBytes);
boolean compareRight = isCompareLongRight(instanceAlertConfig, totalNetOutputBytes);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(totalNetOutputBytes),
instanceInfo.getAppId(), MB_STRING));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteUsedCpuSysChStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
import org.apache.commons.lang.math.NumberUtils;
import java.util.Arrays;
import java.util.List;
/**
* @Author: rucao
* @Date: 2021/6/9 上午11:03
*/
public class MinuteUsedCpuSysChStrategy extends AlertConfigStrategy{
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.used_cpu_sys_children.getValue());
if (object == null) {
return null;
}
double min_used_cpu_sys_children_err= NumberUtils.toDouble(object.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, min_used_cpu_sys_children_err);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(min_used_cpu_sys_children_err),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteUsedCpuSysStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
import org.apache.commons.lang.math.NumberUtils;
import java.util.Arrays;
import java.util.List;
/**
* @Author: rucao
* @Date: 2021/6/9 上午11:03
*/
public class MinuteUsedCpuSysStrategy extends AlertConfigStrategy{
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.used_cpu_sys.getValue());
if (object == null) {
return null;
}
double min_used_cpu_sys_err= NumberUtils.toDouble(object.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, min_used_cpu_sys_err);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(min_used_cpu_sys_err),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteUsedCpuUserChStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
import org.apache.commons.lang.math.NumberUtils;
import java.util.Arrays;
import java.util.List;
/**
* @Author: rucao
* @Date: 2021/6/9 上午11:03
*/
public class MinuteUsedCpuUserChStrategy extends AlertConfigStrategy{
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.used_cpu_user_children.getValue());
if (object == null) {
return null;
}
double min_used_cpu_user_children_err= NumberUtils.toDouble(object.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, min_used_cpu_user_children_err);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(min_used_cpu_user_children_err),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/MinuteUsedCpuUserStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
import org.apache.commons.lang.math.NumberUtils;
import java.util.Arrays;
import java.util.List;
/**
* @Author: rucao
* @Date: 2021/6/9 上午11:03
*/
public class MinuteUsedCpuUserStrategy extends AlertConfigStrategy{
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromDiffInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.used_cpu_user.getValue());
if (object == null) {
return null;
}
double min_used_cpu_user_err= NumberUtils.toDouble(object.toString());
boolean compareRight = isCompareDoubleRight(instanceAlertConfig, min_used_cpu_user_err);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(min_used_cpu_user_err),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/alert/strategy/RdbLastBgsaveStatusAlertStrategy.java
================================================
package com.sohu.cache.alert.strategy;
import java.util.Arrays;
import java.util.List;
import com.sohu.cache.alert.bean.AlertConfigBaseData;
import com.sohu.cache.entity.InstanceAlertConfig;
import com.sohu.cache.entity.InstanceAlertValueResult;
import com.sohu.cache.entity.InstanceInfo;
import com.sohu.cache.redis.enums.RedisInfoEnum;
/**
* RDB最近一次bgsave的执行状态
*
* @author leifu
* @Date 2017年6月16日
* @Time 下午2:34:10
*/
public class RdbLastBgsaveStatusAlertStrategy extends AlertConfigStrategy {
@Override
public List checkConfig(InstanceAlertConfig instanceAlertConfig, AlertConfigBaseData alertConfigBaseData) {
Object object = getValueFromRedisInfo(alertConfigBaseData.getStandardStats(), RedisInfoEnum.rdb_last_bgsave_status.getValue());
if (object == null) {
return null;
}
// 关系比对
String rdbLastBgsaveStatus = object.toString();
boolean compareRight = isCompareStringRight(instanceAlertConfig, rdbLastBgsaveStatus);
if (compareRight) {
return null;
}
InstanceInfo instanceInfo = alertConfigBaseData.getInstanceInfo();
return Arrays.asList(new InstanceAlertValueResult(instanceAlertConfig, instanceInfo, String.valueOf(rdbLastBgsaveStatus),
instanceInfo.getAppId(), EMPTY));
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/AsyncService.java
================================================
package com.sohu.cache.async;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 异步服务类
* Created by yijunzhang on 14-6-18.
*/
public interface AsyncService {
/**
* 提交任务
*
* @param callable
* @return 返回是否提交成功
*/
public boolean submitFuture(KeyCallable> callable);
/**
* 提交任务并可拿到返回结果
* @param callable
* @return
*/
public Future> submitFutureWithRst(KeyCallable> callable);
/**
* 提交任务
*
* @param threadPoolKey
* @param callable
* @return 返回是否提交成功
*/
public boolean submitFuture(String threadPoolKey, KeyCallable> callable);
/**
* 提交任务
*
* @param threadPoolKey
* @param callable
* @return 返回任务结果
*/
public Future> submitFutureWithRst(String threadPoolKey, KeyCallable> callable);
/**
* 提交任务
*
* @param callable
* @return 返回成功结果
*/
public Future> submitFuture(Callable> callable);
/**
* 装配key对应的线程池
*
* @param threadPoolKey
* @param threadPool
*/
public void assemblePool(String threadPoolKey, ThreadPoolExecutor threadPool);
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/AsyncThreadPoolFactory.java
================================================
package com.sohu.cache.async;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 异步线程池 Created by yijunzhang on 14-7-10.
*/
public class AsyncThreadPoolFactory {
public static final String DEFAULT_ASYNC_POOL = "async-pool";
public static final ThreadPoolExecutor DEFAULT_ASYNC_THREAD_POOL = new ThreadPoolExecutor(256, 256,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(1024),
new NamedThreadFactory(DEFAULT_ASYNC_POOL, true),new CounterRejectedExecutionHandler());
public static final String TASK_EXECUTE_POOL = "task-execute-pool";
public static final ThreadPoolExecutor TASK_EXECUTE_THREAD_POOL =
new ThreadPoolExecutor(200, 200, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(500), new NamedThreadFactory(TASK_EXECUTE_POOL, true), new CounterRejectedExecutionHandler());
public static final String CLIENT_REPORT_POOL ="client-report-pool";
public static final ThreadPoolExecutor CLIENT_REPORT_THREAD_POOL = new ThreadPoolExecutor(100,
100, 0L, TimeUnit.MILLISECONDS,
new SynchronousQueue(), new NamedThreadFactory(CLIENT_REPORT_POOL, true),new CounterRejectedExecutionHandler());
public static final String REDIS_SLOWLOG_POOL = "redis-slowlog-pool";
public static final ThreadPoolExecutor REDIS_SLOWLOG_THREAD_POOL = new ThreadPoolExecutor(30,
30, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(256), new NamedThreadFactory(REDIS_SLOWLOG_POOL, true),new CounterRejectedExecutionHandler());
public static final String MACHINE_POOL = "machine-ssh-pool";
public static final ThreadPoolExecutor MACHINE_THREAD_POOL = new ThreadPoolExecutor(256,
512, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(2048), new NamedThreadFactory(MACHINE_POOL, true));
public static final String APP_POOL = "app-pool";
public static final ThreadPoolExecutor APP_THREAD_POOL = new ThreadPoolExecutor(10,
10, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(256), new NamedThreadFactory(APP_POOL, true));
public static final String BREVITY_SCHEDULER_POOL = "brevity-scheduler-pool";
public static final ThreadPoolExecutor BREVITY_SCHEDULER_ASYNC_THREAD_POOL = new ThreadPoolExecutor(10, 50,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(2048),
new NamedThreadFactory(BREVITY_SCHEDULER_POOL, true),new CounterRejectedExecutionHandler());
public static final String RESHARD_PROCESS_POOL = "redis-cluster-reshard";
public static final ThreadPoolExecutor RESHARD_PROCESS_THREAD_POOL = new ThreadPoolExecutor(10, 100,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(256),
new NamedThreadFactory(RESHARD_PROCESS_POOL, false),new CounterRejectedExecutionHandler());
public static final String ALERT_RECORD_POOL = "alert-record-pool";
public static final ThreadPoolExecutor ALERT_RECORD_THREAD_POOL = new ThreadPoolExecutor(3, 10,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(1024),
new NamedThreadFactory(ALERT_RECORD_POOL, false));
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/CounterRejectedExecutionHandler.java
================================================
package com.sohu.cache.async;
import com.google.common.util.concurrent.AtomicLongMap;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @author fulei
* @date 2018年8月18日
* @time 上午10:29:59
*/
public class CounterRejectedExecutionHandler implements RejectedExecutionHandler {
private Logger logger = LoggerFactory.getLogger(CounterRejectedExecutionHandler.class);
public static final AtomicLongMap THREAD_POOL_REJECT_MAP = AtomicLongMap.create();
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
NamedThreadFactory namedThreadFactory = (NamedThreadFactory) executor.getThreadFactory();
String threadPoolName = namedThreadFactory.getThreadPoolName();
if (StringUtils.isBlank(threadPoolName)) {
logger.warn("threadPoolName is null");
return;
}
THREAD_POOL_REJECT_MAP.getAndIncrement(threadPoolName);
throw new RejectedExecutionException("Task " + r.toString() +
" rejected from " +
executor.toString());
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/KeyCallable.java
================================================
package com.sohu.cache.async;
import java.util.concurrent.Callable;
/**
* Created by yijunzhang on 14-6-18.
*/
public abstract class KeyCallable implements Callable {
private final String key;
private volatile boolean cancelled = false;
public KeyCallable(String key) {
this.key = key;
}
public abstract V execute();
@Override
public V call() throws Exception {
if (!cancelled) {
V v = execute();
return v;
}
return null;
}
public void cancel() {
this.cancelled = true;
}
public String getKey() {
return key;
}
public boolean isCancelled() {
return cancelled;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/KeyFuture.java
================================================
package com.sohu.cache.async;
import java.util.concurrent.Future;
/**
* Created by yijunzhang on 15-1-20.
*/
public class KeyFuture {
private final String key;
private final Future future;
public KeyFuture(String key, Future future) {
this.key = key;
this.future = future;
}
public String getKey() {
return key;
}
public Future getFuture() {
return future;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/NamedThreadFactory.java
================================================
package com.sohu.cache.async;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by yijunzhang on 14-6-18.
*/
public class NamedThreadFactory implements ThreadFactory {
private static final AtomicInteger POOL_SEQ = new AtomicInteger(1);
private final AtomicInteger mThreadNum = new AtomicInteger(1);
private final String mPrefix;
private final boolean mDaemo;
private final ThreadGroup mGroup;
public NamedThreadFactory() {
this("pool-" + POOL_SEQ.getAndIncrement(), false);
}
public NamedThreadFactory(String prefix) {
this(prefix, false);
}
public NamedThreadFactory(String prefix, boolean daemo) {
mPrefix = prefix + "-thread-";
mDaemo = daemo;
SecurityManager s = System.getSecurityManager();
mGroup = (s == null) ? Thread.currentThread().getThreadGroup() : s.getThreadGroup();
}
public Thread newThread(Runnable runnable) {
String name = mPrefix + mThreadNum.getAndIncrement();
Thread ret = new Thread(mGroup, runnable, name, 0);
ret.setDaemon(mDaemo);
return ret;
}
public ThreadGroup getThreadGroup() {
return mGroup;
}
public String getThreadPoolName() {
return mPrefix;
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/async/impl/AsyncServiceImpl.java
================================================
package com.sohu.cache.async.impl;
import com.sohu.cache.async.AsyncService;
import com.sohu.cache.async.AsyncThreadPoolFactory;
import com.sohu.cache.async.KeyCallable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.PreDestroy;
import java.util.concurrent.*;
/**
* Created by yijunzhang on 14-6-18.
*/
@Service
public class AsyncServiceImpl implements AsyncService {
private final static String DEFAULT_THREAD_POOL = "default_thread_pool";
public final ConcurrentMap threadPoolMap = new ConcurrentSkipListMap();
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final ExecutorService defaultThreadPool = AsyncThreadPoolFactory.DEFAULT_ASYNC_THREAD_POOL;
public AsyncServiceImpl() {
threadPoolMap.put(DEFAULT_THREAD_POOL, defaultThreadPool);
}
@Override
public boolean submitFuture(KeyCallable> callable) {
return submitFuture(DEFAULT_THREAD_POOL, callable);
}
@Override
public Future> submitFutureWithRst(KeyCallable> callable) {
return submitFuture((Callable)callable);
}
@Override
public boolean submitFuture(String threadPoolKey, KeyCallable> callable) {
try {
ExecutorService executorService = threadPoolMap.get(threadPoolKey);
if (executorService == null) {
logger.warn("threadPoolKey={} not found , used defaultThreadPool", threadPoolKey);
executorService = defaultThreadPool;
}
Future future = executorService.submit(callable);
return true;
} catch (Exception e) {
logger.error(callable.getKey(), e);
return false;
}
}
@Override
public Future> submitFutureWithRst(String threadPoolKey, KeyCallable> callable) {
try {
ExecutorService executorService = threadPoolMap.get(threadPoolKey);
if (executorService == null) {
logger.warn("threadPoolKey={} not found , used defaultThreadPool", threadPoolKey);
executorService = defaultThreadPool;
}
Future> future = executorService.submit(callable);
return future;
} catch (Exception e) {
logger.error(callable.getKey(), e);
return null;
}
}
@Override
public Future> submitFuture(Callable> callable) {
try {
Future> future = defaultThreadPool.submit(callable);
return future;
} catch (Exception e) {
logger.error(e.getMessage(), e);
return null;
}
}
@Override
public void assemblePool(String threadPoolKey, ThreadPoolExecutor threadPool) {
ExecutorService executorService = threadPoolMap.putIfAbsent(threadPoolKey, threadPool);
if (executorService != null) {
logger.warn("{} is assembled", threadPoolKey);
}
}
@PreDestroy
public void destory() {
for (ExecutorService executorService : threadPoolMap.values()) {
if (!executorService.isShutdown()) {
executorService.shutdown();
}
}
threadPoolMap.clear();
}
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/client/AppClientReportConstant.java
================================================
package com.sohu.cache.client;
import java.util.Arrays;
import java.util.List;
/**
* Created by rucao on 2019/12/18
*/
public class AppClientReportConstant {
public final static List ClientReportCommandBlacklist = Arrays.asList("info", "ping");
}
================================================
FILE: cachecloud-web/src/main/java/com/sohu/cache/client/AppClientReportModel.java
================================================
package com.sohu.cache.client;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* Created by rucao on 2019/12/16
*/
@Data
public class AppClientReportModel {
/**
* appId
*/
private long appId;
/**
* 客户端版本
*/
private String clientVersion;
/**
* 客户端ip
*/
private String clientIp;
/**
* 客户端连接池配置信息
*/
private Map config;
/**
* 上报数据时间
*/
private long currentMin;
/**
* 统计耗时
*/
private long cost;
/**
* 上报异常数据
*/
private List