mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-05 04:50:55 +08:00
add monitor_system_integrate_with_self file
This commit is contained in:
@@ -14,37 +14,119 @@ import com.xiaojukeji.kafka.manager.common.entity.pojo.MonitorRuleDO;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 监控系统接口
|
||||
* @author zengqiao
|
||||
* @date 20/5/21
|
||||
*/
|
||||
public interface MonitorService {
|
||||
/**
|
||||
* 创建告警规则
|
||||
* @param monitorDTO 告警规则
|
||||
* @param operator 操作人
|
||||
* @return 操作状态结果
|
||||
*/
|
||||
ResultStatus createMonitorRule(MonitorRuleDTO monitorDTO, String operator);
|
||||
|
||||
/**
|
||||
* 删除告警规则
|
||||
* @param id 告警ID
|
||||
* @param operator 操作人
|
||||
* @return 操作状态结果
|
||||
*/
|
||||
ResultStatus deleteMonitorRule(Long id, String operator);
|
||||
|
||||
/**
|
||||
* 修改告警规则
|
||||
* @param monitorDTO 告警规则
|
||||
* @param operator 操作人
|
||||
* @return 操作状态结果
|
||||
*/
|
||||
ResultStatus modifyMonitorRule(MonitorRuleDTO monitorDTO, String operator);
|
||||
|
||||
/**
|
||||
* 获取告警规则
|
||||
* @param operator 操作人
|
||||
* @return 监控告警规则概要信息
|
||||
*/
|
||||
List<MonitorRuleSummary> getMonitorRules(String operator);
|
||||
|
||||
/**
|
||||
* 获取监控告警规则的详情信息
|
||||
* @param monitorRuleDO 本地存储的监控告警规则概要信息
|
||||
* @return
|
||||
*/
|
||||
Result<MonitorRuleDTO> getMonitorRuleDetail(MonitorRuleDO monitorRuleDO);
|
||||
|
||||
/**
|
||||
* 依据主键ID, 获取存储于MySQL中的监控告警规则基本信息
|
||||
* @param id 本地监控告警规则ID
|
||||
* @return 本地监控告警规则信息
|
||||
*/
|
||||
MonitorRuleDO getById(Long id);
|
||||
|
||||
/**
|
||||
* 依据策略ID, 获取存储于MySQL中的监控告警规则基本信息
|
||||
* @param strategyId 策略ID
|
||||
* @return 本地监控告警规则信息
|
||||
*/
|
||||
MonitorRuleDO getByStrategyId(Long strategyId);
|
||||
|
||||
/**
|
||||
* 获取告警历史
|
||||
* @param id 告警ID
|
||||
* @param startTime 查询的起始时间
|
||||
* @param endTime 查询的截止时间
|
||||
* @return 告警历史
|
||||
*/
|
||||
Result<List<Alert>> getMonitorAlertHistory(Long id, Long startTime, Long endTime);
|
||||
|
||||
/**
|
||||
* 查询告警详情
|
||||
* @param alertId 告警ID
|
||||
* @return 告警详情
|
||||
*/
|
||||
Result<MonitorAlertDetail> getMonitorAlertDetail(Long alertId);
|
||||
|
||||
/**
|
||||
* 屏蔽告警
|
||||
* @param monitorSilenceDTO 屏蔽的信息
|
||||
* @param operator 操作人
|
||||
* @return 屏蔽操作的结果
|
||||
*/
|
||||
Result createSilence(MonitorSilenceDTO monitorSilenceDTO, String operator);
|
||||
|
||||
/**
|
||||
* 删除屏蔽策略
|
||||
* @param silenceId 屏蔽ID
|
||||
* @return 删除屏蔽告警的操作结果
|
||||
*/
|
||||
Boolean releaseSilence(Long silenceId);
|
||||
|
||||
/**
|
||||
* 修改屏蔽告警的规则
|
||||
* @param monitorSilenceDTO 屏蔽告警的信息
|
||||
* @param operator 操作人
|
||||
* @return 操作结果
|
||||
*/
|
||||
Result modifySilence(MonitorSilenceDTO monitorSilenceDTO, String operator);
|
||||
|
||||
/**
|
||||
* 获取屏蔽策略
|
||||
* @param strategyId 告警策略ID
|
||||
* @return
|
||||
*/
|
||||
Result<List<Silence>> getSilences(Long strategyId);
|
||||
|
||||
/**
|
||||
* 获取屏蔽详情
|
||||
* @param silenceId 屏蔽ID
|
||||
* @return
|
||||
*/
|
||||
Silence getSilenceById(Long silenceId);
|
||||
|
||||
/**
|
||||
* 获取告警接收组
|
||||
* @return
|
||||
*/
|
||||
List<NotifyGroup> getNotifyGroups();
|
||||
}
|
||||
@@ -14,44 +14,34 @@ public abstract class AbstractMonitorService {
|
||||
* 监控策略的增删改查
|
||||
*/
|
||||
public abstract Integer createStrategy(Strategy strategy);
|
||||
|
||||
public abstract Boolean deleteStrategyById(Long strategyId);
|
||||
|
||||
public abstract Boolean modifyStrategy(Strategy strategy);
|
||||
|
||||
public abstract List<Strategy> getStrategies();
|
||||
|
||||
public abstract Strategy getStrategyById(Long strategyId);
|
||||
|
||||
/**
|
||||
* 告警的查
|
||||
* 告警被触发后, 告警信息的查询
|
||||
*/
|
||||
public abstract List<Alert> getAlerts(Long strategyId, Long startTime, Long endTime);
|
||||
|
||||
public abstract Alert getAlertById(Long alertId);
|
||||
|
||||
/**
|
||||
* 屏蔽的增删改查
|
||||
* 告警被触发之后, 进行屏蔽时, 屏蔽策略的增删改查
|
||||
*/
|
||||
public abstract Boolean createSilence(Silence silence);
|
||||
|
||||
public abstract Boolean releaseSilence(Long silenceId);
|
||||
|
||||
public abstract Boolean modifySilence(Silence silence);
|
||||
|
||||
public abstract List<Silence> getSilences(Long strategyId);
|
||||
|
||||
public abstract Silence getSilenceById(Long silenceId);
|
||||
|
||||
/**
|
||||
* 指标的上报和查询
|
||||
*/
|
||||
public abstract Boolean sinkMetrics(List<MetricSinkPoint> pointList);
|
||||
|
||||
public abstract Metric getMetrics(String metric, Long startTime, Long endTime, Integer step, Properties tags);
|
||||
|
||||
/**
|
||||
* 告警组
|
||||
* 告警组获取
|
||||
*/
|
||||
public abstract List<NotifyGroup> getNotifyGroups();
|
||||
|
||||
/**
|
||||
* 监控指标的上报和查询
|
||||
*/
|
||||
public abstract Boolean sinkMetrics(List<MetricSinkPoint> pointList);
|
||||
public abstract Metric getMetrics(String metric, Long startTime, Long endTime, Integer step, Properties tags);
|
||||
}
|
||||
Reference in New Issue
Block a user