<?xml version="1.0" encoding="utf-8"?>
<Tables xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="https://newlifex.com https://newlifex.com/Model2022.xsd" NameSpace="Stardust.Data.Nodes" ConnName="Stardust" Output="" BaseClass="Entity" Version="11.3.2022.1013" Document="https://newlifex.com/xcode/model" DisplayName="" CubeOutput="../../Stardust.Web/Areas/Redis" xmlns="https://newlifex.com/Model2022.xsd">
  <Table Name="RedisNode" Description="Redis节点。Redis管理">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="Name" DataType="String" Master="True" Description="名称" />
      <Column Name="Category" DataType="String" Description="分类" />
      <Column Name="Server" DataType="String" Description="地址。含端口" />
      <Column Name="Password" DataType="String" Description="密码" />
      <Column Name="Version" DataType="String" Description="版本" />
      <Column Name="Mode" DataType="String" Description="模式" />
      <Column Name="Role" DataType="String" Description="角色" />
      <Column Name="MaxMemory" DataType="Int32" Description="内存容量。单位MB" />
      <Column Name="MemoryPolicy" DataType="String" Description="内存策略。缓存淘汰策略" />
      <Column Name="MemoryAllocator" DataType="String" Description="分配器。内存分配器，低版本有内存泄漏" />
      <Column Name="Enable" DataType="Boolean" Description="启用。停用的节点不再执行监控" />
      <Column Name="ScanQueue" DataType="Boolean" Description="队列。自动扫描发现消息队列，默认true" />
      <Column Name="WebHook" DataType="String" Length="500" Description="告警机器人。钉钉、企业微信等" Category="告警" />
      <Column Name="AlarmMemoryRate" DataType="Int32" Description="内存告警。内存告警的百分比阈值，百分之一" Category="告警" />
      <Column Name="AlarmConnections" DataType="Int32" Description="连接告警。连接数告警阈值" Category="告警" />
      <Column Name="AlarmSpeed" DataType="Int32" Description="速度告警。速度告警阈值" Category="告警" />
      <Column Name="AlarmInputKbps" DataType="Int32" Description="入流量告警。入流量告警阈值" Category="告警" />
      <Column Name="AlarmOutputKbps" DataType="Int32" Description="出流量告警。出流量告警阈值" Category="告警" />
      <Column Name="CreateUser" DataType="String" Description="创建人" Category="扩展" />
      <Column Name="CreateUserID" DataType="Int32" Description="创建者" Category="扩展" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" Category="扩展" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" Category="扩展" />
      <Column Name="UpdateUser" DataType="String" Description="更新人" Category="扩展" />
      <Column Name="UpdateUserID" DataType="Int32" Description="更新者" Category="扩展" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" Category="扩展" />
      <Column Name="UpdateIP" DataType="String" Description="更新地址" Category="扩展" />
      <Column Name="Remark" DataType="String" Length="500" Description="备注" Category="扩展" />
    </Columns>
    <Indexes>
      <Index Columns="Server" Unique="True" />
    </Indexes>
  </Table>
  <Table Name="RedisData" Description="Redis数据。Redis监控" ConnName="StardustData">
    <Columns>
      <Column Name="Id" DataType="Int64" PrimaryKey="True" Description="编号" />
      <Column Name="RedisId" DataType="Int32" Description="Redis节点" />
      <Column Name="Name" DataType="String" Master="True" Description="名称" />
      <Column Name="Speed" DataType="Int32" Description="速度。每秒操作数，instantaneous_ops_per_sec" />
      <Column Name="InputKbps" DataType="Double" Description="入流量。单位kbps" />
      <Column Name="OutputKbps" DataType="Double" Description="出流量。单位kbps" />
      <Column Name="Uptime" DataType="Int32" Description="启动时间。单位秒" />
      <Column Name="ConnectedClients" DataType="Int32" Description="连接数" />
      <Column Name="UsedMemory" DataType="Int32" Description="已用内存。单位MB" />
      <Column Name="FragmentationRatio" DataType="Double" Description="碎片率。单位MB" />
      <Column Name="Keys" DataType="Int64" Description="Keys数" />
      <Column Name="ExpiredKeys" DataType="Int64" Description="过期Keys" />
      <Column Name="EvictedKeys" DataType="Int64" Description="驱逐Keys。由于 maxmemory 限制，而被回收内存的 key 的总数" />
      <Column Name="KeySpaceHits" DataType="Int64" Description="命中数。只读请求命中缓存" />
      <Column Name="KeySpaceMisses" DataType="Int64" Description="Miss数。只读请求未命中缓存" />
      <Column Name="Commands" DataType="Int64" Description="命令数" />
      <Column Name="Reads" DataType="Int64" Description="读取数" />
      <Column Name="Writes" DataType="Int64" Description="写入数" />
      <Column Name="AvgTtl" DataType="Int64" Description="平均过期。平均过期时间，单位毫秒" />
      <Column Name="TopCommand" DataType="String" Length="200" Description="最忙命令" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" Category="扩展" />
      <Column Name="TraceId" DataType="String" Description="追踪。最新一次查看采样，可用于关联多个片段，建立依赖关系，随线程上下文、Http、Rpc传递" Category="扩展" />
      <Column Name="Remark" DataType="String" Length="500" Description="备注" Category="扩展" />
    </Columns>
    <Indexes>
      <Index Columns="RedisId,Id" />
    </Indexes>
  </Table>
  <Table Name="RedisMessageQueue" Description="Redis消息队列。Redis消息队列状态监控">
    <Columns>
      <Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
      <Column Name="RedisId" DataType="Int32" Description="Redis节点" />
      <Column Name="Name" DataType="String" Master="True" Description="名称" />
      <Column Name="Category" DataType="String" Description="分类" />
      <Column Name="Db" DataType="Int32" Description="库" />
      <Column Name="Topic" DataType="String" Description="主题。消息队列主题" />
      <Column Name="Type" DataType="String" Description="类型。消息队列类型" />
      <Column Name="Groups" DataType="String" Length="500" Description="消费组。消费组名称" />
      <Column Name="Consumers" DataType="Int32" Description="消费者。消费者个数" />
      <Column Name="Total" DataType="Int64" Description="总消费。现有消费者的消费总数" />
      <Column Name="Messages" DataType="Int32" Description="消息数。积压下来，等待消费的消息个数" />
      <Column Name="MaxMessages" DataType="Int32" Description="最大积压。达到该值时告警，0表示不启用" />
      <Column Name="Enable" DataType="Boolean" Description="启用。停用的节点不再执行监控" />
      <Column Name="ConsumerInfo" DataType="String" Length="-1" Description="消费者信息" />
      <Column Name="FirstConsumer" DataType="DateTime" Description="最早消费" />
      <Column Name="LastActive" DataType="DateTime" Description="最后活跃" />
      <Column Name="WebHook" DataType="String" Length="500" Description="告警机器人。钉钉、企业微信等" />
      <Column Name="TraceId" DataType="String" Description="追踪。最新一次查看采样，可用于关联多个片段，建立依赖关系，随线程上下文、Http、Rpc传递" Category="扩展" />
      <Column Name="CreateUser" DataType="String" Description="创建人" Category="扩展" />
      <Column Name="CreateUserID" DataType="Int32" Description="创建者" Category="扩展" />
      <Column Name="CreateTime" DataType="DateTime" Description="创建时间" Category="扩展" />
      <Column Name="CreateIP" DataType="String" Description="创建地址" Category="扩展" />
      <Column Name="UpdateUser" DataType="String" Description="更新人" Category="扩展" />
      <Column Name="UpdateUserID" DataType="Int32" Description="更新者" Category="扩展" />
      <Column Name="UpdateTime" DataType="DateTime" Description="更新时间" Category="扩展" />
      <Column Name="UpdateIP" DataType="String" Description="更新地址" Category="扩展" />
      <Column Name="Remark" DataType="String" Length="-1" Description="备注" Category="扩展" />
    </Columns>
    <Indexes>
      <Index Columns="RedisId" />
    </Indexes>
  </Table>
</Tables>