Skip to content

Commit

Permalink
Snapshots report:
Browse files Browse the repository at this point in the history
- Adjusted number of threads to use for snapshot extraction for SaaS controllers
- Adjusted size of chunk of snapshots for indexing

Detected APM Entities report:
- Added BT and Backend rule mappings for entities detected via explicit rules

Licenses report:
- Disabled
  • Loading branch information
danielodievich committed May 21, 2019
1 parent 4df81fd commit c97f747
Show file tree
Hide file tree
Showing 15 changed files with 2,835 additions and 2,590 deletions.
2 changes: 0 additions & 2 deletions DefaultJob.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
},
"UsersGroupsRolesPermissions": true,
"Dashboards": true,
"Licenses": true,
"Events": true,
"Configuration": true,
"ConfigurationComparisonReferenceCriteria": {
Expand Down Expand Up @@ -131,7 +130,6 @@
"Output": {
"UsersGroupsRolesPermissions": true,
"Dashboards": true,
"Licenses": true,
"Events": true,
"Configuration": true,
"DetectedEntities": true,
Expand Down
15 changes: 11 additions & 4 deletions ProcessingSteps/Extract/ExtractAPMSnapshots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ namespace AppDynamics.Dexter.ProcessingSteps
{
public class ExtractAPMSnapshots : JobStepReportBase
{
private const int SNAPSHOTS_EXTRACT_NUMBER_OF_ENTITIES_TO_PROCESS_PER_THREAD = 50;
private const int SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS = 8;
private const int SNAPSHOTS_EXTRACT_NUMBER_OF_SNAPSHOTS_TO_PROCESS_PER_THREAD = 128;
private const int SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS_ONPREM = 8;
private const int SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS_SAAS = 16;
private const int SNAPSHOTS_QUERY_PAGE_SIZE = 600;

public override bool Execute(ProgramOptions programOptions, JobConfiguration jobConfiguration)
Expand Down Expand Up @@ -438,11 +439,17 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job

if (programOptions.ProcessSequentially == false)
{
var listOfSnapshotsInHourChunks = listOfSnapshotsInHourFiltered.BreakListIntoChunks(SNAPSHOTS_EXTRACT_NUMBER_OF_ENTITIES_TO_PROCESS_PER_THREAD);
var listOfSnapshotsInHourChunks = listOfSnapshotsInHourFiltered.BreakListIntoChunks(SNAPSHOTS_EXTRACT_NUMBER_OF_SNAPSHOTS_TO_PROCESS_PER_THREAD);

int numThreadsToUseForExtraction = SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS_ONPREM;
if (jobTarget.Controller.ToLower().Contains("saas.appdynamics.com") == true)
{
numThreadsToUseForExtraction = SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS_SAAS;
}

Parallel.ForEach<List<JToken>, int>(
listOfSnapshotsInHourChunks,
new ParallelOptions { MaxDegreeOfParallelism = SNAPSHOTS_EXTRACT_NUMBER_OF_THREADS },
new ParallelOptions { MaxDegreeOfParallelism = numThreadsToUseForExtraction },
() => 0,
(listOfSnapshotsInHourChunk, loop, subtotal) =>
{
Expand Down
77 changes: 62 additions & 15 deletions ProcessingSteps/Index/IndexAPMConfiguration.cs

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions ProcessingSteps/Index/IndexAPMEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,12 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
#region Business Transactions

List<AppDRESTBusinessTransaction> businessTransactionsRESTList = FileIOHelper.LoadListOfObjectsFromFile<AppDRESTBusinessTransaction>(FilePathMap.APMBusinessTransactionsDataFilePath(jobTarget));
List<APMBusinessTransaction> businessTransactionList = null;
List<APMBusinessTransaction> businessTransactionsList = null;
if (businessTransactionsRESTList != null)
{
loggerConsole.Info("Index List of Business Transactions ({0} entities)", businessTransactionsRESTList.Count);

businessTransactionList = new List<APMBusinessTransaction>(businessTransactionsRESTList.Count);
businessTransactionsList = new List<APMBusinessTransaction>(businessTransactionsRESTList.Count);

foreach (AppDRESTBusinessTransaction businessTransactionREST in businessTransactionsRESTList)
{
Expand All @@ -475,15 +475,15 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
updateEntityWithDeeplinks(businessTransaction);
updateEntityWithEntityDetailAndFlameGraphLinks(businessTransaction, jobTarget, jobConfiguration.Input.TimeRange);

businessTransactionList.Add(businessTransaction);
businessTransactionsList.Add(businessTransaction);
}

// Sort them
businessTransactionList = businessTransactionList.OrderBy(o => o.TierName).ThenBy(o => o.BTName).ToList();
businessTransactionsList = businessTransactionsList.OrderBy(o => o.TierName).ThenBy(o => o.BTName).ToList();

FileIOHelper.WriteListToCSVFile(businessTransactionList, new APMBusinessTransactionReportMap(), FilePathMap.APMBusinessTransactionsIndexFilePath(jobTarget));
FileIOHelper.WriteListToCSVFile(businessTransactionsList, new APMBusinessTransactionReportMap(), FilePathMap.APMBusinessTransactionsIndexFilePath(jobTarget));

stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + businessTransactionList.Count;
stepTimingTarget.NumEntities = stepTimingTarget.NumEntities + businessTransactionsList.Count;
}

#endregion
Expand Down Expand Up @@ -906,7 +906,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
if (tiersList != null) application.NumTiers = tiersList.Count;
if (nodesList != null) application.NumNodes = nodesList.Count;
if (backendsList != null) application.NumBackends = backendsList.Count;
if (businessTransactionList != null) application.NumBTs = businessTransactionList.Count;
if (businessTransactionsList != null) application.NumBTs = businessTransactionsList.Count;
if (serviceEndpointsList != null) application.NumSEPs = serviceEndpointsList.Count;
if (errorList != null) application.NumErrors = errorList.Count;
if (informationPointsList != null) application.NumIPs = informationPointsList.Count;
Expand Down
6 changes: 3 additions & 3 deletions ProcessingSteps/Index/IndexAPMSnapshots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace AppDynamics.Dexter.ProcessingSteps
{
public class IndexAPMSnapshots : JobStepIndexBase
{
private const int SNAPSHOTS_INDEX_NUMBER_OF_ENTITIES_TO_PROCESS_PER_THREAD = 100;
private const int SNAPSHOTS_INDEX_NUMBER_OF_SNAPSHOTS_TO_PROCESS_PER_THREAD = 50;

public override bool Execute(ProgramOptions programOptions, JobConfiguration jobConfiguration)
{
Expand Down Expand Up @@ -180,10 +180,10 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
{
IndexedSnapshotsResults indexedSnapshotsResults = null;

if (programOptions.ProcessSequentially == false && listOfBTSnapshotsInHour.Count >= SNAPSHOTS_INDEX_NUMBER_OF_ENTITIES_TO_PROCESS_PER_THREAD)
if (programOptions.ProcessSequentially == false && listOfBTSnapshotsInHour.Count >= SNAPSHOTS_INDEX_NUMBER_OF_SNAPSHOTS_TO_PROCESS_PER_THREAD)
{
// Partition list of BTs into chunks
int chunkSize = SNAPSHOTS_INDEX_NUMBER_OF_ENTITIES_TO_PROCESS_PER_THREAD;
int chunkSize = SNAPSHOTS_INDEX_NUMBER_OF_SNAPSHOTS_TO_PROCESS_PER_THREAD;
var listOfSnapshotsInHourChunks = listOfBTSnapshotsInHour.BreakListIntoChunks(chunkSize);

// Prepare thread safe storage to dump all those chunks
Expand Down
4 changes: 4 additions & 0 deletions ProcessingSteps/Report/ReportAPMEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
sheet = excelReport.Workbook.Worksheets[SHEET_BACKENDS_LOCATION_PIVOT];
pivot = sheet.PivotTables.Add(sheet.Cells[PIVOT_SHEET_START_PIVOT_AT, 1], range, PIVOT_BACKENDS_LOCATION);
setDefaultPivotTableSettings(pivot);
addFilterFieldToPivot(pivot, "IsExplicitRule");
addRowFieldToPivot(pivot, "BackendType", eSortType.Ascending);
addRowFieldToPivot(pivot, "BackendName");
addRowFieldToPivot(pivot, "Controller");
Expand Down Expand Up @@ -1103,6 +1104,7 @@ public override bool Execute(ProgramOptions programOptions, JobConfiguration job
pivot = sheet.PivotTables.Add(sheet.Cells[PIVOT_SHEET_START_PIVOT_AT, 1], range, PIVOT_BUSINESS_TRANSACTIONS_LOCATION);
setDefaultPivotTableSettings(pivot);
addFilterFieldToPivot(pivot, "IsRenamed");
addFilterFieldToPivot(pivot, "IsExplicitRule");
addRowFieldToPivot(pivot, "BTType", eSortType.Ascending);
addRowFieldToPivot(pivot, "BTName");
addRowFieldToPivot(pivot, "Controller");
Expand Down Expand Up @@ -1424,6 +1426,7 @@ private static void adjustColumnsOfEntityRowTableInEntitiesReport(string entityT
sheet.Column(table.Columns["ApplicationName"].Position + 1).Width = 25;
sheet.Column(table.Columns["BackendName"].Position + 1).Width = 20;
sheet.Column(table.Columns["BackendType"].Position + 1).Width = 10;
sheet.Column(table.Columns["RuleName"].Position + 1).Width = 20;
sheet.Column(table.Columns["Prop1Name"].Position + 1).Width = 25;
sheet.Column(table.Columns["Prop2Name"].Position + 1).Width = 25;
sheet.Column(table.Columns["Prop3Name"].Position + 1).Width = 25;
Expand All @@ -1443,6 +1446,7 @@ private static void adjustColumnsOfEntityRowTableInEntitiesReport(string entityT
sheet.Column(table.Columns["BTName"].Position + 1).Width = 20;
sheet.Column(table.Columns["BTNameOriginal"].Position + 1).Width = 20;
sheet.Column(table.Columns["BTType"].Position + 1).Width = 10;
sheet.Column(table.Columns["RuleName"].Position + 1).Width = 20;
}
else if (entityType == APMServiceEndpoint.ENTITY_TYPE)
{
Expand Down
2 changes: 1 addition & 1 deletion ProcessingSteps/Report/ReportAPMMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ReportAPMMetrics : JobStepReportBase
private const string SHEET_TIERS_PERF_PIVOT = "5.Tiers.Perf";
private const string SHEET_NODES_FULL = "6.Nodes";
private const string SHEET_NODES_HOURLY = "6.Nodes.Hourly";
private const string SHEET_NODES_LICENSE_PIVOT = "6.Nodes.License";
private const string SHEET_NODES_LICENSE_PIVOT = "6.Nodes.Availability";
private const string SHEET_NODES_PERF_PIVOT = "6.Nodes.Perf";
private const string SHEET_BACKENDS_FULL = "7.Backends";
private const string SHEET_BACKENDS_HOURLY = "7.Backends.Hourly";
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AppDynamics DEXTER")]
[assembly: AssemblyDescription("Turn your APM data store into a Data Warehouse with advanced reporting, including entities, configuration, metrics, flowmaps, events, snapshots and call graph flame graphs")]
[assembly: AssemblyDescription("Turn your AppDynamics data into a queryable Data Warehouse with advanced reporting, including entities, configuration, metrics, flowmaps, events, snapshots and call graph flame graphs")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Cisco/AppDynamics")]
[assembly: AssemblyProduct("DEXTER - Data EXTraction and Enhanced Reporting")]
Expand All @@ -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.40.0")]
[assembly: AssemblyFileVersion("1.2.40.0")]
[assembly: AssemblyVersion("1.2.40.1")]
[assembly: AssemblyFileVersion("1.2.40.1")]
2 changes: 1 addition & 1 deletion Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"AppDynamics.Dexter.Core": {
"commandName": "Project",
"commandLineArgs": "--jobfile \"C:\\appdynamics\\AppDynamics.DEXTER\\JobFiles\\licensetest.json\" --outputfolder C:\\AppD.Dexter.Out1\\"
"commandLineArgs": "--jobfile \"C:\\appdynamics\\AppDynamics.DEXTER\\JobFiles\\demo1demo2.All.Compare.json\" --outputfolder D:\\AppD.Dexter.Out\\Demo1\\"
}
}
}
3 changes: 3 additions & 0 deletions ReportObjects/EntityAPM/APMBackend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class APMBackend : APMEntityBase

public string BackendType { get; set; }

public bool IsExplicitRule { get; set; }
public string RuleName { get; set; }

public int? NumProps { get; set; }
public string Prop1Name { get; set; }
public string Prop1Value { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions ReportObjects/EntityAPM/APMBusinessTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class APMBusinessTransaction: APMEntityBase
public string BTNameOriginal { get; set; }
public bool IsRenamed { get; set; }

public bool IsExplicitRule { get; set; }
public string RuleName { get; set; }

public override long EntityID
{
get
Expand Down
3 changes: 3 additions & 0 deletions ReportObjects/EntityAPM/Maps/APMBackendReportMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public APMBackendReportMap()
Map(m => m.BackendName).Index(i); i++;
Map(m => m.BackendType).Index(i); i++;

Map(m => m.IsExplicitRule).Index(i); i++;
Map(m => m.RuleName).Index(i); i++;

Map(m => m.NumProps).Index(i); i++;
Map(m => m.Prop1Name).Index(i); i++;
Map(m => m.Prop1Value).Index(i); i++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public APMBusinessTransactionReportMap()
Map(m => m.IsRenamed).Index(i); i++;
Map(m => m.BTType).Index(i); i++;

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++;
Expand Down
Loading

0 comments on commit c97f747

Please sign in to comment.