123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- using PMS.BusinessModels.CloudMonitorManage;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace PMS.Interface.CloudMonitorManage
- {
- public interface ICloudMonitor
- {
- /// <summary>
- /// 保存云监控配置
- /// </summary>
- /// <param name="cloudMonitorConfig"></param>
- /// <returns></returns>
- bool SaveCloudMonitorConfig(CloudMonitorConfig cloudMonitorConfig);
- /// <summary>
- /// 保存采集配置
- /// </summary>
- /// <param name="collectionConfig"></param>
- /// <returns></returns>
- bool SaveCollectionConfig(CollectionConfig collectionConfig);
- /// <summary>
- /// 保存预警配置
- /// </summary>
- /// <param name="alertConfig"></param>
- /// <returns></returns>
- bool SaveAlertConfig(AlertConfig alertConfig);
- /// <summary>
- /// 获取云监控配置
- /// </summary>
- /// <returns></returns>
- CloudMonitorConfig GetCloudMonitorConfig();
- /// <summary>
- /// 根据项目id获取自定义预警配置
- /// </summary>
- /// <param name="itemId"></param>
- /// <returns></returns>
- List<CustomAlertModel> GetCustomAlertModelByItemId(string itemId);
- /// <summary>
- /// 根据项目id获取 启动的自定义预警配置
- /// </summary>
- /// <param name="itemId"></param>
- /// <returns></returns>
- List<CustomAlertModel> GetCustomAlertModelByItemIdAndStart(string itemId);
- /// <summary>
- /// 根据项目id获取 启动的自定义预警配置
- /// </summary>
- /// <param name="itemId"></param>
- /// <returns></returns>
- List<CustomAPIModel> GetCustomServerModelByItemIdAndStart(string itemId);
- /// <summary>
- /// 根据渠道id获取自定义配置
- /// </summary>
- /// <param name="channelId"></param>
- /// <returns></returns>
- List<CustomAlertModel> GetCustomAlertModelByChannelId(string channelId, string search);
- /// <summary>
- /// 根据渠道id获取自定义API配置
- /// </summary>
- /// <param name="channelId"></param>
- /// <returns></returns>
- List<CustomAPIModel> GetCustomAPIModelByChannelId(string channelId, string search);
- /// <summary>
- /// 根据创建人id获取自定义配置
- /// </summary>
- /// <param name="creatorId"></param>
- /// <returns></returns>
- List<CustomAlertModel> GetCustomAlertModelByCreatorId(string creatorId);
- /// <summary>
- /// 根据项目id获取服务器信息
- /// </summary>
- /// <param name="itemid"></param>
- /// <returns></returns>
- List<ServerInfoModel> GetServerByItemId(string itemid);
- /// <summary>
- /// 新增自定义配置
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool InsertCustomAlert(CustomAlertModel model);
- /// <summary>
- /// 新增自定义API配置
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool InsertCustomAPI(CustomAPIModel model);
- /// <summary>
- /// 修改
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool UpdateCustomAlert(CustomAlertModel model);
- /// <summary>
- /// 修改API
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool UpdateCustomAPI(CustomAPIModel model);
- /// <summary>
- /// 根据id删除
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- bool DeleteCustomAlertById(string id);
- /// <summary>
- /// 根据id删除
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- bool DeleteCustomAPIById(string id);
- /// <summary>
- /// 获取所有服务器信息
- /// </summary>
- /// <returns></returns>
- List<ServerIndexInfoModel> GetServerIndexInfoAll();
- /// <summary>
- /// 获取所有服务器信息 通过项目id过滤
- /// </summary>
- /// <returns></returns>
- List<ServerIndexInfoModel> GetServerIndexInfoByProjectId(string itemId);
- /// <summary>
- /// 获取所有服务器信息 通过渠道id过滤
- /// </summary>
- /// <returns></returns>
- List<ServerIndexInfoModel> GetServerIndexInfoByChannelId(string channelId, string search = "");
- /// <summary>
- /// 获取指标详情 根据指标id
- /// </summary>
- /// <param name="indexId"></param>
- List<ServerIndexDetailModel> GetServerIndexDetailByIndexId(string indexId, DateTime startTime, DateTime endTime);
- /// <summary>
- /// 获取指标详情 服务器ID
- /// </summary>
- /// <param name="serverId"></param>
- List<ServerIndexDetailModel> GetServerIndexDetailByServerId(string serverId, DateTime startTime, DateTime endTime);
- /// <summary>
- /// 获取所有服务器预警
- /// </summary>
- /// <returns></returns>
- List<ServerAlertModel> GetServerAlertAll(string search);
- /// <summary>
- /// 根据预警id获取服务器预警
- /// </summary>
- /// <returns></returns>
- ServerAlertModel GetServerAlertByAlertlId(string alertlId);
- /// <summary>
- /// 根据条件获取服务器预警
- /// </summary>
- /// <returns></returns>
- List<ServerAlertModel> GetServerAlertBySearch(ServerAlertSearch search);
- /// <summary>
- /// 插入服务器预警处理
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool InsertServerAlertProcess(ServerAlertProcessModel model);
- /// <summary>
- /// 查询服务器预警处理过程
- /// </summary>
- /// <param name="alertId"></param>
- /// <returns></returns>
- List<ServerAlertProcessModel> GetServerAlertProcessByAlertId(string alertId);
- /// <summary>
- /// 获取全部项目监控数据
- /// </summary>
- /// <returns></returns>
- List<ProjectMonitorModel> GetProjectMonitorAll();
- /// <summary>
- /// 根据查询获取全部项目监控
- /// </summary>
- /// <returns></returns>
- List<ProjectMonitorModel> GetProjectMonitorBySearch(ServerAlertSearch search);
- /// <summary>
- /// 获取项目的监控状态,根据渠道id过滤
- /// </summary>
- /// <param name="channelId"></param>
- /// <returns></returns>
- List<ProjectMonitorModel> GetProjectMonitorByChannelId(string channelId);
- /// <summary>
- /// 启动或者停止项目监控
- /// </summary>
- /// <param name="projectId"></param>
- /// <param name="state"></param>
- bool StartOrStopProjectMonitor(string projectId, bool state, string clientId = "");
- /// <summary>
- /// 插入数据库数据
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool InsertDbInfo(DbInfoModel model);
- /// <summary>
- /// 修改数据库数据
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- bool UpdateDbInfo(DbInfoModel model);
- /// <summary>
- /// 获取数据库数据,根据服务器ID过滤
- /// </summary>
- /// <param name="channelId"></param>
- /// <returns></returns>
- List<DbInfoModel> GetDbInfoByServerId(string serverId);
- /// <summary>
- /// 获取数据库数据,根据ID过滤
- /// </summary>
- /// <param name="channelId"></param>
- /// <returns></returns>
- DbInfoModel GetDbInfoById(string id);
- /// <summary>
- /// 删除数据库数据,根据ID
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- bool DeleteDbInfoById(string id);
- /// <summary>
- /// 查询上传指标数据
- /// </summary>
- /// <returns></returns>
- PushIndexDataModelTablePage GetPushIndexData(IndexSearch search);
- /// <summary>
- /// 接收上报的服务器信息
- /// </summary>
- /// <param name="serverInfos"></param>
- void ReceiveServerInfo(string clientId, List<Ret<ServerInfo>> serverInfos);
- /// <summary>
- /// 接收上报的数据库连接数信息
- /// </summary>
- /// <param name="dbConnectInfos"></param>
- /// <returns></returns>
- void ReceiveDbConnectInfo(string clientId, List<Ret<DbConnectInfo>> dbConnectInfos);
- /// <summary>
- /// 接收上报的数据库死锁信息
- /// </summary>
- /// <param name="dbLockedInfos"></param>
- /// <returns></returns>
- void ReceiveDbLockedInfo(string clientId, List<Ret<DbLockedInfo>> dbLockedInfos);
- /// <summary>
- /// 接收上报的服务发现信息
- /// </summary>
- /// <returns></returns>
- void ReceiveServiceWorkStateInfo(string clientId, List<Ret<ServiceWorkStateInfo>> serviceWorkStateInfos);
- /// <summary>
- /// 接收上报的自定义预警信息
- /// </summary>
- /// <returns></returns>
- void ReceiveDbCustomAlertInfo(string clientId, Ret<DbCustomAlertInfo> info);
- /// <summary>
- /// 接收上报的自定义服务信息
- /// </summary>
- /// <returns></returns>
- void ReceiveCustomServiceInfo(string clientId, Ret<CustomServiceInfo> info);
- /// <summary>
- /// 采集中断扫描
- /// </summary>
- void CollectionInterruptScanning();
- /// <summary>
- /// 磁盘可用天数扫描
- /// </summary>
- void DiskAvailabilityScanning();
- }
- }
|