The invention discloses a test method for the alarm function of a storage cluster, which first obtains the alarm configuration such as the alarm threshold configuration and the monitoring item configuration, and obtains the monitoring data of the storage cluster to be tested, i.e. the real data of the storage cluster to be tested, and then generates a reasonable alarm fitting the real environment of the storage cluster to be tested based on the alarm configuration, monitoring data and the preset test case template Test case: import the alarm test case into the storage cluster to be tested, and collect the monitoring results of the storage cluster to determine the alarm function test results of the storage cluster to be tested according to the monitoring results. The operation and maintenance personnel only need to change the alarm configuration and data source, which saves the human cost and time of writing the test case, thus reducing the alarm module of the storage cluster The cost of development or test can reduce the waiting time and shorten the development and test cycle. The invention also discloses a test device, a device and a storage medium for storing the alarm function of a cluster, which has the above beneficial effect.
【技术实现步骤摘要】
存储集群告警功能的测试方法、装置、设备及存储介质
本专利技术涉及分布式存储集群
,特别是涉及一种存储集群告警功能的测试方法、装置、设备及存储介质。
技术介绍
在针对分布式存储集群的告警模块进行开发与测试过程中,设计到对服务器节点的硬件设备磨损度、温度、运行异常状态等特殊条件的告警功能的测试,由于设备部件达到这些临界条件造成的损失较大,一般需要进行模拟数据进行开发及测试。目前常见的模拟手段主要集中在人工手动介入制造假数据进行调测,或者使用特定的场景数据开发测试用例进行维护测试,由此,除了人力占用问题,还由于测试场景特定或测试要求变更等问题,导致人工编写的测试用例无法复用,进而导致存储集群的告警模块的开发或测试成本较高,且需要较长的等待时间。如何降低存储集群的告警模块的开发或测试成本,减少等待时间,缩短开发测试周期,是本领域技术人员需要解决的技术问题。
技术实现思路
本专利技术的目的是提供一种存储集群告警功能的测试方法、装置、设备及存储介质,用于降低存储集群的告警模块的开发或测试成本,减 ...
【技术保护点】
1.一种存储集群告警功能的测试方法,其特征在于,包括:/n获取告警配置和待测存储集群的监控数据;/n基于所述告警配置、所述监控数据和预设的测试用例模板,生成告警测试用例;/n将所述告警测试用例导入所述待测存储集群,并采集所述待测存储集群的监控结果,以根据所述监控结果确定所述待测存储集群的告警功能测试结果;/n其中,所述告警配置包括告警阈值配置和监控数据项配置。/n
【技术特征摘要】
1.一种存储集群告警功能的测试方法,其特征在于,包括:
获取告警配置和待测存储集群的监控数据;
基于所述告警配置、所述监控数据和预设的测试用例模板,生成告警测试用例;
将所述告警测试用例导入所述待测存储集群,并采集所述待测存储集群的监控结果,以根据所述监控结果确定所述待测存储集群的告警功能测试结果;
其中,所述告警配置包括告警阈值配置和监控数据项配置。
2.根据权利要求1所述的测试方法,其特征在于,获取所述告警配置,具体包括:
当接收到输入的告警配置时,以所述输入的告警配置为准;
当未接收到所述输入的告警配置时,调用预设的告警配置。
3.根据权利要求1所述的测试方法,其特征在于,所述获取待测存储集群的监控数据,具体包括:
获取所述待测存储集群的瞬时监控数据;
将所述瞬时监控数据格式化后持久化至预设数据库;
在所述预设数据库中筛选得到所述监控数据。
4.根据权利要求3所述的测试方法,其特征在于,在所述预设数据库中筛选得到所述监控数据之后,还包括:
将所述监控数据以预设的数据表结构存储;
其中,所述预设的数据表结构包括监控数据项的ID、监控节点的节点IP、所述监控节点的节点名称、所述监控数据项的名称、所述监控数据项的参数值、所述监控数据项的健康状态、所述监控数据项的运行状态和所述监控数据项的采集时间。
5.根据权利要求1所述的测试方法,其特征在于,所述基于所述告警配置、所述监控数据和预设的测试用例模板,生成告警测试用例,具体包括:
基于所述监控数据,利用随机数算法动态生成模拟监控数据;
根据所述告警配置确定测试用例数量和测试用例类型;
依据所述测试用例数量和所述测试用例类型,将所述模拟监控数据填入所述预设的测试用例模板,得到告警测试用例。
...
【专利技术属性】
技术研发人员:段萌,
申请(专利权)人:苏州浪潮智能科技有限公司,
类型:发明
国别省市:江苏;32
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。