diff --git a/CHANGES.MD b/CHANGES.MD index b7e00f0..5e50773 100644 --- a/CHANGES.MD +++ b/CHANGES.MD @@ -1,3 +1,7 @@ +### Version 1.2.3 + +* Changed Exclude Filter Strategy + ### Version 1.2.2 * Fixed config.yml change bug diff --git a/pom.xml b/pom.xml index 18cad66..4efabbc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.appdynamics.monitors azure-monitoring-extension - 1.2.2 + 1.2.3 UTF-8 diff --git a/src/main/java/com/appdynamics/monitors/azure/Utilities.java b/src/main/java/com/appdynamics/monitors/azure/Utilities.java index 7e34b75..032f78d 100644 --- a/src/main/java/com/appdynamics/monitors/azure/Utilities.java +++ b/src/main/java/com/appdynamics/monitors/azure/Utilities.java @@ -82,7 +82,7 @@ static Map getResourceFilter(JsonNode filtersJson) { static Boolean checkResourceFilter(JsonNode jsonNode, Map resourceFilter){ for(Map.Entry entry : resourceFilter.entrySet()){ if(jsonNode.get("resourceId").asText().contains(entry.getKey())){ - if (jsonNode.get("name").get("value").asText().matches(entry.getValue())){ + if (jsonNode.get("id").asText().matches(entry.getValue())){ return true; } } diff --git a/src/main/resources/conf/config.yml b/src/main/resources/conf/config.yml index c6d4a9e..e0f69f2 100644 --- a/src/main/resources/conf/config.yml +++ b/src/main/resources/conf/config.yml @@ -32,7 +32,7 @@ monitor-api-version: "2017-05-01-preview" keyvault-api-version: "2016-10-01" # Include Filter - These Resource Types will be monitored: -# The exclude Element will ignore by matching the regular expression against the Metric Name from the Metric Definition Response +# The exclude Element will ignore by matching the regular expression against the Metric Definition ID from the Metric Definition Response filter: - resourceType: "Microsoft.AnalysisServices/servers" # exclude: ".*"