diff --git a/AppDynamics.Dexter.Core.csproj b/AppDynamics.Dexter.Core.csproj index 848d4f0..05a6009 100644 --- a/AppDynamics.Dexter.Core.csproj +++ b/AppDynamics.Dexter.Core.csproj @@ -46,13 +46,13 @@ - + - - - + + + @@ -277,6 +277,9 @@ Always + + Always + Always diff --git a/CodeMap.dgml b/CodeMap.dgml new file mode 100644 index 0000000..6f84c1f --- /dev/null +++ b/CodeMap.dgml @@ -0,0 +1,4596 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ControllerApi/ControllerApi.cs b/ControllerApi/ControllerApi.cs index 135e2e7..7a0c8ef 100644 --- a/ControllerApi/ControllerApi.cs +++ b/ControllerApi/ControllerApi.cs @@ -4,7 +4,6 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; -using System.Net.Security; using System.Reflection; using System.Text; @@ -13,6 +12,7 @@ namespace AppDynamics.Dexter public class ControllerApi : IDisposable { private static Logger logger = LogManager.GetCurrentClassLogger(); + private static Logger loggerConsole = LogManager.GetLogger("AppDynamics.Dexter.Console"); #region Private variables @@ -217,7 +217,7 @@ public string GetApplicationActions(long applicationID) #region APM Application configuration - public string GetAPMConfiguration(long applicationID) + public string GetAPMConfigurationExportXML(long applicationID) { return this.apiGET(String.Format("controller/ConfigObjectImportExportServlet?applicationId={0}", applicationID), "text/xml", false); } @@ -232,6 +232,11 @@ public string GetAPMDeveloperModeConfiguration(long applicationID) return this.apiGET(String.Format("controller/restui/applicationManagerUiBean/getDevModeConfig/{0}", applicationID), "application/json", true); } + public string GetAPMConfigurationDetailsJSON(long applicationID) + { + return this.apiGET(String.Format("controller/restui/applicationManagerUiBean/applicationConfiguration/{0}", applicationID), "application/json", true); + } + #endregion #region APM metadata @@ -290,15 +295,15 @@ public string GetAPMBusinessTransactionsInOverflow(long tierID, long currentEven { string requestJSONTemplate = @"{{ - ""componentId"": {0}, - ""timeRangeSpecifier"": {{ - ""type"": ""BETWEEN_TIMES"", - ""startTime"": {3}, - ""endTime"": {4}, - ""durationInMinutes"": {5} - }}, - ""endEventId"": {2}, - ""currentFetchedEventCount"": {1} + ""componentId"": {0}, + ""timeRangeSpecifier"": {{ + ""type"": ""BETWEEN_TIMES"", + ""startTime"": {3}, + ""endTime"": {4}, + ""durationInMinutes"": {5} + }}, + ""endEventId"": {2}, + ""currentFetchedEventCount"": {1} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -859,14 +864,14 @@ public string GetWEBPages(long applicationID, long startTimeInUnixEpochFormat, l { string requestJSONTemplate = @"{{ - ""requestFilter"": {{ ""applicationId"": {0}, ""fetchSyntheticData"": false }}, - ""resultColumns"": [ ""PAGE_TYPE"", ""PAGE_NAME"", ""TOTAL_REQUESTS"", ""END_USER_RESPONSE_TIME"" ], - ""offset"": 0, - ""limit"": -1, - ""searchFilters"": [], - ""columnSorts"": [ {{ ""column"": ""TOTAL_REQUESTS"", ""direction"": ""DESC"" }} ], - ""timeRangeStart"": {1}, - ""timeRangeEnd"": {2} + ""requestFilter"": {{ ""applicationId"": {0}, ""fetchSyntheticData"": false }}, + ""resultColumns"": [ ""PAGE_TYPE"", ""PAGE_NAME"", ""TOTAL_REQUESTS"", ""END_USER_RESPONSE_TIME"" ], + ""offset"": 0, + ""limit"": -1, + ""searchFilters"": [], + ""columnSorts"": [ {{ ""column"": ""TOTAL_REQUESTS"", ""direction"": ""DESC"" }} ], + ""timeRangeStart"": {1}, + ""timeRangeEnd"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -881,10 +886,10 @@ public string GetWEBPagePerformance(long applicationID, long addID, long startTi { string requestJSONTemplate = @"{{ - ""addId"": {1}, - ""applicationId"": {0}, - ""timeRangeString"": ""Custom_Time_Range|BETWEEN_TIMES|{3}|{2}|{4}"", - ""fetchSyntheticData"": false + ""addId"": {1}, + ""applicationId"": {0}, + ""timeRangeString"": ""Custom_Time_Range|BETWEEN_TIMES|{3}|{2}|{4}"", + ""fetchSyntheticData"": false }}"; string requestBody = String.Format(requestJSONTemplate, @@ -901,21 +906,21 @@ public string GetWEBGeoRegions(long applicationID, string country, string region { string requestJSONTemplate = @"{{ - ""applicationId"": {0}, + ""applicationId"": {0}, ""timeRangeString"": ""Custom_Time_Range.BETWEEN_TIMES.{5}.{4}.{6}"", - ""country"": ""{1}"", - ""state"": ""{2}"", - ""city"": ""{3}"", - ""zipCode"": """" + ""country"": ""{1}"", + ""state"": ""{2}"", + ""city"": ""{3}"", + ""zipCode"": """" }}"; string requestBody = String.Format(requestJSONTemplate, applicationID, country, - region, + region, city, startTimeInUnixEpochFormat, - endTimeInUnixEpochFormat, + endTimeInUnixEpochFormat, differenceInMinutes); return this.apiPOST("controller/restui/geoDashboardUiService/getEUMWebGeoDashboardSubLocationsData", "application/json", requestBody, "application/json", true); @@ -969,8 +974,8 @@ public string GetWEBSyntheticJobs(long applicationID) { string requestJSONTemplate = @"{{ - ""applicationId"": {0}, - ""timeRangeString"": ""last_1_hour.BEFORE_NOW.-1.-1.60"" + ""applicationId"": {0}, + ""timeRangeString"": ""last_1_hour.BEFORE_NOW.-1.-1.60"" }}"; string requestBody = String.Format(requestJSONTemplate, @@ -987,14 +992,14 @@ public string GetMOBILENetworkRequests(long applicationID, long mobileApplicatio { string requestJSONTemplate = @"{{ - ""requestFilter"": {{ ""applicationId"": {0}, ""mobileApplicationId"": {1} }}, - ""resultColumns"": [""NETWORK_REQUEST_NAME"", ""NETWORK_REQUEST_ORIGINAL_NAME"", ""TOTAL_REQUESTS"", ""NETWORK_REQUEST_TIME""], - ""offset"": 0, - ""limit"": -1, - ""searchFilters"": [], - ""columnSorts"": [ {{ ""column"": ""TOTAL_REQUESTS"", ""direction"": ""DESC"" }} ], - ""timeRangeStart"": {2}, - ""timeRangeEnd"": {3} + ""requestFilter"": {{ ""applicationId"": {0}, ""mobileApplicationId"": {1} }}, + ""resultColumns"": [""NETWORK_REQUEST_NAME"", ""NETWORK_REQUEST_ORIGINAL_NAME"", ""TOTAL_REQUESTS"", ""NETWORK_REQUEST_TIME""], + ""offset"": 0, + ""limit"": -1, + ""searchFilters"": [], + ""columnSorts"": [ {{ ""column"": ""TOTAL_REQUESTS"", ""direction"": ""DESC"" }} ], + ""timeRangeStart"": {2}, + ""timeRangeEnd"": {3} }} "; string requestBody = String.Format(requestJSONTemplate, @@ -1010,9 +1015,9 @@ public string GetMOBILENetworkRequestPerformance(long applicationID, long mobile { string requestJSONTemplate = @"{{ - ""addId"": {1}, - ""applicationId"": {0}, - ""timeRangeString"": ""Custom_Time_Range|BETWEEN_TIMES|{3}|{2}|{4}"" + ""addId"": {1}, + ""applicationId"": {0}, + ""timeRangeString"": ""Custom_Time_Range|BETWEEN_TIMES|{3}|{2}|{4}"" }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1210,15 +1215,15 @@ public string GetDBQueries(long dbCollectorID, long startTimeInUnixEpochFormat, { string requestJSONTemplate = @"{{ - ""cluster"": false, - ""serverId"": {0}, - ""field"": ""query-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2}, - ""waitStateIds"": [], - ""useTimeBasedCorrelation"": false + ""cluster"": false, + ""serverId"": {0}, + ""field"": ""query-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2}, + ""waitStateIds"": [], + ""useTimeBasedCorrelation"": false }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1243,13 +1248,13 @@ public string GetDBClients(long dbCollectorID, long startTimeInUnixEpochFormat, { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""client-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""client-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1274,13 +1279,13 @@ public string GetDBSessions(long dbCollectorID, long startTimeInUnixEpochFormat, { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""session-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""session-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1365,13 +1370,13 @@ public string GetDBDatabases(long dbCollectorID, long startTimeInUnixEpochFormat { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""schema-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""schema-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1396,13 +1401,13 @@ public string GetDBUsers(long dbCollectorID, long startTimeInUnixEpochFormat, lo { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""db-user-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""db-user-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1427,13 +1432,13 @@ public string GetDBModules(long dbCollectorID, long startTimeInUnixEpochFormat, { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""module-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""module-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1458,13 +1463,13 @@ public string GetDBPrograms(long dbCollectorID, long startTimeInUnixEpochFormat, { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""field"": ""program-id"", - ""size"": 5000, - ""filterBy"": ""time"", - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""field"": ""program-id"", + ""size"": 5000, + ""filterBy"": ""time"", + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1489,11 +1494,11 @@ public string GetDBBusinessTransactions(long dbCollectorID, long startTimeInUnix { string requestJSONTemplate = @"{{ - ""serverId"": {0}, - ""cluster"": false, - ""size"": 5000, - ""startTime"": {1}, - ""endTime"": {2} + ""serverId"": {0}, + ""cluster"": false, + ""size"": 5000, + ""startTime"": {1}, + ""endTime"": {2} }}"; string requestBody = String.Format(requestJSONTemplate, @@ -1609,7 +1614,7 @@ public string GetLicenseModuleUsages(long accountID, string licenseModule, DateT // I really want to use {0:o} but our Controller chokes on this: // yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK // ^^^^^^^^^ - + return this.apiGET(String.Format("api/accounts/{0}/licensemodules/{1}/usages?startdate={2:yyyy-MM-ddTHH:mm:ssK}&enddate={3:yyyy-MM-ddTHH:mm:ssK}&showfiveminutesresolution=false", accountID, licenseModule, from, to), "application/vnd.appd.cntrl+json", false); } @@ -1724,10 +1729,10 @@ public string GetLicenseUsageOtherAgent(string licenseType, long startTimeInUnix { string requestJSONTemplate = @"{{ - ""type"": ""BETWEEN_TIMES"", - ""startTime"": {0}, - ""endTime"": {1}, - ""durationInMinutes"": {2}, + ""type"": ""BETWEEN_TIMES"", + ""startTime"": {0}, + ""endTime"": {1}, + ""durationInMinutes"": {2}, ""timeRange"": null, ""timeRangeAdjusted"": false }}"; @@ -1741,8 +1746,8 @@ public string GetLicenseUsageOtherAgent(string licenseType, long startTimeInUnix } public string GetLicenseRules() - { - return this.apiGET("/mds/v1/license/rules", "application/json", false); + { + return this.apiGET("mds/v1/license/rules", "application/json", false); } public string GetLicenseRuleUsage(string ruleID, long startTimeInUnixEpochFormat, long endTimeInUnixEpochFormat, long durationBetweenTimes) @@ -1830,6 +1835,12 @@ private string apiGET(string restAPIUrl, string acceptHeader, bool useXSRFHeader { logger.Error("{0}/{1} GET as {2} returned {3} ({4})", this.ControllerUrl, restAPIUrl, this.UserName, (int)response.StatusCode, response.ReasonPhrase); } + + if (response.StatusCode == HttpStatusCode.Unauthorized) + { + loggerConsole.Error("{0}/{1} GET as {2} returned {3} ({4})", this.ControllerUrl, restAPIUrl, this.UserName, (int)response.StatusCode, response.ReasonPhrase); + } + return String.Empty; } } @@ -1898,6 +1909,11 @@ private string apiPOST(string restAPIUrl, string acceptHeader, string requestBod logger.Error("{0}/{1} POST as {2} returned {3} ({4})", this.ControllerUrl, restAPIUrl, this.UserName, (int)response.StatusCode, response.ReasonPhrase); } + if (response.StatusCode == HttpStatusCode.Unauthorized) + { + loggerConsole.Error("{0}/{1} POST as {2} returned {3} ({4})", this.ControllerUrl, restAPIUrl, this.UserName, (int)response.StatusCode, response.ReasonPhrase); + } + return String.Empty; } } diff --git a/DataObjects/CompareStatesConfiguration/CompareInput.cs b/DataObjects/CompareStatesConfiguration/CompareInput.cs index de04801..cd02494 100644 --- a/DataObjects/CompareStatesConfiguration/CompareInput.cs +++ b/DataObjects/CompareStatesConfiguration/CompareInput.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace AppDynamics.Dexter +namespace AppDynamics.Dexter { public class CompareInput { diff --git a/DataObjects/CompareStatesConfiguration/CompareTarget.cs b/DataObjects/CompareStatesConfiguration/CompareTarget.cs index 7771230..ddfc513 100644 --- a/DataObjects/CompareStatesConfiguration/CompareTarget.cs +++ b/DataObjects/CompareStatesConfiguration/CompareTarget.cs @@ -21,10 +21,10 @@ public CompareTarget Clone() public override string ToString() { return String.Format( - "CompareTarget: {0}/{1}({2})[{3}] vs {4}/{5}({6})[{7}]", - this.ReferenceConroller, - this.ReferenceApplication, - this.ReferenceApplicationID, + "CompareTarget: {0}/{1}({2})[{3}] vs {4}/{5}({6})[{7}]", + this.ReferenceConroller, + this.ReferenceApplication, + this.ReferenceApplicationID, this.Type, this.DifferenceController, this.DifferenceApplication, diff --git a/DataObjects/JobConfiguration/JobSnapshotSelectionCriteria.cs b/DataObjects/JobConfiguration/JobSnapshotSelectionCriteria.cs index d58025e..165c48d 100644 --- a/DataObjects/JobConfiguration/JobSnapshotSelectionCriteria.cs +++ b/DataObjects/JobConfiguration/JobSnapshotSelectionCriteria.cs @@ -1,6 +1,4 @@ -using System; - -namespace AppDynamics.Dexter +namespace AppDynamics.Dexter { public class JobSnapshotSelectionCriteria { diff --git a/DataObjects/JobConfiguration/JobStatus.cs b/DataObjects/JobConfiguration/JobStatus.cs index d23a177..04bc04b 100644 --- a/DataObjects/JobConfiguration/JobStatus.cs +++ b/DataObjects/JobConfiguration/JobStatus.cs @@ -54,7 +54,7 @@ public enum JobStatus IndexWEBConfiguration = 73, IndexMOBILEConfiguration = 74, IndexBIQConfiguration = 75, - + IndexApplicationConfigurationDifferences = 76, IndexAPMMetrics = 80, diff --git a/DataObjects/ProgramOptions/ProgramOptions.cs b/DataObjects/ProgramOptions/ProgramOptions.cs index 482392d..be0cf6a 100644 --- a/DataObjects/ProgramOptions/ProgramOptions.cs +++ b/DataObjects/ProgramOptions/ProgramOptions.cs @@ -1,25 +1,24 @@ using CommandLine; -using CommandLine.Text; using System; namespace AppDynamics.Dexter { public class ProgramOptions { - [Option('j', "job-file", Required = true, SetName ="etl", HelpText = "Input file defining the parameters of the ETL job to process.")] + [Option('j', "job-file", Required = true, SetName = "etl", HelpText = "Input file defining the parameters of the ETL job to process.")] public string InputJobFilePath { get; set; } [Option('o', "output-folder", Required = false, HelpText = "Output folder where to store results of processing.")] public string OutputFolderPath { get; set; } - [Option('c', "compare-states-file", Required = true, SetName = "compare", HelpText = "Compare file defining the mappings of the state comparison to perform.")] + [Option('c', "compare-states-file", Required = true, SetName = "compare", HelpText = "Compare file defining the mappings of the state comparison to perform.")] public string CompareFilePath { get; set; } [Option('l', "left-from-state-folder", Required = true, SetName = "compare", HelpText = "Folder of the ETL job to use as a left side/reference/from comparison.")] public string FromJobFolderPath { get; set; } [Option('r', "right-to-state-folder", Required = true, SetName = "compare", HelpText = "Folder of the ETL job to use as a right side/target/to comparison.")] - public string ToJobFolderPath{ get; set; } + public string ToJobFolderPath { get; set; } [Option('d', "delete-previous-job-output", Required = false, HelpText = "If true, delete any results of previous processing.")] public bool RestartJobFromBeginning { get; set; } @@ -30,7 +29,7 @@ public class ProgramOptions [Option('v', "skip-version-check", Required = false, HelpText = "If true, skips the version check against GitHub repository.")] public bool SkipVersionCheck { get; set; } - public string OutputJobFolderPath { get; set;} + public string OutputJobFolderPath { get; set; } public string OutputJobFilePath { get; set; } diff --git a/DataObjects/RestApi/AppDRESTBackend.cs b/DataObjects/RestApi/AppDRESTBackend.cs index 5a7efce..ed28fae 100644 --- a/DataObjects/RestApi/AppDRESTBackend.cs +++ b/DataObjects/RestApi/AppDRESTBackend.cs @@ -29,7 +29,7 @@ public class AppDRESTBackend public int applicationComponentNodeId { get; set; } public string exitPointType { get; set; } public long id { get; set; } - public string name{ get; set; } + public string name { get; set; } public List properties { get; set; } public long tierId { get; set; } diff --git a/DefaultJob.json b/DefaultJob.json index 61727ed..7293755 100644 --- a/DefaultJob.json +++ b/DefaultJob.json @@ -51,8 +51,8 @@ ], "Input": { "TimeRange": { - "From": "2019-06-01T12:00:00", - "To": "2019-06-01T13:00:00" + "From": "2019-09-01T09:00:00", + "To": "2019-09-01T10:00:00" }, "UsersGroupsRolesPermissions": true, "Dashboards": true, diff --git a/EmptyConfig/reference.controller/EmptyAPM.0/CFG/configuration.json b/EmptyConfig/reference.controller/EmptyAPM.0/CFG/configuration.json new file mode 100644 index 0000000..388dcc0 --- /dev/null +++ b/EmptyConfig/reference.controller/EmptyAPM.0/CFG/configuration.json @@ -0,0 +1,380 @@ +{ + "id" : 0, + "version" : 1, + "defaultBusinessTransactionSLA" : { + "averageResponseTimeThreshold" : { + "warningThreshold" : 15000, + "criticalThreshold" : 30000, + "warningThresholdEnabled" : true, + "criticalThresholdEnabled" : true, + "valid" : true + }, + "errorsPerMinuteThreshold" : { + "warningThreshold" : 20, + "criticalThreshold" : 100, + "warningThresholdEnabled" : true, + "criticalThresholdEnabled" : true, + "valid" : true + }, + "specified" : true + }, + "defaultTransactionConfiguration" : { + "id" : 38458, + "version" : 0, + "snapshotCollectionPolicy" : { + "collectingOnDemandSnapshots" : false, + "onDemandSnapshotCollectionDurationInMinutes" : 0, + "onDemandSnapshotCollectionRemainingDurationInMinutes" : 0, + "numberOfOnDemandSnapshotsToCollect" : 0, + "collectSnapshotOnSLAViolationEnabled" : true, + "onWarningThresholdViolation" : true, + "collectOutliersOnlyOnSLAViolation" : true, + "maxAttemptsForOutliersOnSLAViolation" : 20, + "onSLAViolationSnapshotCollectionDurationInMinutes" : 5, + "numberOfSnapshotsToCollectOnSLAViolation" : 5, + "occuranceSnapshotCollectionEnabled" : false, + "nthOccurance" : 100, + "collectSnapshotForEveryNMinutesEnabled" : true, + "minuteFrequency" : 10, + "automaticCollectionEnabled" : true, + "automaticSlowVolumePercentageThreshold" : 10, + "automaticErrorVolumePercentageThreshold" : 10, + "onCriticalThresholdViolation" : false + }, + "requestThresholds" : { + "id" : 0, + "version" : 0, + "startingNodeSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "startingNodeExtremelySlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 4.0 + }, + "exitCallSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "continuingSegmentSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "stallConfig" : { + "absolute" : false, + "absoluteTimeInSecs" : 0, + "btSLAViolationMultiplier" : 300 + }, + "percentileConfig" : { + "enabled" : true, + "percentileValues" : [ 95.0 ] + } + } + }, + "defaultBackgroundTransactionConfiguration" : { + "id" : 38457, + "version" : 0, + "snapshotCollectionPolicy" : { + "collectingOnDemandSnapshots" : false, + "onDemandSnapshotCollectionDurationInMinutes" : 0, + "onDemandSnapshotCollectionRemainingDurationInMinutes" : 0, + "numberOfOnDemandSnapshotsToCollect" : 0, + "collectSnapshotOnSLAViolationEnabled" : true, + "onWarningThresholdViolation" : true, + "collectOutliersOnlyOnSLAViolation" : true, + "maxAttemptsForOutliersOnSLAViolation" : 20, + "onSLAViolationSnapshotCollectionDurationInMinutes" : 5, + "numberOfSnapshotsToCollectOnSLAViolation" : 5, + "occuranceSnapshotCollectionEnabled" : false, + "nthOccurance" : 100, + "collectSnapshotForEveryNMinutesEnabled" : true, + "minuteFrequency" : 10, + "automaticCollectionEnabled" : true, + "automaticSlowVolumePercentageThreshold" : 10, + "automaticErrorVolumePercentageThreshold" : 10, + "onCriticalThresholdViolation" : false + }, + "requestThresholds" : { + "id" : 0, + "version" : 0, + "startingNodeSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "startingNodeExtremelySlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 4.0 + }, + "exitCallSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "continuingSegmentSlowThreshold" : { + "evaluationType" : "STANDARD_DEVIATION", + "percentageThreshold" : 0, + "percentageThresholdEvaluationMinutes" : 120, + "staticThresholdInMillis" : 0, + "standardDeviationThreshold" : 3.0 + }, + "stallConfig" : { + "absolute" : false, + "absoluteTimeInSecs" : 0, + "btSLAViolationMultiplier" : 300 + }, + "percentileConfig" : { + "enabled" : true, + "percentileValues" : [ 95.0 ] + } + } + }, + "callGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ "name=java,description=Core Java Libraries,system=true", "name=javax,description=Java Extension/J2EE Libraries,system=true", "name=com.sun,description=Sun Reference Implementations/JDK Core Classes,system=true", "name=sun,description=Sun Reference Implementations/JDK Core Classes,system=true", "name=org,description=Common Open Source Libraries like Apache's,system=true", "name=com.bea,description=BEA Core Classes,system=true", "name=com.weblogic,description=Weblogic Server Core Classes,system=true", "name=weblogic,description=Weblogic Server Core Classes,system=true", "name=com.ibm,description=IBM Core Classes including Websphere App Server,system=true", "name=com.mysql,description=MYSQL Driver Implementation Classes,system=true", "name=com.oracle,description=Oracle Core Classes,system=true", "name=oracle,description=Oracle Core Classes,system=true", "name=com.microsoft.sqlserver,description=MS SQL Server Driver Implementation Classes,system=true", "name=com.opensymphony,description=Opensymphony J2EE Components,system=true", "name=net.sf,description=Source Forge Project Classes,system=true", "name=jrockit,description=JRockit JVM implementation classes,system=true", "name=kodo,description=Kodo JPA / JDO implementation classes,system=true", "name=com.pointbase,description=Pointbase Driver implementation classes,system=true", "name=persistence.antlr,description=Toplink JPA Classes,system=true", "name=com.informix,description=Informix implementation Classes,system=true", "name=com.sybase.jdbc2,description=Sybase JDBC2 implementation Classes,system=true", "name=com.sybase.jdbc3,description=Sybase JDBC3 implementation Classes,system=true", "name=com.sybase.jdbc4,description=Sybase JDBC4 implementation Classes,system=true", "name=com.mongodb.connection,description=MongoDB wire protocol,system=false" ], + "includedPackages" : [ "name=com.sun.jersey,description=Jersey REST framework implementation classes,system=false", "name=org.apache.openejb,description=Apache OpenEJB Classes,system=false", "name=org.apache.cassandra,description=Apache Cassandra implementation classes,system=false", "name=org.apache.kafka,description=Apache Kafka Classes,system=false", "name=org.apache.http,description=Apache Http Classes,system=false", "name=org.asynchttpclient,description=Ning Async Http Client Classes,system=false", "name=org.apache.camel.example,description=Apache Camel example classes,system=false", "name=org.apache.camel.component.seda,description=Apache Camel Seda internals,system=false", "name=org.mule.processor,description=Mule ESB classes,system=false", "name=org.jboss.soa.esb.client,description=JBoss ESB classes,system=false", "name=org.springframework.integration,description=Spring Integration classes,system=false", "name=com.ibm.mq,description=IBM MQ Classes,system=false", "name=org.apache.activemq,description=ActiveMQ Classes,system=false", "name=com.ibm.bpm,description=IBM-BPM related Classes,system=false", "name=com.ibm.bpe,description=IBM-BPM related Classes,system=false", "name=com.ibm.ws,description=IBM-BPM related Classes,system=false" ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "dotNetCallGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ ], + "includedPackages" : [ ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "phpCallGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ ], + "includedPackages" : [ ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "nodeJsCallGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ ], + "includedPackages" : [ ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "pythonCallGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ ], + "includedPackages" : [ ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "rubyCallGraphConfiguration" : { + "id" : 0, + "version" : 0, + "samplingRateInMilliSeconds" : 10, + "excludedPackages" : [ ], + "includedPackages" : [ ], + "minDurationForJDBCCallsInMilliSeconds" : 10, + "rawSQL" : false, + "hotspotsEnabled" : false + }, + "snapshotQuietTimePostSLAFailureInMinutes" : 30, + "snapshotEvaluationIntervalInMinutes" : 1, + "lastModificationTimestamp" : 1566842453739, + "errorConfig" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : [ ], + "customerLoggerDefinitions" : [ ], + "httpErrorReturnCodes" : [ ], + "errorRedirectPages" : [ ], + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : true, + "ignoreLoggerMsgPatterns" : [ ], + "maxFramesInRootCause" : 5, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : true, + "disableSLF4JLogging" : false + }, + "dotNetErrorConfig" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : [ ], + "customerLoggerDefinitions" : [ ], + "httpErrorReturnCodes" : [ ], + "errorRedirectPages" : [ ], + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : true, + "ignoreLoggerMsgPatterns" : [ ], + "maxFramesInRootCause" : 0, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : true, + "disableSLF4JLogging" : false, + "disableSystemTrace" : false, + "disableEventLog" : false, + "disableNLog" : false, + "disableLog4NetLogging" : false + }, + "phpErrorConfiguration" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : null, + "customerLoggerDefinitions" : null, + "httpErrorReturnCodes" : null, + "errorRedirectPages" : null, + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : false, + "ignoreLoggerMsgPatterns" : [ ], + "maxFramesInRootCause" : 0, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : true, + "disableSLF4JLogging" : false, + "detectPhpErrors" : true, + "errorThreshold" : "ERROR" + }, + "nodeJsErrorConfiguration" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : null, + "customerLoggerDefinitions" : null, + "httpErrorReturnCodes" : [ ], + "errorRedirectPages" : null, + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : false, + "ignoreLoggerMsgPatterns" : null, + "maxFramesInRootCause" : 0, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : false, + "disableSLF4JLogging" : false + }, + "pythonErrorConfiguration" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : null, + "customerLoggerDefinitions" : null, + "httpErrorReturnCodes" : [ ], + "errorRedirectPages" : null, + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : false, + "ignoreLoggerMsgPatterns" : [ ], + "maxFramesInRootCause" : 0, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : true, + "disableSLF4JLogging" : false, + "detectPythonErrors" : true, + "errorThreshold" : "ERROR" + }, + "rubyErrorConfiguration" : { + "id" : 0, + "version" : 0, + "ignoreExceptions" : [ ], + "ignoreLoggerNames" : null, + "customerLoggerDefinitions" : null, + "httpErrorReturnCodes" : [ ], + "errorRedirectPages" : null, + "disableJavaLogging" : false, + "disableLog4JLogging" : false, + "disableDefaultHTTPErrorCode" : false, + "ignoreExceptionMsgPatterns" : [ ], + "captureLoggerErrorAndFatalMessages" : false, + "ignoreLoggerMsgPatterns" : null, + "maxFramesInRootCause" : 0, + "stackTraceLineLimit" : 0, + "markTransactionAsErrorOnErrorMessageLog" : false, + "disableSLF4JLogging" : false + }, + "instrumentationLevel" : "PRODUCTION", + "ruleProcessingEnabled" : true, + "stallConfig" : null, + "eumConfiguration" : { + "id" : 903, + "version" : 0, + "enabled" : false, + "injectedJSTemplate" : null, + "externalJSFetchURL" : null, + "heartBeatURL" : null, + "automatic" : false, + "manual" : false, + "eumCloudApplicationKey" : null, + "eumBeaconUrl" : null, + "eumJSUrl" : null, + "targetTierIDs" : [ ], + "excludeRules" : [ ], + "includeRules" : [ ], + "frameworksToEnableAttributeInjection" : null, + "mobileEnabled" : false, + "globalAccountName" : null, + "btHeaderInjectionEnabled" : false, + "btExcludeRules" : [ ], + "btIncludeRules" : [ ], + "iotEnabled" : false, + "webEnabled" : false, + "injectionRules" : [ ], + "parsingRules" : [ ], + "eumJSUrlHttps" : null, + "eumBeaconHttpsUrl" : null, + "externalJSFetchURLHttps" : null, + "targetedEUMAppId" : null, + "hostOption" : 0, + "enableCrossDomainSessionCorrelation" : false, + "eumCustomConfig" : null + }, + "properties" : [ ], + "asyncActivitySupported" : true, + "btDiscoveryLocked" : false, + "allAgentsDisabled" : false, + "btCleanupTimeframeInMinutes" : 15, + "btCleanupCallCountThreshold" : 1, + "btRetentionPeriodInHours" : 0, + "dataGathererConfigTimestampMillis" : 1566842452327 +} \ No newline at end of file diff --git a/GithubApi/GithubApi.cs b/GithubApi/GithubApi.cs index 71baa45..d200f1e 100644 --- a/GithubApi/GithubApi.cs +++ b/GithubApi/GithubApi.cs @@ -4,9 +4,7 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; -using System.Net.Security; using System.Reflection; -using System.Text; namespace AppDynamics.Dexter { diff --git a/Helpers/AESEncryptionHelper.cs b/Helpers/AESEncryptionHelper.cs index b43138e..8b875c5 100644 --- a/Helpers/AESEncryptionHelper.cs +++ b/Helpers/AESEncryptionHelper.cs @@ -55,7 +55,7 @@ public static string Decrypt(string cipherText) catch (FormatException ex) { if (ex.Message == "Invalid length for a Base-64 char array or string." || ex.Message.StartsWith("The input is not a valid Base-64 string")) - { + { // This is plaintext return cipherText; } diff --git a/Helpers/EPPlusCSVHelper.cs b/Helpers/EPPlusCSVHelper.cs index b2c1160..dac5ee1 100644 --- a/Helpers/EPPlusCSVHelper.cs +++ b/Helpers/EPPlusCSVHelper.cs @@ -207,6 +207,7 @@ public static ExcelRangeBase ReadCSVIntoExcelRange(StreamReader sr, int skipLine } catch (OutOfMemoryException ex) { + logger.Error(ex); logger.Warn("Max number of rows or cells in sheet {0} reached", sheet.Name); return null; } diff --git a/Helpers/FileIOHelper.cs b/Helpers/FileIOHelper.cs index a820572..ee3dc57 100644 --- a/Helpers/FileIOHelper.cs +++ b/Helpers/FileIOHelper.cs @@ -348,7 +348,7 @@ public static JobConfiguration ReadJobConfigurationFromFile(string configuration logger.Warn("Unable to find file {0}", configurationFilePath); } else - { + { logger.Trace("Reading JobConfiguration JSON from job file {0}", configurationFilePath); return JsonConvert.DeserializeObject(File.ReadAllText(configurationFilePath)); diff --git a/ProcessingSteps/Extract/ExtractAPMConfiguration.cs b/ProcessingSteps/Extract/ExtractAPMConfiguration.cs index 1aec546..be70f4f 100644 --- a/ProcessingSteps/Extract/ExtractAPMConfiguration.cs +++ b/ProcessingSteps/Extract/ExtractAPMConfiguration.cs @@ -71,12 +71,23 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job loggerConsole.Info("Application Configuration"); - if (File.Exists(FilePathMap.APMApplicationConfigurationDataFilePath(jobTarget)) == false) + if (File.Exists(FilePathMap.APMApplicationConfigurationXMLDataFilePath(jobTarget)) == false) { controllerApi.Timeout = 3; - string applicationConfigXml = controllerApi.GetAPMConfiguration(jobTarget.ApplicationID); - if (applicationConfigXml != String.Empty) FileIOHelper.SaveFileToPath(applicationConfigXml, FilePathMap.APMApplicationConfigurationDataFilePath(jobTarget)); + string applicationConfigXml = controllerApi.GetAPMConfigurationExportXML(jobTarget.ApplicationID); + if (applicationConfigXml != String.Empty) FileIOHelper.SaveFileToPath(applicationConfigXml, FilePathMap.APMApplicationConfigurationXMLDataFilePath(jobTarget)); } + + controllerApi.PrivateApiLogin(); + + if (File.Exists(FilePathMap.APMApplicationConfigurationDetailsDataFilePath(jobTarget)) == false) + { + controllerApi.PrivateApiLogin(); + + string applicationConfigJSON = controllerApi.GetAPMConfigurationDetailsJSON(jobTarget.ApplicationID); + if (applicationConfigJSON != String.Empty) FileIOHelper.SaveFileToPath(applicationConfigJSON, FilePathMap.APMApplicationConfigurationDetailsDataFilePath(jobTarget)); + } + #endregion #region Service Endpoints @@ -114,8 +125,6 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job if (File.Exists(FilePathMap.APMApplicationDeveloperModeNodesDataFilePath(jobTarget)) == false) { - controllerApi.PrivateApiLogin(); - string devModeConfigurationJSON = controllerApi.GetAPMDeveloperModeConfiguration(jobTarget.ApplicationID); if (devModeConfigurationJSON != String.Empty) FileIOHelper.SaveFileToPath(devModeConfigurationJSON, FilePathMap.APMApplicationDeveloperModeNodesDataFilePath(jobTarget)); } diff --git a/ProcessingSteps/Extract/ExtractAPMEntities.cs b/ProcessingSteps/Extract/ExtractAPMEntities.cs index b4387ff..c92fda7 100644 --- a/ProcessingSteps/Extract/ExtractAPMEntities.cs +++ b/ProcessingSteps/Extract/ExtractAPMEntities.cs @@ -137,10 +137,10 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job () => 0, (listOfBackendsInHourChunk, loop, subtotal) => { - // Set up controller access - ControllerApi controllerApiParallel = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword)); - // Login into private API - controllerApiParallel.PrivateApiLogin(); + // Set up controller access + ControllerApi controllerApiParallel = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword)); + // Login into private API + controllerApiParallel.PrivateApiLogin(); foreach (AppDRESTBackend backend in listOfBackendsInHourChunk) { @@ -228,11 +228,11 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job () => 0, (listOfNodesInHourChunk, loop, subtotal) => { - // Set up controller access - ControllerApi controllerApiParallel = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword)); + // Set up controller access + ControllerApi controllerApiParallel = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword)); - // Login into private API - controllerApiParallel.PrivateApiLogin(); + // Login into private API + controllerApiParallel.PrivateApiLogin(); foreach (AppDRESTNode node in listOfNodesInHourChunk) { diff --git a/ProcessingSteps/Extract/ExtractAPMFlowmaps.cs b/ProcessingSteps/Extract/ExtractAPMFlowmaps.cs index d94cdcf..961b638 100644 --- a/ProcessingSteps/Extract/ExtractAPMFlowmaps.cs +++ b/ProcessingSteps/Extract/ExtractAPMFlowmaps.cs @@ -109,7 +109,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job int j = 0; Parallel.For(0, - differenceInMinutesForLastTimeRange, + differenceInMinutesForLastTimeRange, new ParallelOptions { MaxDegreeOfParallelism = FLOWMAP_EXTRACT_NUMBER_OF_THREADS }, () => 0, (minute, loop, subtotal) => diff --git a/ProcessingSteps/Extract/ExtractAPMSnapshots.cs b/ProcessingSteps/Extract/ExtractAPMSnapshots.cs index 8f1f943..ef4e9fc 100644 --- a/ProcessingSteps/Extract/ExtractAPMSnapshots.cs +++ b/ProcessingSteps/Extract/ExtractAPMSnapshots.cs @@ -547,11 +547,11 @@ public override bool ShouldExecute(JobConfiguration jobConfiguration) } private int extractSnapshots( - JobConfiguration jobConfiguration, - JobTarget jobTarget, - ControllerApi controllerApi, - List snapshotTokenList, - List tiersNodeJSList, + JobConfiguration jobConfiguration, + JobTarget jobTarget, + ControllerApi controllerApi, + List snapshotTokenList, + List tiersNodeJSList, bool progressToConsole) { int j = 0; @@ -667,7 +667,7 @@ private int extractSnapshots( tw.WriteLine("\"errors\" :"); tw.WriteLine("{"); someObjectWrittenAlready = false; - foreach(JToken snapshotSegment in snapshotSegmentsList) + foreach (JToken snapshotSegment in snapshotSegmentsList) { if ((bool)snapshotSegment["errorOccurred"] == true) { diff --git a/ProcessingSteps/Extract/ExtractControllerUsersGroupsRolesAndPermissions.cs b/ProcessingSteps/Extract/ExtractControllerUsersGroupsRolesAndPermissions.cs index ce94ba3..ceff9e7 100644 --- a/ProcessingSteps/Extract/ExtractControllerUsersGroupsRolesAndPermissions.cs +++ b/ProcessingSteps/Extract/ExtractControllerUsersGroupsRolesAndPermissions.cs @@ -34,7 +34,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } // Process each Controller once - int i = 0; + int i = 0; var controllers = jobConfiguration.Target.GroupBy(t => t.Controller); foreach (var controllerGroup in controllers) { diff --git a/ProcessingSteps/Extract/ExtractDBEntities.cs b/ProcessingSteps/Extract/ExtractDBEntities.cs index 98a41ed..b42092e 100644 --- a/ProcessingSteps/Extract/ExtractDBEntities.cs +++ b/ProcessingSteps/Extract/ExtractDBEntities.cs @@ -60,7 +60,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job stepTimingTarget.StartTime = DateTime.Now; stepTimingTarget.NumEntities = 1; - + try { this.DisplayJobTargetStartingStatus(jobConfiguration, jobTarget, i + 1); diff --git a/ProcessingSteps/Extract/ExtractLicenses.cs b/ProcessingSteps/Extract/ExtractLicenses.cs index d41b07b..dc18532 100644 --- a/ProcessingSteps/Extract/ExtractLicenses.cs +++ b/ProcessingSteps/Extract/ExtractLicenses.cs @@ -97,7 +97,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job if (licenseModulesJSON != String.Empty) { JObject licenseModulesContainer = JObject.Parse(licenseModulesJSON); - if (licenseModulesContainer != null && + if (licenseModulesContainer != null && isTokenPropertyNull(licenseModulesContainer, "modules") == false) { JArray licenseModulesArray = (JArray)licenseModulesContainer["modules"]; @@ -129,32 +129,38 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job JArray licenseRulesArray = JArray.Parse(licenseRulesJSON); if (licenseRulesArray != null) { - foreach (JObject licenseRuleObject in licenseRulesArray) + using (ControllerApi controllerApi1 = new ControllerApi(jobTarget.Controller, jobTarget.UserName, AESEncryptionHelper.Decrypt(jobTarget.UserPassword))) { - string ruleID = getStringValueFromJToken(licenseRuleObject, "id"); - string ruleName = getStringValueFromJToken(licenseRuleObject, "name"); + controllerApi1.PrivateApiLogin(); - loggerConsole.Info("License Rule Configuration - {0}", ruleName); + foreach (JObject licenseRuleObject in licenseRulesArray) + { + string ruleID = getStringValueFromJToken(licenseRuleObject, "id"); + string ruleName = getStringValueFromJToken(licenseRuleObject, "name"); - string licenseRuleDetailsJSON = controllerApi.GetLicenseRuleConfiguration(ruleID); - if (licenseRuleDetailsJSON != String.Empty) FileIOHelper.SaveFileToPath(licenseRuleDetailsJSON, FilePathMap.LicenseRuleConfigurationDataFilePath(jobTarget, ruleName, ruleID)); - } + loggerConsole.Info("License Rule Configuration - {0}", ruleName); - controllerApi.PrivateApiLogin(); + string licenseRuleDetailsJSON = controllerApi.GetLicenseRuleConfiguration(ruleID); + if (licenseRuleDetailsJSON != String.Empty) FileIOHelper.SaveFileToPath(licenseRuleDetailsJSON, FilePathMap.LicenseRuleConfigurationDataFilePath(jobTarget, ruleName, ruleID)); + } - foreach (JObject licenseRuleObject in licenseRulesArray) - { - string ruleID = getStringValueFromJToken(licenseRuleObject, "id"); - string ruleName = getStringValueFromJToken(licenseRuleObject, "name"); + foreach (JObject licenseRuleObject in licenseRulesArray) + { + string ruleID = getStringValueFromJToken(licenseRuleObject, "id"); + string ruleName = getStringValueFromJToken(licenseRuleObject, "name"); - loggerConsole.Info("License Rule Usage - {0}", ruleName); + loggerConsole.Info("License Rule Usage - {0}", ruleName); - string licenseRuleUsageJSON = controllerApi.GetLicenseRuleUsage(ruleID, fromTimeUnix, toTimeUnix, differenceInMinutes); - if (licenseRuleUsageJSON != String.Empty) FileIOHelper.SaveFileToPath(licenseRuleUsageJSON, FilePathMap.LicenseRuleUsageDataFilePath(jobTarget, ruleName, ruleID)); + string licenseRuleUsageJSON = controllerApi1.GetLicenseRuleUsage(ruleID, fromTimeUnix, toTimeUnix, differenceInMinutes); + if (licenseRuleUsageJSON != String.Empty) FileIOHelper.SaveFileToPath(licenseRuleUsageJSON, FilePathMap.LicenseRuleUsageDataFilePath(jobTarget, ruleName, ruleID)); + } } + } } + controllerApi.PrivateApiLogin(); + loggerConsole.Info("List of Applications Referenced by License Rules"); string applicationsListJSON = controllerApi.GetControllerApplicationsForLicenseRule(); @@ -173,7 +179,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job string accountJSON = controllerApi.GetAccount(); if (accountJSON != String.Empty) FileIOHelper.SaveFileToPath(accountJSON, FilePathMap.LicenseAccountDataFilePath(jobTarget)); - + #endregion } } diff --git a/ProcessingSteps/Extract/ExtractMOBILEEntities.cs b/ProcessingSteps/Extract/ExtractMOBILEEntities.cs index 116dce5..7e4067d 100644 --- a/ProcessingSteps/Extract/ExtractMOBILEEntities.cs +++ b/ProcessingSteps/Extract/ExtractMOBILEEntities.cs @@ -66,7 +66,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job stepTimingTarget.StartTime = DateTime.Now; stepTimingTarget.NumEntities = 1; - + try { this.DisplayJobTargetStartingStatus(jobConfiguration, jobTarget, i + 1); diff --git a/ProcessingSteps/Extract/ExtractWEBEntities.cs b/ProcessingSteps/Extract/ExtractWEBEntities.cs index 3d9337b..6402af1 100644 --- a/ProcessingSteps/Extract/ExtractWEBEntities.cs +++ b/ProcessingSteps/Extract/ExtractWEBEntities.cs @@ -65,7 +65,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job stepTimingTarget.StartTime = DateTime.Now; stepTimingTarget.NumEntities = 3; - + try { this.DisplayJobTargetStartingStatus(jobConfiguration, jobTarget, i + 1); diff --git a/ProcessingSteps/FilePathMap.cs b/ProcessingSteps/FilePathMap.cs index aa6f7e0..3b838d7 100644 --- a/ProcessingSteps/FilePathMap.cs +++ b/ProcessingSteps/FilePathMap.cs @@ -58,6 +58,7 @@ public class FilePathMap // Controller wide settings file names private const string EXTRACT_CONFIGURATION_APPLICATION_FILE_NAME = "configuration.xml"; + private const string EXTRACT_CONFIGURATION_APPLICATION_DETAILS_FILE_NAME = "configuration.json"; private const string EXTRACT_CONFIGURATION_APPLICATION_SEP_FILE_NAME = "seps.json"; private const string EXTRACT_CONTROLLER_VERSION_FILE_NAME = "controllerversion.xml"; @@ -317,6 +318,12 @@ public class FilePathMap private const string CONVERT_CONFIG_ENTITY_BUSINESS_TRANSACTIONS_FILE_NAME = "bts.configuration.csv"; private const string CONVERT_CONFIG_AGENT_CALL_GRAPH_SETTINGS_FILE_NAME = "callgraphs.configuration.csv"; private const string CONVERT_CONFIG_DEVELOPER_MODE_NODES_FILE_NAME = "devmode.nodes.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_RULES_FILE_NAME = "errordetection.rules.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_IGNORE_MESSAGES_FILE_NAME = "errordetection.ignore.messages.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_IGNORE_LOGGERS_FILE_NAME = "errordetection.ignore.loggers.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_LOGGERS_FILE_NAME = "errordetection.loggers.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_HTTP_CODES_FILE_NAME = "errordetection.httpcodes.csv"; + private const string CONVERT_CONFIG_ERROR_DETECTION_REDIRECT_PAGES_FILE_NAME = "errordetection.redirectpages.csv"; // Settings report list conversion file names - WEB private const string CONVERT_CONFIG_WEB_SUMMARY_FILE_NAME = "application.config.web.csv"; @@ -2115,7 +2122,7 @@ public string DBCurrentWaitStatesDataFilePath(JobTarget jobTarget, JobTimeRange EXTRACT_CURRENT_WAIT_STATES_FILE_NAME, jobTimeRange.From, jobTimeRange.To); - + return Path.Combine( this.ProgramOptions.OutputJobFolderPath, DATA_FOLDER_NAME, @@ -2421,7 +2428,7 @@ public string DBBusinessTransactionsIndexFilePath(JobTarget jobTarget) ENTITIES_FOLDER_NAME, CONVERT_DB_BUSINESS_TRANSACTIONS_FILE_NAME); } - + #endregion #region DB Entity Report @@ -3675,7 +3682,7 @@ public string ApplicationPolicyActionMappingsReportFilePath() #region APM Application Configuration Data - public string APMApplicationConfigurationDataFilePath(JobTarget jobTarget) + public string APMApplicationConfigurationXMLDataFilePath(JobTarget jobTarget) { return Path.Combine( this.ProgramOptions.OutputJobFolderPath, @@ -3686,6 +3693,18 @@ public string APMApplicationConfigurationDataFilePath(JobTarget jobTarget) EXTRACT_CONFIGURATION_APPLICATION_FILE_NAME); } + public string APMApplicationConfigurationDetailsDataFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + DATA_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + EXTRACT_CONFIGURATION_APPLICATION_DETAILS_FILE_NAME); + } + + public string APMApplicationConfigurationSEPDataFilePath(JobTarget jobTarget) { return Path.Combine( @@ -3899,6 +3918,72 @@ public string APMDeveloperModeNodesIndexFilePath(JobTarget jobTarget) CONVERT_CONFIG_DEVELOPER_MODE_NODES_FILE_NAME); } + public string APMErrorDetectionRulesIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_RULES_FILE_NAME); + } + + public string APMErrorDetectionIgnoreMessagesIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_IGNORE_MESSAGES_FILE_NAME); + } + + public string APMErrorDetectionIgnoreLoggersIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_IGNORE_LOGGERS_FILE_NAME); + } + + public string APMErrorDetectionLoggersIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_LOGGERS_FILE_NAME); + } + + public string APMErrorDetectionHTTPCodesIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_HTTP_CODES_FILE_NAME); + } + + public string APMErrorDetectionRedirectPagesIndexFilePath(JobTarget jobTarget) + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + INDEX_FOLDER_NAME, + getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), + getShortenedEntityNameForFileSystem(jobTarget.Application, jobTarget.ApplicationID), + CONFIGURATION_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_REDIRECT_PAGES_FILE_NAME); + } + #endregion #region APM Application Configuration Report @@ -4064,6 +4149,60 @@ public string APMDeveloperModeNodesReportFilePath() CONVERT_CONFIG_DEVELOPER_MODE_NODES_FILE_NAME); } + public string APMErrorDetectionRulesReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_RULES_FILE_NAME); + } + + public string APMErrorDetectionIgnoreMessagesReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_IGNORE_MESSAGES_FILE_NAME); + } + + public string APMErrorDetectionIgnoreLoggersReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_IGNORE_LOGGERS_FILE_NAME); + } + + public string APMErrorDetectionLoggersReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_LOGGERS_FILE_NAME); + } + + public string APMErrorDetectionHTTPCodesReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_HTTP_CODES_FILE_NAME); + } + + public string APMErrorDetectionRedirectPagesReportFilePath() + { + return Path.Combine( + this.ProgramOptions.OutputJobFolderPath, + REPORT_FOLDER_NAME, + CONFIGURATION_APM_FOLDER_NAME, + CONVERT_CONFIG_ERROR_DETECTION_REDIRECT_PAGES_FILE_NAME); + } + public string ConfigurationExcelReportFilePath(JobTimeRange jobTimeRange) { string reportFileName = String.Format( @@ -4298,7 +4437,7 @@ public string PermissionsIndexFilePath(JobTarget jobTarget) getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), CONTROLLER_RBAC_FOLDER_NAME, CONVERT_PERMISSIONS_FILE_NAME); - } + } public string GroupMembershipsIndexFilePath(JobTarget jobTarget) { @@ -4328,7 +4467,7 @@ public string UserPermissionsIndexFilePath(JobTarget jobTarget) getFileSystemSafeString(getControllerNameForFileSystem(jobTarget.Controller)), CONTROLLER_RBAC_FOLDER_NAME, CONVERT_USER_PERMISSIONS_FILE_NAME); - } + } public string RBACControllerSummaryIndexFilePath(JobTarget jobTarget) { @@ -4574,7 +4713,7 @@ public string EntitiesFullReportFilePath(string entityFolderName) return Path.Combine( this.ProgramOptions.OutputJobFolderPath, - REPORT_FOLDER_NAME, + REPORT_FOLDER_NAME, APM_METRICS_FOLDER_NAME, reportFileName); } @@ -5080,7 +5219,7 @@ public string AuditEventsDataFilePath(JobTarget jobTarget) EXTRACT_AUDIT_EVENTS_FILE_NAME, this.JobConfiguration.Input.TimeRange.From, this.JobConfiguration.Input.TimeRange.To); - + return Path.Combine( this.ProgramOptions.OutputJobFolderPath, DATA_FOLDER_NAME, diff --git a/ProcessingSteps/Index/IndexAPMConfiguration.cs b/ProcessingSteps/Index/IndexAPMConfiguration.cs index e22650f..f74c87c 100644 --- a/ProcessingSteps/Index/IndexAPMConfiguration.cs +++ b/ProcessingSteps/Index/IndexAPMConfiguration.cs @@ -54,9 +54,9 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job else { // Check if there is a valid reference application - JobTarget jobTargetReferenceApp = jobConfiguration.Target.Where(t => + JobTarget jobTargetReferenceApp = jobConfiguration.Target.Where(t => t.Type == APPLICATION_TYPE_APM && - String.Compare(t.Controller, jobConfiguration.Input.ConfigurationComparisonReferenceAPM.Controller, StringComparison.InvariantCultureIgnoreCase) == 0 && + String.Compare(t.Controller, jobConfiguration.Input.ConfigurationComparisonReferenceAPM.Controller, StringComparison.InvariantCultureIgnoreCase) == 0 && String.Compare(t.Application, jobConfiguration.Input.ConfigurationComparisonReferenceAPM.Application, StringComparison.InvariantCultureIgnoreCase) == 0).FirstOrDefault(); if (jobTargetReferenceApp == null) { @@ -123,10 +123,10 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job loggerConsole.Info("Load Configuration file"); - XmlDocument configXml = FileIOHelper.LoadXmlDocumentFromFile(FilePathMap.APMApplicationConfigurationDataFilePath(jobTarget)); + XmlDocument configXml = FileIOHelper.LoadXmlDocumentFromFile(FilePathMap.APMApplicationConfigurationXMLDataFilePath(jobTarget)); if (configXml == null) { - logger.Warn("No application configuration in {0} file", FilePathMap.APMApplicationConfigurationDataFilePath(jobTarget)); + logger.Warn("No application configuration in {0} file", FilePathMap.APMApplicationConfigurationXMLDataFilePath(jobTarget)); continue; } @@ -174,7 +174,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job applicationConfiguration.EUMConfigPage = ruleSetting.ToString(); } } - catch (JsonReaderException ex) {} + catch (JsonReaderException ex) { } try { JObject ruleSetting = JObject.Parse(getStringValueFromXmlNode(configXml.SelectSingleNode("application/eum-cloud-config/mobile-page-config"))); @@ -202,8 +202,13 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job applicationConfiguration.MetricBaselinesConfig = makeXMLFormattedAndIndented(configXml.SelectSingleNode("application/metric-baselines")); applicationConfiguration.NumBaselines = configXml.SelectNodes("application/metric-baselines/metric-baseline").Count; - applicationConfiguration.ErrorAgentConfig = makeXMLFormattedAndIndented(String.Format("{0}", makeXMLFormattedAndIndented(configXml.SelectNodes("application/configuration/error-configuration")))); - applicationConfiguration.NumErrorRules = configXml.SelectNodes("application/configuration/error-configuration").Count; + JObject applicationConfigurationDetailsObject = FileIOHelper.LoadJObjectFromFile(FilePathMap.APMApplicationConfigurationDetailsDataFilePath(jobTarget)); + if (applicationConfigurationDetailsObject != null) + { + applicationConfiguration.BTCleanupInterval = getIntValueFromJToken(applicationConfigurationDetailsObject, "btCleanupTimeframeInMinutes"); + applicationConfiguration.BTCleanupCallCount = getLongValueFromJToken(applicationConfigurationDetailsObject, "btCleanupCallCountThreshold"); + applicationConfiguration.IsBTCleanupEnabled = (applicationConfiguration.BTCleanupInterval > 0); + } #endregion @@ -901,7 +906,6 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job List developerModeSettingsList = new List(); JArray developerModeTiersArray = FileIOHelper.LoadJArrayFromFile(FilePathMap.APMApplicationDeveloperModeNodesDataFilePath(jobTarget)); - if (developerModeTiersArray != null && developerModeTiersArray.Count > 0) { foreach (JToken developerModeBusinessTransactionToken in developerModeTiersArray) @@ -940,6 +944,431 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + developerModeSettingsList.Count; + #endregion + + #region Error Detection rules, loggers, ignore exceptions, messages, HTTP codes and redirect pages + + loggerConsole.Info("Error Detection Settings"); + + // 6 types of agent. Java has 6 checkboxes, others have less + List errorDetectionRulesList = new List(6 * 5); + + // 6 types of agent. Let's assume there are 10 rules each, which is probably too generous + List errorDetectionIgnoreMessagesList = new List(6 * 10); + + // 2 types of agent support it + List errorDetectionIgnoreLoggersList = new List(2 * 2); + + // 2 types of agent support it + List errorDetectionLoggersList = new List(2 * 2); + + // 4 types of agent support it + List errorDetectionHTTPCodesList = new List(4 * 2); + + // 2 types of agent support it + List errorDetectionRedirectPagesList = new List(2 * 2); + + #region Java + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "errorConfig") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["errorConfig"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Detect errors from java.util.logging", (getBoolValueFromJToken(errorConfigContainer, "disableJavaLogging") == false).ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Detect errors from Log4j", (getBoolValueFromJToken(errorConfigContainer, "disableLog4JLogging") == false).ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Detect errors from SLF4j/Logback", (getBoolValueFromJToken(errorConfigContainer, "disableSLF4JLogging") == false).ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Detect errors at ERROR or higher", getBoolValueFromJToken(errorConfigContainer, "captureLoggerErrorAndFatalMessages").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Java", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Java", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Java", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerNames") == false) + { + JArray ignoreLoggersArray = (JArray)errorConfigContainer["ignoreLoggerNames"]; + + if (ignoreLoggersArray.Count > 0) + { + for (int j = 0; j < ignoreLoggersArray.Count; j++) + { + errorDetectionIgnoreLoggersList.Add(fillErrorDetectionIgnoreLogger(applicationConfiguration, "Java", ignoreLoggersArray[j].ToString())); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "customerLoggerDefinitions") == false) + { + JArray loggersArray = (JArray)errorConfigContainer["customerLoggerDefinitions"]; + + if (loggersArray.Count > 0) + { + foreach (JObject loggerObject in loggersArray) + { + errorDetectionLoggersList.Add(fillErrorDetectionLogger(applicationConfiguration, "Java", loggerObject)); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "httpErrorReturnCodes") == false) + { + JArray httpErrorCodesArray = (JArray)errorConfigContainer["httpErrorReturnCodes"]; + + if (httpErrorCodesArray.Count > 0) + { + foreach (JObject httpErrorCodeObject in httpErrorCodesArray) + { + errorDetectionHTTPCodesList.Add(fillErrorDetectionHTTPCode(applicationConfiguration, "Java", httpErrorCodeObject)); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "errorRedirectPages") == false) + { + JArray errorRedirectPagesArray = (JArray)errorConfigContainer["errorRedirectPages"]; + + if (errorRedirectPagesArray.Count > 0) + { + foreach (JObject errorRedirectPageObject in errorRedirectPagesArray) + { + errorDetectionRedirectPagesList.Add(fillErrorDetectionRedirectPage(applicationConfiguration, "Java", errorRedirectPageObject)); + } + } + } + } + + #endregion + + #region .NET + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "dotNetErrorConfig") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["dotNetErrorConfig"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect errors from NLog", (getBoolValueFromJToken(errorConfigContainer, "disableNLog") == false).ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect errors from Log4Net", (getBoolValueFromJToken(errorConfigContainer, "disableLog4NetLogging") == false).ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect errors from System.Diagnostics.Trace", (getBoolValueFromJToken(errorConfigContainer, "disableSystemTrace") == false).ToString())); ; + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect errors from EventLog", (getBoolValueFromJToken(errorConfigContainer, "disableEventLog") == false).ToString())); ; + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect errors at ERROR or higher", getBoolValueFromJToken(errorConfigContainer, "captureLoggerErrorAndFatalMessages").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, ".NET", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, ".NET", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, ".NET", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerNames") == false) + { + JArray ignoreLoggersArray = (JArray)errorConfigContainer["ignoreLoggerNames"]; + + if (ignoreLoggersArray.Count > 0) + { + for (int j = 0; j < ignoreLoggersArray.Count; j++) + { + errorDetectionIgnoreLoggersList.Add(fillErrorDetectionIgnoreLogger(applicationConfiguration, ".NET", ignoreLoggersArray[j].ToString())); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "customerLoggerDefinitions") == false) + { + JArray loggersArray = (JArray)errorConfigContainer["customerLoggerDefinitions"]; + + if (loggersArray.Count > 0) + { + foreach (JObject loggerObject in loggersArray) + { + errorDetectionLoggersList.Add(fillErrorDetectionLogger(applicationConfiguration, ".NET", loggerObject)); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "httpErrorReturnCodes") == false) + { + JArray httpErrorCodesArray = (JArray)errorConfigContainer["httpErrorReturnCodes"]; + + if (httpErrorCodesArray.Count > 0) + { + foreach (JObject httpErrorCodeObject in httpErrorCodesArray) + { + errorDetectionHTTPCodesList.Add(fillErrorDetectionHTTPCode(applicationConfiguration, ".NET", httpErrorCodeObject)); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "errorRedirectPages") == false) + { + JArray errorRedirectPagesArray = (JArray)errorConfigContainer["errorRedirectPages"]; + + if (errorRedirectPagesArray.Count > 0) + { + foreach (JObject errorRedirectPageObject in errorRedirectPagesArray) + { + errorDetectionRedirectPagesList.Add(fillErrorDetectionRedirectPage(applicationConfiguration, ".NET", errorRedirectPageObject)); + } + } + } + } + + #endregion + + #region PHP + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "phpErrorConfiguration") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["phpErrorConfiguration"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "PHP", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "PHP", "Detect errors", getBoolValueFromJToken(errorConfigContainer, "detectPhpErrors").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "PHP", "Detect errors of Level", getStringValueFromJToken(errorConfigContainer, "errorThreshold"))); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "PHP", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "PHP", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "PHP", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + } + + #endregion + + #region Node.JS + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "nodeJsErrorConfiguration") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["nodeJsErrorConfiguration"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Node.js", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Node.js", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Node.js", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Node.js", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "httpErrorReturnCodes") == false) + { + JArray httpErrorCodesArray = (JArray)errorConfigContainer["httpErrorReturnCodes"]; + + if (httpErrorCodesArray.Count > 0) + { + foreach (JObject httpErrorCodeObject in httpErrorCodesArray) + { + errorDetectionHTTPCodesList.Add(fillErrorDetectionHTTPCode(applicationConfiguration, "Node.js", httpErrorCodeObject)); + } + } + } + } + + #endregion + + #region Python + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "pythonErrorConfiguration") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["pythonErrorConfiguration"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Python", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Python", "Detect errors", getBoolValueFromJToken(errorConfigContainer, "detectPythonErrors").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Python", "Detect errors of Level", getStringValueFromJToken(errorConfigContainer, "errorThreshold"))); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Python", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Python", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Python", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "httpErrorReturnCodes") == false) + { + JArray httpErrorCodesArray = (JArray)errorConfigContainer["httpErrorReturnCodes"]; + + if (httpErrorCodesArray.Count > 0) + { + foreach (JObject httpErrorCodeObject in httpErrorCodesArray) + { + errorDetectionHTTPCodesList.Add(fillErrorDetectionHTTPCode(applicationConfiguration, "Python", httpErrorCodeObject)); + } + } + } + } + + #endregion + + #region Ruby + + if (applicationConfigurationDetailsObject != null && + isTokenPropertyNull(applicationConfigurationDetailsObject, "rubyErrorConfiguration") == false) + { + JObject errorConfigContainer = (JObject)applicationConfigurationDetailsObject["rubyErrorConfiguration"]; + + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Ruby", "Mark BT As Error", getBoolValueFromJToken(errorConfigContainer, "markTransactionAsErrorOnErrorMessageLog").ToString())); + errorDetectionRulesList.Add(fillErrorDetectionRule(applicationConfiguration, "Ruby", "Detect default HTTP error code", (getBoolValueFromJToken(errorConfigContainer, "disableDefaultHTTPErrorCode") == false).ToString())); + + if (isTokenPropertyNull(errorConfigContainer, "ignoreExceptions") == false && isTokenPropertyNull(errorConfigContainer, "ignoreExceptionMsgPatterns") == false) + { + + JArray ignoreExceptionsArray = (JArray)errorConfigContainer["ignoreExceptions"]; + JArray ignoreExceptionsMessagesArray = (JArray)errorConfigContainer["ignoreExceptionMsgPatterns"]; + + if (ignoreExceptionsArray.Count > 0 && ignoreExceptionsMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreExceptionsArray.Count; j++) + { + try + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Ruby", ignoreExceptionsArray[j].ToString(), (JObject)ignoreExceptionsMessagesArray[j])); + } + catch { } + } + } + } + if (isTokenPropertyNull(errorConfigContainer, "ignoreLoggerMsgPatterns") == false) + { + JArray ignoreMessagesArray = (JArray)errorConfigContainer["ignoreLoggerMsgPatterns"]; + + if (ignoreMessagesArray.Count > 0) + { + for (int j = 0; j < ignoreMessagesArray.Count; j++) + { + errorDetectionIgnoreMessagesList.Add(fillErrorDetectionIgnoreException(applicationConfiguration, "Ruby", String.Format("", j), (JObject)ignoreMessagesArray[j])); + } + } + } + } + + #endregion + + FileIOHelper.WriteListToCSVFile(errorDetectionRulesList, new ErrorDetectionRuleReportMap(), FilePathMap.APMErrorDetectionRulesIndexFilePath(jobTarget)); + FileIOHelper.WriteListToCSVFile(errorDetectionIgnoreMessagesList, new ErrorDetectionIgnoreMessageReportMap(), FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(jobTarget)); + FileIOHelper.WriteListToCSVFile(errorDetectionIgnoreLoggersList, new ErrorDetectionIgnoreLoggerReportMap(), FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(jobTarget)); + FileIOHelper.WriteListToCSVFile(errorDetectionLoggersList, new ErrorDetectionLoggerReportMap(), FilePathMap.APMErrorDetectionLoggersIndexFilePath(jobTarget)); + FileIOHelper.WriteListToCSVFile(errorDetectionHTTPCodesList, new ErrorDetectionHTTPCodeReportMap(), FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(jobTarget)); + FileIOHelper.WriteListToCSVFile(errorDetectionRedirectPagesList, new ErrorDetectionRedirectPageReportMap(), FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(jobTarget)); + + stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + errorDetectionRulesList.Count + errorDetectionIgnoreMessagesList.Count + errorDetectionIgnoreLoggersList.Count + errorDetectionLoggersList.Count + errorDetectionHTTPCodesList.Count + errorDetectionRedirectPagesList.Count; + #endregion #region Application Settings @@ -1040,6 +1469,30 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job { FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMDeveloperModeNodesReportFilePath(), FilePathMap.APMDeveloperModeNodesIndexFilePath(jobTarget)); } + if (File.Exists(FilePathMap.APMErrorDetectionRulesIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionRulesIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionRulesReportFilePath(), FilePathMap.APMErrorDetectionRulesIndexFilePath(jobTarget)); + } + if (File.Exists(FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionIgnoreMessagesReportFilePath(), FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(jobTarget)); + } + if (File.Exists(FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionIgnoreLoggersReportFilePath(), FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(jobTarget)); + } + if (File.Exists(FilePathMap.APMErrorDetectionLoggersIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionLoggersIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionLoggersReportFilePath(), FilePathMap.APMErrorDetectionLoggersIndexFilePath(jobTarget)); + } + if (File.Exists(FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionHTTPCodesReportFilePath(), FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(jobTarget)); + } + if (File.Exists(FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(jobTarget)) == true && new FileInfo(FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(jobTarget)).Length > 0) + { + FileIOHelper.AppendTwoCSVFiles(FilePathMap.APMErrorDetectionRedirectPagesReportFilePath(), FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(jobTarget)); + } #endregion } @@ -1137,7 +1590,6 @@ private static string getNameValueDetailsFromParametersCollection(XmlNode xmlNod return sb.ToString(); } - private static BusinessTransactionDiscoveryRule fillBusinessTransactionDiscoveryRule(XmlNode entryMatchPointConfigurationNode, XmlNode entryMatchPointTransactionConfigurationNode, APMApplicationConfiguration applicationConfiguration, XmlNode applicationComponentNode) { BusinessTransactionDiscoveryRule businessTransactionDiscoveryRule = new BusinessTransactionDiscoveryRule(); @@ -1954,6 +2406,161 @@ private static AgentCallGraphSetting fillAgentCallGraphSetting(XmlNode agentCall return agentCallGraphSetting; } + private static ErrorDetectionRule fillErrorDetectionRule(APMApplicationConfiguration applicationConfiguration, string agentType, string ruleName, string ruleValue) + { + ErrorDetectionRule errorDetectionRule = new ErrorDetectionRule(); + + errorDetectionRule.Controller = applicationConfiguration.Controller; + errorDetectionRule.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionRule.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionRule.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionRule.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionRule.AgentType = agentType; + errorDetectionRule.RuleName = ruleName; + errorDetectionRule.RuleValue = ruleValue; + + return errorDetectionRule; + } + + private static ErrorDetectionIgnoreMessage fillErrorDetectionIgnoreException(APMApplicationConfiguration applicationConfiguration, string agentType, string exceptionClass, JObject messageMatchObject) + { + ErrorDetectionIgnoreMessage errorDetectionIgnoreException = new ErrorDetectionIgnoreMessage(); + + errorDetectionIgnoreException.Controller = applicationConfiguration.Controller; + errorDetectionIgnoreException.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionIgnoreException.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionIgnoreException.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionIgnoreException.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionIgnoreException.AgentType = agentType; + errorDetectionIgnoreException.ExceptionClass = exceptionClass; + errorDetectionIgnoreException.MatchType = getStringValueFromJToken(messageMatchObject, "matchType"); + if (getBoolValueFromJToken(messageMatchObject, "inverse") == true) + { + errorDetectionIgnoreException.MatchType = String.Format("NOT {0}", errorDetectionIgnoreException.MatchType); + } + switch (errorDetectionIgnoreException.MatchType) + { + case "INLIST": + errorDetectionIgnoreException.MessagePattern = getStringValueOfObjectFromJToken(messageMatchObject, "inList", true); + + break; + + default: + errorDetectionIgnoreException.MessagePattern = getStringValueFromJToken(messageMatchObject, "matchPattern"); + + break; + } + + return errorDetectionIgnoreException; + } + + private static ErrorDetectionIgnoreLogger fillErrorDetectionIgnoreLogger(APMApplicationConfiguration applicationConfiguration, string agentType, string loggerName) + { + ErrorDetectionIgnoreLogger errorDetectionIgnoreLogger = new ErrorDetectionIgnoreLogger(); + + errorDetectionIgnoreLogger.Controller = applicationConfiguration.Controller; + errorDetectionIgnoreLogger.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionIgnoreLogger.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionIgnoreLogger.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionIgnoreLogger.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionIgnoreLogger.AgentType = agentType; + errorDetectionIgnoreLogger.LoggerName = loggerName; + + return errorDetectionIgnoreLogger; + } + + private static ErrorDetectionLogger fillErrorDetectionLogger(APMApplicationConfiguration applicationConfiguration, string agentType, JObject loggerObject) + { + ErrorDetectionLogger errorDetectionLogger = new ErrorDetectionLogger(); + + errorDetectionLogger.Controller = applicationConfiguration.Controller; + errorDetectionLogger.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionLogger.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionLogger.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionLogger.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionLogger.AgentType = agentType; + errorDetectionLogger.LoggerName = getStringValueFromJToken(loggerObject, "name"); + errorDetectionLogger.IsEnabled = !getBoolValueFromJToken(loggerObject, "disable"); + + errorDetectionLogger.ExceptionParam = getIntValueFromJToken(loggerObject, "methodParamExceptionIndex"); + errorDetectionLogger.MessageParam = getIntValueFromJToken(loggerObject, "methodParamMessageIndex"); + + if (isTokenPropertyNull(loggerObject, "definition") == false) + { + errorDetectionLogger.MatchClass = getStringValueFromJToken(loggerObject["definition"], "className"); + errorDetectionLogger.MatchMethod = getStringValueFromJToken(loggerObject["definition"], "methodName"); + errorDetectionLogger.MatchType = getStringValueFromJToken(loggerObject["definition"], "matchType"); + errorDetectionLogger.MatchParameterTypes = getStringValueOfObjectFromJToken(loggerObject["definition"], "methodParameterTypes", true); + } + + return errorDetectionLogger; + } + + private static ErrorDetectionHTTPCode fillErrorDetectionHTTPCode(APMApplicationConfiguration applicationConfiguration, string agentType, JObject loggerObject) + { + ErrorDetectionHTTPCode errorDetectionHTTPCode = new ErrorDetectionHTTPCode(); + + errorDetectionHTTPCode.Controller = applicationConfiguration.Controller; + errorDetectionHTTPCode.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionHTTPCode.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionHTTPCode.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionHTTPCode.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionHTTPCode.AgentType = agentType; + errorDetectionHTTPCode.RangeName = getStringValueFromJToken(loggerObject, "name"); + errorDetectionHTTPCode.IsEnabled = !getBoolValueFromJToken(loggerObject, "disable"); + errorDetectionHTTPCode.CaptureURL = !getBoolValueFromJToken(loggerObject, "captureURL"); + + errorDetectionHTTPCode.CodeFrom = getIntValueFromJToken(loggerObject, "lowerBound"); + errorDetectionHTTPCode.CodeTo = getIntValueFromJToken(loggerObject, "upperBound"); + + return errorDetectionHTTPCode; + } + + private static ErrorDetectionRedirectPage fillErrorDetectionRedirectPage(APMApplicationConfiguration applicationConfiguration, string agentType, JObject errorRedirectPageObject) + { + ErrorDetectionRedirectPage errorDetectionRedirectPage = new ErrorDetectionRedirectPage(); + + errorDetectionRedirectPage.Controller = applicationConfiguration.Controller; + errorDetectionRedirectPage.ControllerLink = applicationConfiguration.ControllerLink; + errorDetectionRedirectPage.ApplicationName = applicationConfiguration.ApplicationName; + errorDetectionRedirectPage.ApplicationID = applicationConfiguration.ApplicationID; + errorDetectionRedirectPage.ApplicationLink = applicationConfiguration.ApplicationLink; + + errorDetectionRedirectPage.AgentType = agentType; + errorDetectionRedirectPage.PageName = getStringValueFromJToken(errorRedirectPageObject, "name"); + errorDetectionRedirectPage.IsEnabled = !getBoolValueFromJToken(errorRedirectPageObject, "disable"); + + if (isTokenPropertyNull(errorRedirectPageObject, "match") == false) + { + errorDetectionRedirectPage.MatchType = getStringValueFromJToken(errorRedirectPageObject["match"], "matchType"); + errorDetectionRedirectPage.MatchPattern = getStringValueFromJToken(errorRedirectPageObject["match"], "matchPattern"); + if (getBoolValueFromJToken(errorRedirectPageObject["match"], "inverse") == true) + { + errorDetectionRedirectPage.MatchType = String.Format("NOT {0}", errorDetectionRedirectPage.MatchType); + } + + switch (errorDetectionRedirectPage.MatchType) + { + case "INLIST": + errorDetectionRedirectPage.MatchPattern = getStringValueOfObjectFromJToken(errorRedirectPageObject["match"], "inList", true); + + break; + + default: + errorDetectionRedirectPage.MatchPattern = getStringValueFromJToken(errorRedirectPageObject["match"], "matchPattern"); + + break; + } + } + + return errorDetectionRedirectPage; + } + private static void fillMatchRuleDetails(BusinessTransactionEntryRule businessTransactionEntryRule, XmlNode matchRule) { // Enabled seems to be set inside of the match-rule, not couple of levels up diff --git a/ProcessingSteps/Index/IndexAPMEntities.cs b/ProcessingSteps/Index/IndexAPMEntities.cs index 9d740ae..e942ac8 100644 --- a/ProcessingSteps/Index/IndexAPMEntities.cs +++ b/ProcessingSteps/Index/IndexAPMEntities.cs @@ -207,7 +207,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job if (optionValueAdjusted.Length > 0) { - string[] optionValueAdjustedTokens = optionValueAdjusted.Split(new char[] { '=' , ':'}); + string[] optionValueAdjustedTokens = optionValueAdjusted.Split(new char[] { '=', ':' }); if (optionValueAdjustedTokens.Length > 0) { nodePropertyRow.PropName = optionValueAdjustedTokens[0]; @@ -400,7 +400,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job additionalInfoLookupSucceeded = true; } } - } catch { } + } + catch { } if (additionalInfoLookupSucceeded == false) { @@ -413,7 +414,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job backend.BackendType = betterBackendType; additionalInfoLookupSucceeded = true; } - } catch { } + } + catch { } } } } @@ -902,7 +904,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job foreach (AppDRESTTier tierREST in tiersRESTList) { - APMTier tier = tiersList.Where(t => t.TierID == tierREST.id).FirstOrDefault(); + APMTier tier = tiersList.Where(t => t.TierID == tierREST.id).FirstOrDefault(); if (tier != null) { diff --git a/ProcessingSteps/Index/IndexAPMMetrics.cs b/ProcessingSteps/Index/IndexAPMMetrics.cs index 7ddcf8a..7c936d1 100644 --- a/ProcessingSteps/Index/IndexAPMMetrics.cs +++ b/ProcessingSteps/Index/IndexAPMMetrics.cs @@ -923,7 +923,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job { case APMApplication.ENTITY_TYPE: FileIOHelper.AppendTwoCSVFiles( - FilePathMap.MetricReportFilePath(APMApplication.ENTITY_FOLDER, metricExtractMapping.FolderName), + FilePathMap.MetricReportFilePath(APMApplication.ENTITY_FOLDER, metricExtractMapping.FolderName), FilePathMap.MetricValuesIndexFilePath(jobTarget, APMApplication.ENTITY_FOLDER, metricExtractMapping.FolderName)); break; diff --git a/ProcessingSteps/Index/IndexAPMSnapshots.cs b/ProcessingSteps/Index/IndexAPMSnapshots.cs index 14e3ca8..94068db 100644 --- a/ProcessingSteps/Index/IndexAPMSnapshots.cs +++ b/ProcessingSteps/Index/IndexAPMSnapshots.cs @@ -147,7 +147,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job loggerConsole.Info("Index Snapshots"); int totalNumberOfSnapshots = 0; - + // Process each hour at a time foreach (JobTimeRange jobTimeRange in jobConfiguration.Input.HourlyTimeRanges) { @@ -257,7 +257,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job j += listOfBTSnapshotsInHour.Count; // Save results for this BT for all the Snapshots - if (indexedSnapshotsResults != null && indexedSnapshotsResults.Snapshots.Count > 0) + if (indexedSnapshotsResults != null && indexedSnapshotsResults.Snapshots.Count > 0) { // Sort things prettily indexedSnapshotsResults.Snapshots = indexedSnapshotsResults.Snapshots.OrderBy(s => s.Occurred).ThenBy(s => s.UserExperience).ToList(); @@ -554,7 +554,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job foreach (APMNode node in nodesList) { if (node.TierID == businessTransaction.TierID) - { + { // Flame graph if (foldedCallStacksNodesList.ContainsKey(node.NodeID) == false) foldedCallStacksNodesList[node.NodeID] = new Dictionary(50); if (File.Exists(FilePathMap.SnapshotsFoldedCallStacksIndexBusinessTransactionNodeHourRangeFilePath(jobTarget, businessTransaction, node, jobTimeRange)) == true) @@ -751,7 +751,7 @@ private IndexedSnapshotsResults indexSnapshots( Dictionary serviceEndpointsDictionary, Dictionary errorsDictionary, List methodInvocationDataCollectorsList, - Dictionary> methodCallLineClassToFrameworkTypeMappingDictionary, + Dictionary> methodCallLineClassToFrameworkTypeMappingDictionary, bool progressToConsole) { int j = 0; @@ -2829,9 +2829,9 @@ private List convertCallGraphChildren_Stack( // Populate current method call class, methods and types methodCallLine.Type = getStringValueFromJToken(methodCallLineJSON, "type"); - methodCallLine.PrettyName = getStringValueFromJToken(methodCallLineJSON, "name"); - methodCallLine.Class = getStringValueFromJToken(methodCallLineJSON, "className"); - methodCallLine.Method = getStringValueFromJToken(methodCallLineJSON, "methodName"); + methodCallLine.PrettyName = getStringValueFromJToken(methodCallLineJSON, "name"); + methodCallLine.Class = getStringValueFromJToken(methodCallLineJSON, "className"); + methodCallLine.Method = getStringValueFromJToken(methodCallLineJSON, "methodName"); methodCallLine.LineNumber = getIntValueFromJToken(methodCallLineJSON, "lineNumber"); if (methodCallLine.Type == "JS") { diff --git a/ProcessingSteps/Index/IndexApplicationConfigurationDifferences.cs b/ProcessingSteps/Index/IndexApplicationConfigurationDifferences.cs index 60ce750..6c57292 100644 --- a/ProcessingSteps/Index/IndexApplicationConfigurationDifferences.cs +++ b/ProcessingSteps/Index/IndexApplicationConfigurationDifferences.cs @@ -68,7 +68,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job jobConfiguration.Input.ConfigurationComparisonReferenceAPM.ApplicationID = jobTargetReferenceApp.ApplicationID; } } - + // Check to see if the reference application is the template or specific application, and add one of them to the if (jobConfiguration.Input.ConfigurationComparisonReferenceWEB.Controller == BLANK_APPLICATION_CONTROLLER && jobConfiguration.Input.ConfigurationComparisonReferenceWEB.Application == BLANK_APPLICATION_WEB) @@ -382,7 +382,43 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, agentCallGraphSettingCollectorsListReference, agentCallGraphSettingCollectorsListDifference)); - #endregion + #endregion + + #region Error Detection Settings + + loggerConsole.Info("Error Detection Settings"); + + List errorDetectionRulesListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionRulesIndexFilePath(referenceTarget), new ErrorDetectionRuleReportMap()); + List errorDetectionRulesListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionRulesIndexFilePath(jobTarget), new ErrorDetectionRuleReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionRulesListReference, errorDetectionRulesListDifference)); + + List errorDetectionIgnoreMessagesListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(referenceTarget), new ErrorDetectionIgnoreMessageReportMap()); + List errorDetectionIgnoreMessagesListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionIgnoreMessagesIndexFilePath(jobTarget), new ErrorDetectionIgnoreMessageReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionIgnoreMessagesListReference, errorDetectionIgnoreMessagesListDifference)); + + List errorDetectionIgnoreLoggersListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(referenceTarget), new ErrorDetectionIgnoreLoggerReportMap()); + List errorDetectionIgnoreLoggersListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionIgnoreLoggersIndexFilePath(jobTarget), new ErrorDetectionIgnoreLoggerReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionIgnoreLoggersListReference, errorDetectionIgnoreLoggersListDifference)); + + List errorDetectionLoggersListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionLoggersIndexFilePath(referenceTarget), new ErrorDetectionLoggerReportMap()); + List errorDetectionLoggersListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionLoggersIndexFilePath(jobTarget), new ErrorDetectionLoggerReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionLoggersListReference, errorDetectionLoggersListDifference)); + + List errorDetectionHTTPCodesListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(referenceTarget), new ErrorDetectionHTTPCodeReportMap()); + List errorDetectionHTTPCodesListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionHTTPCodesIndexFilePath(jobTarget), new ErrorDetectionHTTPCodeReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionHTTPCodesListReference, errorDetectionHTTPCodesListDifference)); + + List errorDetectionRedirectPagesListReference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(referenceTarget), new ErrorDetectionRedirectPageReportMap()); + List errorDetectionRedirectPagesListDifference = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMErrorDetectionRedirectPagesIndexFilePath(jobTarget), new ErrorDetectionRedirectPageReportMap()); + + configurationDifferencesList.AddRange(compareListOfEntities(referenceTarget, jobTarget, errorDetectionRedirectPagesListReference, errorDetectionRedirectPagesListDifference)); + + #endregion #endregion @@ -551,7 +587,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job break; - default: + default: logger.Warn("Comparing type unsupported for target {0}, skipping", jobTarget); loggerConsole.Warn("Comparing type unsupported for target {0}, skipping", jobTarget); @@ -709,7 +745,7 @@ public override bool ShouldExecute(JobConfiguration jobConfiguration) private List compareListOfEntities( JobTarget jobTargetReference, JobTarget jobTargetDifference, - List configEntitiesListReference, + List configEntitiesListReference, List configEntitiesListDifference) where T : ConfigurationEntityBase { List configurationDifferencesList = new List(256); @@ -1032,9 +1068,9 @@ private List compareTwoEntitiesJSONProperty( // Check for success in parsing object from string if (propValueReference == null && propValueDifference == null) - { - return configurationDifferencesList; - } + { + return configurationDifferencesList; + } else if (propValueReference != null && propValueDifference == null) { ConfigurationDifference configDifference = fillConfigurationDifference( diff --git a/ProcessingSteps/Index/IndexApplicationHealthRulesAlertsPolicies.cs b/ProcessingSteps/Index/IndexApplicationHealthRulesAlertsPolicies.cs index c29caca..a7c449a 100644 --- a/ProcessingSteps/Index/IndexApplicationHealthRulesAlertsPolicies.cs +++ b/ProcessingSteps/Index/IndexApplicationHealthRulesAlertsPolicies.cs @@ -381,7 +381,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job break; - + default: break; } diff --git a/ProcessingSteps/Index/IndexBIQEntities.cs b/ProcessingSteps/Index/IndexBIQEntities.cs index bc3fd8a..0918146 100644 --- a/ProcessingSteps/Index/IndexBIQEntities.cs +++ b/ProcessingSteps/Index/IndexBIQEntities.cs @@ -156,7 +156,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job widget.SearchLink = search.SearchLink; widget.InternalName = getStringValueFromJToken(searchWidget, "name"); - widget.WidgetID= getLongValueFromJToken(searchWidget, "id"); + widget.WidgetID = getLongValueFromJToken(searchWidget, "id"); if (isTokenPropertyNull(searchWidget, "adqlQueries") == false) { @@ -471,7 +471,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job experienceLevelsList = experienceLevelsList.OrderBy(o => o.ExperienceLevelName).ToList(); FileIOHelper.WriteListToCSVFile(experienceLevelsList, new BIQExperienceLevelReportMap(), FilePathMap.BIQExperienceLevelsIndexFilePath(jobTarget)); - stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + businessJourneysList.Count; + stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + experienceLevelsList.Count; } } diff --git a/ProcessingSteps/Index/IndexControllerAuditEventsAndNotifications.cs b/ProcessingSteps/Index/IndexControllerAuditEventsAndNotifications.cs index ed1a6d3..4087e01 100644 --- a/ProcessingSteps/Index/IndexControllerAuditEventsAndNotifications.cs +++ b/ProcessingSteps/Index/IndexControllerAuditEventsAndNotifications.cs @@ -26,7 +26,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job stepTimingFunction.NumEntities = jobConfiguration.Target.Count; this.DisplayJobStepStartingStatus(jobConfiguration); - + FilePathMap = new FilePathMap(programOptions, jobConfiguration); try @@ -94,7 +94,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job @event.EventID = getLongValueFromJToken(interestingEvent, "id"); @event.OccurredUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(interestingEvent["notificationData"], "time")); - try { @event.Occurred = @event.OccurredUtc.ToLocalTime();} catch { } + try { @event.Occurred = @event.OccurredUtc.ToLocalTime(); } catch { } @event.Type = getStringValueFromJToken(interestingEvent["notificationData"], "eventType"); @event.Severity = getStringValueFromJToken(interestingEvent["notificationData"], "severity"); diff --git a/ProcessingSteps/Index/IndexControllerConfiguration.cs b/ProcessingSteps/Index/IndexControllerConfiguration.cs index 82bba6a..4267518 100644 --- a/ProcessingSteps/Index/IndexControllerConfiguration.cs +++ b/ProcessingSteps/Index/IndexControllerConfiguration.cs @@ -161,7 +161,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job List emailTemplatesList = new List(); JArray emailTemplatesArray = FileIOHelper.LoadJArrayFromFile(FilePathMap.EmailTemplatesDataFilePath(jobTarget)); - JArray emailTemplatesDetailArray = FileIOHelper.LoadJArrayFromFile(FilePathMap.EmailTemplatesDetailDataFilePath(jobTarget)); + JArray emailTemplatesDetailArray = FileIOHelper.LoadJArrayFromFile(FilePathMap.EmailTemplatesDetailDataFilePath(jobTarget)); if (emailTemplatesArray != null) { foreach (JObject emailTemplateObject in emailTemplatesArray) @@ -175,10 +175,12 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job emailAlertTemplate.OneEmailPerEvent = getBoolValueFromJToken(emailTemplateObject, "oneEmailPerEvent"); emailAlertTemplate.EventLimit = getLongValueFromJToken(emailTemplateObject, "eventClampLimit"); - try { + try + { string[] emails = emailTemplateObject["toRecipients"].Select(s => getStringValueFromJToken(s, "value")).ToArray(); emailAlertTemplate.To = String.Join(";", emails); - } catch { } + } + catch { } try { string[] emails = emailTemplateObject["ccRecipients"].Select(s => getStringValueFromJToken(s, "value")).ToArray(); @@ -211,7 +213,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } catch { } emailAlertTemplate.TestLogLevel = getStringValueFromJToken(emailTemplateObject, "testLogLevel"); - + emailAlertTemplate.Headers = getStringValueOfObjectFromJToken(emailTemplateObject, "headers", true); emailAlertTemplate.Subject = getStringValueFromJToken(emailTemplateObject, "subject"); emailAlertTemplate.TextBody = getStringValueFromJToken(emailTemplateObject, "textBody"); diff --git a/ProcessingSteps/Index/IndexControllerUsersGroupsRolesAndPermissions.cs b/ProcessingSteps/Index/IndexControllerUsersGroupsRolesAndPermissions.cs index 6aeb6d3..34ae340 100644 --- a/ProcessingSteps/Index/IndexControllerUsersGroupsRolesAndPermissions.cs +++ b/ProcessingSteps/Index/IndexControllerUsersGroupsRolesAndPermissions.cs @@ -38,7 +38,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job bool reportFolderCleaned = false; // Process each Controller once - int i = 0; + int i = 0; var controllers = jobConfiguration.Target.GroupBy(t => t.Controller); foreach (var controllerGroup in controllers) { @@ -499,8 +499,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job bool parsedBool = false; Boolean.TryParse(requireStrongPasswords, out parsedBool); controller.IsStrongPasswords = parsedBool; - } - + } + if (usersList != null) controller.NumUsers = usersList.Count; if (groupsList != null) controller.NumGroups = groupsList.Count; if (rolesList != null) controller.NumRoles = rolesList.Count; diff --git a/ProcessingSteps/Index/IndexControllerVersionAndApplications.cs b/ProcessingSteps/Index/IndexControllerVersionAndApplications.cs index 80b4992..7a4271a 100644 --- a/ProcessingSteps/Index/IndexControllerVersionAndApplications.cs +++ b/ProcessingSteps/Index/IndexControllerVersionAndApplications.cs @@ -113,7 +113,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job JArray mobileApplicationsArray = FileIOHelper.LoadJArrayFromFile(FilePathMap.MOBILEApplicationsDataFilePath(jobTarget)); List controllerApplicationsList = new List(100); - + if (isTokenPropertyNull(allApplicationsContainerObject, "apmApplications") == false) { loggerConsole.Info("Index List of APM Applications"); @@ -182,7 +182,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job { controllerApplicationsList.Add(controllerApplication); } - + // Now go through children if (mobileApplicationsArray != null) { diff --git a/ProcessingSteps/Index/IndexDBEntities.cs b/ProcessingSteps/Index/IndexDBEntities.cs index 9ca67dd..100e2fd 100644 --- a/ProcessingSteps/Index/IndexDBEntities.cs +++ b/ProcessingSteps/Index/IndexDBEntities.cs @@ -125,7 +125,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job // Performance data dbCollector.Calls = getLongValueFromJToken(dbCollectorToken["rolledUpMetricDatas"], "DB|KPI|Calls per Minute"); - + try { JToken dbCollectorDefinitionWithTimeREST = dbCollectorsTimeSpentArray.Where(t => (long)t["id"] == (long)dbCollectorToken["id"]).FirstOrDefault(); @@ -296,7 +296,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dbQuery.UserName = dbCollectorThis.UserName; dbQuery.Calls = getLongValueFromJToken(dbQueryToken, "hits"); - try {dbQuery.ExecTime = Convert.ToInt64((Decimal)dbQueryToken["duration"]); } catch { } + try { dbQuery.ExecTime = Convert.ToInt64((Decimal)dbQueryToken["duration"]); } catch { } dbQuery.ExecTimeSpan = new TimeSpan(dbQuery.ExecTime * TimeSpan.TicksPerMillisecond); dbQuery.AvgExecTime = 0; if (dbQuery.Calls != 0) dbQuery.AvgExecTime = dbQuery.ExecTime / dbQuery.Calls; @@ -526,7 +526,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dbBlockingSession.BlockTime = getLongValueFromJToken(dbBlockedQueryDetail, "duration"); dbBlockingSession.BlockTimeSpan = new TimeSpan(dbBlockingSession.BlockTime * TimeSpan.TicksPerMillisecond); dbBlockingSession.FirstOccurrenceUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(dbBlockedQueryDetail, "timeStamp")); - try {dbBlockingSession.FirstOccurrence = dbBlockingSession.FirstOccurrenceUtc.ToLocalTime(); } catch { } + try { dbBlockingSession.FirstOccurrence = dbBlockingSession.FirstOccurrenceUtc.ToLocalTime(); } catch { } dbBlockingSession.Duration = differenceInMinutes; dbBlockingSession.From = jobConfiguration.Input.TimeRange.From.ToLocalTime(); @@ -580,7 +580,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dbDatabase.UserName = dbCollectorThis.UserName; try { dbDatabase.ExecTime = Convert.ToInt64((Decimal)dbDatabaseToken["duration"]); } catch { } - dbDatabase.ExecTimeSpan = new TimeSpan(dbDatabase.ExecTime * TimeSpan.TicksPerMillisecond); + dbDatabase.ExecTimeSpan = new TimeSpan(dbDatabase.ExecTime * TimeSpan.TicksPerMillisecond); try { dbDatabase.Weight = Math.Round((Decimal)dbDatabaseToken["weight"], 2); } catch { } dbDatabase.DatabaseName = getStringValueFromJToken(dbDatabaseToken, "name"); @@ -814,8 +814,8 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dbBusinessTransaction.Calls = getLongValueFromJToken(dbBusinessTransactionToken, "hits"); try { dbBusinessTransaction.ExecTime = Convert.ToInt64((Decimal)dbBusinessTransactionToken["duration"]); } catch { } - dbBusinessTransaction.ExecTimeSpan = new TimeSpan(dbBusinessTransaction.ExecTime * TimeSpan.TicksPerMillisecond); - if (dbBusinessTransaction.Calls != 0) dbBusinessTransaction.AvgExecTime = dbBusinessTransaction.ExecTime / dbBusinessTransaction.Calls; + dbBusinessTransaction.ExecTimeSpan = new TimeSpan(dbBusinessTransaction.ExecTime * TimeSpan.TicksPerMillisecond); + if (dbBusinessTransaction.Calls != 0) dbBusinessTransaction.AvgExecTime = dbBusinessTransaction.ExecTime / dbBusinessTransaction.Calls; dbBusinessTransaction.AvgExecRange = getDurationRangeAsString(dbBusinessTransaction.AvgExecTime); @@ -927,7 +927,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } // Let's append all Applications - var controllers = jobConfiguration.Target.Where(t=> t.Type == APPLICATION_TYPE_DB).GroupBy(t => t.Controller); + var controllers = jobConfiguration.Target.Where(t => t.Type == APPLICATION_TYPE_DB).GroupBy(t => t.Controller); foreach (var controllerGroup in controllers) { if (File.Exists(FilePathMap.DBCollectorsIndexFilePath(controllerGroup.ToList()[0])) == true && new FileInfo(FilePathMap.DBCollectorsIndexFilePath(controllerGroup.ToList()[0])).Length > 0) diff --git a/ProcessingSteps/Index/IndexDashboards.cs b/ProcessingSteps/Index/IndexDashboards.cs index d587ffc..80b0d22 100644 --- a/ProcessingSteps/Index/IndexDashboards.cs +++ b/ProcessingSteps/Index/IndexDashboards.cs @@ -88,7 +88,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dashboard.TemplateEntityType = getStringValueFromJToken(dashboardObject, "templateEntityType"); dashboard.SecurityToken = getStringValueFromJToken(dashboardObject, "securityToken"); if (dashboard.SecurityToken.Length > 0) dashboard.IsShared = true; - dashboard.IsSharingRevoked= getBoolValueFromJToken(dashboardObject, "sharingRevoked"); + dashboard.IsSharingRevoked = getBoolValueFromJToken(dashboardObject, "sharingRevoked"); dashboard.IsTemplate = getBoolValueFromJToken(dashboardObject, "template"); dashboard.Height = getIntValueFromJToken(dashboardObject, "height"); @@ -102,7 +102,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job dashboard.StartTimeUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(dashboardObject, "startTime")); try { dashboard.StartTime = dashboard.StartTimeUtc.ToLocalTime(); } catch { } dashboard.EndTimeUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(dashboardObject, "endTime")); - try { dashboard.EndTime = dashboard.EndTimeUtc.ToLocalTime();} catch { } + try { dashboard.EndTime = dashboard.EndTimeUtc.ToLocalTime(); } catch { } dashboard.CreatedBy = getStringValueFromJToken(dashboardObject, "createdBy"); dashboard.CreatedOnUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(dashboardObject, "createdOn")); @@ -448,7 +448,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } else { - if (isTokenPropertyNull(dashboardDetailObject, "success") == false && + if (isTokenPropertyNull(dashboardDetailObject, "success") == false && getBoolValueFromJToken(dashboardDetailObject, "success") == false) { dashboard.NumWidgets = -1; diff --git a/ProcessingSteps/Index/IndexLicenses.cs b/ProcessingSteps/Index/IndexLicenses.cs index 8daa59f..c6c4ec5 100644 --- a/ProcessingSteps/Index/IndexLicenses.cs +++ b/ProcessingSteps/Index/IndexLicenses.cs @@ -2,12 +2,10 @@ using AppDynamics.Dexter.ReportObjects; using Newtonsoft.Json.Linq; using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using System.Text; using System.Threading; namespace AppDynamics.Dexter.ProcessingSteps @@ -240,7 +238,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job licenseValue.AgentType = license.AgentType; licenseValue.RuleName = "Account"; - + licenseValue.LicenseEventTimeUtc = UnixTimeHelper.ConvertFromUnixTimestamp(getLongValueFromJToken(licenseUsageObject, "createdOn")); licenseValue.LicenseEventTime = licenseValue.LicenseEventTimeUtc.ToLocalTime(); diff --git a/ProcessingSteps/Index/IndexMOBILEEntities.cs b/ProcessingSteps/Index/IndexMOBILEEntities.cs index e0f21b6..2004ed7 100644 --- a/ProcessingSteps/Index/IndexMOBILEEntities.cs +++ b/ProcessingSteps/Index/IndexMOBILEEntities.cs @@ -341,7 +341,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } // Has Activity - if (networkRequestToBT.ART == 0 && + if (networkRequestToBT.ART == 0 && networkRequestToBT.CPM == 0 && networkRequestToBT.Calls == 0) { networkRequestToBT.HasActivity = false; diff --git a/ProcessingSteps/Index/IndexSIMEntities.cs b/ProcessingSteps/Index/IndexSIMEntities.cs index 7219d2c..ea1ee6a 100644 --- a/ProcessingSteps/Index/IndexSIMEntities.cs +++ b/ProcessingSteps/Index/IndexSIMEntities.cs @@ -229,9 +229,9 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job JToken agentRegistrationRequestConfigToken = machineObject["agentConfig"]["rawConfig"]["_agentRegistrationRequestConfig"]; machine.MachineInfo = getStringValueFromJToken(agentRegistrationRequestConfigToken, "machineInfo"); - machine.JVMInfo = getStringValueFromJToken(agentRegistrationRequestConfigToken, "jvmInfo"); - machine.InstallDirectory = getStringValueFromJToken(agentRegistrationRequestConfigToken, "installDirectory"); - machine.AgentVersionRaw = getStringValueFromJToken(agentRegistrationRequestConfigToken, "agentVersion"); + machine.JVMInfo = getStringValueFromJToken(agentRegistrationRequestConfigToken, "jvmInfo"); + machine.InstallDirectory = getStringValueFromJToken(agentRegistrationRequestConfigToken, "installDirectory"); + machine.AgentVersionRaw = getStringValueFromJToken(agentRegistrationRequestConfigToken, "agentVersion"); if (machine.AgentVersionRaw != String.Empty) { // Machine agent looks like that @@ -256,7 +256,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } } } - machine.AutoRegisterAgent = getBoolValueFromJToken(agentRegistrationRequestConfigToken, "autoRegisterAgent"); + machine.AutoRegisterAgent = getBoolValueFromJToken(agentRegistrationRequestConfigToken, "autoRegisterAgent"); machine.AgentType = getStringValueFromJToken(agentRegistrationRequestConfigToken, "agentType"); try { @@ -277,7 +277,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job } } catch { } - machine.APMTierName = agentRegistrationRequestConfigToken["tierName"].ToString(); + machine.APMTierName = agentRegistrationRequestConfigToken["tierName"].ToString(); machine.APMNodeName = agentRegistrationRequestConfigToken["nodeName"].ToString(); } @@ -467,11 +467,11 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job // This worked in 4.4.1, the format is // { - // "containerId": "e25bf24eb981bd10d0ef22b78b4b4a73b4cc242813371c43849635c77b3be95f", - // "containerName": "settlementServices", - // "imageName": "fin-java-services", - // "containerSimMachineId": 224 - // } + // "containerId": "e25bf24eb981bd10d0ef22b78b4b4a73b4cc242813371c43849635c77b3be95f", + // "containerName": "settlementServices", + // "imageName": "fin-java-services", + // "containerSimMachineId": 224 + // } machineContainer.ContainerID = getStringValueFromJToken(containerObject, "containerId"); machineContainer.ContainerName = getStringValueFromJToken(containerObject, "containerName"); machineContainer.ImageName = getStringValueFromJToken(containerObject, "imageName"); @@ -737,7 +737,7 @@ private void updateEntityWithDeeplinks(SIMEntityBase entityRow, JobTimeRange job } // Determine what kind of entity we are dealing with and adjust accordingly - if (entityRow is WEBApplication) + if (entityRow is SIMApplication) { entityRow.ControllerLink = String.Format(DEEPLINK_CONTROLLER, entityRow.Controller, DEEPLINK_THIS_TIMERANGE); entityRow.ApplicationLink = String.Format(DEEPLINK_SIM_APPLICATION, entityRow.Controller, DEEPLINK_THIS_TIMERANGE); diff --git a/ProcessingSteps/Index/IndexWEBConfiguration.cs b/ProcessingSteps/Index/IndexWEBConfiguration.cs index 7285c7c..a35395a 100644 --- a/ProcessingSteps/Index/IndexWEBConfiguration.cs +++ b/ProcessingSteps/Index/IndexWEBConfiguration.cs @@ -182,7 +182,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job applicationConfiguration.StallThresholdType = getStringValueFromJToken(pageSettingsObject["thresholds"]["stallThreshold"], "type"); applicationConfiguration.StallThreshold = getIntValueFromJToken(pageSettingsObject["thresholds"]["stallThreshold"], "value"); } - applicationConfiguration.Percentiles= getStringValueOfObjectFromJToken(pageSettingsObject, "percentileMetrics", true); + applicationConfiguration.Percentiles = getStringValueOfObjectFromJToken(pageSettingsObject, "percentileMetrics", true); applicationConfiguration.SessionTimeout = getIntValueFromJToken(pageSettingsObject["sessionsMonitor"], "sessionTimeoutMins"); applicationConfiguration.IsIPDisplayed = getBoolValueFromJToken(pageSettingsObject, "ipAddressDisplayed"); @@ -194,7 +194,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job #endregion #region Rules of all kinds - + loggerConsole.Info("Page and AJAX Request Rules"); #region Page Rules diff --git a/ProcessingSteps/Index/IndexWEBEntities.cs b/ProcessingSteps/Index/IndexWEBEntities.cs index 72f1545..f24eb1d 100644 --- a/ProcessingSteps/Index/IndexWEBEntities.cs +++ b/ProcessingSteps/Index/IndexWEBEntities.cs @@ -81,7 +81,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job List webPageToBTsList = null; List webPageToWebPagesList = null; - JObject webPagesContainerObject = FileIOHelper.LoadJObjectFromFile(FilePathMap.WEBPagesDataFilePath(jobTarget)); + JObject webPagesContainerObject = FileIOHelper.LoadJObjectFromFile(FilePathMap.WEBPagesDataFilePath(jobTarget)); if (isTokenPropertyNull(webPagesContainerObject, "data") == false) { JArray webPagesArray = (JArray)webPagesContainerObject["data"]; diff --git a/ProcessingSteps/JobStepBase.cs b/ProcessingSteps/JobStepBase.cs index be71307..e4132f4 100644 --- a/ProcessingSteps/JobStepBase.cs +++ b/ProcessingSteps/JobStepBase.cs @@ -9,7 +9,7 @@ namespace AppDynamics.Dexter.ProcessingSteps { - public class JobStepBase + public class JobStepBase { #region Constants for metric retrieval and mapping @@ -281,7 +281,7 @@ internal List getMetricsExtractMappingList(JobConfiguratio internal Dictionary> populateMethodCallMappingDictionary(string methodCallLinesToFrameworkTypeMappingFilePath) { - List methodCallLineClassToFrameworkTypeMappingList = FileIOHelper.ReadListFromCSVFile(methodCallLinesToFrameworkTypeMappingFilePath, new MethodCallLineClassTypeMappingReportMap()); + List methodCallLineClassToFrameworkTypeMappingList = FileIOHelper.ReadListFromCSVFile(methodCallLinesToFrameworkTypeMappingFilePath, new MethodCallLineClassTypeMappingReportMap()); methodCallLineClassToFrameworkTypeMappingList = methodCallLineClassToFrameworkTypeMappingList.OrderByDescending(m => m.ClassPrefix).ToList(); Dictionary> methodCallLineClassToFrameworkTypeMappingDictionary = new Dictionary>(26); methodCallLineClassToFrameworkTypeMappingDictionary.Add("a", methodCallLineClassToFrameworkTypeMappingList.Where(m => m.ClassPrefix.Substring(0, 1).ToLower() == "a").ToList()); diff --git a/ProcessingSteps/Report/ReportAPMEntityDetails.cs b/ProcessingSteps/Report/ReportAPMEntityDetails.cs index 8d8aed0..92ab78e 100644 --- a/ProcessingSteps/Report/ReportAPMEntityDetails.cs +++ b/ProcessingSteps/Report/ReportAPMEntityDetails.cs @@ -1882,7 +1882,7 @@ private static bool finalizeAndSaveIndividualEntityMetricReport(ExcelPackage exc // Remove DetailLink column because this document would be pointing to relative location from the overall metric reports, and the link would be invalid if (table.Columns["DetailLink"] != null) { -// sheet.Column(table.Columns["DetailLink"].Position + 1).Width = 1; + // sheet.Column(table.Columns["DetailLink"].Position + 1).Width = 1; sheet.DeleteColumn(table.Columns["DetailLink"].Position + 1); } } diff --git a/ProcessingSteps/Report/ReportAPMFlameGraphs.cs b/ProcessingSteps/Report/ReportAPMFlameGraphs.cs index f87abac..7b56642 100644 --- a/ProcessingSteps/Report/ReportAPMFlameGraphs.cs +++ b/ProcessingSteps/Report/ReportAPMFlameGraphs.cs @@ -167,7 +167,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job { #region Nodes - List nodesList = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMNodesIndexFilePath(jobTarget), new APMNodeReportMap()); + List nodesList = FileIOHelper.ReadListFromCSVFile(FilePathMap.APMNodesIndexFilePath(jobTarget), new APMNodeReportMap()); if (nodesList != null) { loggerConsole.Info("Flame Graphs for Nodes ({0} entities)", nodesList.Count); @@ -354,7 +354,7 @@ private bool createFlameGraph( List methodCallLineClassToFrameworkTypeMappingList = methodCallLineClassToFrameworkTypeMappingDictionary["c"]; if (methodCallLineClassToFrameworkTypeMappingList != null) { - listOfCustomMethodCallMappings = methodCallLineClassToFrameworkTypeMappingList.Where(m => m.ClassPrefix.StartsWith("custom") == true).ToList(); + listOfCustomMethodCallMappings = methodCallLineClassToFrameworkTypeMappingList.Where(m => m.ClassPrefix.StartsWith("custom") == true).ToList(); } } diff --git a/ProcessingSteps/Report/ReportAPMMetricGraphs.cs b/ProcessingSteps/Report/ReportAPMMetricGraphs.cs index 442ed02..5cb7646 100644 --- a/ProcessingSteps/Report/ReportAPMMetricGraphs.cs +++ b/ProcessingSteps/Report/ReportAPMMetricGraphs.cs @@ -480,8 +480,6 @@ private bool finalizeAndSaveIndividualEntityMetricReport(ExcelPackage excelMetri logger.Info("Finalize Entity Metric Graphs Report File {0}", reportFilePath); ExcelWorksheet sheet; - ExcelRangeBase range; - ExcelTable table; #region TOC sheet diff --git a/ProcessingSteps/Report/ReportApplicationEventsAndHealthRuleViolations.cs b/ProcessingSteps/Report/ReportApplicationEventsAndHealthRuleViolations.cs index 7107053..e91d01e 100644 --- a/ProcessingSteps/Report/ReportApplicationEventsAndHealthRuleViolations.cs +++ b/ProcessingSteps/Report/ReportApplicationEventsAndHealthRuleViolations.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Reflection; namespace AppDynamics.Dexter.ProcessingSteps @@ -215,7 +214,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); - + #endregion #region Report file variables diff --git a/ProcessingSteps/Report/ReportControllerAndApplicationConfiguration.cs b/ProcessingSteps/Report/ReportControllerAndApplicationConfiguration.cs index b862064..869ac83 100644 --- a/ProcessingSteps/Report/ReportControllerAndApplicationConfiguration.cs +++ b/ProcessingSteps/Report/ReportControllerAndApplicationConfiguration.cs @@ -38,7 +38,7 @@ public class ReportControllerAndApplicationConfiguration : JobStepReportBase private const string SHEET_APP_ACTIONS = "11.Actions"; private const string SHEET_APP_ACTIONS_PIVOT = "11.Actions.Type"; private const string SHEET_APP_POLICIES_TO_ACTIONS_MAPPING = "12.Policy Actions"; - + // APM Configuration private const string SHEET_APM_APPLICATION_CONFIGURATION = "20.APM Application Config"; private const string SHEET_APM_BUSINESS_TRANSACTION_DISCOVERY_RULES = "21.APM BT Discovery Rules"; @@ -64,6 +64,12 @@ public class ReportControllerAndApplicationConfiguration : JobStepReportBase private const string SHEET_APM_AGENT_CALL_GRAPH_SETTINGS = "34.APM Call Graph Settings"; private const string SHEET_APM_SERVICE_ENDPOINT_RULES_SETTINGS = "35.APM Service Endpoint Rules"; private const string SHEET_APM_DEVELOPER_MODE_NODES = "36.APM Developer Mode Nodes"; + private const string SHEET_APM_ERROR_DETECTION_RULES = "37.APM Error Detection Rules"; + private const string SHEET_APM_ERROR_DETECTION_IGNORE_MESSAGES = "38.APM Error Ignore Messages"; + private const string SHEET_APM_ERROR_DETECTION_IGNORE_LOGGERS = "39.APM Error Ignore Loggers"; + private const string SHEET_APM_ERROR_DETECTION_LOGGERS = "40.APM Error Loggers"; + private const string SHEET_APM_ERROR_DETECTION_HTTP_CODES = "41.APM Error HTTP Codes"; + private const string SHEET_APM_ERROR_DETECTION_REDIRECT_PAGES = "42.APM Error Redired Pages"; // DB Configuration private const string SHEET_DB_APPLICATION_CONFIGURATION = "50.DB Application Config"; @@ -120,7 +126,12 @@ public class ReportControllerAndApplicationConfiguration : JobStepReportBase private const string TABLE_APM_AGENT_CALL_GRAPH_SETTINGS = "t_APM_AgentCallGraphSettings"; private const string TABLE_APM_SERVICE_ENDPOINT_ENTRY_RULES = "t_APM_SEPEntryRules"; private const string TABLE_APM_DEVELOPER_MODE_NODES = "t_APM_DevModeNodes"; - + private const string TABLE_APM_ERROR_DETECTION_RULES = "t_APM_ErrorDetectionRules"; + private const string TABLE_APM_ERROR_DETECTION_IGNORE_MESSAGES = "t_APM_ErrorIgnoreMessages"; + private const string TABLE_APM_ERROR_DETECTION_IGNORE_LOGGERS = "t_APM_ErrorIgnoreLoggers"; + private const string TABLE_APM_ERROR_DETECTION_LOGGERS = "t_APM_ErrorLoggers"; + private const string TABLE_APM_ERROR_DETECTION_HTTP_CODES = "t_APM_ErrorHTTPCodes"; + private const string TABLE_APM_ERROR_DETECTION_REDIRECT_PAGES = "t_APM_ErrorRediredPages"; // DB Configuration private const string TABLE_DB_APPLICATION_CONFIGURATION = "t_DB_ApplicationConfiguration"; private const string TABLE_DB_COLLECTOR_DEFINITIONS = "t_DB_CollectorDefinitions"; @@ -532,6 +543,42 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_RULES); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_IGNORE_MESSAGES); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_IGNORE_LOGGERS); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_LOGGERS); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_HTTP_CODES); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + + sheet = excelReport.Workbook.Worksheets.Add(SHEET_APM_ERROR_DETECTION_REDIRECT_PAGES); + sheet.Cells[1, 1].Value = "Table of Contents"; + sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); + sheet.Cells[1, 2].StyleName = "HyperLinkStyle"; + sheet.View.FreezePanes(LIST_SHEET_START_TABLE_AT + 1, 1); + sheet = excelReport.Workbook.Worksheets.Add(SHEET_DB_APPLICATION_CONFIGURATION); sheet.Cells[1, 1].Value = "Table of Contents"; sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); @@ -848,6 +895,40 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job #endregion + #region APM Error Settings + + loggerConsole.Info("List of Error Detection Rules"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_RULES]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionRulesReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + loggerConsole.Info("List of Error Detection Ignore Messages"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_IGNORE_MESSAGES]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionIgnoreMessagesReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + loggerConsole.Info("List of Error Detection Ignore Loggers"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_IGNORE_LOGGERS]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionIgnoreLoggersReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + loggerConsole.Info("List of Error Detection Loggers"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_LOGGERS]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionLoggersReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + loggerConsole.Info("List of Error Detection HTTP Codes"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_HTTP_CODES]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionHTTPCodesReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + loggerConsole.Info("List of Error Detection Redirect Pages"); + + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_REDIRECT_PAGES]; + EPPlusCSVHelper.ReadCSVFileIntoExcelRange(FilePathMap.APMErrorDetectionRedirectPagesReportFilePath(), 0, sheet, LIST_SHEET_START_TABLE_AT, 1); + + #endregion + #region DB Application Configuration loggerConsole.Info("List of DB Application Config"); @@ -1426,7 +1507,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Column(3).Width = 20; sheet.Column(4).Width = 20; sheet.Column(5).Width = 20; - sheet.Column(6).Width = 20; + sheet.Column(6).Width = 20; } #endregion @@ -1892,6 +1973,125 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job #endregion + #region APM Error Settings + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_RULES]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_IGNORE_MESSAGES); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["RuleName"].Position + 1).Width = 30; + sheet.Column(table.Columns["RuleValue"].Position + 1).Width = 15; + } + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_IGNORE_MESSAGES]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_IGNORE_LOGGERS); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["ExceptionClass"].Position + 1).Width = 20; + sheet.Column(table.Columns["MatchType"].Position + 1).Width = 15; + sheet.Column(table.Columns["MessagePattern"].Position + 1).Width = 20; + } + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_IGNORE_LOGGERS]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_LOGGERS); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["LoggerName"].Position + 1).Width = 20; + } + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_LOGGERS]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_HTTP_CODES); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["LoggerName"].Position + 1).Width = 20; + sheet.Column(table.Columns["MatchClass"].Position + 1).Width = 15; + sheet.Column(table.Columns["MatchMethod"].Position + 1).Width = 15; + sheet.Column(table.Columns["MatchType"].Position + 1).Width = 15; + sheet.Column(table.Columns["MatchParameterTypes"].Position + 1).Width = 15; + } + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_HTTP_CODES]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_REDIRECT_PAGES); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["RangeName"].Position + 1).Width = 20; + } + + // Make table + sheet = excelReport.Workbook.Worksheets[SHEET_APM_ERROR_DETECTION_REDIRECT_PAGES]; + logger.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + loggerConsole.Info("{0} Sheet ({1} rows)", sheet.Name, sheet.Dimension.Rows); + if (sheet.Dimension.Rows > LIST_SHEET_START_TABLE_AT) + { + range = sheet.Cells[LIST_SHEET_START_TABLE_AT, 1, sheet.Dimension.Rows, sheet.Dimension.Columns]; + table = sheet.Tables.Add(range, TABLE_APM_ERROR_DETECTION_RULES); + table.ShowHeader = true; + table.TableStyle = TableStyles.Medium2; + table.ShowFilter = true; + table.ShowTotal = false; + + sheet.Column(table.Columns["Controller"].Position + 1).Width = 20; + sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 20; + sheet.Column(table.Columns["PageName"].Position + 1).Width = 20; + } + + #endregion + #region DB Application Configuration // Make table diff --git a/ProcessingSteps/Report/ReportControllerUsersGroupsRolesAndPermissions.cs b/ProcessingSteps/Report/ReportControllerUsersGroupsRolesAndPermissions.cs index 04956ba..dd4d73e 100644 --- a/ProcessingSteps/Report/ReportControllerUsersGroupsRolesAndPermissions.cs +++ b/ProcessingSteps/Report/ReportControllerUsersGroupsRolesAndPermissions.cs @@ -9,7 +9,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; using System.Reflection; namespace AppDynamics.Dexter.ProcessingSteps diff --git a/ProcessingSteps/Report/ReportDBEntities.cs b/ProcessingSteps/Report/ReportDBEntities.cs index 9b26430..57e89ad 100644 --- a/ProcessingSteps/Report/ReportDBEntities.cs +++ b/ProcessingSteps/Report/ReportDBEntities.cs @@ -299,7 +299,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Cells[2, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_MODULES_LIST); sheet.Cells[2, 2].StyleName = "HyperLinkStyle"; sheet.View.FreezePanes(PIVOT_SHEET_START_PIVOT_AT + PIVOT_SHEET_CHART_HEIGHT + 2, 1); - + sheet = excelReport.Workbook.Worksheets.Add(SHEET_PROGRAMS_LIST); sheet.Cells[1, 1].Value = "Table of Contents"; sheet.Cells[1, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_TOC); @@ -316,7 +316,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Cells[2, 1].Value = "See Table"; sheet.Cells[2, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_PROGRAMS_LIST); sheet.Cells[2, 2].StyleName = "HyperLinkStyle"; - sheet.View.FreezePanes(PIVOT_SHEET_START_PIVOT_AT + PIVOT_SHEET_CHART_HEIGHT + 2, 1); + sheet.View.FreezePanes(PIVOT_SHEET_START_PIVOT_AT + PIVOT_SHEET_CHART_HEIGHT + 2, 1); sheet = excelReport.Workbook.Worksheets.Add(SHEET_BUSINESS_TRANSACTIONS_LIST); sheet.Cells[1, 1].Value = "Table of Contents"; @@ -341,7 +341,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job sheet.Cells[2, 2].Formula = String.Format(@"=HYPERLINK(""#'{0}'!A1"", """")", SHEET_WAITSTATES_LIST); sheet.Cells[2, 2].StyleName = "HyperLinkStyle"; sheet.View.FreezePanes(PIVOT_SHEET_START_PIVOT_AT + PIVOT_SHEET_CHART_HEIGHT + 2, 1); - + #endregion loggerConsole.Info("Fill Detected DB Entities Report File"); diff --git a/ProcessingSteps/Report/ReportLicenses.cs b/ProcessingSteps/Report/ReportLicenses.cs index 2eff8a9..80badf2 100644 --- a/ProcessingSteps/Report/ReportLicenses.cs +++ b/ProcessingSteps/Report/ReportLicenses.cs @@ -377,7 +377,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job table.TableStyle = TableStyles.Medium2; table.ShowFilter = true; table.ShowTotal = false; - + sheet.Column(table.Columns["Controller"].Position + 1).Width = 15; sheet.Column(table.Columns["AccountName"].Position + 1).Width = 15; sheet.Column(table.Columns["AccountNameGlobal"].Position + 1).Width = 20; diff --git a/Program.cs b/Program.cs index 88da31a..641aeec 100644 --- a/Program.cs +++ b/Program.cs @@ -42,7 +42,7 @@ public static void Main(string[] args) var parserResult = Parser.Default .ParseArguments(args) .WithParsed((ProgramOptions programOptions) => { RunProgram(programOptions); }) - .WithNotParsed((errs) => + .WithNotParsed((errs) => { logger.Error("Could not parse command line arguments into ProgramOptions"); //loggerConsole.Error("Could not parse command line arguments into ProgramOptions"); diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d63959e..110f1db 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.42.0")] -[assembly: AssemblyFileVersion("1.2.42.0")] +[assembly: AssemblyVersion("1.2.43.0")] +[assembly: AssemblyFileVersion("1.2.43.0")] diff --git a/Properties/PublishProfiles/net472.pubxml b/Properties/PublishProfiles/net472.pubxml deleted file mode 100644 index d9fbf5f..0000000 --- a/Properties/PublishProfiles/net472.pubxml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - FileSystem - Debug - net472 - bin\Publish\full-win - Any CPU - linux-x64 - - \ No newline at end of file diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index 0134c89..7163065 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "AppDynamics.Dexter.Core": { "commandName": "Project", - "commandLineArgs": "--job-file \"C:\\appdynamics\\AppDynamics.DEXTER\\JobFiles\\demo1demo2.All.Compare.json\" -v" + "commandLineArgs": "--job-file \"C:\\appdynamics\\AppDynamics.DEXTER\\JobFiles\\errordetect.json\" -v" } } } \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/APMApplicationConfiguration.cs b/ReportObjects/ConfigurationAPM/APMApplicationConfiguration.cs index 3274b9a..3fbba1d 100644 --- a/ReportObjects/ConfigurationAPM/APMApplicationConfiguration.cs +++ b/ReportObjects/ConfigurationAPM/APMApplicationConfiguration.cs @@ -32,8 +32,6 @@ public class APMApplicationConfiguration : ConfigurationEntityBase [FieldComparison(FieldComparisonType.ValueComparison)] public int NumHealthRules { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] - public int NumErrorRules { get; set; } - [FieldComparison(FieldComparisonType.ValueComparison)] public int NumHTTPDCVariablesCollected { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] public int NumHTTPDCs { get; set; } @@ -57,6 +55,12 @@ public class APMApplicationConfiguration : ConfigurationEntityBase [FieldComparison(FieldComparisonType.ValueComparison)] public bool IsBTLockdownEnabled { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] + public bool IsBTCleanupEnabled { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public int BTCleanupInterval { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public long BTCleanupCallCount { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] public bool IsAsyncSupported { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] public int SnapshotEvalInterval { get; set; } @@ -98,8 +102,6 @@ public class APMApplicationConfiguration : ConfigurationEntityBase [FieldComparison(FieldComparisonType.XmlValueComparison)] public string MetricBaselinesConfig { get; set; } - [FieldComparison(FieldComparisonType.XmlValueComparison)] - public string ErrorAgentConfig { get; set; } public override string EntityIdentifier { diff --git a/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule.cs b/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule.cs index 45ea7d4..30a40d1 100644 --- a/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule.cs +++ b/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule.cs @@ -77,7 +77,7 @@ public override String ToString() this.ApplicationName, this.TierName, this.AgentType, - this.EntryPointType, + this.EntryPointType, this.RuleName); } } diff --git a/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule20.cs b/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule20.cs index 1daa4fb..1ed07c0 100644 --- a/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule20.cs +++ b/ReportObjects/ConfigurationAPM/BusinessTransactionEntryRule20.cs @@ -80,7 +80,7 @@ public override String ToString() this.ApplicationName, this.ScopeName, this.AgentType, - this.EntryPointType, + this.EntryPointType, this.RuleName); } } diff --git a/ReportObjects/ConfigurationAPM/ConfigurationEntityBase.cs b/ReportObjects/ConfigurationAPM/ConfigurationEntityBase.cs index 4e3232e..f5ab1c3 100644 --- a/ReportObjects/ConfigurationAPM/ConfigurationEntityBase.cs +++ b/ReportObjects/ConfigurationAPM/ConfigurationEntityBase.cs @@ -1,6 +1,4 @@ -using System; - -namespace AppDynamics.Dexter.ReportObjects +namespace AppDynamics.Dexter.ReportObjects { public class ConfigurationEntityBase { diff --git a/ReportObjects/ConfigurationAPM/DeveloperModeNode.cs b/ReportObjects/ConfigurationAPM/DeveloperModeNode.cs index e1a5f2b..9deee7e 100644 --- a/ReportObjects/ConfigurationAPM/DeveloperModeNode.cs +++ b/ReportObjects/ConfigurationAPM/DeveloperModeNode.cs @@ -45,7 +45,7 @@ public override string RuleSubType public override String ToString() { return String.Format( - "DeveloperModeSetting: {0}/{1}/{2} {3} {4} {5}", + "DeveloperModeSetting: {0}/{1}/{2} {3} {4}", this.Controller, this.ApplicationName, this.TierName, diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionHTTPCode.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionHTTPCode.cs new file mode 100644 index 0000000..8798a3d --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionHTTPCode.cs @@ -0,0 +1,62 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionHTTPCode : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string RangeName { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public bool IsEnabled { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public bool CaptureURL { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public int CodeFrom { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public int CodeTo { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.RangeName); + } + } + + public override string EntityName + { + get + { + return this.RangeName; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionHTTPCode"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionHTTPCode: {0}/{1}/{2} {3} {4}-{5}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.RangeName, + this.CodeFrom, + this.CodeTo); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreLogger.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreLogger.cs new file mode 100644 index 0000000..13b0d03 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreLogger.cs @@ -0,0 +1,52 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionIgnoreLogger : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string LoggerName { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.LoggerName); + } + } + + public override string EntityName + { + get + { + return this.LoggerName; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionIgnoreLogger"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionIgnoreLogger: {0}/{1}/{2} {3}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.LoggerName); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreMessage.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreMessage.cs new file mode 100644 index 0000000..35b5feb --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionIgnoreMessage.cs @@ -0,0 +1,58 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionIgnoreMessage : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string ExceptionClass { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchType { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MessagePattern { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.ExceptionClass); + } + } + + public override string EntityName + { + get + { + return this.ExceptionClass; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionIgnoreMessage"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionIgnoreMessage: {0}/{1}/{2} {3} {4}={5}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.ExceptionClass, + this.MatchType, + this.MessagePattern); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionLogger.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionLogger.cs new file mode 100644 index 0000000..a1c9d25 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionLogger.cs @@ -0,0 +1,68 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionLogger : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string LoggerName { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public bool IsEnabled { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchClass { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchMethod { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchType { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchParameterTypes { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public int ExceptionParam { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public int MessageParam { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.LoggerName); + } + } + + public override string EntityName + { + get + { + return this.LoggerName; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionLogger"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionLogger: {0}/{1}/{2} {3} {4}:{5}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.LoggerName, + this.MatchClass, + this.MatchMethod); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionRedirectPage.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionRedirectPage.cs new file mode 100644 index 0000000..8e4fb14 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionRedirectPage.cs @@ -0,0 +1,60 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionRedirectPage : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string PageName { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public bool IsEnabled { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchType { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string MatchPattern { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.PageName); + } + } + + public override string EntityName + { + get + { + return this.PageName; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionRedirectPage"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionRedirectPage: {0}/{1}/{2} {3} {4}={5}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.PageName, + this.MatchType, + this.MatchPattern); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/ErrorDetectionRule.cs b/ReportObjects/ConfigurationAPM/ErrorDetectionRule.cs new file mode 100644 index 0000000..8b085cb --- /dev/null +++ b/ReportObjects/ConfigurationAPM/ErrorDetectionRule.cs @@ -0,0 +1,55 @@ +using System; + +namespace AppDynamics.Dexter.ReportObjects +{ + public class ErrorDetectionRule : ConfigurationEntityBase + { + public string AgentType { get; set; } + public string RuleName { get; set; } + [FieldComparison(FieldComparisonType.ValueComparison)] + public string RuleValue { get; set; } + + public override string EntityIdentifier + { + get + { + return String.Format("{0}/{1}", this.AgentType, this.RuleName); + } + } + + public override string EntityName + { + get + { + return this.RuleName; + } + } + + public override string RuleType + { + get + { + return "APMErrorDetectionRule"; + } + } + + public override string RuleSubType + { + get + { + return this.AgentType; + } + } + + public override String ToString() + { + return String.Format( + "ErrorDetectionRule: {0}/{1}/ {2} {3}={4}", + this.Controller, + this.ApplicationName, + this.AgentType, + this.RuleName, + this.RuleValue); + } + } +} diff --git a/ReportObjects/ConfigurationAPM/Maps/APMApplicationConfigurationReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/APMApplicationConfigurationReportMap.cs index 8fbae01..377fea6 100644 --- a/ReportObjects/ConfigurationAPM/Maps/APMApplicationConfigurationReportMap.cs +++ b/ReportObjects/ConfigurationAPM/Maps/APMApplicationConfigurationReportMap.cs @@ -24,7 +24,6 @@ public APMApplicationConfigurationReportMap() Map(m => m.NumInfoPointRules).Index(i); i++; Map(m => m.NumAgentProps).Index(i); i++; Map(m => m.NumHealthRules).Index(i); i++; - Map(m => m.NumErrorRules).Index(i); i++; Map(m => m.NumHTTPDCVariablesCollected).Index(i); i++; Map(m => m.NumHTTPDCs).Index(i); i++; Map(m => m.NumMIDCVariablesCollected).Index(i); i++; @@ -37,6 +36,9 @@ public APMApplicationConfigurationReportMap() Map(m => m.IsHREngineEnabled).Index(i); i++; Map(m => m.IsDeveloperModeEnabled).Index(i); i++; Map(m => m.IsBTLockdownEnabled).Index(i); i++; + Map(m => m.IsBTCleanupEnabled).Index(i); i++; + Map(m => m.BTCleanupInterval).Index(i); i++; + Map(m => m.BTCleanupCallCount).Index(i); i++; Map(m => m.IsAsyncSupported).Index(i); i++; Map(m => m.SnapshotEvalInterval).Index(i); i++; Map(m => m.SnapshotQuietTime).Index(i); i++; @@ -57,8 +59,7 @@ public APMApplicationConfigurationReportMap() Map(m => m.TasksConfig).Index(i); i++; Map(m => m.BTGroupsConfig).Index(i); i++; Map(m => m.MetricBaselinesConfig).Index(i); i++; - Map(m => m.ErrorAgentConfig).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.ControllerLink).Index(i); i++; Map(m => m.ApplicationLink).Index(i); i++; diff --git a/ReportObjects/ConfigurationAPM/Maps/CustomExitRuleReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/CustomExitRuleReportMap.cs index 4d217c6..d2d2193 100644 --- a/ReportObjects/ConfigurationAPM/Maps/CustomExitRuleReportMap.cs +++ b/ReportObjects/ConfigurationAPM/Maps/CustomExitRuleReportMap.cs @@ -20,7 +20,7 @@ public CustomExitRuleReportMap() Map(m => m.MatchType).Index(i); i++; Map(m => m.MatchParameterTypes).Index(i); i++; Map(m => m.IsApplyToAllBTs).Index(i); i++; - + Map(m => m.DataCollectorsConfig).Index(i); i++; Map(m => m.InfoPointsConfig).Index(i); i++; Map(m => m.RuleRawValue).Index(i); i++; diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionHTTPCodeReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionHTTPCodeReportMap.cs new file mode 100644 index 0000000..e664736 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionHTTPCodeReportMap.cs @@ -0,0 +1,27 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionHTTPCodeReportMap : ClassMap + { + public ErrorDetectionHTTPCodeReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.RangeName).Index(i); i++; + Map(m => m.IsEnabled).Index(i); i++; + Map(m => m.CaptureURL).Index(i); i++; + + Map(m => m.CodeFrom).Index(i); i++; + Map(m => m.CodeTo).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreLoggerReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreLoggerReportMap.cs new file mode 100644 index 0000000..d9b864d --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreLoggerReportMap.cs @@ -0,0 +1,22 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionIgnoreLoggerReportMap : ClassMap + { + public ErrorDetectionIgnoreLoggerReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.LoggerName).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreMessageReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreMessageReportMap.cs new file mode 100644 index 0000000..bffcee7 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionIgnoreMessageReportMap.cs @@ -0,0 +1,24 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionIgnoreMessageReportMap : ClassMap + { + public ErrorDetectionIgnoreMessageReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.ExceptionClass).Index(i); i++; + Map(m => m.MatchType).Index(i); i++; + Map(m => m.MessagePattern).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionLoggerReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionLoggerReportMap.cs new file mode 100644 index 0000000..d40fa38 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionLoggerReportMap.cs @@ -0,0 +1,31 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionLoggerReportMap : ClassMap + { + public ErrorDetectionLoggerReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.LoggerName).Index(i); i++; + Map(m => m.IsEnabled).Index(i); i++; + + Map(m => m.MatchClass).Index(i); i++; + Map(m => m.MatchMethod).Index(i); i++; + Map(m => m.MatchType).Index(i); i++; + Map(m => m.MatchParameterTypes).Index(i); i++; + + Map(m => m.ExceptionParam).Index(i); i++; + Map(m => m.MessageParam).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRedirectPageReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRedirectPageReportMap.cs new file mode 100644 index 0000000..c106d39 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRedirectPageReportMap.cs @@ -0,0 +1,25 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionRedirectPageReportMap : ClassMap + { + public ErrorDetectionRedirectPageReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.PageName).Index(i); i++; + Map(m => m.IsEnabled).Index(i); i++; + Map(m => m.MatchType).Index(i); i++; + Map(m => m.MatchPattern).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRuleReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRuleReportMap.cs new file mode 100644 index 0000000..8e095b4 --- /dev/null +++ b/ReportObjects/ConfigurationAPM/Maps/ErrorDetectionRuleReportMap.cs @@ -0,0 +1,23 @@ +using AppDynamics.Dexter.ReportObjects; +using CsvHelper.Configuration; + +namespace AppDynamics.Dexter.ReportObjectMaps +{ + public class ErrorDetectionRuleReportMap : ClassMap + { + public ErrorDetectionRuleReportMap() + { + int i = 0; + Map(m => m.Controller).Index(i); i++; + Map(m => m.ApplicationName).Index(i); i++; + + Map(m => m.AgentType).Index(i); i++; + Map(m => m.RuleName).Index(i); i++; + Map(m => m.RuleValue).Index(i); i++; + + Map(m => m.ApplicationID).Index(i); i++; + Map(m => m.ControllerLink).Index(i); i++; + Map(m => m.ApplicationLink).Index(i); i++; + } + } +} \ No newline at end of file diff --git a/ReportObjects/ConfigurationAPM/Maps/InformationPointRuleReportMap.cs b/ReportObjects/ConfigurationAPM/Maps/InformationPointRuleReportMap.cs index 61bf7be..a233805 100644 --- a/ReportObjects/ConfigurationAPM/Maps/InformationPointRuleReportMap.cs +++ b/ReportObjects/ConfigurationAPM/Maps/InformationPointRuleReportMap.cs @@ -20,7 +20,7 @@ public InformationPointRuleReportMap() Map(m => m.MatchCondition).Index(i); i++; Map(m => m.InfoPointsConfig).Index(i); i++; Map(m => m.RuleRawValue).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.ControllerLink).Index(i); i++; Map(m => m.ApplicationLink).Index(i); i++; diff --git a/ReportObjects/ConfigurationAPM/ServiceEndpointEntryRule.cs b/ReportObjects/ConfigurationAPM/ServiceEndpointEntryRule.cs index b425b7f..a6cb47e 100644 --- a/ReportObjects/ConfigurationAPM/ServiceEndpointEntryRule.cs +++ b/ReportObjects/ConfigurationAPM/ServiceEndpointEntryRule.cs @@ -31,7 +31,7 @@ public override string EntityIdentifier { return String.Format("{0}/{1}/{2}", this.EntryPointType, this.AgentType, this.TierName); } - } + } public override string EntityName { diff --git a/ReportObjects/ConfigurationDB/DBCollectorDefinition.cs b/ReportObjects/ConfigurationDB/DBCollectorDefinition.cs index 939907b..6f732a0 100644 --- a/ReportObjects/ConfigurationDB/DBCollectorDefinition.cs +++ b/ReportObjects/ConfigurationDB/DBCollectorDefinition.cs @@ -71,7 +71,7 @@ public class DBCollectorDefinition : ConfigurationEntityBase [FieldComparison(FieldComparisonType.ValueComparison)] public bool IsLDAPEnabled { get; set; } - public string CreatedBy{ get; set; } + public string CreatedBy { get; set; } public DateTime CreatedOn { get; set; } public string ModifiedBy { get; set; } public DateTime ModifiedOn { get; set; } @@ -114,7 +114,7 @@ public override String ToString() "DBCollectorDefinition: {0}/{1}({2}) [{3}]", this.Controller, this.CollectorName, - this.ConfigID, + this.ConfigID, this.CollectorType); } } diff --git a/ReportObjects/ConfigurationDB/DBCustomMetric.cs b/ReportObjects/ConfigurationDB/DBCustomMetric.cs index edd25e9..5454a25 100644 --- a/ReportObjects/ConfigurationDB/DBCustomMetric.cs +++ b/ReportObjects/ConfigurationDB/DBCustomMetric.cs @@ -75,8 +75,8 @@ public override String ToString() "DBCustomMetric: {0}/{1}({2}) {3}({4})", this.Controller, this.CollectorName, - this.ConfigID, - this.MetricName, + this.ConfigID, + this.MetricName, this.MetricID); } } diff --git a/ReportObjects/ConfigurationMOBILE/MOBILEApplicationConfiguration.cs b/ReportObjects/ConfigurationMOBILE/MOBILEApplicationConfiguration.cs index 842408b..406e800 100644 --- a/ReportObjects/ConfigurationMOBILE/MOBILEApplicationConfiguration.cs +++ b/ReportObjects/ConfigurationMOBILE/MOBILEApplicationConfiguration.cs @@ -42,7 +42,7 @@ public class MOBILEApplicationConfiguration : ConfigurationEntityBase [FieldComparison(FieldComparisonType.ValueComparison)] public bool IsIPDisplayed { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] - public bool EnableScreenshot{ get; set; } + public bool EnableScreenshot { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] public bool AutoScreenshot { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] diff --git a/ReportObjects/ConfigurationMOBILE/MOBILENetworkRequestRule.cs b/ReportObjects/ConfigurationMOBILE/MOBILENetworkRequestRule.cs index 067aa3a..7614d6d 100644 --- a/ReportObjects/ConfigurationMOBILE/MOBILENetworkRequestRule.cs +++ b/ReportObjects/ConfigurationMOBILE/MOBILENetworkRequestRule.cs @@ -89,7 +89,7 @@ public override String ToString() "MOBILENetworkRequestRule: {0}/{1}({2}) {3} {4}", this.Controller, this.ApplicationName, - this.ApplicationID, + this.ApplicationID, this.DetectionType, this.RuleName); } diff --git a/ReportObjects/ConfigurationMOBILE/Maps/MOBILEApplicationConfigurationReportMap.cs b/ReportObjects/ConfigurationMOBILE/Maps/MOBILEApplicationConfigurationReportMap.cs index 44b5c55..4d27fc8 100644 --- a/ReportObjects/ConfigurationMOBILE/Maps/MOBILEApplicationConfigurationReportMap.cs +++ b/ReportObjects/ConfigurationMOBILE/Maps/MOBILEApplicationConfigurationReportMap.cs @@ -35,7 +35,7 @@ public MOBILEApplicationConfigurationReportMap() Map(m => m.EnableScreenshot).Index(i); i++; Map(m => m.AutoScreenshot).Index(i); i++; Map(m => m.UseCellular).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.ControllerLink).Index(i); i++; Map(m => m.ApplicationLink).Index(i); i++; diff --git a/ReportObjects/ConfigurationPolicy/Action.cs b/ReportObjects/ConfigurationPolicy/Action.cs index 9e24525..1bc61cd 100644 --- a/ReportObjects/ConfigurationPolicy/Action.cs +++ b/ReportObjects/ConfigurationPolicy/Action.cs @@ -27,7 +27,7 @@ public class Action : ConfigurationEntityBase [FieldComparison(FieldComparisonType.ValueComparison)] public bool CollectScriptOutputs { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] - public int TimeoutMinutes { get; set; } + public int TimeoutMinutes { get; set; } [FieldComparison(FieldComparisonType.ValueComparison)] public string To { get; set; } diff --git a/ReportObjects/ConfigurationPolicy/Maps/ApplicationConfigurationPolicyReportMap.cs b/ReportObjects/ConfigurationPolicy/Maps/ApplicationConfigurationPolicyReportMap.cs index 1caa6f1..343b933 100644 --- a/ReportObjects/ConfigurationPolicy/Maps/ApplicationConfigurationPolicyReportMap.cs +++ b/ReportObjects/ConfigurationPolicy/Maps/ApplicationConfigurationPolicyReportMap.cs @@ -15,7 +15,7 @@ public ApplicationConfigurationPolicyReportMap() Map(m => m.NumHealthRules).Index(i); i++; Map(m => m.NumPolicies).Index(i); i++; Map(m => m.NumActions).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.ControllerLink).Index(i); i++; Map(m => m.ApplicationLink).Index(i); i++; diff --git a/ReportObjects/ConfigurationWEB/Maps/WEBApplicationConfigurationReportMap.cs b/ReportObjects/ConfigurationWEB/Maps/WEBApplicationConfigurationReportMap.cs index 79445ec..9c0c098 100644 --- a/ReportObjects/ConfigurationWEB/Maps/WEBApplicationConfigurationReportMap.cs +++ b/ReportObjects/ConfigurationWEB/Maps/WEBApplicationConfigurationReportMap.cs @@ -55,7 +55,7 @@ public WEBApplicationConfigurationReportMap() Map(m => m.EnableSlowSnapshots).Index(i); i++; Map(m => m.EnablePeriodicSnapshots).Index(i); i++; Map(m => m.EnableErrorSnapshots).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.ControllerLink).Index(i); i++; Map(m => m.ApplicationLink).Index(i); i++; diff --git a/ReportObjects/ConfigurationWEB/WEBPageDetectionRule.cs b/ReportObjects/ConfigurationWEB/WEBPageDetectionRule.cs index ea81a7d..e393c91 100644 --- a/ReportObjects/ConfigurationWEB/WEBPageDetectionRule.cs +++ b/ReportObjects/ConfigurationWEB/WEBPageDetectionRule.cs @@ -90,7 +90,7 @@ public override String ToString() "WEBPageDetectionRule: {0}/{1}({2}) {3} {4} {5}", this.Controller, this.ApplicationName, - this.ApplicationID, + this.ApplicationID, this.EntityCategory, this.DetectionType, this.RuleName); diff --git a/ReportObjects/ConfigurationWEB/WEBSyntheticJobDefinition.cs b/ReportObjects/ConfigurationWEB/WEBSyntheticJobDefinition.cs index 9ce60f9..9c6083b 100644 --- a/ReportObjects/ConfigurationWEB/WEBSyntheticJobDefinition.cs +++ b/ReportObjects/ConfigurationWEB/WEBSyntheticJobDefinition.cs @@ -91,7 +91,7 @@ public override String ToString() "WEBSyntheticJobDefinition: {0}/{1}({2}) {3} {4} {5}", this.Controller, this.ApplicationName, - this.ApplicationID, + this.ApplicationID, this.JobName, this.JobType, this.URL); diff --git a/ReportObjects/Controller/ControllerApplication.cs b/ReportObjects/Controller/ControllerApplication.cs index 9987bd2..3621a24 100644 --- a/ReportObjects/Controller/ControllerApplication.cs +++ b/ReportObjects/Controller/ControllerApplication.cs @@ -33,7 +33,7 @@ public override String ToString() return String.Format( "ControllerApplication: {0}/{1}({2}) [{3}]", this.Controller, - this.ApplicationName, + this.ApplicationName, this.ApplicationID, this.Type); } diff --git a/ReportObjects/Controller/ControllerSetting.cs b/ReportObjects/Controller/ControllerSetting.cs index 0a474c4..150a29c 100644 --- a/ReportObjects/Controller/ControllerSetting.cs +++ b/ReportObjects/Controller/ControllerSetting.cs @@ -22,7 +22,7 @@ public override string EntityIdentifier } } - public override string EntityName + public override string EntityName { get { diff --git a/ReportObjects/Controller/ControllerSummary.cs b/ReportObjects/Controller/ControllerSummary.cs index 99081fa..c048fdf 100644 --- a/ReportObjects/Controller/ControllerSummary.cs +++ b/ReportObjects/Controller/ControllerSummary.cs @@ -25,7 +25,7 @@ public override String ToString() { return String.Format( "ControllerSummary: {0} {1}", - this.Controller, + this.Controller, this.Version); } diff --git a/ReportObjects/Controller/Dashboard.cs b/ReportObjects/Controller/Dashboard.cs index e1b9fa0..2dfa38d 100644 --- a/ReportObjects/Controller/Dashboard.cs +++ b/ReportObjects/Controller/Dashboard.cs @@ -55,8 +55,8 @@ public override String ToString() { return String.Format( "Dashboard: {0}/{1} ({2}) {3} widgets", - this.Controller, - this.DashboardName, + this.Controller, + this.DashboardName, this.CanvasType, this.NumWidgets); } diff --git a/ReportObjects/Controller/DashboardMetricSeries.cs b/ReportObjects/Controller/DashboardMetricSeries.cs index 8508c14..3e0a2b4 100644 --- a/ReportObjects/Controller/DashboardMetricSeries.cs +++ b/ReportObjects/Controller/DashboardMetricSeries.cs @@ -53,7 +53,7 @@ public override String ToString() { return String.Format( "DashboardMetricSeries: {0}/{1} {2} {3} {4}", - this.Controller, + this.Controller, this.DashboardName, this.WidgetType, this.Index, diff --git a/ReportObjects/Controller/DashboardWidget.cs b/ReportObjects/Controller/DashboardWidget.cs index c6107be..3ef372b 100644 --- a/ReportObjects/Controller/DashboardWidget.cs +++ b/ReportObjects/Controller/DashboardWidget.cs @@ -16,7 +16,7 @@ public class DashboardWidget public string SelectedEntities { get; set; } public int NumSelectedEntities { get; set; } - public string Title{ get; set; } + public string Title { get; set; } public string Description { get; set; } public string Label { get; set; } public string Text { get; set; } @@ -46,7 +46,7 @@ public class DashboardWidget public string VerticalAxisLabel { get; set; } public string HorizontalAxisLabel { get; set; } - public string AxisType{ get; set; } + public string AxisType { get; set; } public bool IsMultipleYAxis { get; set; } public string StackMode { get; set; } @@ -74,7 +74,7 @@ public override String ToString() { return String.Format( "DashboardWidget: {0}/{1} {2} {3}x{4}", - this.Controller, + this.Controller, this.DashboardName, this.WidgetType, this.Width, diff --git a/ReportObjects/Controller/EmailAlertTemplate.cs b/ReportObjects/Controller/EmailAlertTemplate.cs index 64854df..dd6aa31 100644 --- a/ReportObjects/Controller/EmailAlertTemplate.cs +++ b/ReportObjects/Controller/EmailAlertTemplate.cs @@ -39,7 +39,7 @@ public override String ToString() return String.Format( "EmailAlertTemplate: {0} {1} {2}", this.Controller, - this.Name, + this.Name, this.To); } } diff --git a/ReportObjects/Controller/HTTPAlertTemplate.cs b/ReportObjects/Controller/HTTPAlertTemplate.cs index 5a55966..dc8bcd7 100644 --- a/ReportObjects/Controller/HTTPAlertTemplate.cs +++ b/ReportObjects/Controller/HTTPAlertTemplate.cs @@ -38,7 +38,7 @@ public override String ToString() "HTTPAlertTemplate: {0} {1} {2}://{3}:{4}/{5}?{6}", this.Controller, this.Name, - this.Scheme, + this.Scheme, this.Host, this.Port, this.Path, diff --git a/ReportObjects/Controller/Maps/ControllerApplicationReportMap.cs b/ReportObjects/Controller/Maps/ControllerApplicationReportMap.cs index 38dc4a3..e898250 100644 --- a/ReportObjects/Controller/Maps/ControllerApplicationReportMap.cs +++ b/ReportObjects/Controller/Maps/ControllerApplicationReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class ControllerApplicationReportMap: ClassMap + public class ControllerApplicationReportMap : ClassMap { public ControllerApplicationReportMap() { diff --git a/ReportObjects/Controller/Maps/ControllerSummaryReportMap.cs b/ReportObjects/Controller/Maps/ControllerSummaryReportMap.cs index 359d533..ac22d3a 100644 --- a/ReportObjects/Controller/Maps/ControllerSummaryReportMap.cs +++ b/ReportObjects/Controller/Maps/ControllerSummaryReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class ControllerSummaryReportMap: ClassMap + public class ControllerSummaryReportMap : ClassMap { public ControllerSummaryReportMap() { diff --git a/ReportObjects/EntityAPM/APMApplication.cs b/ReportObjects/EntityAPM/APMApplication.cs index f23c2c5..1d67b40 100644 --- a/ReportObjects/EntityAPM/APMApplication.cs +++ b/ReportObjects/EntityAPM/APMApplication.cs @@ -62,7 +62,7 @@ public override string FolderName return ENTITY_FOLDER; } } - + public APMApplication Clone() { return (APMApplication)this.MemberwiseClone(); diff --git a/ReportObjects/EntityAPM/APMBackend.cs b/ReportObjects/EntityAPM/APMBackend.cs index 1e1d458..0cfc0b3 100644 --- a/ReportObjects/EntityAPM/APMBackend.cs +++ b/ReportObjects/EntityAPM/APMBackend.cs @@ -76,7 +76,7 @@ public override String ToString() "APMBackend: {0}/{1}({2})/{3}({4})", this.Controller, this.ApplicationName, - this.ApplicationID, + this.ApplicationID, this.BackendName, this.BackendID); } diff --git a/ReportObjects/EntityAPM/APMBusinessTransaction.cs b/ReportObjects/EntityAPM/APMBusinessTransaction.cs index 7d84aa3..05c07d6 100644 --- a/ReportObjects/EntityAPM/APMBusinessTransaction.cs +++ b/ReportObjects/EntityAPM/APMBusinessTransaction.cs @@ -2,7 +2,7 @@ namespace AppDynamics.Dexter.ReportObjects { - public class APMBusinessTransaction: APMEntityBase + public class APMBusinessTransaction : APMEntityBase { public const string ENTITY_TYPE = "Business Transaction"; public const string ENTITY_FOLDER = "BT"; diff --git a/ReportObjects/EntityAPM/APMError.cs b/ReportObjects/EntityAPM/APMError.cs index 79fe62d..9749ecc 100644 --- a/ReportObjects/EntityAPM/APMError.cs +++ b/ReportObjects/EntityAPM/APMError.cs @@ -2,7 +2,7 @@ namespace AppDynamics.Dexter.ReportObjects { - public class APMError: APMEntityBase + public class APMError : APMEntityBase { public const string ENTITY_TYPE = "Error"; public const string ENTITY_FOLDER = "ERR"; diff --git a/ReportObjects/EntityAPM/APMInformationPoint.cs b/ReportObjects/EntityAPM/APMInformationPoint.cs index 9de0957..b61542c 100644 --- a/ReportObjects/EntityAPM/APMInformationPoint.cs +++ b/ReportObjects/EntityAPM/APMInformationPoint.cs @@ -2,7 +2,7 @@ namespace AppDynamics.Dexter.ReportObjects { - public class APMInformationPoint: APMEntityBase + public class APMInformationPoint : APMEntityBase { public const string ENTITY_TYPE = "Information Point"; public const string ENTITY_FOLDER = "IP"; diff --git a/ReportObjects/EntityAPM/APMResolvedBackend.cs b/ReportObjects/EntityAPM/APMResolvedBackend.cs index ba74dc4..139063a 100644 --- a/ReportObjects/EntityAPM/APMResolvedBackend.cs +++ b/ReportObjects/EntityAPM/APMResolvedBackend.cs @@ -45,7 +45,7 @@ public override String ToString() "APMResolvedBackend: {0}/{1}({2})/{3}({4})={5}({6})", this.Controller, this.ApplicationName, - this.ApplicationID, + this.ApplicationID, this.BackendName, this.BackendID, this.TierName, diff --git a/ReportObjects/EntityAPM/APMServiceEndpoint.cs b/ReportObjects/EntityAPM/APMServiceEndpoint.cs index f6cf7d6..4818c22 100644 --- a/ReportObjects/EntityAPM/APMServiceEndpoint.cs +++ b/ReportObjects/EntityAPM/APMServiceEndpoint.cs @@ -2,7 +2,7 @@ namespace AppDynamics.Dexter.ReportObjects { - public class APMServiceEndpoint: APMEntityBase + public class APMServiceEndpoint : APMEntityBase { public const string ENTITY_TYPE = "Service Endpoint"; public const string ENTITY_FOLDER = "SEP"; diff --git a/ReportObjects/EntityAPM/Maps/APMApplicationReportMap.cs b/ReportObjects/EntityAPM/Maps/APMApplicationReportMap.cs index 2aba59b..f79b5b0 100644 --- a/ReportObjects/EntityAPM/Maps/APMApplicationReportMap.cs +++ b/ReportObjects/EntityAPM/Maps/APMApplicationReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class APMApplicationReportMap: ClassMap + public class APMApplicationReportMap : ClassMap { public APMApplicationReportMap() { diff --git a/ReportObjects/EntityAPM/Maps/APMBusinessTransactionReportMap.cs b/ReportObjects/EntityAPM/Maps/APMBusinessTransactionReportMap.cs index f698cbb..a4e00fe 100644 --- a/ReportObjects/EntityAPM/Maps/APMBusinessTransactionReportMap.cs +++ b/ReportObjects/EntityAPM/Maps/APMBusinessTransactionReportMap.cs @@ -7,7 +7,7 @@ public class APMBusinessTransactionReportMap : ClassMap { public APMBusinessTransactionReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; @@ -18,7 +18,7 @@ public APMBusinessTransactionReportMap() Map(m => m.IsExplicitRule).Index(i); i++; Map(m => m.RuleName).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.TierID).Index(i); i++; Map(m => m.BTID).Index(i); i++; diff --git a/ReportObjects/EntityAPM/Maps/APMNodePropertyReportMap.cs b/ReportObjects/EntityAPM/Maps/APMNodePropertyReportMap.cs index 4b4ed60..52b72d7 100644 --- a/ReportObjects/EntityAPM/Maps/APMNodePropertyReportMap.cs +++ b/ReportObjects/EntityAPM/Maps/APMNodePropertyReportMap.cs @@ -7,7 +7,7 @@ public class APMNodePropertyReportMap : ClassMap { public APMNodePropertyReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/EntityAPM/Maps/APMNodeReportMap.cs b/ReportObjects/EntityAPM/Maps/APMNodeReportMap.cs index da60568..298baf0 100644 --- a/ReportObjects/EntityAPM/Maps/APMNodeReportMap.cs +++ b/ReportObjects/EntityAPM/Maps/APMNodeReportMap.cs @@ -7,7 +7,7 @@ public class APMNodeReportMap : ClassMap { public APMNodeReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/EntityAPM/Maps/APMOverflowBusinessTransactionReportMap.cs b/ReportObjects/EntityAPM/Maps/APMOverflowBusinessTransactionReportMap.cs index 5d19456..a53e319 100644 --- a/ReportObjects/EntityAPM/Maps/APMOverflowBusinessTransactionReportMap.cs +++ b/ReportObjects/EntityAPM/Maps/APMOverflowBusinessTransactionReportMap.cs @@ -7,7 +7,7 @@ public class APMOverflowBusinessTransactionReportMap : ClassMap m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/EntityBIQ/BIQApplication.cs b/ReportObjects/EntityBIQ/BIQApplication.cs index dd528b8..2b6efb0 100644 --- a/ReportObjects/EntityBIQ/BIQApplication.cs +++ b/ReportObjects/EntityBIQ/BIQApplication.cs @@ -9,7 +9,7 @@ public class BIQApplication : BIQEntityBase public int NumMultiSearches { get; set; } public int NumLegacySearches { get; set; } - public int NumSavedMetrics{ get; set; } + public int NumSavedMetrics { get; set; } public int NumBusinessJourneys { get; set; } diff --git a/ReportObjects/EntityBIQ/BIQWidget.cs b/ReportObjects/EntityBIQ/BIQWidget.cs index 6ee5302..424d4ec 100644 --- a/ReportObjects/EntityBIQ/BIQWidget.cs +++ b/ReportObjects/EntityBIQ/BIQWidget.cs @@ -55,7 +55,7 @@ public override String ToString() this.SearchName, this.SearchType, this.SearchID, - this.WidgetName, + this.WidgetName, this.WidgetType, this.WidgetID); } diff --git a/ReportObjects/EntityDB/DBBlockingSession.cs b/ReportObjects/EntityDB/DBBlockingSession.cs index 10279d6..5e98232 100644 --- a/ReportObjects/EntityDB/DBBlockingSession.cs +++ b/ReportObjects/EntityDB/DBBlockingSession.cs @@ -29,9 +29,9 @@ public override String ToString() "DBBlockingSession: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.BlockingSessionName, + this.ConfigID, + this.CollectorType, + this.BlockingSessionName, this.BlockingSessionID); } } diff --git a/ReportObjects/EntityDB/DBBusinessTransaction.cs b/ReportObjects/EntityDB/DBBusinessTransaction.cs index a1d5d95..8449bad 100644 --- a/ReportObjects/EntityDB/DBBusinessTransaction.cs +++ b/ReportObjects/EntityDB/DBBusinessTransaction.cs @@ -4,8 +4,6 @@ namespace AppDynamics.Dexter.ReportObjects { public class DBBusinessTransaction : DBEntityBase { - public string ApplicationName { get; set; } - public string BTName { get; set; } public long Calls { get; set; } @@ -16,7 +14,6 @@ public class DBBusinessTransaction : DBEntityBase public decimal Weight { get; set; } - public long ApplicationID { get; set; } public long BTID { get; set; } public override String ToString() @@ -25,9 +22,9 @@ public override String ToString() "DBBusinessTransaction: {0}/{1}({2}) [{3}] {4}/{5}", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.ApplicationName, + this.ConfigID, + this.CollectorType, + this.ApplicationName, this.BTName); } } diff --git a/ReportObjects/EntityDB/DBClient.cs b/ReportObjects/EntityDB/DBClient.cs index 5fc0ab9..6206052 100644 --- a/ReportObjects/EntityDB/DBClient.cs +++ b/ReportObjects/EntityDB/DBClient.cs @@ -19,9 +19,9 @@ public override String ToString() "DBClient: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.ClientName, + this.ConfigID, + this.CollectorType, + this.ClientName, this.ClientID); } } diff --git a/ReportObjects/EntityDB/DBCollector.cs b/ReportObjects/EntityDB/DBCollector.cs index 0668324..80ed048 100644 --- a/ReportObjects/EntityDB/DBCollector.cs +++ b/ReportObjects/EntityDB/DBCollector.cs @@ -16,7 +16,7 @@ public override String ToString() "DBCollector: {0}/{1}({2}) [{3}]", this.Controller, this.CollectorName, - this.CollectorID, + this.CollectorID, this.CollectorType); } } diff --git a/ReportObjects/EntityDB/DBDatabase.cs b/ReportObjects/EntityDB/DBDatabase.cs index 7b2594f..aea41f5 100644 --- a/ReportObjects/EntityDB/DBDatabase.cs +++ b/ReportObjects/EntityDB/DBDatabase.cs @@ -19,9 +19,9 @@ public override String ToString() "DBDatabase: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.DatabaseName, + this.ConfigID, + this.CollectorType, + this.DatabaseName, this.DatabaseID); } } diff --git a/ReportObjects/EntityDB/DBEntityBase.cs b/ReportObjects/EntityDB/DBEntityBase.cs index 6477823..0a39e67 100644 --- a/ReportObjects/EntityDB/DBEntityBase.cs +++ b/ReportObjects/EntityDB/DBEntityBase.cs @@ -10,7 +10,7 @@ public class DBEntityBase public string ApplicationName { get; set; } public long ApplicationID { get; set; } public string ApplicationLink { get; set; } - + public long ConfigID { get; set; } public long CollectorID { get; set; } diff --git a/ReportObjects/EntityDB/DBModule.cs b/ReportObjects/EntityDB/DBModule.cs index 2733b88..079fbda 100644 --- a/ReportObjects/EntityDB/DBModule.cs +++ b/ReportObjects/EntityDB/DBModule.cs @@ -19,9 +19,9 @@ public override String ToString() "DBModule: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.ModuleName, + this.ConfigID, + this.CollectorType, + this.ModuleName, this.ModuleID); } } diff --git a/ReportObjects/EntityDB/DBProgram.cs b/ReportObjects/EntityDB/DBProgram.cs index 8c80e59..aba50d2 100644 --- a/ReportObjects/EntityDB/DBProgram.cs +++ b/ReportObjects/EntityDB/DBProgram.cs @@ -19,9 +19,9 @@ public override String ToString() "DBProgram: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.ProgramName, + this.ConfigID, + this.CollectorType, + this.ProgramName, this.ProgramID); } } diff --git a/ReportObjects/EntityDB/DBQuery.cs b/ReportObjects/EntityDB/DBQuery.cs index 680288d..491de71 100644 --- a/ReportObjects/EntityDB/DBQuery.cs +++ b/ReportObjects/EntityDB/DBQuery.cs @@ -39,9 +39,9 @@ public override String ToString() "DBQuery: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.QueryHash, + this.ConfigID, + this.CollectorType, + this.QueryHash, this.QueryID); } } diff --git a/ReportObjects/EntityDB/DBSession.cs b/ReportObjects/EntityDB/DBSession.cs index ae3a19c..7073d81 100644 --- a/ReportObjects/EntityDB/DBSession.cs +++ b/ReportObjects/EntityDB/DBSession.cs @@ -21,9 +21,9 @@ public override String ToString() "DBSession: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.SessionName, + this.ConfigID, + this.CollectorType, + this.SessionName, this.SessionID); } } diff --git a/ReportObjects/EntityDB/DBUser.cs b/ReportObjects/EntityDB/DBUser.cs index ff9d30c..caff189 100644 --- a/ReportObjects/EntityDB/DBUser.cs +++ b/ReportObjects/EntityDB/DBUser.cs @@ -19,9 +19,9 @@ public override String ToString() "DBUser: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.DBUserName, + this.ConfigID, + this.CollectorType, + this.DBUserName, this.UserID); } } diff --git a/ReportObjects/EntityDB/DBWaitState.cs b/ReportObjects/EntityDB/DBWaitState.cs index 7d123fe..0030a30 100644 --- a/ReportObjects/EntityDB/DBWaitState.cs +++ b/ReportObjects/EntityDB/DBWaitState.cs @@ -17,9 +17,9 @@ public override String ToString() "DBWaitState: {0}/{1}({2}) [{3}] {4}({5})", this.Controller, this.CollectorName, - this.ConfigID, - this.CollectorType, - this.State, + this.ConfigID, + this.CollectorType, + this.State, this.WaitStateID); } } diff --git a/ReportObjects/EntityMOBILE/MOBILENetworkRequest.cs b/ReportObjects/EntityMOBILE/MOBILENetworkRequest.cs index 2581656..52f2724 100644 --- a/ReportObjects/EntityMOBILE/MOBILENetworkRequest.cs +++ b/ReportObjects/EntityMOBILE/MOBILENetworkRequest.cs @@ -31,7 +31,7 @@ public class MOBILENetworkRequest : MOBILEEntityBase public long Server { get; set; } public long HttpErrors { get; set; } - public long HttpEPM{ get; set; } + public long HttpEPM { get; set; } public long NetworkErrors { get; set; } public long NetworkEPM { get; set; } diff --git a/ReportObjects/EntityMOBILE/MOBILENetworkRequestToBusinessTransaction.cs b/ReportObjects/EntityMOBILE/MOBILENetworkRequestToBusinessTransaction.cs index b852e28..78d7de3 100644 --- a/ReportObjects/EntityMOBILE/MOBILENetworkRequestToBusinessTransaction.cs +++ b/ReportObjects/EntityMOBILE/MOBILENetworkRequestToBusinessTransaction.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace AppDynamics.Dexter.ReportObjects { diff --git a/ReportObjects/EntitySIM/Maps/SIMMachineProcessReportMap.cs b/ReportObjects/EntitySIM/Maps/SIMMachineProcessReportMap.cs index 411cf09..e6ab9c2 100644 --- a/ReportObjects/EntitySIM/Maps/SIMMachineProcessReportMap.cs +++ b/ReportObjects/EntitySIM/Maps/SIMMachineProcessReportMap.cs @@ -31,7 +31,7 @@ public SIMMachineProcessReportMap() Map(m => m.PID).Index(i); i++; Map(m => m.ParentPID).Index(i); i++; Map(m => m.PGID).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.TierID).Index(i); i++; Map(m => m.NodeID).Index(i); i++; diff --git a/ReportObjects/Event/Maps/ApplicationEventSummaryReportMap.cs b/ReportObjects/Event/Maps/ApplicationEventSummaryReportMap.cs index 0e50183..cf718ba 100644 --- a/ReportObjects/Event/Maps/ApplicationEventSummaryReportMap.cs +++ b/ReportObjects/Event/Maps/ApplicationEventSummaryReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class ApplicationEventSummaryReportMap: ClassMap + public class ApplicationEventSummaryReportMap : ClassMap { public ApplicationEventSummaryReportMap() { diff --git a/ReportObjects/FlameGraph/FoldedStackLine.cs b/ReportObjects/FlameGraph/FoldedStackLine.cs index e7b549e..aff2d73 100644 --- a/ReportObjects/FlameGraph/FoldedStackLine.cs +++ b/ReportObjects/FlameGraph/FoldedStackLine.cs @@ -1,7 +1,7 @@ using System; -using System.Text; -using System.Linq; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.RegularExpressions; namespace AppDynamics.Dexter.ReportObjects @@ -79,7 +79,7 @@ public FoldedStackLine(MethodCallLine methodCallLine, bool includeTimeOfEvent) // Add stack frame to the beginning of the string if (sbFoldedCallStack.Length > 0) sbFoldedCallStack.Insert(0, ";"); sbFoldedCallStack.Insert(0, methodCallLine.FullName); - + // Add method timing to the array this.StackTimingArray[methodCallLine.Depth + numberOfSpecialSlotsForTime] = methodCallLine.Exec; @@ -107,9 +107,9 @@ public FoldedStackLine(MethodCallLine methodCallLine, bool includeTimeOfEvent) { // Add synthetic frames for Flame Chart if (sbFoldedCallStack.Length > 0) sbFoldedCallStack.Insert(0, ";"); - sbFoldedCallStack.Insert(0, - String.Format("{0:yyyyMMddHH};{1};{2:00}", - methodCallLineOriginal.Occurred, + sbFoldedCallStack.Insert(0, + String.Format("{0:yyyyMMddHH};{1};{2:00}", + methodCallLineOriginal.Occurred, get10MinuteRange(methodCallLineOriginal.Occurred.Minute), methodCallLineOriginal.Occurred.Minute)); this.StackTimingArray[0] = 0; @@ -171,7 +171,7 @@ public void AddFoldedStackLine(FoldedStackLine foldedStackLineToAdd) } else if ( (this.ExitCallsArray[i] == null || this.ExitCallsArray[i].Length == 0) && - foldedStackLineToAdd.ExitCallsArray[i] != null && + foldedStackLineToAdd.ExitCallsArray[i] != null && foldedStackLineToAdd.ExitCallsArray[i].Length > 0) { // Move the target exit call into here @@ -182,7 +182,7 @@ public void AddFoldedStackLine(FoldedStackLine foldedStackLineToAdd) (foldedStackLineToAdd.ExitCallsArray[i] == null || foldedStackLineToAdd.ExitCallsArray[i].Length == 0)) { // Do nothing, nothing to join - } + } } } } @@ -190,7 +190,7 @@ public void AddFoldedStackLine(FoldedStackLine foldedStackLineToAdd) public override String ToString() { return String.Format( - "{0} {1} {2}", + "{0} {1} {2}", this.NumSamples, this.StackTiming, this.FoldedStack); diff --git a/ReportObjects/License/License.cs b/ReportObjects/License/License.cs index cd3b312..e2effe6 100644 --- a/ReportObjects/License/License.cs +++ b/ReportObjects/License/License.cs @@ -34,7 +34,7 @@ public override String ToString() return String.Format( "License: {0}/{1} {2}/{3}", this.Controller, - this.AccountName, + this.AccountName, this.Average, this.Provisioned); } diff --git a/ReportObjects/Metric/Maps/ApplicationMetricReportMap.cs b/ReportObjects/Metric/Maps/ApplicationMetricReportMap.cs index db17267..be84c97 100644 --- a/ReportObjects/Metric/Maps/ApplicationMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/ApplicationMetricReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class ApplicationMetricReportMap: ClassMap + public class ApplicationMetricReportMap : ClassMap { public ApplicationMetricReportMap() { diff --git a/ReportObjects/Metric/Maps/BackendMetricReportMap.cs b/ReportObjects/Metric/Maps/BackendMetricReportMap.cs index 9ca8ad9..43326a6 100644 --- a/ReportObjects/Metric/Maps/BackendMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/BackendMetricReportMap.cs @@ -7,7 +7,7 @@ public class BackendMetricReportMap : ClassMap { public BackendMetricReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.BackendName).Index(i); i++; diff --git a/ReportObjects/Metric/Maps/BusinessTransactionMetricReportMap.cs b/ReportObjects/Metric/Maps/BusinessTransactionMetricReportMap.cs index 2e85090..59f4099 100644 --- a/ReportObjects/Metric/Maps/BusinessTransactionMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/BusinessTransactionMetricReportMap.cs @@ -7,7 +7,7 @@ public class BusinessTransactionMetricReportMap : ClassMap m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/Metric/Maps/ErrorMetricReportMap.cs b/ReportObjects/Metric/Maps/ErrorMetricReportMap.cs index 8cbe825..81306a8 100644 --- a/ReportObjects/Metric/Maps/ErrorMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/ErrorMetricReportMap.cs @@ -7,7 +7,7 @@ public class ErrorMetricReportMap : ClassMap { public ErrorMetricReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/Metric/Maps/InformationPointMetricReportMap.cs b/ReportObjects/Metric/Maps/InformationPointMetricReportMap.cs index 81d4d5d..5a5aef4 100644 --- a/ReportObjects/Metric/Maps/InformationPointMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/InformationPointMetricReportMap.cs @@ -7,7 +7,7 @@ public class InformationPointMetricReportMap : ClassMap { public InformationPointMetricReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.IPName).Index(i); i++; diff --git a/ReportObjects/Metric/Maps/NodeMetricReportMap.cs b/ReportObjects/Metric/Maps/NodeMetricReportMap.cs index 209327d..25de1ff 100644 --- a/ReportObjects/Metric/Maps/NodeMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/NodeMetricReportMap.cs @@ -7,7 +7,7 @@ public class NodeMetricReportMap : ClassMap { public NodeMetricReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/Metric/Maps/ServiceEndpointMetricReportMap.cs b/ReportObjects/Metric/Maps/ServiceEndpointMetricReportMap.cs index cdb5da4..159a7b0 100644 --- a/ReportObjects/Metric/Maps/ServiceEndpointMetricReportMap.cs +++ b/ReportObjects/Metric/Maps/ServiceEndpointMetricReportMap.cs @@ -7,7 +7,7 @@ public class ServiceEndpointMetricReportMap : ClassMap { public ServiceEndpointMetricReportMap() { - int i = 0; + int i = 0; Map(m => m.Controller).Index(i); i++; Map(m => m.ApplicationName).Index(i); i++; Map(m => m.TierName).Index(i); i++; diff --git a/ReportObjects/RBAC/RBACEntityBase.cs b/ReportObjects/RBAC/RBACEntityBase.cs index 6a1dd80..a28274c 100644 --- a/ReportObjects/RBAC/RBACEntityBase.cs +++ b/ReportObjects/RBAC/RBACEntityBase.cs @@ -5,7 +5,7 @@ namespace AppDynamics.Dexter.ReportObjects public class RBACEntityBase { public string Controller { get; set; } - + public string CreatedBy { get; set; } public string UpdatedBy { get; set; } diff --git a/ReportObjects/RBAC/RBACGroup.cs b/ReportObjects/RBAC/RBACGroup.cs index cc27684..b461f1b 100644 --- a/ReportObjects/RBAC/RBACGroup.cs +++ b/ReportObjects/RBAC/RBACGroup.cs @@ -16,7 +16,7 @@ public override String ToString() return String.Format( "RBACGroup: {0}/{1}({2})", this.Controller, - this.GroupName, + this.GroupName, this.SecurityProvider); } } diff --git a/ReportObjects/RBAC/RBACUser.cs b/ReportObjects/RBAC/RBACUser.cs index 064f5f3..fb367bf 100644 --- a/ReportObjects/RBAC/RBACUser.cs +++ b/ReportObjects/RBAC/RBACUser.cs @@ -17,7 +17,7 @@ public override String ToString() return String.Format( "RBACUser: {0}/{1}({2})", this.Controller, - this.UserName, + this.UserName, this.SecurityProvider); } } diff --git a/ReportObjects/RBAC/RBACUserPermission.cs b/ReportObjects/RBAC/RBACUserPermission.cs index af931a6..a8709f6 100644 --- a/ReportObjects/RBAC/RBACUserPermission.cs +++ b/ReportObjects/RBAC/RBACUserPermission.cs @@ -32,8 +32,8 @@ public override String ToString() this.Controller, this.UserName, this.GroupName, - this.RoleName, - this.PermissionName, + this.RoleName, + this.PermissionName, this.Allowed); } } diff --git a/ReportObjects/Snapshot/CallChainContainer.cs b/ReportObjects/Snapshot/CallChainContainer.cs index 34b105a..d3a9570 100644 --- a/ReportObjects/Snapshot/CallChainContainer.cs +++ b/ReportObjects/Snapshot/CallChainContainer.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Text; namespace AppDynamics.Dexter.ReportObjects @@ -37,7 +36,7 @@ public override string ToString() } if (i < this.CallTimings.Count - 1) { - sb.Append(", "); + sb.Append(", "); } } if (this.CallTimings.Count > 1) diff --git a/ReportObjects/Snapshot/Maps/BusinessDataReportMap.cs b/ReportObjects/Snapshot/Maps/BusinessDataReportMap.cs index 7653a7c..06011ab 100644 --- a/ReportObjects/Snapshot/Maps/BusinessDataReportMap.cs +++ b/ReportObjects/Snapshot/Maps/BusinessDataReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class BusinessDataReportMap: ClassMap + public class BusinessDataReportMap : ClassMap { public BusinessDataReportMap() { diff --git a/ReportObjects/Snapshot/Maps/ExitCallReportMap.cs b/ReportObjects/Snapshot/Maps/ExitCallReportMap.cs index b68e588..1d489eb 100644 --- a/ReportObjects/Snapshot/Maps/ExitCallReportMap.cs +++ b/ReportObjects/Snapshot/Maps/ExitCallReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class ExitCallReportMap: ClassMap + public class ExitCallReportMap : ClassMap { public ExitCallReportMap() { @@ -56,7 +56,7 @@ public ExitCallReportMap() Map(m => m.SQLOrderBy).Index(i); i++; Map(m => m.SQLUnion).Index(i); i++; Map(m => m.SQLWhere).Index(i); i++; - + Map(m => m.URLCleaned).Index(i); i++; Map(m => m.URLScheme).Index(i); i++; Map(m => m.URLHost).Index(i); i++; diff --git a/ReportObjects/Snapshot/Maps/SegmentReportMap.cs b/ReportObjects/Snapshot/Maps/SegmentReportMap.cs index f48f6e7..1c6a772 100644 --- a/ReportObjects/Snapshot/Maps/SegmentReportMap.cs +++ b/ReportObjects/Snapshot/Maps/SegmentReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class SegmentReportMap: ClassMap + public class SegmentReportMap : ClassMap { public SegmentReportMap() { @@ -74,7 +74,7 @@ public SegmentReportMap() Map(m => m.NumCallsToApplications).Index(i); i++; Map(m => m.NumSEPs).Index(i); i++; - + Map(m => m.NumHTTPDCs).Index(i); i++; Map(m => m.NumMIDCs).Index(i); i++; diff --git a/ReportObjects/Snapshot/Maps/ServiceEndpointCallReportMap.cs b/ReportObjects/Snapshot/Maps/ServiceEndpointCallReportMap.cs index 6aa3e96..29255f6 100644 --- a/ReportObjects/Snapshot/Maps/ServiceEndpointCallReportMap.cs +++ b/ReportObjects/Snapshot/Maps/ServiceEndpointCallReportMap.cs @@ -28,7 +28,7 @@ public ServiceEndpointCallReportMap() Map(m => m.SEPName).Index(i); i++; Map(m => m.SEPType).Index(i); i++; - + Map(m => m.ApplicationID).Index(i); i++; Map(m => m.TierID).Index(i); i++; Map(m => m.NodeID).Index(i); i++; diff --git a/ReportObjects/Snapshot/Maps/SnapshotReportMap.cs b/ReportObjects/Snapshot/Maps/SnapshotReportMap.cs index 2dbf9fd..75de351 100644 --- a/ReportObjects/Snapshot/Maps/SnapshotReportMap.cs +++ b/ReportObjects/Snapshot/Maps/SnapshotReportMap.cs @@ -3,7 +3,7 @@ namespace AppDynamics.Dexter.ReportObjectMaps { - public class SnapshotReportMap: ClassMap + public class SnapshotReportMap : ClassMap { public SnapshotReportMap() { diff --git a/ReportObjects/Snapshot/MethodCallLine.cs b/ReportObjects/Snapshot/MethodCallLine.cs index 6a0f1f8..fb6f874 100644 --- a/ReportObjects/Snapshot/MethodCallLine.cs +++ b/ReportObjects/Snapshot/MethodCallLine.cs @@ -51,7 +51,7 @@ public class MethodCallLine public bool ExecAdjusted { get; set; } public string ExecRange { get; set; } - + public int Depth { get; set; } public MethodCallLineElementType ElementType { get; set; } public int NumChildren { get; set; } diff --git a/ReportObjects/Snapshot/MethodCallLineElementType.cs b/ReportObjects/Snapshot/MethodCallLineElementType.cs index a512257..93164c9 100644 --- a/ReportObjects/Snapshot/MethodCallLineElementType.cs +++ b/ReportObjects/Snapshot/MethodCallLineElementType.cs @@ -1,6 +1,4 @@ -using System; - -namespace AppDynamics.Dexter.ReportObjects +namespace AppDynamics.Dexter.ReportObjects { public enum MethodCallLineElementType { diff --git a/global.json b/global.json index fd50db3..89cff3e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.2.104" + "version": "2.2.401" } } \ No newline at end of file