使用森数据DIX人员需要的知识背景
1. 操作系统基础知识:
Linux系统:入门级应用的知识,如 PATH,JAVA_HOME环境变量配置,文件拷贝,tar包、gz包解压,文件执行权限修改等
Windows系统:PATH,JAVA_HOME环境变量配置,服务启停应用等
2. 数据库基础知识:
传统关系型数据:简单SQL编写,如 select
、from
、 where
、 left join
的使用
3. 网络基础知识:
会网络ping通、telnet端口开启的检查
4. 数据格式基础知识:
了解JSON格式数据,理解如下数据格式含义:
[ { "Summary": "CPU使用率高于86%,设备负载过高(来源于:BP2)", "SourceAlertKey": "CPU使用率", "SourceSeverity": "Critical", "SourceIdentifier": "Identifier", "SourceEventID": "1455867577750", "Severity": "3", "LastOccurrence": "2018-08-19 17:18:23", "SourceCIName": "192.168.123.191", "Status": "1", "SourceID":"2" } ]
5. 编程基础知识:
能看懂以下这段样例代码的具体逻辑:
/ 描述该功能...function run(args) { var DbUtil = Java.type("com.uinnova.di.dicom.util.DbUtil"); var dbType = "MYSQL"; var username = "username"; var password = "password"; var url = "jdbc:mysql://0.0.0.0:3306/dix?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2b8"; var DbUtil_db = new DbUtil(dbType, username, password, url); var sql = "select * from equipmonitor"; var data = DbUtil_db.query(sql); var result_list = new java.util.ArrayList(); var mapObj = new java.util.HashMap(); var CommonUtil = Java.type("com.uinnova.di.dicom.util.CommonUtil"); for (var i = 0; i < data.size(); i++) { var temp = data.get(i); var object = new Object(); var mapKey = temp['objId']; var objValue = mapObj.get(mapKey); if (objValue != '' && objValue != null) { var listData = objValue['data']; object.kpiName = temp.get('kpi_name'); object.value = temp.get('value'); object.unit = temp.get('unit'); object.timeStamp = temp.get('time_stamp').toString(); listData.add(object); objValue.data = listData; mapObj.put(mapKey,objValue); }else{ var newObject = new Object(); var newListData = new java.util.ArrayList(); newObject.objId = mapKey; object.kpiName = temp.get('kpi_name'); object.value = temp.get('value'); object.unit = temp.get('unit'); object.timeStamp = temp.get('time_stamp').toString(); newListData.add(object); newObject.data = newListData; var nowTime = CommonUtil.conLong2Date(new Date().getTime(), 'yyyy-MM-dd HH:mm:ss'); newObject.time = nowTime; mapObj.put(mapKey,newObject); } } for (var key in mapObj) { result_list.add(mapObj[key]); } return result_list;}