package com.wgcloud.util.staticvar;
|
|
import com.wgcloud.entity.*;
|
|
import java.util.ArrayList;
|
import java.util.Collections;
|
import java.util.List;
|
|
|
/**
|
* @version v3.3
|
* @ClassName:BatchData.java
|
* @author: http://www.wgstart.com
|
* @date: 2021年1月16日
|
* @Description: 临时存贮监控数据的静态工具类
|
* @Copyright: 2019-2021 wgcloud. All rights reserved.
|
*/
|
public class BatchData {
|
|
//系统信息
|
public static List<SystemInfo> SYSTEM_INFO_LIST = Collections.synchronizedList(new ArrayList<SystemInfo>());
|
|
|
//进程信息
|
public static List<AppInfo> APP_INFO_LIST = Collections.synchronizedList(new ArrayList<AppInfo>());
|
|
|
//进程状态
|
public static List<AppState> APP_STATE_LIST = Collections.synchronizedList(new ArrayList<AppState>());
|
|
//日志监控信息
|
public static List<FileWarnInfo> FILEWARN_INFO_LIST = Collections.synchronizedList(new ArrayList<FileWarnInfo>());
|
|
|
//日志监控状态
|
public static List<FileWarnState> FILEWARN_STATE_LIST = Collections.synchronizedList(new ArrayList<FileWarnState>());
|
|
//自定义监控项信息
|
public static List<CustomInfo> CUSTOM_INFO_LIST = Collections.synchronizedList(new ArrayList<CustomInfo>());
|
|
//自定义监控项状态
|
public static List<CustomState> CUSTOM_STATE_LIST = Collections.synchronizedList(new ArrayList<CustomState>());
|
|
|
//docker信息
|
public static List<DockerInfo> DOCKER_INFO_LIST = Collections.synchronizedList(new ArrayList<DockerInfo>());
|
|
//端口信息
|
public static List<PortInfo> PORT_INFO_LIST = Collections.synchronizedList(new ArrayList<PortInfo>());
|
|
//文件防篡改监测信息
|
public static List<FileSafe> FILE_SAFE_LIST = Collections.synchronizedList(new ArrayList<FileSafe>());
|
|
//docker状态
|
public static List<DockerState> DOCKER_STATE_LIST = Collections.synchronizedList(new ArrayList<DockerState>());
|
|
//cpu监控
|
public static List<CpuState> CPU_STATE_LIST = Collections.synchronizedList(new ArrayList<CpuState>());
|
|
//内存监控
|
public static List<MemState> MEM_STATE_LIST = Collections.synchronizedList(new ArrayList<MemState>());
|
|
//网络吞吐监控,暂没用
|
public static List<NetIoState> NETIO_STATE_LIST = Collections.synchronizedList(new ArrayList<NetIoState>());
|
|
//磁盘大小
|
public static List<DiskState> DISK_STATE_LIST = Collections.synchronizedList(new ArrayList<DiskState>());
|
|
|
//磁盘IO
|
public static List<DeskIo> DESK_IO_LIST = Collections.synchronizedList(new ArrayList<DeskIo>());
|
|
//磁盘smart
|
public static List<DiskSmart> DISK_SMART_LIST = Collections.synchronizedList(new ArrayList<DiskSmart>());
|
|
|
//cpu温度
|
public static List<CpuTemperatures> CPU_TEMPERATURES_LIST = Collections.synchronizedList(new ArrayList<CpuTemperatures>());
|
|
|
//系统负载监控
|
public static List<SysLoadState> SYSLOAD_STATE_LIST = Collections.synchronizedList(new ArrayList<SysLoadState>());
|
|
//tcp监控,暂没用
|
public static List<TcpState> TCP_STATE_LIST = Collections.synchronizedList(new ArrayList<TcpState>());
|
|
//日志信息
|
public static List<LogInfo> LOG_INFO_LIST = Collections.synchronizedList(new ArrayList<LogInfo>());
|
|
|
//接口检测状态信息
|
public static List<HeathState> HEATH_STATE_LIST = Collections.synchronizedList(new ArrayList<HeathState>());
|
|
//数通设备PING检测状态信息
|
public static List<DceState> DCE_STATE_LIST = Collections.synchronizedList(new ArrayList<DceState>());
|
|
//SNMP设备检测状态信息
|
public static List<SnmpState> SNMP_STATE_LIST = Collections.synchronizedList(new ArrayList<SnmpState>());
|
|
//数据表DbTableCount检测状态信息
|
public static List<DbTableCount> DBTABLE_COUNT_LIST = Collections.synchronizedList(new ArrayList<DbTableCount>());
|
|
/**
|
* 定时清空历史趋势图数据时,丢弃期间的agent监控数据更新,但依然保留趋势图状态数据,防止死锁
|
*/
|
public static void clearAll() {
|
BatchData.SYSTEM_INFO_LIST.clear();
|
BatchData.APP_INFO_LIST.clear();
|
BatchData.FILEWARN_INFO_LIST.clear();
|
BatchData.FILEWARN_STATE_LIST.clear();
|
BatchData.DOCKER_INFO_LIST.clear();
|
BatchData.PORT_INFO_LIST.clear();
|
//以下cpu温度没有趋势图,因此也没有必要暂存清理历史数据时候的上报数据
|
BatchData.CPU_TEMPERATURES_LIST.clear();
|
}
|
|
|
}
|