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 SYSTEM_INFO_LIST = Collections.synchronizedList(new ArrayList()); //进程信息 public static List APP_INFO_LIST = Collections.synchronizedList(new ArrayList()); //进程状态 public static List APP_STATE_LIST = Collections.synchronizedList(new ArrayList()); //日志监控信息 public static List FILEWARN_INFO_LIST = Collections.synchronizedList(new ArrayList()); //日志监控状态 public static List FILEWARN_STATE_LIST = Collections.synchronizedList(new ArrayList()); //自定义监控项信息 public static List CUSTOM_INFO_LIST = Collections.synchronizedList(new ArrayList()); //自定义监控项状态 public static List CUSTOM_STATE_LIST = Collections.synchronizedList(new ArrayList()); //docker信息 public static List DOCKER_INFO_LIST = Collections.synchronizedList(new ArrayList()); //端口信息 public static List PORT_INFO_LIST = Collections.synchronizedList(new ArrayList()); //文件防篡改监测信息 public static List FILE_SAFE_LIST = Collections.synchronizedList(new ArrayList()); //docker状态 public static List DOCKER_STATE_LIST = Collections.synchronizedList(new ArrayList()); //cpu监控 public static List CPU_STATE_LIST = Collections.synchronizedList(new ArrayList()); //内存监控 public static List MEM_STATE_LIST = Collections.synchronizedList(new ArrayList()); //网络吞吐监控,暂没用 public static List NETIO_STATE_LIST = Collections.synchronizedList(new ArrayList()); //磁盘大小 public static List DISK_STATE_LIST = Collections.synchronizedList(new ArrayList()); //磁盘IO public static List DESK_IO_LIST = Collections.synchronizedList(new ArrayList()); //磁盘smart public static List DISK_SMART_LIST = Collections.synchronizedList(new ArrayList()); //cpu温度 public static List CPU_TEMPERATURES_LIST = Collections.synchronizedList(new ArrayList()); //系统负载监控 public static List SYSLOAD_STATE_LIST = Collections.synchronizedList(new ArrayList()); //tcp监控,暂没用 public static List TCP_STATE_LIST = Collections.synchronizedList(new ArrayList()); //日志信息 public static List LOG_INFO_LIST = Collections.synchronizedList(new ArrayList()); //接口检测状态信息 public static List HEATH_STATE_LIST = Collections.synchronizedList(new ArrayList()); //数通设备PING检测状态信息 public static List DCE_STATE_LIST = Collections.synchronizedList(new ArrayList()); //SNMP设备检测状态信息 public static List SNMP_STATE_LIST = Collections.synchronizedList(new ArrayList()); //数据表DbTableCount检测状态信息 public static List DBTABLE_COUNT_LIST = Collections.synchronizedList(new ArrayList()); /** * 定时清空历史趋势图数据时,丢弃期间的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(); } }