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