diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml
similarity index 59%
rename from .idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml
rename to .idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml
index c6ea67e..6fec8f4 100644
--- a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_11.xml
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml
similarity index 61%
rename from .idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml
rename to .idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml
index f538e36..9eb8596 100644
--- a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_11.xml
+++ b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_hynnet_jacob_1_18.xml b/.idea/libraries/Maven__com_hynnet_jacob_1_18.xml
new file mode 100644
index 0000000..1362ca2
--- /dev/null
+++ b/.idea/libraries/Maven__com_hynnet_jacob_1_18.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml
deleted file mode 100644
index 578b079..0000000
--- a/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_2_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_microsoft_sqlserver_mssql_jdbc_6_2_2_jre8.xml b/.idea/libraries/Maven__com_microsoft_sqlserver_mssql_jdbc_6_2_2_jre8.xml
new file mode 100644
index 0000000..c205dec
--- /dev/null
+++ b/.idea/libraries/Maven__com_microsoft_sqlserver_mssql_jdbc_6_2_2_jre8.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
deleted file mode 100644
index b8581a6..0000000
--- a/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__log4j_log4j_1_2_14.xml b/.idea/libraries/Maven__log4j_log4j_1_2_14.xml
new file mode 100644
index 0000000..2825a67
--- /dev/null
+++ b/.idea/libraries/Maven__log4j_log4j_1_2_14.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__mysql_mysql_connector_java_6_0_6.xml b/.idea/libraries/Maven__mysql_mysql_connector_java_6_0_6.xml
new file mode 100644
index 0000000..10e7222
--- /dev/null
+++ b/.idea/libraries/Maven__mysql_mysql_connector_java_6_0_6.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml b/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml
deleted file mode 100644
index 88d626e..0000000
--- a/.idea/libraries/Maven__net_minidev_accessors_smart_1_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml b/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml
deleted file mode 100644
index 6c692c8..0000000
--- a/.idea/libraries/Maven__net_minidev_json_smart_2_2_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.xml b/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.xml
new file mode 100644
index 0000000..2970b5e
--- /dev/null
+++ b/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml b/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml
deleted file mode 100644
index 58bdc9a..0000000
--- a/.idea/libraries/Maven__org_assertj_assertj_core_2_6_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
deleted file mode 100644
index 78dbe45..0000000
--- a/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml b/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml
deleted file mode 100644
index a523703..0000000
--- a/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_6_0.xml b/.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_6_0.xml
new file mode 100644
index 0000000..7935f5c
--- /dev/null
+++ b/.idea/libraries/Maven__org_mongodb_mongo_java_driver_3_6_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml b/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml
deleted file mode 100644
index 7ab319b..0000000
--- a/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml b/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml
deleted file mode 100644
index da69f6c..0000000
--- a/.idea/libraries/Maven__org_ow2_asm_asm_5_0_3.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_postgresql_postgresql_42_1_4.xml b/.idea/libraries/Maven__org_postgresql_postgresql_42_1_4.xml
new file mode 100644
index 0000000..9e59f23
--- /dev/null
+++ b/.idea/libraries/Maven__org_postgresql_postgresql_42_1_4.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml
deleted file mode 100644
index f86d2c8..0000000
--- a/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_4_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
deleted file mode 100644
index bae9949..0000000
--- a/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml
deleted file mode 100644
index 6073e53..0000000
--- a/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml
deleted file mode 100644
index a14ac63..0000000
--- a/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_25.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_snmp4j_snmp4j_2_5_8.xml b/.idea/libraries/Maven__org_snmp4j_snmp4j_2_5_8.xml
new file mode 100644
index 0000000..6db16f5
--- /dev/null
+++ b/.idea/libraries/Maven__org_snmp4j_snmp4j_2_5_8.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml
deleted file mode 100644
index 44dc419..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml
deleted file mode 100644
index 4c3a2b7..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml
deleted file mode 100644
index c6ba5e1..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml
deleted file mode 100644
index 33c0b1c..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml
deleted file mode 100644
index d7db397..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml
deleted file mode 100644
index 9312efe..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml
deleted file mode 100644
index 07d7bca..0000000
--- a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_1_5_9_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml
deleted file mode 100644
index e06e71e..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_aop_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml
deleted file mode 100644
index 0a8cafe..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_beans_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml
deleted file mode 100644
index 8050852..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_context_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml
deleted file mode 100644
index b95dd78..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_core_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml
deleted file mode 100644
index 7a825ff..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_expression_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml
deleted file mode 100644
index 0c0fcbf..0000000
--- a/.idea/libraries/Maven__org_springframework_spring_test_4_3_13_RELEASE.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
deleted file mode 100644
index 20e2920..0000000
--- a/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml b/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml
new file mode 100644
index 0000000..77144ff
--- /dev/null
+++ b/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lib/jacob-1.18-x64.dll b/lib/jacob-1.18-x64.dll
new file mode 100644
index 0000000..b09c633
Binary files /dev/null and b/lib/jacob-1.18-x64.dll differ
diff --git a/lib/jacob-1.18-x86.dll b/lib/jacob-1.18-x86.dll
new file mode 100644
index 0000000..a53cc77
Binary files /dev/null and b/lib/jacob-1.18-x86.dll differ
diff --git a/overflow_probe_container_general.iml b/overflow_probe_container_general.iml
index cc93fd1..e85028a 100644
--- a/overflow_probe_container_general.iml
+++ b/overflow_probe_container_general.iml
@@ -16,37 +16,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 83ead1b..1f4dd57 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,9 +5,8 @@
com.loafle
- maven_parent_spring_boot
- 1.5.9-RELEASE
-
+ maven_parent_jar
+ 1.0.0-RELEASE
com.loafle.overflow
@@ -21,6 +20,18 @@
4.1.17.Final
2.9.2
+
+ 6.0.6
+ 42.1.4
+ 6.2.2.jre8
+
+ 1.18
+
+ 2.9.0
+
+ 3.6.0
+
+ 2.5.8
@@ -40,6 +51,52 @@
${jackson.version}
+
+
+ mysql
+ mysql-connector-java
+ ${mysql-connector-java.version}
+
+
+
+ org.postgresql
+ postgresql
+ ${postgresql.version}
+
+
+
+ com.microsoft.sqlserver
+ mssql-jdbc
+ ${mssql-jdbc.version}
+
+
+
+
+ com.hynnet
+ jacob
+ ${jacob.version}
+
+
+
+
+ redis.clients
+ jedis
+ ${jedis.version}
+
+
+
+
+ org.mongodb
+ mongo-java-driver
+ ${mongo-java-driver.version}
+
+
+
+
+ org.snmp4j
+ snmp4j
+ ${snmp4j.version}
+
\ No newline at end of file
diff --git a/src/main/java/com/loafle/overflow/probe/container/Application.java b/src/main/java/com/loafle/overflow/probe/container/Application.java
deleted file mode 100644
index 1763122..0000000
--- a/src/main/java/com/loafle/overflow/probe/container/Application.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.loafle.overflow.probe.container;
-
-import com.loafle.overflow.probe.container.server.ContainerServer;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.Banner;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class Application implements CommandLineRunner {
- @Autowired
- private ContainerServer containerServer;
-
- @Override
- public void run(String... strings) throws Exception {
- containerServer.start();
- }
-
- public static void main(String[] args) {
- SpringApplication app = new SpringApplication(Application.class);
- app.setBannerMode(Banner.Mode.OFF);
- app.run(args);
- }
-}
diff --git a/src/main/java/com/loafle/overflow/probe/container/Container.java b/src/main/java/com/loafle/overflow/probe/container/Container.java
new file mode 100644
index 0000000..2d40adb
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/Container.java
@@ -0,0 +1,12 @@
+package com.loafle.overflow.probe.container;
+
+import com.loafle.overflow.probe.container.server.ContainerServer;
+
+public class Container {
+
+ public static void main(String[] args) throws Exception {
+ ContainerServer server = new ContainerServer();
+
+ server.start();
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/Crawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/Crawler.java
new file mode 100644
index 0000000..b26faf9
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/Crawler.java
@@ -0,0 +1,60 @@
+package com.loafle.overflow.probe.container.crawler;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.loafle.overflow.probe.container.crawler.config.Config;
+import com.loafle.overflow.probe.container.crawler.result.ResultSet;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public abstract class Crawler {
+ protected ObjectMapper objectMapper;
+ private Map configs;
+ private String configPath;
+
+ protected Crawler() {
+ objectMapper = new ObjectMapper();
+ }
+
+ public Config getConfig(String id) throws Exception {
+ return configs.get(id);
+ }
+
+ public void putConfig(String id, Config config) throws Exception {
+ if (configs == null) {
+ configs = new HashMap<>();
+ }
+ configs.put(id, config);
+ }
+
+ public boolean add(Config config) throws Exception {
+ this.putConfig(config.getId(), config);
+ return true;
+ }
+
+ public List get(String id) throws Exception {
+
+ List rsList = (List)getInternal(getConfig(id));
+
+ return rsList;
+ }
+
+ public boolean init(Config config) throws Exception {
+ add(config);
+ return true;
+ }
+
+ public boolean remove(String id) throws Exception {
+ this.configs.remove(id);
+ return true;
+ }
+
+ public abstract String name();
+ public abstract List getInternal(Config c) throws Exception;
+
+ public Object getInternalMeta(Config c) throws Exception {
+ return null;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Config.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Config.java
new file mode 100644
index 0000000..0caa4a6
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Config.java
@@ -0,0 +1,53 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+import java.util.List;
+
+public class Config {
+
+ private String id;
+ private Target target;
+ private Schedule schedule;
+ private Crawler crawler;
+ private List- items;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Target getTarget() {
+ return target;
+ }
+
+ public void setTarget(Target target) {
+ this.target = target;
+ }
+
+ public Schedule getSchedule() {
+ return schedule;
+ }
+
+ public void setSchedule(Schedule schedule) {
+ this.schedule = schedule;
+ }
+
+ public Crawler getCrawler() {
+ return crawler;
+ }
+
+ public void setCrawler(Crawler crawler) {
+ this.crawler = crawler;
+ }
+
+ public List
- getItems() {
+ return items;
+ }
+
+ public void setItems(List
- items) {
+ this.items = items;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Connection.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Connection.java
new file mode 100644
index 0000000..8d1a13b
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Connection.java
@@ -0,0 +1,41 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+public class Connection {
+ private String ip;
+ private String port;
+ private String portType;
+ private boolean ssl;
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public String getPort() {
+ return port;
+ }
+
+ public void setPort(String port) {
+ this.port = port;
+ }
+
+ public String getPortType() {
+ return portType;
+ }
+
+ public void setPortType(String portType) {
+ this.portType = portType;
+ }
+
+ public boolean isSsl() {
+ return ssl;
+ }
+
+ public void setSsl(boolean ssl) {
+ this.ssl = ssl;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Crawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Crawler.java
new file mode 100644
index 0000000..645f63d
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Crawler.java
@@ -0,0 +1,22 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+public class Crawler {
+ private String name;
+ private String container;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getContainer() {
+ return container;
+ }
+
+ public void setContainer(String container) {
+ this.container = container;
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Item.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Item.java
new file mode 100644
index 0000000..2ea58b0
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Item.java
@@ -0,0 +1,35 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+import java.util.List;
+
+public class Item {
+
+ private List keys;
+ private QueryInfo queryInfo;
+ private MappingInfo mappingInfo;
+
+ public List getKeys() {
+ return keys;
+ }
+
+ public void setKeys(List keys) {
+ this.keys = keys;
+ }
+
+ public QueryInfo getQueryInfo() {
+ return queryInfo;
+ }
+
+ public void setQueryInfo(QueryInfo queryInfo) {
+ this.queryInfo = queryInfo;
+ }
+
+ public MappingInfo getMappingInfo() {
+ return mappingInfo;
+ }
+
+ public void setMappingInfo(MappingInfo mappingInfo) {
+ this.mappingInfo = mappingInfo;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Keys.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Keys.java
new file mode 100644
index 0000000..f42b0a9
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Keys.java
@@ -0,0 +1,24 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+public class Keys {
+
+ private String metric;
+ private String key;
+
+ public String getMetric() {
+ return metric;
+ }
+
+ public void setMetric(String metric) {
+ this.metric = metric;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/MappingInfo.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/MappingInfo.java
new file mode 100644
index 0000000..faff14d
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/MappingInfo.java
@@ -0,0 +1,44 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+import java.util.List;
+
+public class MappingInfo {
+
+ private String parseDirection;
+ private List arrayColumns;
+ private List keyColumns;
+ private String valueColumn;
+
+ public String getParseDirection() {
+ return parseDirection;
+ }
+
+ public void setParseDirection(String parseDirection) {
+ this.parseDirection = parseDirection;
+ }
+
+ public List getArrayColumns() {
+ return arrayColumns;
+ }
+
+ public void setArrayColumns(List arrayColumns) {
+ this.arrayColumns = arrayColumns;
+ }
+
+ public List getKeyColumns() {
+ return keyColumns;
+ }
+
+ public void setKeyColumns(List keyColumns) {
+ this.keyColumns = keyColumns;
+ }
+
+ public String getValueColumn() {
+ return valueColumn;
+ }
+
+ public void setValueColumn(String valueColumn) {
+ this.valueColumn = valueColumn;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/QueryInfo.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/QueryInfo.java
new file mode 100644
index 0000000..5ebda72
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/QueryInfo.java
@@ -0,0 +1,25 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+import java.util.Map;
+
+public class QueryInfo {
+ private String query;
+ private Map extend;
+
+ public String getQuery() {
+ return query;
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+
+ public Map getExtend() {
+ return extend;
+ }
+
+ public void setExtend(Map extend) {
+ this.extend = extend;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Schedule.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Schedule.java
new file mode 100644
index 0000000..96f1587
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Schedule.java
@@ -0,0 +1,14 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+public class Schedule {
+ private String interval;
+
+ public String getInterval() {
+ return interval;
+ }
+
+ public void setInterval(String interval) {
+ this.interval = interval;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/config/Target.java b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Target.java
new file mode 100644
index 0000000..a03199a
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/config/Target.java
@@ -0,0 +1,25 @@
+package com.loafle.overflow.probe.container.crawler.config;
+
+import java.util.Map;
+
+public class Target {
+ private Map auth;
+ private Connection connection;
+
+ public Map getAuth() {
+ return auth;
+ }
+
+ public void setAuth(Map auth) {
+ this.auth = auth;
+ }
+
+ public Connection getConnection() {
+ return connection;
+ }
+
+ public void setConnection(Connection connection) {
+ this.connection = connection;
+ }
+}
+
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseCrawler.java
new file mode 100644
index 0000000..b34fbb3
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseCrawler.java
@@ -0,0 +1,78 @@
+package com.loafle.overflow.probe.container.crawler.impl.database;
+
+import com.loafle.overflow.probe.container.crawler.Crawler;
+import com.loafle.overflow.probe.container.crawler.config.Config;
+import com.loafle.overflow.probe.container.crawler.config.Item;
+import com.loafle.overflow.probe.container.crawler.result.ResultSet;
+import com.loafle.overflow.probe.container.crawler.result.ResultSetRow;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public abstract class DatabaseCrawler extends Crawler {
+
+ public DatabaseCrawler() {
+ }
+
+ @Override
+ public List getInternal(Config config) throws Exception {
+ return getMetrics(config);
+ }
+
+ private List getMetrics(Config config) throws Exception {
+
+ Connection conn = null;
+ Statement stmt = null;
+ java.sql.ResultSet rs = null;
+
+ String url = (String)config.getTarget().getAuth().get("url");
+ String id = (String)config.getTarget().getAuth().get("id");
+ String pw = (String)config.getTarget().getAuth().get("pw");
+
+ loadDriverClass();
+
+ List resultSets = new ArrayList<>();
+
+ try {
+ conn = java.sql.DriverManager.getConnection(url, id, pw);
+ stmt = conn.createStatement();
+
+ for (Item item : config.getItems()) {
+
+ ResultSet resultSet = ResultSetRow.newInstance(item);
+ Map meta = resultSet.getMeta();
+
+ rs = stmt.executeQuery((String)item.getQueryInfo().getQuery());
+
+ while(rs.next()) {
+ List row = new ArrayList<>(Arrays.asList(new String[meta.size()]));
+ for (Map.Entry info : meta.entrySet()) {
+ String data = rs.getString(info.getKey());
+ data = data.trim();
+ row.set(info.getValue().intValue(),data);
+ }
+ resultSet.addRow(row);
+ }
+
+ resultSets.add(resultSet);
+ rs.close();
+ }
+ return resultSets;
+
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ if (conn != null) {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}
+ if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
+ if (stmt != null) {try {stmt.close();} catch (SQLException e) {e.printStackTrace();}}
+ }
+ }
+
+ protected abstract void loadDriverClass() throws ClassNotFoundException;
+
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseMetaInfo.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseMetaInfo.java
new file mode 100644
index 0000000..4e3d8f0
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/DatabaseMetaInfo.java
@@ -0,0 +1,11 @@
+package com.loafle.overflow.probe.container.crawler.impl.database;
+
+public class DatabaseMetaInfo {
+ private String name;
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/mysql/MySQLCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/mysql/MySQLCrawler.java
new file mode 100644
index 0000000..0d5f5c5
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/mysql/MySQLCrawler.java
@@ -0,0 +1,13 @@
+package com.loafle.overflow.probe.container.crawler.impl.database.mysql;
+
+import com.loafle.overflow.probe.container.crawler.impl.database.DatabaseCrawler;
+
+public class MySQLCrawler extends DatabaseCrawler {
+ public String name() {
+ return "MYSQL_CRAWLER";
+ }
+
+ protected void loadDriverClass() throws ClassNotFoundException {
+ Class.forName("com.mysql.cj.jdbc.Driver");
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/oracle/OracleCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/oracle/OracleCrawler.java
new file mode 100644
index 0000000..8ac3aaf
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/oracle/OracleCrawler.java
@@ -0,0 +1,14 @@
+package com.loafle.overflow.probe.container.crawler.impl.database.oracle;
+
+import com.loafle.overflow.probe.container.crawler.impl.database.DatabaseCrawler;
+
+public class OracleCrawler extends DatabaseCrawler {
+ public String name() {
+ return "ORACLE_CRAWLER";
+ }
+
+ @Override
+ protected void loadDriverClass() throws ClassNotFoundException {
+ Class.forName("oracle.jdbc.driver.OracleDriver");
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/postgresql/PostgreSQLCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/postgresql/PostgreSQLCrawler.java
new file mode 100644
index 0000000..9271808
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/postgresql/PostgreSQLCrawler.java
@@ -0,0 +1,13 @@
+package com.loafle.overflow.probe.container.crawler.impl.database.postgresql;
+
+import com.loafle.overflow.probe.container.crawler.impl.database.DatabaseCrawler;
+
+public class PostgreSQLCrawler extends DatabaseCrawler {
+ public String name() {
+ return "POSTGRESQL_CRAWLER";
+ }
+
+ protected void loadDriverClass() throws ClassNotFoundException {
+ Class.forName("org.postgresql.Driver");
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/sqlserver/SQLServerCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/sqlserver/SQLServerCrawler.java
new file mode 100644
index 0000000..6609031
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/database/sqlserver/SQLServerCrawler.java
@@ -0,0 +1,13 @@
+package com.loafle.overflow.probe.container.crawler.impl.database.sqlserver;
+
+import com.loafle.overflow.probe.container.crawler.impl.database.DatabaseCrawler;
+
+public class SQLServerCrawler extends DatabaseCrawler {
+ public String name() {
+ return "SQLSERVER_CRAWLER";
+ }
+
+ protected void loadDriverClass() throws ClassNotFoundException {
+ Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
+ }
+}
diff --git a/src/main/java/com/loafle/overflow/probe/container/crawler/impl/jmx/JMXCrawler.java b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/jmx/JMXCrawler.java
new file mode 100644
index 0000000..a5ad30e
--- /dev/null
+++ b/src/main/java/com/loafle/overflow/probe/container/crawler/impl/jmx/JMXCrawler.java
@@ -0,0 +1,190 @@
+package com.loafle.overflow.probe.container.crawler.impl.jmx;
+
+import com.loafle.overflow.probe.container.crawler.Crawler;
+import com.loafle.overflow.probe.container.crawler.config.Config;
+import com.loafle.overflow.probe.container.crawler.config.Item;
+import com.loafle.overflow.probe.container.crawler.result.ResultSet;
+
+import javax.management.*;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.management.remote.rmi.RMIConnectorServer;
+import javax.naming.Context;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+import java.io.IOException;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class JMXCrawler extends Crawler {
+ private static final Logger logger = Logger.getLogger(JMXCrawler.class.getName());
+
+ private String jmxUrl;
+ private String username;
+ private String password;
+ private boolean ssl;
+
+ public JMXCrawler() {}
+
+ public String name() {
+ return "JMX_CRAWLER";
+ }
+
+ private List parse(Map dataMap, Map meta) {
+
+ List row = new ArrayList<>(Arrays.asList(new String[meta.size()]));
+ for (Map.Entry info : meta.entrySet()) {
+ String data = dataMap.get(info.getKey());
+ data = data.trim();
+ row.set(info.getValue().intValue(),data);
+ }
+ return row;
+ }
+
+ private Map parseAttribute(MBeanServerConnection beanCon, ObjectName mbeanName) throws IntrospectionException, ReflectionException, InstanceNotFoundException, IOException, AttributeNotFoundException, MBeanException {
+
+ Map returnMap = new HashMap<>();
+ MBeanInfo info = beanCon.getMBeanInfo(mbeanName);
+
+ for (MBeanAttributeInfo attr : info.getAttributes()) {
+
+ if (!attr.isReadable()) {
+ logCrawler(mbeanName, attr, "not readable");
+ continue;
+ }
+
+// System.out.println("========================================================================");
+// System.out.println("PropertyListString"+mbeanName.getCanonicalKeyPropertyListString());
+// System.out.println("canonicaName="+mbeanName.getCanonicalName());
+// System.out.println(mbeanName.getDomain());
+// System.out.println(mbeanName.getKeyPropertyListString().compareTo("http"));
+// System.out.println("========================================================================");
+ Object att = null;
+
+ try {
+ att = beanCon.getAttribute(mbeanName, attr.getName());
+ }catch (Exception e) {
+ logCrawler(mbeanName, attr, "fail: " + e);
+ continue;
+ }
+
+ if (att != null)
+ returnMap.put(attr.getName(), att.toString());
+ }
+ return returnMap;
+ }
+
+ @Override
+ public List getInternal(Config config) throws Exception {
+
+ String hostIp = config.getTarget().getConnection().getIp();
+ String port = config.getTarget().getConnection().getPort();
+
+ this.jmxUrl = "service:jmx:rmi:///jndi/rmi://" + hostIp + ":" +port + "/jmxrmi";
+ this.username = (String) config.getTarget().getAuth().get("id");
+ this.password = (String) config.getTarget().getAuth().get("pw");
+
+ // connection
+ MBeanServerConnection beanCon;
+ JMXConnector jmxconn = null;
+ try {
+
+
+ Map environment = getAuthority();
+ jmxconn = JMXConnectorFactory.connect(new JMXServiceURL(this.jmxUrl), environment);
+ beanCon = jmxconn.getMBeanServerConnection();
+
+ List resultSetList = new ArrayList<>();
+ List objectNames = new LinkedList();
+ objectNames.add(null);
+ ObjectName on = null;
+
+ for (Item item : config.getItems()) {
+
+ ResultSet resultSet = ResultSet.newInstance(item);
+
+ // get object
+ String query = item.getQueryInfo().getQuery();
+ on = new ObjectName(query);
+ Set names = beanCon.queryMBeans(on, null);
+
+ List