资源模板以及资源策略模块方法和接口。
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 基础监控项对象 rm_initial_monitor_item
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmInitialMonitorItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 监控项类型(监控项,自动发现项) */
|
||||
@Excel(name = "监控项类型(监控项,自动发现项)")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 监控OID */
|
||||
@Excel(name = "监控OID")
|
||||
private String oid;
|
||||
|
||||
/** 过滤值 */
|
||||
@Excel(name = "过滤值")
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
@Excel(name = "监控说明")
|
||||
private String monitorDescription;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
/** 采集周期 */
|
||||
@Excel(name = "采集周期")
|
||||
private String collectionCycle;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import com.ruoyi.rocketmq.domain.vo.RmMonitorPolicyVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源监控策略对象 rm_monitor_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorPolicy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 模板ID */
|
||||
@Excel(name = "模板ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 资源组ID */
|
||||
@Excel(name = "资源组ID")
|
||||
private Long resourceGroupId;
|
||||
/** 资源组名称 */
|
||||
private String resourceGroupName;
|
||||
|
||||
/** 策略名称 */
|
||||
@Excel(name = "策略名称")
|
||||
private String policyName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 状态:0-待下发,1-已下发 */
|
||||
@Excel(name = "状态:0-待下发,1-已下发")
|
||||
private String status;
|
||||
|
||||
/** 下发策略时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下发策略时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deployTime;
|
||||
/** 采集周期及id集合 */
|
||||
private List<RmMonitorPolicyVo> collectionAndIdList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 监控模板对象 rm_monitor_template
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
@Excel(name = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/** 模板描述 */
|
||||
@Excel(name = "模板描述")
|
||||
private String description;
|
||||
|
||||
/** 监控项 */
|
||||
@Excel(name = "监控项")
|
||||
private String monitorItems;
|
||||
|
||||
/** 自动发现项 */
|
||||
@Excel(name = "自动发现项")
|
||||
private String discoveryRules;
|
||||
|
||||
/** 资源组ID */
|
||||
@Excel(name = "资源组ID")
|
||||
private Long resourceGroupId;
|
||||
/** 资源组名称 */
|
||||
private String resourceGroupName;
|
||||
/** 资源类型(linux,switch) */
|
||||
private String resourcyType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Linux系统监控项对象 rm_template_linux
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmTemplateLinux extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 关联的模板ID */
|
||||
@Excel(name = "关联的模板ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long policyId;
|
||||
|
||||
/** 监控项类型 */
|
||||
@Excel(name = "监控项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
@Excel(name = "监控状态(0-禁用,1启用)")
|
||||
private String monitorStatus;
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 交换机监控模板对象 rm_template_switch
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmTemplateSwitch extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 关联的模板ID */
|
||||
@Excel(name = "关联的模板ID")
|
||||
private Long templateId;
|
||||
|
||||
/** 关联的策略ID */
|
||||
private Long policyId;
|
||||
|
||||
/** 监控项类型 */
|
||||
@Excel(name = "监控项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 监控标识(唯一键) */
|
||||
@Excel(name = "监控标识(唯一键)")
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
@Excel(name = "监控名称")
|
||||
private String metricName;
|
||||
|
||||
/** 监控OID(SNMP标识) */
|
||||
@Excel(name = "监控OID(SNMP标识)")
|
||||
private String oid;
|
||||
|
||||
/** 过滤值(用于特定端口或接口过滤) */
|
||||
@Excel(name = "过滤值(用于特定端口或接口过滤)")
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
@Excel(name = "监控说明")
|
||||
private String switchDescription;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
@Excel(name = "监控状态(0-禁用,1启用)")
|
||||
private String monitorStatus;
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CollectVo {
|
||||
/** 采集类型 */
|
||||
private String type;
|
||||
/** 是否采集 */
|
||||
private boolean collect = false;
|
||||
/** 采集周期 */
|
||||
private Long interval = 300L;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资源监控策略对象 rm_monitor_policy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-10
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorPolicyVo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 采集周期 */
|
||||
private Long collectionCycle;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 监控模板对象 rm_monitor_template业务类
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-09
|
||||
*/
|
||||
@Data
|
||||
public class RmMonitorTemplateVo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
private String templateName;
|
||||
|
||||
/** 模板描述 */
|
||||
private String description;
|
||||
|
||||
/** 监控项 */
|
||||
private String monitorItems;
|
||||
|
||||
/** 自动发现项 */
|
||||
private String discoveryRules;
|
||||
|
||||
/** 资源组ID */
|
||||
private Long resourceGroupId;
|
||||
|
||||
/** 关联的模板ID */
|
||||
private Long templateId;
|
||||
/** 监控项类型 */
|
||||
private String itemType;
|
||||
/** 监控标识(唯一键) */
|
||||
private String metricKey;
|
||||
|
||||
/** 监控名称 */
|
||||
private String metricName;
|
||||
|
||||
/** 数据类型 */
|
||||
private String dataType;
|
||||
|
||||
/** 监控状态(0-禁用,1启用) */
|
||||
private String monitorStatus;
|
||||
/** 监控OID(SNMP标识) */
|
||||
private String oid;
|
||||
|
||||
/** 过滤值(用于特定端口或接口过滤) */
|
||||
private String filterValue;
|
||||
|
||||
/** 监控说明 */
|
||||
private String switchDescription;
|
||||
/**
|
||||
* 资源类型,linux,switch
|
||||
*/
|
||||
private String resourceType;
|
||||
/**
|
||||
* 监控ids
|
||||
*/
|
||||
private Long[] monitorIds;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user