diff --git a/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java new file mode 100644 index 0000000..5063eec --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java @@ -0,0 +1,151 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.commons.utils.StringConvertor; +import com.loafle.overflow.crawler.config.Connection; +import com.loafle.overflow.crawler.config.Crawler; +import com.loafle.overflow.crawler.config.Keys; +import com.loafle.overflow.module.infra.model.InfraHost; +import com.loafle.overflow.module.meta.model.MetaCrawler; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; +import com.loafle.overflow.module.meta.service.MetaSensorItemKeyService; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("GenerateUtil") +public class GenerateUtil { + + @Autowired + private MetaSensorItemKeyService metaSensorItemKeyService; + + private Map> mappingMap = null; + + public Map initMappingMap(MetaCrawler metaCrawler) { + + if(this.mappingMap == null) { + this.mappingMap = new HashMap<>(); + } + + Map resultMap = this.mappingMap.get(metaCrawler.getId()); + + if(resultMap != null) { + return resultMap; + } + + resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); + this.mappingMap.put(metaCrawler.getId(), resultMap); + + return resultMap; + } + + public Map getAuth(MetaCrawler metaCrawler, com.loafle.overflow.module.infra.model.InfraService infraService) { + + Map auth = new HashMap<>(); + + switch (metaCrawler.getId()) { + case 11: // mysql + { + auth.put("url", "jdbc:mysql://"+ StringConvertor.intToIp(infraService.getHost().getIp())+":"+String.valueOf(infraService.getPort())); + auth.put("id", "docker"); // FIXME: Auth Info + auth.put("pw", "qwer5795QWER"); // FIXME: Auth Info + } + break; + } + + return auth; + } + + public Crawler getCrawler(MetaCrawler metaCrawler) { + + Crawler crawler = new Crawler(); + crawler.setName(metaCrawler.getName()); + + String container = ""; + + switch (metaCrawler.getId()) { + case 1: + break; + case 2: + case 9: + case 10: + case 11: + case 13: + case 15: + container = "java_proxy"; + break; + default: + container = "java_proxy"; + break; + } + + + crawler.setContainer(container); + + return crawler; + } + + public com.loafle.overflow.crawler.config.Target createTarget(InfraHost infraHost, Sensor dbSensor) { + + com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); + Connection connection = new Connection(); + connection.setIp(StringConvertor.intToIp(infraHost.getIp())); + + + switch (dbSensor.getCrawler().getId()) { + case 23: + { + connection.setPort("135"); + connection.setPortType("tcp"); + connection.setSsl(false); + + target.setConnection(connection); + + // FIXME: load crawler Auth Info + Map auth = new HashMap<>(); + auth.put("id", "administrator"); + auth.put("pw", "dbseogns18"); + + target.setAuth(auth); + + } + break; + } + + + return target; + } + + + public Map> sortItems(List sensorItems, Map keyMap) { + + Map> metricMap = new HashMap<>(); + + MetaSensorItemKey itemKey = null; + + for(SensorItem sItem : sensorItems) { + itemKey = keyMap.get(sItem.getItem().getId()); + if(metricMap.containsKey(itemKey.getFroms()) == false) { + metricMap.put(itemKey.getFroms(), new ArrayList<>()); + } + metricMap.get(itemKey.getFroms()).add(itemKey); + } + + return metricMap; + } + + public Keys createKeys(MetaSensorItemKey itemKey) { + Keys keys = new Keys(); + keys.setKey(itemKey.getKey()); + keys.setMetric(itemKey.getItem().getKey()); + return keys; + } +} diff --git a/src/main/java/com/loafle/overflow/module/generator/service/InfraHostGenerator.java b/src/main/java/com/loafle/overflow/module/generator/service/InfraHostGenerator.java new file mode 100644 index 0000000..ba007bb --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/InfraHostGenerator.java @@ -0,0 +1,62 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.crawler.config.Config; +import com.loafle.overflow.crawler.config.Crawler; +import com.loafle.overflow.crawler.config.Schedule; +import com.loafle.overflow.module.infra.model.Infra; +import com.loafle.overflow.module.infra.model.InfraHost; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import org.codehaus.jackson.map.ObjectMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("InfraHostGenerator") +public class InfraHostGenerator { + + @Autowired + private GenerateUtil generateUtil; + + @Autowired + private InfraHostWMIGenerator infraHostWMIGenerator; + + public String process(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { + + InfraHost infraHost = (InfraHost)infra; + + Config config = new Config(); + config.setId(String.valueOf(dbSensor.getId())); + + com.loafle.overflow.crawler.config.Target target = this.generateUtil.createTarget(infraHost, dbSensor); + + config.setTarget(target); + + // FIXME: Interval + Schedule schedule = new Schedule(); + schedule.setInterval("5"); + config.setSchedule(schedule); + + Crawler crawler = this.generateUtil.getCrawler(dbSensor.getCrawler()); + config.setCrawler(crawler); + + Map keyMap = this.generateUtil.initMappingMap(dbSensor.getCrawler()); + + switch (dbSensor.getCrawler().getId()) { + case 23: + this.infraHostWMIGenerator.process(sensorItems, keyMap, dbSensor, config); + default: + break; + } + + ObjectMapper objectMapper = new ObjectMapper(); + return objectMapper.writeValueAsString(config); + } +} diff --git a/src/main/java/com/loafle/overflow/module/generator/service/InfraHostWMIGenerator.java b/src/main/java/com/loafle/overflow/module/generator/service/InfraHostWMIGenerator.java new file mode 100644 index 0000000..abeee2b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/InfraHostWMIGenerator.java @@ -0,0 +1,136 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.crawler.config.*; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.type.TypeReference; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("InfraHostWMIGenerator") +public class InfraHostWMIGenerator { + + @Autowired + private GenerateUtil generateUtil; + + public void process(List sensorItems, Map keyMap, Sensor dbSensor, Config config) throws IOException { + + Map> metricMap = null; + metricMap = this.generateUtil.sortItems(sensorItems, keyMap); + +// MetaSensorItemKey itemKey = null; +// +// for(SensorItem sItem : sensorItems) { +// itemKey = keyMap.get(sItem.getItem().getId()); +// if(metricMap.containsKey(itemKey.getFroms()) == false) { +// metricMap.put(itemKey.getFroms(), new ArrayList<>()); +// } +// metricMap.get(itemKey.getFroms()).add(itemKey); +// } + + List itemList = new ArrayList<>(); + Item item = null; + QueryInfo queryInfo = null; + MappingInfo mappingInfo = null; + + StringBuffer stringBuffer = new StringBuffer(); + + Map extendMap = new HashMap<>(); + extendMap.put("nameSpace", "root/cimv2"); + extendMap.put("wmicPath", "/home/snoop/temp/wmic"); + + + List keysList = null; + MetaSensorItemKey tempItemKey = null; + Keys keys = null; + for(Map.Entry> elems : metricMap.entrySet()) { + keysList = new ArrayList<>(); + item = new Item(); + stringBuffer.setLength(0); + + stringBuffer.append("SELECT "); + + for(int indexI = 0; indexI < elems.getValue().size(); ++indexI) { + + tempItemKey = elems.getValue().get(indexI); + stringBuffer.append(tempItemKey.getKey()); + if(indexI + 1 < elems.getValue().size()) { + stringBuffer.append(", "); + } + +// keys = new Keys(); +// keys.setKey(tempItemKey.getKey()); +// keys.setMetric(tempItemKey.getItem().getKey()); + keysList.add(this.generateUtil.createKeys(tempItemKey)); + } + + + List arrayColumns = null; + + String json = tempItemKey.getOption(); + if(json != null && json.length() > 0) { + HashMap optionMap; + optionMap = new ObjectMapper().readValue(json, new TypeReference>() {}); + + Object obj = null; + obj = optionMap.get("appends"); + if(obj != null) { + List appendsList = (List)obj; + for(String append : appendsList) { + stringBuffer.append(", "); + stringBuffer.append(append); + } + } + + stringBuffer.append(" FROM "); + stringBuffer.append(elems.getKey()); + + obj = optionMap.get("where"); + if(obj != null) { + String where = (String)obj; + stringBuffer.append(" WHERE "); + stringBuffer.append(where); + } + + obj = optionMap.get("arrayColumns"); + if(obj != null) { + arrayColumns = (List)obj; + } + + } + else { + stringBuffer.append(" FROM "); + stringBuffer.append(elems.getKey()); + } + + queryInfo = new QueryInfo(); + queryInfo.setQuery(stringBuffer.toString()); + queryInfo.setExtend(extendMap); + + mappingInfo = new MappingInfo(); + mappingInfo.setParseDirection("col"); + mappingInfo.setArrayColumns(arrayColumns); + + item.setMappingInfo(mappingInfo); + item.setQueryInfo(queryInfo); + item.setKeys(keysList); + + itemList.add(item); + + } + + config.setItems(itemList); + + } +} diff --git a/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceGenerator.java b/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceGenerator.java new file mode 100644 index 0000000..398008b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceGenerator.java @@ -0,0 +1,75 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.commons.utils.StringConvertor; +import com.loafle.overflow.crawler.config.Config; +import com.loafle.overflow.crawler.config.Connection; +import com.loafle.overflow.crawler.config.Crawler; +import com.loafle.overflow.crawler.config.Schedule; +import com.loafle.overflow.module.infra.model.Infra; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import org.codehaus.jackson.map.ObjectMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("InfraServiceGenerator") +public class InfraServiceGenerator { + + @Autowired + private GenerateUtil generateUtil; + + @Autowired + private InfraServiceMysqlGenerator infraServiceMysqlGenerator; + + public String process(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { + com.loafle.overflow.module.infra.model.InfraService infraService = (com.loafle.overflow.module.infra.model.InfraService)infra; + + Config config = new Config(); + config.setId(String.valueOf(dbSensor.getId())); + + com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); + Connection connection = new Connection(); + connection.setIp(StringConvertor.intToIp(infraService.getHost().getIp())); + connection.setPort(String.valueOf(infraService.getPort())); + connection.setPortType(infraService.getPortType()); + connection.setSsl(infraService.isTlsType()); + + target.setConnection(connection); + + Map auth = this.generateUtil.getAuth(dbSensor.getCrawler(), infraService); + + target.setAuth(auth); + + config.setTarget(target); + + // FIXME: Interval + Schedule schedule = new Schedule(); + schedule.setInterval("5"); + config.setSchedule(schedule); + + Crawler crawler = this.generateUtil.getCrawler(dbSensor.getCrawler()); + config.setCrawler(crawler); + + Map keyMap = this.generateUtil.initMappingMap(dbSensor.getCrawler()); + + switch (dbSensor.getCrawler().getId()) { + case 11: + this.infraServiceMysqlGenerator.process(sensorItems, keyMap, dbSensor, config); +// case 23: +// processWMI(sensorItems, keyMap, dbSensor, config); + default: + break; + } + + ObjectMapper objectMapper = new ObjectMapper(); + return objectMapper.writeValueAsString(config); + } +} diff --git a/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceMysqlGenerator.java b/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceMysqlGenerator.java new file mode 100644 index 0000000..0e0a1e0 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/InfraServiceMysqlGenerator.java @@ -0,0 +1,153 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.crawler.config.*; +import com.loafle.overflow.module.meta.model.MetaCrawler; +import com.loafle.overflow.module.meta.model.MetaSensorItemKey; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.type.TypeReference; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("InfraServiceMysqlGenerator") +public class InfraServiceMysqlGenerator { + + @Autowired + private GenerateUtil generateUtil; + + public void process(List sensorItems, Map keyMap, Sensor dbSensor, Config config) throws IOException { + + +// List keysList = new ArrayList<>(); +// for(SensorItem sItem : sensorItems) { +// keys = new Keys(); +// keys.setMetric(sItem.getItem().getKey()); +// keys.setKey(KeyMap.get(sItem.getItem().getId()).getKey()); +// keysList.add(keys); +// } +// item.setKeys(keysList); + Map> metricMap = null; + metricMap = this.generateUtil.sortItems(sensorItems, keyMap); + + List itemList = new ArrayList<>(); + + QueryInfo queryInfo = null; + MappingInfo mappingInfo = null; + + List keysList = null; + MetaSensorItemKey tempItemKey = null; + Keys keys = null; + Item item = null; + StringBuffer stringBuffer = new StringBuffer(); + for(Map.Entry> elems : metricMap.entrySet()) { + + keysList = new ArrayList<>(); + item = new Item(); + stringBuffer.setLength(0); + + stringBuffer.append(elems.getKey()); + + stringBuffer.append(" where "); + for(int indexI = 0; indexI < elems.getValue().size(); ++indexI) { + tempItemKey = elems.getValue().get(indexI); + + stringBuffer.append("variable_name = '"); + stringBuffer.append(tempItemKey.getKey()); + stringBuffer.append("'"); + + if(indexI + 1 < elems.getValue().size()) { + stringBuffer.append(" or "); + } + keysList.add(this.generateUtil.createKeys(tempItemKey)); + } + + + + List keyColumns = null; + String valueColumn = null; + + String json = tempItemKey.getOption(); + if(json != null && json.length() > 0) { + HashMap optionMap; + optionMap = new ObjectMapper().readValue(json, new TypeReference>() {}); + + Object obj = null; + obj = optionMap.get("valueColumn"); + if(obj != null) { + valueColumn = (String)obj; + } + + obj = optionMap.get("keyColumns"); + if(obj != null) { + keyColumns = (List)obj; + } + } + + queryInfo = new QueryInfo(); + queryInfo.setQuery(stringBuffer.toString()); + + mappingInfo = new MappingInfo(); + mappingInfo.setParseDirection("row"); + mappingInfo.setValueColumn(valueColumn); + mappingInfo.setKeyColumns(keyColumns); + + item.setMappingInfo(mappingInfo); + item.setQueryInfo(queryInfo); + item.setKeys(keysList); + + itemList.add(item); + + } + + config.setItems(itemList); + + +// ObjectMapper objectMapper = new ObjectMapper(); +// +// return objectMapper.writeValueAsString(config); + } + + public void setQueryAndMapping(MetaCrawler metaCrawler, List keysList, QueryInfo queryInfo, MappingInfo mappingInfo) { + + switch (metaCrawler.getId()) { + case 11: // mysql + { + String query = "show status where "; +// queryInfo.setQuery("show status where "); + + Keys keys = null; + for(int indexI = 0 ; indexI < keysList.size(); ++indexI) { + keys = keysList.get(indexI); + query += "variable_name = '"; + query += keys.getKey(); + query += "'"; + if(indexI + 1 < keysList.size()) { + query += " or "; + } + } + + queryInfo.setQuery(query); + + mappingInfo.setParseDirection("row"); + mappingInfo.setValueColumn("Value"); + + List keyColumns = new ArrayList<>(); + keyColumns.add("Variable_name"); + + mappingInfo.setKeyColumns(keyColumns); + } + break; + } + + } +} diff --git a/src/main/java/com/loafle/overflow/module/generator/service/SensorConfigGenerator.java b/src/main/java/com/loafle/overflow/module/generator/service/SensorConfigGenerator.java new file mode 100644 index 0000000..03af878 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/generator/service/SensorConfigGenerator.java @@ -0,0 +1,66 @@ +package com.loafle.overflow.module.generator.service; + +import com.loafle.overflow.commons.model.PageParams; +import com.loafle.overflow.module.infra.model.Infra; +import com.loafle.overflow.module.infra.service.InfraService; +import com.loafle.overflow.module.sensor.model.Sensor; +import com.loafle.overflow.module.sensor.model.SensorItem; +import com.loafle.overflow.module.sensor.service.SensorItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.List; + +/** + * Created by snoop on 17. 9. 6. + */ +@Service("SensorConfigGenerator") +public class SensorConfigGenerator { + + @Autowired + private SensorItemService sensorItemService; + + @Autowired + private InfraService infraService; + + @Autowired + private InfraHostGenerator infraHostGenerator; + + @Autowired + private InfraServiceGenerator infraServiceGenerator; + + + public String generate(Sensor sensor) throws IOException { + PageParams pageParams = new PageParams(); + pageParams.setPageNo(0); + pageParams.setCountPerPage(Integer.MAX_VALUE); + pageParams.setSortCol("id"); + pageParams.setSortDirection("descending"); + Page dbItemList = this.sensorItemService.readAllBySensor(sensor, pageParams); + + List sensorItems = dbItemList.getContent(); + + if(sensorItems.size() <= 0) { + return ""; + } + Sensor dbSensor = sensorItems.get(0).getSensor(); + + Infra infra = this.infraService.readByTarget(dbSensor.getTarget()); + + // 7 = Infra OS Service + if(infra.getInfraType().getId() == 7) { + return this.infraServiceGenerator.process(dbSensor, sensorItems, infra); + } + if(infra.getInfraType().getId() == 2) { + return this.infraHostGenerator.process(dbSensor, sensorItems, infra); + } + + return null; + } + + + + +} diff --git a/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java b/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java index b3c3c98..f7a236c 100644 --- a/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java +++ b/src/main/java/com/loafle/overflow/module/sensor/service/SensorService.java @@ -2,14 +2,10 @@ package com.loafle.overflow.module.sensor.service; import com.loafle.overflow.commons.model.PageParams; import com.loafle.overflow.commons.utils.PageUtil; -import com.loafle.overflow.commons.utils.StringConvertor; -import com.loafle.overflow.crawler.config.*; import com.loafle.overflow.module.domain.model.Domain; +import com.loafle.overflow.module.generator.service.SensorConfigGenerator; import com.loafle.overflow.module.infra.model.Infra; -import com.loafle.overflow.module.infra.model.InfraHost; import com.loafle.overflow.module.infra.service.InfraService; -import com.loafle.overflow.module.meta.model.MetaCrawler; -import com.loafle.overflow.module.meta.model.MetaSensorItemKey; import com.loafle.overflow.module.meta.model.MetaSensorStatus; import com.loafle.overflow.module.meta.service.MetaSensorItemKeyService; import com.loafle.overflow.module.probe.model.Probe; @@ -18,18 +14,13 @@ import com.loafle.overflow.module.sensor.dao.SensorDAO; import com.loafle.overflow.module.sensor.model.Sensor; import com.loafle.overflow.module.sensor.model.SensorItem; import com.loafle.overflow.module.target.model.Target; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.stereotype.Service; import javax.transaction.Transactional; import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** * Created by insanity on 17. 6. 28. @@ -52,7 +43,10 @@ public class SensorService { @Autowired private MetaSensorItemKeyService metaSensorItemKeyService; - private Map> mappingMap = null; + @Autowired + private SensorConfigGenerator sensorConfigGenerator; + +// private Map> mappingMap = null; public Sensor regist(Sensor sensor) { return this.sensorDAO.save(sensor); @@ -116,375 +110,377 @@ public class SensorService { public String generateSensorConfig(Sensor sensor) throws IOException { - PageParams pageParams = new PageParams(); - pageParams.setPageNo(0); - pageParams.setCountPerPage(Integer.MAX_VALUE); - pageParams.setSortCol("id"); - pageParams.setSortDirection("descending"); - Page dbItemList = this.sensorItemService.readAllBySensor(sensor, pageParams); + return this.sensorConfigGenerator.generate(sensor); - List sensorItems = dbItemList.getContent(); - - if(sensorItems.size() <= 0) { - return ""; - } - Sensor dbSensor = sensorItems.get(0).getSensor(); - - Infra infra = this.infraService.readByTarget(dbSensor.getTarget()); - - // 7 = Infra OS Service - if(infra.getInfraType().getId() == 7) { - return this.processService(dbSensor, sensorItems, infra); - } - if(infra.getInfraType().getId() == 2) { - return this.processHost(dbSensor, sensorItems, infra); - } - - return null; - } - - private String processHost(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { - - InfraHost infraHost = (InfraHost)infra; - - Config config = new Config(); - config.setId(String.valueOf(dbSensor.getId())); - - com.loafle.overflow.crawler.config.Target target = this.createTarget(infraHost, dbSensor); - - config.setTarget(target); - - // FIXME: Interval - Schedule schedule = new Schedule(); - schedule.setInterval("5"); - config.setSchedule(schedule); - - Crawler crawler = this.getCrawler(dbSensor.getCrawler()); - config.setCrawler(crawler); - - Map keyMap = this.initMappingMap(dbSensor.getCrawler()); - - switch (dbSensor.getCrawler().getId()) { - case 23: - processWMI(sensorItems, keyMap, dbSensor, config); - default: - break; - } - - ObjectMapper objectMapper = new ObjectMapper(); - return objectMapper.writeValueAsString(config); - } - - private com.loafle.overflow.crawler.config.Target createTarget(InfraHost infraHost, Sensor dbSensor) { - - com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); - Connection connection = new Connection(); - connection.setIp(StringConvertor.intToIp(infraHost.getIp())); - - - switch (dbSensor.getCrawler().getId()) { - case 23: - { - connection.setPort("135"); - connection.setPortType("tcp"); - connection.setSsl(false); - - target.setConnection(connection); - - // FIXME: load crawler Auth Info - Map auth = new HashMap<>(); - auth.put("id", "administrator"); - auth.put("pw", "dbseogns18"); - - target.setAuth(auth); - - } - break; - } - - - return target; - } - - private String processService(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { - com.loafle.overflow.module.infra.model.InfraService infraService = (com.loafle.overflow.module.infra.model.InfraService)infra; - - Config config = new Config(); - config.setId(String.valueOf(dbSensor.getId())); - - com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); - Connection connection = new Connection(); - connection.setIp(StringConvertor.intToIp(infraService.getHost().getIp())); - connection.setPort(String.valueOf(infraService.getPort())); - connection.setPortType(infraService.getPortType()); - connection.setSsl(infraService.isTlsType()); - - target.setConnection(connection); - - Map auth = this.getAuth(dbSensor.getCrawler(), infraService); - - target.setAuth(auth); - - config.setTarget(target); - - // FIXME: Interval - Schedule schedule = new Schedule(); - schedule.setInterval("5"); - config.setSchedule(schedule); - - Crawler crawler = this.getCrawler(dbSensor.getCrawler()); - config.setCrawler(crawler); - - Map keyMap = this.initMappingMap(dbSensor.getCrawler()); - - switch (dbSensor.getCrawler().getId()) { - case 11: - processMysql(sensorItems, keyMap, dbSensor, config); - case 23: - processWMI(sensorItems, keyMap, dbSensor, config); - default: - break; - } - - ObjectMapper objectMapper = new ObjectMapper(); - return objectMapper.writeValueAsString(config); - } - - private void processMysql(List sensorItems, Map KeyMap, Sensor dbSensor, Config config) throws IOException { - Item item = new Item(); - Keys keys = null; - List keysList = new ArrayList<>(); - for(SensorItem sItem : sensorItems) { - keys = new Keys(); - keys.setMetric(sItem.getItem().getKey()); - keys.setKey(KeyMap.get(sItem.getItem().getId()).getKey()); - keysList.add(keys); - } - item.setKeys(keysList); - - QueryInfo queryInfo = new QueryInfo(); - MappingInfo mappingInfo = new MappingInfo(); - - this.setQueryAndMapping(dbSensor.getCrawler(), keysList, queryInfo, mappingInfo); - - item.setQueryInfo(queryInfo); - item.setMappingInfo(mappingInfo); - - List itemList = new ArrayList<>(); - itemList.add(item); - - config.setItems(itemList); - - -// ObjectMapper objectMapper = new ObjectMapper(); +// PageParams pageParams = new PageParams(); +// pageParams.setPageNo(0); +// pageParams.setCountPerPage(Integer.MAX_VALUE); +// pageParams.setSortCol("id"); +// pageParams.setSortDirection("descending"); +// Page dbItemList = this.sensorItemService.readAllBySensor(sensor, pageParams); // +// List sensorItems = dbItemList.getContent(); +// +// if(sensorItems.size() <= 0) { +// return ""; +// } +// Sensor dbSensor = sensorItems.get(0).getSensor(); +// +// Infra infra = this.infraService.readByTarget(dbSensor.getTarget()); +// +// // 7 = Infra OS Service +// if(infra.getInfraType().getId() == 7) { +// return this.processService(dbSensor, sensorItems, infra); +// } +// if(infra.getInfraType().getId() == 2) { +// return this.processHost(dbSensor, sensorItems, infra); +// } +// +// return null; + } + +// private String processHost(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { +// +// InfraHost infraHost = (InfraHost)infra; +// +// Config config = new Config(); +// config.setId(String.valueOf(dbSensor.getId())); +// +// com.loafle.overflow.crawler.config.Target target = this.createTarget(infraHost, dbSensor); +// +// config.setTarget(target); +// +// // FIXME: Interval +// Schedule schedule = new Schedule(); +// schedule.setInterval("5"); +// config.setSchedule(schedule); +// +// Crawler crawler = this.getCrawler(dbSensor.getCrawler()); +// config.setCrawler(crawler); +// +// Map keyMap = this.initMappingMap(dbSensor.getCrawler()); +// +// switch (dbSensor.getCrawler().getId()) { +// case 23: +// processWMI(sensorItems, keyMap, dbSensor, config); +// default: +// break; +// } +// +// ObjectMapper objectMapper = new ObjectMapper(); // return objectMapper.writeValueAsString(config); - } - private void processWMI(List sensorItems, Map keyMap, Sensor dbSensor, Config config) throws IOException { +// } - Map> metricMap = new HashMap<>(); +// private com.loafle.overflow.crawler.config.Target createTarget(InfraHost infraHost, Sensor dbSensor) { +// +// com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); +// Connection connection = new Connection(); +// connection.setIp(StringConvertor.intToIp(infraHost.getIp())); +// +// +// switch (dbSensor.getCrawler().getId()) { +// case 23: +// { +// connection.setPort("135"); +// connection.setPortType("tcp"); +// connection.setSsl(false); +// +// target.setConnection(connection); +// +// // FIXME: load crawler Auth Info +// Map auth = new HashMap<>(); +// auth.put("id", "administrator"); +// auth.put("pw", "dbseogns18"); +// +// target.setAuth(auth); +// +// } +// break; +// } +// +// +// return target; +// } - MetaSensorItemKey itemKey = null; +// private String processService(Sensor dbSensor, List sensorItems, Infra infra) throws IOException { +// com.loafle.overflow.module.infra.model.InfraService infraService = (com.loafle.overflow.module.infra.model.InfraService)infra; +// +// Config config = new Config(); +// config.setId(String.valueOf(dbSensor.getId())); +// +// com.loafle.overflow.crawler.config.Target target = new com.loafle.overflow.crawler.config.Target(); +// Connection connection = new Connection(); +// connection.setIp(StringConvertor.intToIp(infraService.getHost().getIp())); +// connection.setPort(String.valueOf(infraService.getPort())); +// connection.setPortType(infraService.getPortType()); +// connection.setSsl(infraService.isTlsType()); +// +// target.setConnection(connection); +// +// Map auth = this.getAuth(dbSensor.getCrawler(), infraService); +// +// target.setAuth(auth); +// +// config.setTarget(target); +// +// // FIXME: Interval +// Schedule schedule = new Schedule(); +// schedule.setInterval("5"); +// config.setSchedule(schedule); +// +// Crawler crawler = this.getCrawler(dbSensor.getCrawler()); +// config.setCrawler(crawler); +// +// Map keyMap = this.initMappingMap(dbSensor.getCrawler()); +// +// switch (dbSensor.getCrawler().getId()) { +// case 11: +// processMysql(sensorItems, keyMap, dbSensor, config); +// case 23: +// processWMI(sensorItems, keyMap, dbSensor, config); +// default: +// break; +// } +// +// ObjectMapper objectMapper = new ObjectMapper(); +// return objectMapper.writeValueAsString(config); +// } - for(SensorItem sItem : sensorItems) { - itemKey = keyMap.get(sItem.getItem().getId()); - if(metricMap.containsKey(itemKey.getFroms()) == false) { - metricMap.put(itemKey.getFroms(), new ArrayList<>()); - } - metricMap.get(itemKey.getFroms()).add(itemKey); - } +// private void processMysql(List sensorItems, Map KeyMap, Sensor dbSensor, Config config) throws IOException { +// Item item = new Item(); +// Keys keys = null; +// List keysList = new ArrayList<>(); +// for(SensorItem sItem : sensorItems) { +// keys = new Keys(); +// keys.setMetric(sItem.getItem().getKey()); +// keys.setKey(KeyMap.get(sItem.getItem().getId()).getKey()); +// keysList.add(keys); +// } +// item.setKeys(keysList); +// +// QueryInfo queryInfo = new QueryInfo(); +// MappingInfo mappingInfo = new MappingInfo(); +// +// this.setQueryAndMapping(dbSensor.getCrawler(), keysList, queryInfo, mappingInfo); +// +// item.setQueryInfo(queryInfo); +// item.setMappingInfo(mappingInfo); +// +// List itemList = new ArrayList<>(); +// itemList.add(item); +// +// config.setItems(itemList); +// +// +//// ObjectMapper objectMapper = new ObjectMapper(); +//// +//// return objectMapper.writeValueAsString(config); +// } +// private void processWMI(List sensorItems, Map keyMap, Sensor dbSensor, Config config) throws IOException { +// +// Map> metricMap = new HashMap<>(); +// +// MetaSensorItemKey itemKey = null; +// +// for(SensorItem sItem : sensorItems) { +// itemKey = keyMap.get(sItem.getItem().getId()); +// if(metricMap.containsKey(itemKey.getFroms()) == false) { +// metricMap.put(itemKey.getFroms(), new ArrayList<>()); +// } +// metricMap.get(itemKey.getFroms()).add(itemKey); +// } +// +// List itemList = new ArrayList<>(); +// Item item = null; +// QueryInfo queryInfo = null; +// MappingInfo mappingInfo = null; +// +// StringBuffer stringBuffer = new StringBuffer(); +// +// Map extendMap = new HashMap<>(); +// extendMap.put("nameSpace", "root/cimv2"); +// extendMap.put("wmicPath", "/home/snoop/temp/wmic"); +// +// +// List keysList = null; +// MetaSensorItemKey tempItemKey = null; +// Keys keys = null; +// for(Map.Entry> elems : metricMap.entrySet()) { +// keysList = new ArrayList<>(); +// item = new Item(); +// stringBuffer.setLength(0); +// +// stringBuffer.append("SELECT "); +// +// for(int indexI = 0; indexI < elems.getValue().size(); ++indexI) { +// +// tempItemKey = elems.getValue().get(indexI); +// stringBuffer.append(tempItemKey.getKey()); +// if(indexI + 1 < elems.getValue().size()) { +// stringBuffer.append(", "); +// } +// +// keys = new Keys(); +// keys.setKey(tempItemKey.getKey()); +// keys.setMetric(tempItemKey.getItem().getKey()); +// keysList.add(keys); +// } +// +// +// List arrayColumns = null; +// +// String json = tempItemKey.getOption(); +// if(json != null && json.length() > 0) { +// HashMap optionMap; +// optionMap = new ObjectMapper().readValue(json, new TypeReference>() {}); +// +// Object obj = null; +// obj = optionMap.get("appends"); +// if(obj != null) { +// List appendsList = (List)obj; +// for(String append : appendsList) { +// stringBuffer.append(", "); +// stringBuffer.append(append); +// } +// } +// +// stringBuffer.append(" FROM "); +// stringBuffer.append(elems.getKey()); +// +// obj = optionMap.get("where"); +// if(obj != null) { +// String where = (String)obj; +// stringBuffer.append(" WHERE "); +// stringBuffer.append(where); +// } +// +// obj = optionMap.get("arrayColumns"); +// if(obj != null) { +// arrayColumns = (List)obj; +// } +// +// } +// else { +// stringBuffer.append(" FROM "); +// stringBuffer.append(elems.getKey()); +// } +// +// queryInfo = new QueryInfo(); +// queryInfo.setQuery(stringBuffer.toString()); +// queryInfo.setExtend(extendMap); +// +// mappingInfo = new MappingInfo(); +// mappingInfo.setParseDirection("col"); +// mappingInfo.setArrayColumns(arrayColumns); +// +// item.setMappingInfo(mappingInfo); +// item.setQueryInfo(queryInfo); +// item.setKeys(keysList); +// +// itemList.add(item); +// +// } +// +// config.setItems(itemList); +// +// } - List itemList = new ArrayList<>(); - Item item = null; - QueryInfo queryInfo = null; - MappingInfo mappingInfo = null; +// private void setQueryAndMapping(MetaCrawler metaCrawler, List keysList, QueryInfo queryInfo, MappingInfo mappingInfo) { +// +// switch (metaCrawler.getId()) { +// case 11: // mysql +// { +// String query = "show status where "; +//// queryInfo.setQuery("show status where "); +// +// Keys keys = null; +// for(int indexI = 0 ; indexI < keysList.size(); ++indexI) { +// keys = keysList.get(indexI); +// query += "variable_name = '"; +// query += keys.getKey(); +// query += "'"; +// if(indexI + 1 < keysList.size()) { +// query += " or "; +// } +// } +// +// queryInfo.setQuery(query); +// +// mappingInfo.setParseDirection("row"); +// mappingInfo.setValueColumn("Value"); +// +// List keyColumns = new ArrayList<>(); +// keyColumns.add("Variable_name"); +// +// mappingInfo.setKeyColumns(keyColumns); +// } +// break; +// } +// +// } - StringBuffer stringBuffer = new StringBuffer(); - - Map extendMap = new HashMap<>(); - extendMap.put("nameSpace", "root/cimv2"); - extendMap.put("wmicPath", "/home/snoop/temp/wmic"); - - - List keysList = null; - MetaSensorItemKey tempItemKey = null; - Keys keys = null; - for(Map.Entry> elems : metricMap.entrySet()) { - keysList = new ArrayList<>(); - item = new Item(); - stringBuffer.setLength(0); - - stringBuffer.append("SELECT "); - - for(int indexI = 0; indexI < elems.getValue().size(); ++indexI) { - - tempItemKey = elems.getValue().get(indexI); - stringBuffer.append(tempItemKey.getKey()); - if(indexI + 1 < elems.getValue().size()) { - stringBuffer.append(", "); - } - - keys = new Keys(); - keys.setKey(tempItemKey.getKey()); - keys.setMetric(tempItemKey.getItem().getKey()); - keysList.add(keys); - } - - - List arrayColumns = null; - - String json = tempItemKey.getOption(); - if(json != null && json.length() > 0) { - HashMap optionMap; - optionMap = new ObjectMapper().readValue(json, new TypeReference>() {}); - - Object obj = null; - obj = optionMap.get("appends"); - if(obj != null) { - List appendsList = (List)obj; - for(String append : appendsList) { - stringBuffer.append(", "); - stringBuffer.append(append); - } - } - - stringBuffer.append(" FROM "); - stringBuffer.append(elems.getKey()); - - obj = optionMap.get("where"); - if(obj != null) { - String where = (String)obj; - stringBuffer.append(" WHERE "); - stringBuffer.append(where); - } - - obj = optionMap.get("arrayColumns"); - if(obj != null) { - arrayColumns = (List)obj; - } - - } - else { - stringBuffer.append(" FROM "); - stringBuffer.append(elems.getKey()); - } - - queryInfo = new QueryInfo(); - queryInfo.setQuery(stringBuffer.toString()); - queryInfo.setExtend(extendMap); - - mappingInfo = new MappingInfo(); - mappingInfo.setParseDirection("col"); - mappingInfo.setArrayColumns(arrayColumns); - - item.setMappingInfo(mappingInfo); - item.setQueryInfo(queryInfo); - item.setKeys(keysList); - - itemList.add(item); - - } - - config.setItems(itemList); - - } - - private void setQueryAndMapping(MetaCrawler metaCrawler, List keysList, QueryInfo queryInfo, MappingInfo mappingInfo) { - - switch (metaCrawler.getId()) { - case 11: // mysql - { - String query = "show status where "; -// queryInfo.setQuery("show status where "); - - Keys keys = null; - for(int indexI = 0 ; indexI < keysList.size(); ++indexI) { - keys = keysList.get(indexI); - query += "variable_name = '"; - query += keys.getKey(); - query += "'"; - if(indexI + 1 < keysList.size()) { - query += " or "; - } - } - - queryInfo.setQuery(query); - - mappingInfo.setParseDirection("row"); - mappingInfo.setValueColumn("Value"); - - List keyColumns = new ArrayList<>(); - keyColumns.add("Variable_name"); - - mappingInfo.setKeyColumns(keyColumns); - } - break; - } - - } - - private Map initMappingMap(MetaCrawler metaCrawler) { - - if(this.mappingMap == null) { - this.mappingMap = new HashMap<>(); - } - - Map resultMap = this.mappingMap.get(metaCrawler.getId()); - - if(resultMap != null) { - return resultMap; - } - - resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); - this.mappingMap.put(metaCrawler.getId(), resultMap); - - return resultMap; - } - - private Map getAuth(MetaCrawler metaCrawler, com.loafle.overflow.module.infra.model.InfraService infraService) { - - Map auth = new HashMap<>(); - - switch (metaCrawler.getId()) { - case 11: // mysql - { - auth.put("url", "jdbc:mysql://"+StringConvertor.intToIp(infraService.getHost().getIp())+":"+String.valueOf(infraService.getPort())); - auth.put("id", "docker"); // FIXME: Auth Info - auth.put("pw", "qwer5795QWER"); // FIXME: Auth Info - } - break; - } - - return auth; - } - - private Crawler getCrawler(MetaCrawler metaCrawler) { - - Crawler crawler = new Crawler(); - crawler.setName(metaCrawler.getName()); - - String container = ""; - - switch (metaCrawler.getId()) { - case 1: - break; - case 2: - case 9: - case 10: - case 11: - case 13: - case 15: - container = "java_proxy"; - break; - default: - container = "java_proxy"; - break; - } - - - crawler.setContainer(container); - - return crawler; - } +// private Map initMappingMap(MetaCrawler metaCrawler) { +// +// if(this.mappingMap == null) { +// this.mappingMap = new HashMap<>(); +// } +// +// Map resultMap = this.mappingMap.get(metaCrawler.getId()); +// +// if(resultMap != null) { +// return resultMap; +// } +// +// resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); +// this.mappingMap.put(metaCrawler.getId(), resultMap); +// +// return resultMap; +// } +// +// private Map getAuth(MetaCrawler metaCrawler, com.loafle.overflow.module.infra.model.InfraService infraService) { +// +// Map auth = new HashMap<>(); +// +// switch (metaCrawler.getId()) { +// case 11: // mysql +// { +// auth.put("url", "jdbc:mysql://"+StringConvertor.intToIp(infraService.getHost().getIp())+":"+String.valueOf(infraService.getPort())); +// auth.put("id", "docker"); // FIXME: Auth Info +// auth.put("pw", "qwer5795QWER"); // FIXME: Auth Info +// } +// break; +// } +// +// return auth; +// } +// +// private Crawler getCrawler(MetaCrawler metaCrawler) { +// +// Crawler crawler = new Crawler(); +// crawler.setName(metaCrawler.getName()); +// +// String container = ""; +// +// switch (metaCrawler.getId()) { +// case 1: +// break; +// case 2: +// case 9: +// case 10: +// case 11: +// case 13: +// case 15: +// container = "java_proxy"; +// break; +// default: +// container = "java_proxy"; +// break; +// } +// +// +// crawler.setContainer(container); +// +// return crawler; +// } } diff --git a/src/main/resources/init.sql b/src/main/resources/init.sql index 27d5b0e..5b64d95 100644 --- a/src/main/resources/init.sql +++ b/src/main/resources/init.sql @@ -525,209 +525,209 @@ INSERT INTO meta_sensor_item (create_date,"key",name,type_id) VALUES ( INSERT INTO meta_sensor_item (create_date,"key",name,type_id) VALUES ( '2017-06-26 20:10','disk.usage.free[$0]','FreeSpace','3'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_dump_status','show status','','11','5'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_load_status','show status','','11','6'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_resize_status','show status','','11','7'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_data','show status','','11','8'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_bytes_data','show status','','11','9'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_dirty','show status','','11','10'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_bytes_dirty','show status','','11','11'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_flushed','show status','','11','12'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_free','show status','','11','13'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_misc','show status','','11','14'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_pages_total','show status','','11','15'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_read_ahead_rnd','show status','','11','16'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_read_ahead','show status','','11','17'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_read_ahead_evicted','show status','','11','18'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_read_requests','show status','','11','19'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_reads','show status','','11','20'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_wait_free','show status','','11','21'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_buffer_pool_write_requests','show status','','11','22'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_fsyncs','show status','','11','23'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_pending_fsyncs','show status','','11','24'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_pending_reads','show status','','11','25'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_pending_writes','show status','','11','26'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_read','show status','','11','27'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_reads','show status','','11','28'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_writes','show status','','11','29'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_data_written','show status','','11','30'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_dblwr_pages_written','show status','','11','31'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_dblwr_writes','show status','','11','32'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_log_waits','show status','','11','33'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_log_write_requests','show status','','11','34'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_log_writes','show status','','11','35'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_os_log_fsyncs','show status','','11','36'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_os_log_pending_fsyncs','show status','','11','37'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_os_log_pending_writes','show status','','11','38'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_os_log_written','show status','','11','39'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_page_size','show status','','11','40'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_pages_created','show status','','11','41'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_pages_read','show status','','11','42'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_pages_written','show status','','11','43'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_row_lock_current_waits','show status','','11','44'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_row_lock_time','show status','','11','45'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_row_lock_time_avg','show status','','11','46'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_row_lock_time_max','show status','','11','47'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_row_lock_waits','show status','','11','48'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_rows_deleted','show status','','11','49'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_rows_inserted','show status','','11','50'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_rows_read','show status','','11','51'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_rows_updated','show status','','11','52'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_num_open_files','show status','','11','53'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_truncated_status_writes','show status','','11','54'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Innodb_available_undo_logs','show status','','11','55'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_accept','show status','','11','56'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_internal','show status','','11','57'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_max_connections','show status','','11','58'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_peer_address','show status','','11','59'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_select','show status','','11','60'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connection_errors_tcpwrap','show status','','11','61'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Connections','show status','','11','62'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Max_used_connections','show status','','11','63'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Max_used_connections_time','show status','','11','64'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_accounts_lost','show status','','11','65'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_cond_classes_lost','show status','','11','66'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_cond_instances_lost','show status','','11','67'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_digest_lost','show status','','11','68'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_file_classes_lost','show status','','11','69'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_file_handles_lost','show status','','11','70'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_file_instances_lost','show status','','11','71'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_hosts_lost','show status','','11','72'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_index_stat_lost','show status','','11','73'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_locker_lost','show status','','11','74'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_memory_classes_lost','show status','','11','75'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_metadata_lock_lost','show status','','11','76'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_mutex_classes_lost','show status','','11','77'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_mutex_instances_lost','show status','','11','78'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_nested_statement_lost','show status','','11','79'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_prepared_statements_lost','show status','','11','80'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_program_lost','show status','','11','81'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_rwlock_classes_lost','show status','','11','82'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_rwlock_instances_lost','show status','','11','83'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_session_connect_attrs_lost','show status','','11','84'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_socket_classes_lost','show status','','11','85'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_socket_instances_lost','show status','','11','86'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_stage_classes_lost','show status','','11','87'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_statement_classes_lost','show status','','11','88'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_table_handles_lost','show status','','11','89'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_table_instances_lost','show status','','11','90'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_table_lock_stat_lost','show status','','11','91'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_thread_classes_lost','show status','','11','92'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_thread_instances_lost','show status','','11','93'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( -'2017-06-26 19:49','Performance_schema_users_lost','show status','','11','94'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_dump_status','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','5'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_load_status','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','6'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_resize_status','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','7'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_data','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','8'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_bytes_data','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','9'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_dirty','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','10'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_bytes_dirty','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','11'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_flushed','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','12'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_free','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','13'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_misc','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','14'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_pages_total','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','15'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_read_ahead_rnd','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','16'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_read_ahead','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','17'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_read_ahead_evicted','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','18'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_read_requests','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','19'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_reads','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','20'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_wait_free','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','21'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_buffer_pool_write_requests','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','22'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_fsyncs','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','23'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_pending_fsyncs','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','24'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_pending_reads','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','25'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_pending_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','26'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_read','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','27'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_reads','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','28'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','29'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_data_written','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','30'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_dblwr_pages_written','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','31'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_dblwr_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','32'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_log_waits','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','33'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_log_write_requests','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','34'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_log_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','35'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_os_log_fsyncs','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','36'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_os_log_pending_fsyncs','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','37'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_os_log_pending_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','38'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_os_log_written','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','39'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_page_size','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','40'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_pages_created','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','41'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_pages_read','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','42'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_pages_written','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','43'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_row_lock_current_waits','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','44'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_row_lock_time','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','45'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_row_lock_time_avg','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','46'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_row_lock_time_max','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','47'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_row_lock_waits','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','48'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_rows_deleted','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','49'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_rows_inserted','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','50'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_rows_read','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','51'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_rows_updated','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','52'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_num_open_files','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','53'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_truncated_status_writes','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','54'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Innodb_available_undo_logs','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','55'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_accept','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','56'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_internal','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','57'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_max_connections','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','58'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_peer_address','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','59'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_select','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','60'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connection_errors_tcpwrap','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','61'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Connections','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','62'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Max_used_connections','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','63'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Max_used_connections_time','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','64'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_accounts_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','65'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_cond_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','66'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_cond_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','67'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_digest_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','68'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_file_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','69'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_file_handles_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','70'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_file_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','71'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_hosts_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','72'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_index_stat_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','73'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_locker_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','74'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_memory_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','75'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_metadata_lock_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','76'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_mutex_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','77'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_mutex_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','78'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_nested_statement_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','79'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_prepared_statements_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','80'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_program_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','81'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_rwlock_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','82'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_rwlock_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','83'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_session_connect_attrs_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','84'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_socket_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','85'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_socket_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','86'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_stage_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','87'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_statement_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','88'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_table_handles_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','89'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_table_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','90'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_table_lock_stat_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','91'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_thread_classes_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','92'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_thread_instances_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','93'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( +'2017-06-26 19:49','Performance_schema_users_lost','show status','{"valueColumn": "Value","keyColumns": ["Variable_name"]}','11','94'); +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','PercentIdleTime','Win32_PerfFormattedData_PerfOS_Processor','{"where": "Name=''_Total''"}','23','95'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','PercentProcessorTime','Win32_PerfFormattedData_PerfOS_Processor','{"where": "Name=''_Total''"}','23','96'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','PercentUserTime','Win32_PerfFormattedData_PerfOS_Processor','{"where": "Name=''_Total''"}','23','97'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','PercentPrivilegedTime','Win32_PerfFormattedData_PerfOS_Processor','{"where": "Name=''_Total''"}','23','98'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','TotalVirtualMemorySize','Win32_OperatingSystem','','23','99'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','TotalVisibleMemorySize','Win32_OperatingSystem','','23','100'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','SizeStoredInPagingFiles','Win32_OperatingSystem','','23','101'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','FreeVirtualMemory','Win32_OperatingSystem','','23','102'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','FreePhysicalMemory','Win32_OperatingSystem','','23','103'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','FreeSpaceInPagingFiles','Win32_OperatingSystem ','','23','104'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','Size','Win32_LogicalDisk','{"arrayColumns": ["Caption"],"appends": ["Caption"]}','23','105'); -INSERT INTO meta_sensor_item_key (create_date,"key","froms",option_json,crawler_id,item_id) VALUES ( +INSERT INTO meta_sensor_item_key (create_date,"key",froms,option_json,crawler_id,item_id) VALUES ( '2017-06-26 19:49','FreeSpace','Win32_LogicalDisk','{"arrayColumns": ["Caption"],"appends": ["Caption"]}','23','106');