Documentation
¶
Index ¶
- type AlarmDetail
- type AlarmHistoryDetail
- type BufferPoolInfo
- type ClusterCreateSpec
- type ClusterDetail
- type ConnectView
- type ConnectionInfo
- type DBStatistic
- type DataPoint
- type DeadLockDetail
- type DeadLockOverview
- type DiagnoseDetail
- type DiagnoseGeneral
- type DiagnoseGeneralItem
- type DiagnoseMetric
- type DiagnoseMetricItem
- type DiagnoseScore
- type DiskView
- type EngineView
- type ErrorInfo
- type ExecutionPlan
- type FieldList
- type GidList
- type HostStatistic
- type IndexInfo
- type InspectTaskModel
- type InspectTopResource
- type InstanceFilter
- type InstancesCutInfo
- type InstancesInfo
- type KV
- type KVs
- type LockStatistic
- type Metric
- type MetricData
- type MetricResourceModel
- type NowSession
- type Panel
- type PanelClusterItem
- type Point
- type SchemaView
- type ServerInfo
- type Session
- type SessionForKill
- type SlowDigestLog
- type SlowLog
- type SlowLowView
- type SlowSession
- type Statistic
- type StatisticInt
- type StatisticSimple
- type StatisticString
- type SupportMetric
- type SystemView
- type Table
- type TableStorage
- type TableStorageInfo
- type TuningAdvice
- type UnCommitTransaction
- type UnCommitTrx
- type UntrxLock
- type UserStatistic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmDetail ¶
type AlarmDetail struct { /* 实例id (Optional) */ InstanceId string `json:"instanceId"` /* 实例名称 (Optional) */ InstanceName string `json:"instanceName"` /* 监控项 (Optional) */ Metric string `json:"metric"` /* 触发条件 (Optional) */ TriggerCondition string `json:"triggerCondition"` /* 告警级别,从低到高为‘告警’,‘严重’,‘致命’ (Optional) */ AlarmLevel string `json:"alarmLevel"` /* 告警级别标记 (Optional) */ AlarmLevelTag string `json:"alarmLevelTag"` /* 首次告警时间 (Optional) */ FirstAlarmTime string `json:"firstAlarmTime"` /* 最近一次告警时间 (Optional) */ LastAlarmTime string `json:"lastAlarmTime"` /* 持续时间,单位:min (Optional) */ DurationTime int `json:"durationTime"` /* 发生次数 (Optional) */ Frequency int `json:"frequency"` }
type AlarmHistoryDetail ¶
type AlarmHistoryDetail struct { /* 实例id (Optional) */ InstanceId string `json:"instanceId"` /* 实例名称 (Optional) */ InstanceName string `json:"instanceName"` /* 监控项 (Optional) */ Metric string `json:"metric"` /* 触发条件 (Optional) */ TriggerCondition string `json:"triggerCondition"` /* 告警级别,从低到高为‘告警’,‘严重’,‘致命’ (Optional) */ AlarmLevel string `json:"alarmLevel"` /* 告警级别标记 (Optional) */ AlarmLevelTag string `json:"alarmLevelTag"` /* 告警时间 (Optional) */ AlarmTime string `json:"alarmTime"` /* 持续时间,单位:min (Optional) */ DurationTime string `json:"durationTime"` }
type BufferPoolInfo ¶
type ClusterCreateSpec ¶
type ClusterCreateSpec struct { /* 接入类型 public, rds, ecs, gateway */ ConnectType string `json:"connectType"` /* 地域 */ Region string `json:"region"` /* 数据库库类型:MySQL,Redis,TiDB 目前只支持MySQL */ DatabaseType string `json:"databaseType"` /* rds实例id,云数据库需要 (Optional) */ ClusterGid string `json:"clusterGid"` /* 用户名,自建数据库需要 (Optional) */ Name string `json:"name"` /* 主机域名,自建数据库需要 (Optional) */ Host string `json:"host"` /* 端口号,自建数据库需要 (Optional) */ Port int `json:"port"` /* 数据库账号,自建数据库需要 (Optional) */ AccountName string `json:"accountName"` /* 数据库密码,自建数据库需要 (Optional) */ Password string `json:"password"` }
type ClusterDetail ¶
type ClusterDetail struct { /* 全局实例id (Optional) */ InstanceGid string `json:"instanceGid"` /* 接入类型,目前取值为:rds (Optional) */ ConnectType string `json:"connectType"` /* 数据库接入类型,如:MYSQL (Optional) */ DatabaseType string `json:"databaseType"` /* 创建时间 (Optional) */ CreateTime string `json:"createTime"` /* rds实例id (Optional) */ InstanceId string `json:"instanceId"` /* rds实例名称 (Optional) */ InstanceName string `json:"instanceName"` /* 地域代码 (Optional) */ Region string `json:"region"` /* 实例类型,如:cluster,standalone (Optional) */ InstanceType string `json:"instanceType"` /* 数据库引擎 MySQL (Optional) */ Engine string `json:"engine"` /* 实例版本信息 5.7 (Optional) */ EngineVersion string `json:"engineVersion"` /* 实例规格 (Optional) */ InstanceClass string `json:"instanceClass"` /* 实例运行状态 (Optional) */ InstanceStatus string `json:"instanceStatus"` }
type ConnectView ¶
type ConnectView struct { /* 活跃连接数 (Optional) */ Running StatisticString `json:"running"` /* 总连接数 (Optional) */ Total StatisticString `json:"total"` /* 最大连接数 (Optional) */ Max string `json:"max"` /* 连接使用率 (Optional) */ Ratio StatisticString `json:"ratio"` /* 扣分说明 (Optional) */ Message string `json:"message"` }
type ConnectionInfo ¶
type DBStatistic ¶
type DataPoint ¶
type DataPoint struct { /* 时间戳,精确到毫秒,如:1606836371000。 (Optional) */ Timestamp int64 `json:"timestamp"` /* 值 (Optional) */ Value interface{} `json:"value"` }
type DeadLockDetail ¶
type DeadLockDetail struct { /* 事务标记名称 (Optional) */ TrxName string `json:"trxName"` /* Session ID (Optional) */ SessionId string `json:"sessionId"` /* 请求类型 (Optional) */ QueryType string `json:"queryType"` /* 事务id (Optional) */ TrxId string `json:"trxId"` /* 访问来源host (Optional) */ Host string `json:"host"` /* 涉及表名 (Optional) */ TableName string `json:"tableName"` /* 等待锁 (Optional) */ WaitLock string `json:"waitLock"` /* 等待锁索引名 (Optional) */ WaitLockIndex string `json:"waitLockIndex"` /* 等待锁类型 (Optional) */ WaitLockType string `json:"waitLockType"` /* 持有锁 (Optional) */ HoldLock string `json:"holdLock"` /* 持有锁索引名 (Optional) */ HoldLockIndex string `json:"holdLockIndex"` /* 持有锁类型 (Optional) */ HoldLockType string `json:"holdLockType"` /* 事务SQL (Optional) */ TrxSql string `json:"trxSql"` }
type DeadLockOverview ¶
type DiagnoseDetail ¶
type DiagnoseDetail struct { /* 诊断结果一句话描述 (Optional) */ Message string `json:"message"` /* (Optional) */ Score DiagnoseScore `json:"score"` /* (Optional) */ General DiagnoseGeneral `json:"general"` /* (Optional) */ Metrics DiagnoseMetric `json:"metrics"` }
type DiagnoseGeneral ¶
type DiagnoseGeneral struct { /* 可用性、可靠性、可维护性等信息 (Optional) */ Data []DiagnoseGeneralItem `json:"data"` }
type DiagnoseGeneralItem ¶
type DiagnoseMetric ¶
type DiagnoseMetric struct { /* 实时性能、慢查询、会话等信息 (Optional) */ Data []DiagnoseMetricItem `json:"data"` }
type DiagnoseMetricItem ¶
type DiagnoseScore ¶
type DiskView ¶
type DiskView struct { /* 总空间 (Optional) */ TotalSize string `json:"totalSize"` /* 已用空间 (Optional) */ UsedSize string `json:"usedSize"` /* 日增空间 (Optional) */ DayIncrease string `json:"dayIncrease"` /* 空间日增率 (Optional) */ DayRatio string `json:"dayRatio"` /* 扣分说明 (Optional) */ Message string `json:"message"` }
type EngineView ¶
type ExecutionPlan ¶
type ExecutionPlan struct { /* sql执行顺序id (Optional) */ Id string `json:"id"` /* select语句类型 (Optional) */ SelectType string `json:"selectType"` /* 表名 (Optional) */ Table string `json:"table"` /* 匹配的分区 (Optional) */ Partitions string `json:"partitions"` /* 访问行的类型 (Optional) */ AccessType string `json:"accessType"` /* 可能选用的索引 (Optional) */ PossibleKeys string `json:"possibleKeys"` /* 确切使用到的索引 (Optional) */ Key string `json:"key"` /* 表示索引中使用的字节数 (Optional) */ KeyLen string `json:"keyLen"` /* 哪个字段或常数与 key 一起被使用 (Optional) */ Ref string `json:"ref"` /* 一共扫描了多少行. 是一个估计值 (Optional) */ Rows string `json:"rows"` /* 此查询条件所过滤的数据的百分比 (Optional) */ Filtered string `json:"filtered"` /* 额外的信息 (Optional) */ Extra string `json:"extra"` }
type FieldList ¶
type FieldList struct { /* 数据库名 (Optional) */ DbName string `json:"dbName"` /* 表名 (Optional) */ TableName string `json:"tableName"` /* 表引擎 (Optional) */ Engine string `json:"engine"` /* 主键类型 (Optional) */ KeyType string `json:"keyType"` /* 列名 (Optional) */ RowName string `json:"rowName"` /* 列类型 (Optional) */ RowType string `json:"rowType"` /* 表行数 (Optional) */ TableRows int64 `json:"tableRows"` /* 表存储大小 (Optional) */ TableSize int64 `json:"tableSize"` /* 索引名 (Optional) */ IndexName string `json:"indexName"` /* 索引的列 (Optional) */ IndexRow string `json:"indexRow"` /* 个数 (Optional) */ Number int64 `json:"number"` /* 操作sql (Optional) */ Sql string `json:"sql"` /* 当前自增序列值 (Optional) */ AutoIncrement string `json:"autoIncrement"` /* 最大序列值 (Optional) */ MaxNum string `json:"maxNum"` }
type HostStatistic ¶
type InspectTaskModel ¶
type InspectTaskModel struct { /* 诊断id (Optional) */ InspectId string `json:"inspectId"` /* rds实例id (Optional) */ InstanceId string `json:"instanceId"` /* rds实例名称 (Optional) */ InstanceName string `json:"instanceName"` /* 实例规格 (Optional) */ InstanceClass string `json:"instanceClass"` /* 区域 (Optional) */ Region string `json:"region"` /* 实例类型 (Optional) */ InstanceType string `json:"instanceType"` /* 数据库版本 (Optional) */ EngineVersion string `json:"engineVersion"` /* 巡检分值 (Optional) */ Score int `json:"score"` /* 巡检范围的起始时间,如:2020-11-09T00:00:00Z (Optional) */ BeginTime string `json:"beginTime"` /* 巡检范围的截至时间,如:2020-11-09T23:59:59Z (Optional) */ EndTime string `json:"endTime"` /* 巡检开始时间,2021-11-09T00:19:00Z (Optional) */ CreateTime string `json:"createTime"` /* 巡检完成时间,2021-11-09T00:19:30Z (Optional) */ UpdateTime string `json:"updateTime"` /* cpu使用率 (Optional) */ CupInfo string `json:"cupInfo"` /* 内存使用率 (Optional) */ MemoryInfo string `json:"memoryInfo"` /* 连接使用率 (Optional) */ ConnectInfo string `json:"connectInfo"` /* 慢SQL数量 (Optional) */ SlowSqlInfo string `json:"slowSqlInfo"` /* 大表数量 (Optional) */ BigTableInfo string `json:"bigTableInfo"` /* 是否死锁 (Optional) */ DeadLockInfo string `json:"deadLockInfo"` }
type InspectTopResource ¶
type InstanceFilter ¶
type InstancesCutInfo ¶
type InstancesInfo ¶
type InstancesInfo struct { /* rds实例id (Optional) */ ClusterGid string `json:"clusterGid"` /* 端口号 (Optional) */ Port int `json:"port"` /* rds实例名称 (Optional) */ Name string `json:"name"` /* 数据库版本, 如: MySQL (Optional) */ EngineVersion string `json:"engineVersion"` /* 实例类型,如:cluster,standalone (Optional) */ InstanceType string `json:"instanceType"` /* 接入状态 (Optional) */ InstanceStatus string `json:"instanceStatus"` /* 接入状态描述 (Optional) */ Message string `json:"message"` /* 接入来源,目前默认rds (Optional) */ Source string `json:"source"` }
type LockStatistic ¶
type LockStatistic struct { /* 表 (Optional) */ Table string `json:"table"` /* 持有锁的会话ID (Optional) */ HoldLock int `json:"holdLock"` /* 等待锁的会话ID (Optional) */ WaitLock string `json:"waitLock"` /* 事务开始时间 (Optional) */ StartTime string `json:"startTime"` /* 总等待时长 (Optional) */ WaitTime int `json:"waitTime"` /* 等待锁的sql (Optional) */ WaitSql string `json:"waitSql"` }
type MetricData ¶
type MetricResourceModel ¶
type MetricResourceModel struct { /* 实例id (Optional) */ InstanceId string `json:"instanceId"` /* 实例名称 (Optional) */ InstanceName string `json:"instanceName"` /* 数据库版本, 如:MySQL 5.7 (Optional) */ EngineVersion string `json:"engineVersion"` /* 实例规格 (Optional) */ InstanceClass string `json:"instanceClass"` /* 值 (Optional) */ Value string `json:"value"` }
type NowSession ¶
type NowSession struct { /* 会话id (Optional) */ Id int `json:"id"` /* 会话用户 (Optional) */ User string `json:"user"` /* 会话源端IP (Optional) */ Host string `json:"host"` /* 数据库 (Optional) */ Db string `json:"db"` /* session命令 (Optional) */ Command string `json:"command"` /* 会话活跃时间 (Optional) */ Time int `json:"time"` /* 会话状态 (Optional) */ State string `json:"state"` /* 正在执行的sql (Optional) */ Info string `json:"info"` }
type PanelClusterItem ¶
type SchemaView ¶
type SchemaView struct { /* 表空间,top10 (Optional) */ Items []TableStorage `json:"items"` /* 扣分说明 (Optional) */ Message string `json:"message"` }
type ServerInfo ¶
type Session ¶
type Session struct { /* 会话id (Optional) */ Id int `json:"id"` /* 会话用户 (Optional) */ User string `json:"user"` /* 会话源端IP (Optional) */ Host string `json:"host"` /* 数据库名 (Optional) */ Db string `json:"db"` /* session命令 (Optional) */ Cmd string `json:"cmd"` /* 当前活跃状态 (Optional) */ Active bool `json:"active"` /* 会话建立时间 (Optional) */ Time int `json:"time"` /* 会话状态 (Optional) */ State string `json:"state"` /* 正在执行的sql (Optional) */ Info string `json:"info"` /* 事务持续时间 (Optional) */ Duration int `json:"duration"` }
type SessionForKill ¶
type SlowDigestLog ¶
type SlowDigestLog struct { /* 执行时间 (Optional) */ ExecTime Statistic `json:"execTime"` /* 锁等待时间 (Optional) */ LockTime Statistic `json:"lockTime"` /* 返回行数 (Optional) */ RowsSent StatisticInt `json:"rowsSent"` /* 扫描行数 (Optional) */ RowsExamined StatisticInt `json:"rowsExamined"` /* sql模板 (Optional) */ Sql string `json:"sql"` /* 数据库 (Optional) */ Database string `json:"database"` /* 执行次数 (Optional) */ QueryCount int `json:"queryCount"` }
type SlowLog ¶
type SlowLog struct { /* 开始时间 (Optional) */ StartTime string `json:"startTime"` /* 用户名 (Optional) */ UserName string `json:"userName"` /* 执行时间(秒) (Optional) */ ExecTime float32 `json:"execTime"` /* 锁等待时间(秒) (Optional) */ LockTime float32 `json:"lockTime"` /* 返回行数 (Optional) */ RowsSent float32 `json:"rowsSent"` /* 扫描行数 (Optional) */ RowsExamined float32 `json:"rowsExamined"` /* sql语句 (Optional) */ Sql string `json:"sql"` /* 数据库名 (Optional) */ Database string `json:"database"` /* 客户端IP (Optional) */ Host string `json:"host"` /* 日志类型 (Optional) */ LogType string `json:"logType"` }
type SlowLowView ¶
type SlowLowView struct { /* (Optional) */ Items []SlowDigestLog `json:"items"` /* 扣分说明 (Optional) */ Message string `json:"message"` }
type SlowSession ¶
type StatisticInt ¶
type StatisticSimple ¶
type StatisticString ¶
type SupportMetric ¶
type SystemView ¶
type SystemView struct { /* cpu (Optional) */ Cpu StatisticString `json:"cpu"` /* 内存 (Optional) */ Mem StatisticString `json:"mem"` /* 每秒读写次数 (Optional) */ Iops StatisticString `json:"iops"` /* 扣分说明 (Optional) */ Message string `json:"message"` }
type Table ¶
type Table struct { /* 诊断类型id (Optional) */ TypeId int64 `json:"typeId"` /* 诊断名称 (Optional) */ Title string `json:"title"` /* 问题与建议 (Optional) */ Message string `json:"message"` /* 其他信息提示,如:"mysql 5.5 5.6 mariadb不支持" (Optional) */ Note string `json:"note"` /* 受影响表 表头 (Optional) */ FormHeader []Point `json:"formHeader"` /* 问题数量 (Optional) */ Count int64 `json:"count"` }
type TableStorage ¶
type TableStorage struct { /* 表名 (Optional) */ TableName string `json:"tableName"` /* 数据库名 (Optional) */ DbName string `json:"dbName"` /* 引擎类型 (Optional) */ Engine string `json:"engine"` /* 表空间 (Optional) */ TotalSize string `json:"totalSize"` /* 表空间占比,如 40% (Optional) */ Percentage string `json:"percentage"` /* 数据空间 (Optional) */ DataSize string `json:"dataSize"` /* 索引空间 (Optional) */ IdxSize string `json:"idxSize"` /* 碎片率,如 0.99% (Optional) */ Fragment string `json:"fragment"` /* 表行数 (Optional) */ DataRows int `json:"dataRows"` }
type TableStorageInfo ¶
type TableStorageInfo struct { /* 表名 (Optional) */ TableName string `json:"tableName"` /* 数据库名 (Optional) */ DbName string `json:"dbName"` /* 引擎 (Optional) */ Engine string `json:"engine"` /* 表空间大小 (Optional) */ TotalSize string `json:"totalSize"` /* 表空间占比 (Optional) */ Percentage string `json:"percentage"` /* 数据空间 (Optional) */ DataSize string `json:"dataSize"` /* 索引空间 (Optional) */ IdxSize string `json:"idxSize"` /* 碎片率 (Optional) */ Fragment string `json:"fragment"` /* 表行数 (Optional) */ DataRows int `json:"dataRows"` }
type TuningAdvice ¶
type UnCommitTransaction ¶
type UnCommitTransaction struct { /* 连接实例用户名 (Optional) */ User string `json:"user"` /* 连接的db (Optional) */ Db string `json:"db"` /* 连接的来源ip (Optional) */ Host string `json:"host"` /* 当前状态 (Optional) */ State string `json:"state"` /* session开始时间 (Optional) */ StartTime int `json:"startTime"` /* 最后执行的sql (Optional) */ LastSql string `json:"lastSql"` }
type UnCommitTrx ¶
type UnCommitTrx struct { /* 会话用户 (Optional) */ User string `json:"user"` /* 数据库 (Optional) */ Db string `json:"db"` /* 会话源端IP (Optional) */ Host string `json:"host"` /* 当前状态 (Optional) */ State string `json:"state"` /* session开始时间 (Optional) */ StartTime int `json:"startTime"` /* 最后执行的sql (Optional) */ LastSql string `json:"lastSql"` }
type UntrxLock ¶
type UntrxLock struct { /* 会话id (Optional) */ Id int `json:"id"` /* 会话用户 (Optional) */ User string `json:"user"` /* 会话源端IP (Optional) */ Host string `json:"host"` /* 数据库 (Optional) */ Db string `json:"db"` /* session命令 (Optional) */ Command string `json:"command"` /* 会话活跃时间 (Optional) */ Time int `json:"time"` /* 会话状态 (Optional) */ State string `json:"state"` /* 正在执行的sql (Optional) */ Info string `json:"info"` }
Source Files
¶
- AlarmDetail.go
- AlarmHistoryDetail.go
- BufferPoolInfo.go
- ClusterCreateSpec.go
- ClusterDetail.go
- ConnectView.go
- ConnectionInfo.go
- DBStatistic.go
- DataPoint.go
- DeadLockDetail.go
- DeadLockOverview.go
- DiagnoseDetail.go
- DiagnoseGeneral.go
- DiagnoseGeneralItem.go
- DiagnoseMetric.go
- DiagnoseMetricItem.go
- DiagnoseScore.go
- DiskView.go
- EngineView.go
- ErrorInfo.go
- ExecutionPlan.go
- FieldList.go
- GidList.go
- HostStatistic.go
- IndexInfo.go
- InspectTaskModel.go
- InspectTopResource.go
- InstanceFilter.go
- InstancesCutInfo.go
- InstancesInfo.go
- KV.go
- KVs.go
- LockStatistic.go
- Metric.go
- MetricData.go
- MetricResourceModel.go
- NowSession.go
- Panel.go
- PanelClusterItem.go
- Point.go
- SchemaView.go
- ServerInfo.go
- Session.go
- SessionForKill.go
- SlowDigestLog.go
- SlowLog.go
- SlowLowView.go
- SlowSession.go
- Statistic.go
- StatisticInt.go
- StatisticSimple.go
- StatisticString.go
- SupportMetric.go
- SystemView.go
- Table.go
- TableStorage.go
- TableStorageInfo.go
- TuningAdvice.go
- UnCommitTransaction.go
- UnCommitTrx.go
- UntrxLock.go
- UserStatistic.go
Click to show internal directories.
Click to hide internal directories.