diff --git a/pom.xml b/pom.xml index 0c5eea3..8b04915 100644 --- a/pom.xml +++ b/pom.xml @@ -74,8 +74,8 @@ maven-compiler-plugin 2.3.2 - 1.5 - 1.5 + 1.8 + 1.8 diff --git a/src/main/java/com/appdynamics/extensions/oracledb/OracledbMonitor.java b/src/main/java/com/appdynamics/extensions/oracledb/OracledbMonitor.java index 1225c77..cd1d03e 100644 --- a/src/main/java/com/appdynamics/extensions/oracledb/OracledbMonitor.java +++ b/src/main/java/com/appdynamics/extensions/oracledb/OracledbMonitor.java @@ -132,7 +132,7 @@ private Map getConnectionProperties(Map server) { private String getPassword(Map server, String normal_password) { String encryptionPassword = Util.convertToString(server.get("encryptedPassword"), ""); - String encryptionKey = Util.convertToString(server.get("encryptionKey"), ""); + String encryptionKey = Util.convertToString(getContextConfiguration().getConfigYml().get("encryptionKey"), ""); String password; if (!Strings.isNullOrEmpty(encryptionKey) && !Strings.isNullOrEmpty(encryptionPassword)) { password = getEncryptedPassword(encryptionKey, encryptionPassword); @@ -148,6 +148,4 @@ private String getEncryptedPassword(String encryptionKey, String encryptedPasswo cryptoMap.put(Constants.ENCRYPTION_KEY, encryptionKey); return CryptoUtils.getPassword(cryptoMap); } - - } diff --git a/src/main/resources/conf/config.yml b/src/main/resources/conf/config.yml index 57346f9..5d0499b 100644 --- a/src/main/resources/conf/config.yml +++ b/src/main/resources/conf/config.yml @@ -20,9 +20,6 @@ dbServers: #Needs to be used in conjunction with `encryptionKey`. Please read the extension documentation to generate encrypted password # encryptedPassword: "9XdTa7+McBwP2g2xSpyNsg==" - #Needs to be used in conjunction with `encryptedPassword`. Please read the extension documentation to generate encrypted password -# encryptionKey: "myKey" - # Replaces characters in metric name with the specified characters. # "replace" takes any regular expression # "replaceWith" takes the string to replace the matched characters @@ -115,3 +112,24 @@ numberOfThreads: 5 # taskSchedule: # numberOfThreads: 1 # taskDelaySeconds: 10 + +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" diff --git a/src/test/resources/conf/config.yml b/src/test/resources/conf/config.yml index e1efde8..81be5c1 100644 --- a/src/test/resources/conf/config.yml +++ b/src/test/resources/conf/config.yml @@ -20,9 +20,6 @@ dbServers: #Needs to be used in conjunction with `encryptionKey`. Please read the extension documentation to generate encrypted password encryptedPassword: "9XdTa7+McBwP2g2xSpyNsg==" - #Needs to be used in conjunction with `encryptedPassword`. Please read the extension documentation to generate encrypted password - encryptionKey: "myKey" - # Replaces characters in metric name with the specified characters. # "replace" takes any regular expression # "replaceWith" takes the string to replace the matched characters @@ -72,3 +69,24 @@ numberOfThreads: 5 taskSchedule: numberOfThreads: 1 taskDelaySeconds: 10 + + +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" diff --git a/src/test/resources/conf/config1.yml b/src/test/resources/conf/config1.yml index c876457..35a1ee3 100644 --- a/src/test/resources/conf/config1.yml +++ b/src/test/resources/conf/config1.yml @@ -17,9 +17,6 @@ dbServers: #Needs to be used in conjunction with `encryptionKey`. Please read the extension documentation to generate encrypted password #encryptedPassword: "" - #Needs to be used in conjunction with `encryptedPassword`. Please read the extension documentation to generate encrypted password - #encryptionKey: "welcome" - # Replaces characters in metric name with the specified characters. # "replace" takes any regular expression # "replaceWith" takes the string to replace the matched characters @@ -45,4 +42,25 @@ dbServers: type: "metricValue" - name: "EVENT_POSTED_COUNT" - type: "metricValue" \ No newline at end of file + type: "metricValue" + +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" \ No newline at end of file diff --git a/src/test/resources/conf/config_convert.yml b/src/test/resources/conf/config_convert.yml index d54a5cd..dac7218 100644 --- a/src/test/resources/conf/config_convert.yml +++ b/src/test/resources/conf/config_convert.yml @@ -12,4 +12,25 @@ columns: "READY" : 3 "UNSAFE" : 4 "SHUTDOWN" : 5 - "RECOVERING" : 6 \ No newline at end of file + "RECOVERING" : 6 + +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" \ No newline at end of file diff --git a/src/test/resources/conf/config_for_columns.yml b/src/test/resources/conf/config_for_columns.yml index ad055d5..f80638f 100644 --- a/src/test/resources/conf/config_for_columns.yml +++ b/src/test/resources/conf/config_for_columns.yml @@ -6,4 +6,26 @@ columns: type: "metricValue" - name: "AVERAGE_CPU_USAGE_PERCENT" - type: "metricValue" \ No newline at end of file + type: "metricValue" + + +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" \ No newline at end of file diff --git a/src/test/resources/conf/config_generic.yml b/src/test/resources/conf/config_generic.yml index fe9e00a..6582739 100644 --- a/src/test/resources/conf/config_generic.yml +++ b/src/test/resources/conf/config_generic.yml @@ -17,9 +17,6 @@ dbServers: #Needs to be used in conjunction with `encryptionKey`. Please read the extension documentation to generate encrypted password #encryptedPassword: "" - #Needs to be used in conjunction with `encryptedPassword`. Please read the extension documentation to generate encrypted password - #encryptionKey: "welcome" - # Replaces characters in metric name with the specified characters. # "replace" takes any regular expression # "replaceWith" takes the string to replace the matched characters @@ -317,3 +314,23 @@ dbServers: numberOfThreads: 5 +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" \ No newline at end of file diff --git a/src/test/resources/conf/config_query.yml b/src/test/resources/conf/config_query.yml index b452603..abb0a37 100644 --- a/src/test/resources/conf/config_query.yml +++ b/src/test/resources/conf/config_query.yml @@ -17,9 +17,6 @@ dbServers: #Needs to be used in conjunction with `encryptionKey`. Please read the extension documentation to generate encrypted password #encryptedPassword: "" - #Needs to be used in conjunction with `encryptedPassword`. Please read the extension documentation to generate encrypted password - #encryptionKey: "welcome" - # Replaces characters in metric name with the specified characters. # "replace" takes any regular expression # "replaceWith" takes the string to replace the matched characters @@ -313,3 +310,25 @@ dbServers: - name: "TOTAL_ROW_COUNT" type: "metricValue" + + +# Default information needs to be updated +controllerInfo: + controllerHost: "controller" + controllerPort: 8080 + account: "customer1" + username: "user1" + password: "welcome" + encryptedPassword: "" + controllerSslEnabled: false + enableOrchestration: false + uniqueHostId: "" + accountAccessKey: "" + machinePath: "" + simEnabled: true + applicationName: "" + tierName: "" + nodeName: "" + + +encryptionKey: "myKey" \ No newline at end of file