Skip to content

Commit 82dec2e

Browse files
Added support for more CUSTOM backends recognition
Fixed excessive number of hyperlinks corrupting large reports Added all components of Snapshot report
1 parent cdf2e8c commit 82dec2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+5090
-2124
lines changed

AppDynamics.Dexter.csproj

+47-39
Original file line numberDiff line numberDiff line change
@@ -98,45 +98,53 @@
9898
<Compile Include="Program.cs" />
9999
<Compile Include="DataObjects\ProgramOptions\ProgramOptions.cs" />
100100
<Compile Include="Properties\AssemblyInfo.cs" />
101-
<Compile Include="ReportObjects\Segment.cs" />
102-
<Compile Include="ReportObjects\Snapshot.cs" />
103-
<Compile Include="ReportObjects\EventReportMaps\HealthRuleViolationEventReportMap.cs" />
104-
<Compile Include="ReportObjects\HealthRuleViolationEvent.cs" />
105-
<Compile Include="ReportObjects\Event.cs" />
106-
<Compile Include="ReportObjects\ActivityFlow.cs" />
107-
<Compile Include="ReportObjects\ActivityFlowReportMaps\ActivityFlowReportMap.cs" />
108-
<Compile Include="ReportObjects\EventReportMaps\EventReportMap.cs" />
109-
<Compile Include="ReportObjects\MetricSummary.cs" />
110-
<Compile Include="ReportObjects\MetricReportMaps\MetricSummaryMetricReportMap.cs" />
111-
<Compile Include="ReportObjects\MetricReportMaps\ErrorMetricReportMap.cs" />
112-
<Compile Include="ReportObjects\MetricReportMaps\ServiceEndpointMetricReportMap.cs" />
113-
<Compile Include="ReportObjects\MetricReportMaps\BusinessTransactionMetricReportMap.cs" />
114-
<Compile Include="ReportObjects\EntityBase.cs" />
115-
<Compile Include="ReportObjects\MetricEnums.cs" />
116-
<Compile Include="ReportObjects\MetricReportMaps\MetricValueMetricReportMap.cs" />
117-
<Compile Include="ReportObjects\MetricValue.cs" />
118-
<Compile Include="ReportObjects\MetricReportMaps\BackendMetricReportMap.cs" />
119-
<Compile Include="ReportObjects\MetricReportMaps\NodeMetricReportMap.cs" />
120-
<Compile Include="ReportObjects\MetricReportMaps\TierMetricReportMap.cs" />
121-
<Compile Include="ReportObjects\EntityBusinessTransaction.cs" />
122-
<Compile Include="ReportObjects\EntityNode.cs" />
123-
<Compile Include="ReportObjects\EntityReportMaps\BusinessTransactionEntityReportMap.cs" />
124-
<Compile Include="ReportObjects\EntityReportMaps\NodeEntityReportMap.cs" />
125-
<Compile Include="ReportObjects\EntityBackend.cs" />
126-
<Compile Include="ReportObjects\EntityReportMaps\BackendEntityReportMap.cs" />
127-
<Compile Include="ReportObjects\EntityServiceEndpoint.cs" />
128-
<Compile Include="ReportObjects\EntityReportMaps\ServiceEndpointEntityReportMap.cs" />
129-
<Compile Include="ReportObjects\EntityError.cs" />
130-
<Compile Include="ReportObjects\EntityReportMaps\ErrorEntityReportMap.cs" />
131-
<Compile Include="ReportObjects\EntityReportMaps\TierEntityReportMap.cs" />
132-
<Compile Include="ReportObjects\EntityTier.cs" />
133-
<Compile Include="ReportObjects\EntityApplication.cs" />
134-
<Compile Include="ReportObjects\EntityReportMaps\ApplicationEntityReportMap.cs" />
135-
<Compile Include="ReportObjects\EntityController.cs" />
136-
<Compile Include="ReportObjects\EntityReportMaps\ControllerEntityReportMap.cs" />
137-
<Compile Include="ReportObjects\MetricReportMaps\ApplicationMetricReportMap.cs" />
138-
<Compile Include="ReportObjects\SnapshotReportMaps\SegmentReportMap.cs" />
139-
<Compile Include="ReportObjects\SnapshotReportMaps\SnapshotReportMap.cs" />
101+
<Compile Include="ReportObjects\Snapshot\Maps\BusinessDataReportMap.cs" />
102+
<Compile Include="ReportObjects\Snapshot\BusinessData.cs" />
103+
<Compile Include="ReportObjects\Snapshot\ExitCall.cs" />
104+
<Compile Include="ReportObjects\Snapshot\Maps\DetectedErrorReportMap.cs" />
105+
<Compile Include="ReportObjects\Snapshot\Maps\ServiceEndpointCallReportMap.cs" />
106+
<Compile Include="ReportObjects\Snapshot\Maps\ExitCallReportMap.cs" />
107+
<Compile Include="ReportObjects\Snapshot\Segment.cs" />
108+
<Compile Include="ReportObjects\Snapshot\DetectedError.cs" />
109+
<Compile Include="ReportObjects\Snapshot\ServiceEndpointCall.cs" />
110+
<Compile Include="ReportObjects\Snapshot\Snapshot.cs" />
111+
<Compile Include="ReportObjects\Event\Maps\HealthRuleViolationEventReportMap.cs" />
112+
<Compile Include="ReportObjects\Event\HealthRuleViolationEvent.cs" />
113+
<Compile Include="ReportObjects\Event\Event.cs" />
114+
<Compile Include="ReportObjects\ActivityFlow\ActivityFlow.cs" />
115+
<Compile Include="ReportObjects\ActivityFlow\Maps\ActivityFlowReportMap.cs" />
116+
<Compile Include="ReportObjects\Event\Maps\EventReportMap.cs" />
117+
<Compile Include="ReportObjects\Metric\MetricSummary.cs" />
118+
<Compile Include="ReportObjects\Metric\Maps\MetricSummaryMetricReportMap.cs" />
119+
<Compile Include="ReportObjects\Metric\Maps\ErrorMetricReportMap.cs" />
120+
<Compile Include="ReportObjects\Metric\Maps\ServiceEndpointMetricReportMap.cs" />
121+
<Compile Include="ReportObjects\Metric\Maps\BusinessTransactionMetricReportMap.cs" />
122+
<Compile Include="ReportObjects\Entity\EntityBase.cs" />
123+
<Compile Include="ReportObjects\Metric\MetricEnums.cs" />
124+
<Compile Include="ReportObjects\Metric\Maps\MetricValueMetricReportMap.cs" />
125+
<Compile Include="ReportObjects\Metric\MetricValue.cs" />
126+
<Compile Include="ReportObjects\Metric\Maps\BackendMetricReportMap.cs" />
127+
<Compile Include="ReportObjects\Metric\Maps\NodeMetricReportMap.cs" />
128+
<Compile Include="ReportObjects\Metric\Maps\TierMetricReportMap.cs" />
129+
<Compile Include="ReportObjects\Entity\EntityBusinessTransaction.cs" />
130+
<Compile Include="ReportObjects\Entity\EntityNode.cs" />
131+
<Compile Include="ReportObjects\Entity\Maps\BusinessTransactionEntityReportMap.cs" />
132+
<Compile Include="ReportObjects\Entity\Maps\NodeEntityReportMap.cs" />
133+
<Compile Include="ReportObjects\Entity\EntityBackend.cs" />
134+
<Compile Include="ReportObjects\Entity\Maps\BackendEntityReportMap.cs" />
135+
<Compile Include="ReportObjects\Entity\EntityServiceEndpoint.cs" />
136+
<Compile Include="ReportObjects\Entity\Maps\ServiceEndpointEntityReportMap.cs" />
137+
<Compile Include="ReportObjects\Entity\EntityError.cs" />
138+
<Compile Include="ReportObjects\Entity\Maps\ErrorEntityReportMap.cs" />
139+
<Compile Include="ReportObjects\Entity\Maps\TierEntityReportMap.cs" />
140+
<Compile Include="ReportObjects\Entity\EntityTier.cs" />
141+
<Compile Include="ReportObjects\Entity\EntityApplication.cs" />
142+
<Compile Include="ReportObjects\Entity\Maps\ApplicationEntityReportMap.cs" />
143+
<Compile Include="ReportObjects\Entity\EntityController.cs" />
144+
<Compile Include="ReportObjects\Entity\Maps\ControllerEntityReportMap.cs" />
145+
<Compile Include="ReportObjects\Metric\Maps\ApplicationMetricReportMap.cs" />
146+
<Compile Include="ReportObjects\Snapshot\Maps\SegmentReportMap.cs" />
147+
<Compile Include="ReportObjects\Snapshot\Maps\SnapshotReportMap.cs" />
140148
</ItemGroup>
141149
<ItemGroup>
142150
<None Include="App.config" />

ControllerApi/ControllerApi.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Net;
55
using System.Net.Http;
66
using System.Net.Http.Headers;
7+
using System.Reflection;
78

89
namespace AppDynamics.Dexter
910
{
@@ -48,7 +49,8 @@ public ControllerApi(string controllerURL, string userName, string userPassword)
4849
httpClient.Timeout = new TimeSpan(0, 3, 0);
4950
httpClient.BaseAddress = new Uri(this.ControllerUrl);
5051
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(string.Format("{0}:{1}", this.UserName, this.Password))));
51-
52+
httpClient.DefaultRequestHeaders.Add("x-requested-by", String.Format("AppDynamics DEXTER {0}", Assembly.GetEntryAssembly().GetName().Version));
53+
5254
// If customer controller certificates are not in trusted store, let's not fail
5355
ServicePointManager.ServerCertificateValidationCallback += ignoreBadCertificates;
5456
// If customer controller is still leveraging old TLS or SSL3 protocols, enable that
@@ -148,6 +150,11 @@ public string GetListOfBackends(int applicationID)
148150
return this.GetListOfBackends(applicationID.ToString());
149151
}
150152

153+
public string GetListOfBackendsAdditionalDetail(int applicationID)
154+
{
155+
return this.apiGET(String.Format("controller/restui/backendUiService/backendListViewData/{0}/false?time-range=last_15_minutes.BEFORE_NOW.-1.-1.15", applicationID), "application/json", true);
156+
}
157+
151158
public string GetListOfServiceEndpoints(string applicationName)
152159
{
153160
return this.apiGET(String.Format("controller/rest/applications/{0}/metric-data?metric-path=Service Endpoints|*|*|Calls per Minute&time-range-type=BEFORE_NOW&duration-in-mins=15&output=JSON", applicationName), "application/json", false);
@@ -168,7 +175,7 @@ public string GetListOfServiceEndpointsInTier(int applicationID, string tierName
168175
return this.GetListOfServiceEndpointsInTier(applicationID.ToString(), tierName);
169176
}
170177

171-
public string GetListOfServiceEndpointsWithDetail(int applicationID)
178+
public string GetListOfServiceEndpointsAdditionalDetail(int applicationID)
172179
{
173180
return this.apiGET(String.Format("controller/restui/serviceEndpoint/list2/{0}/{0}/APPLICATION?time-range=last_15_minutes.BEFORE_NOW.-1.-1.15", applicationID), "application/json", true);
174181
}

DataObjects/JobConfiguration/JobStatus.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public enum JobStatus
2222
ReportControllerAndApplicationConfiguration = 22,
2323
ReportEventsAndHealthRuleViolations = 23,
2424
ReportApplicationAndEntityMetrics = 24,
25-
ReportIndividualApplicationAndEntityDetails = 25,
26-
ReportSnapshots = 26,
25+
ReportSnapshots = 25,
26+
ReportIndividualApplicationAndEntityDetails = 26,
2727
ReportFlameGraphs = 27,
2828

2929
Done = 30,

Helpers/AESEncryptionHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static string Decrypt(string cipherText)
5656
}
5757
catch (FormatException ex)
5858
{
59-
if (ex.Message == "Invalid length for a Base-64 char array or string.")
59+
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"))
6060
{
6161
// This is plaintext
6262
return cipherText;

JobFiles/DefaultJob.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"Input": {
33
"TimeRange" : {
4-
"From": "2017-06-26T18:00:00",
5-
"To": "2017-06-26T19:59:00"
4+
"From": "2017-10-01T18:00:00",
5+
"To": "2017-10-02T19:00:00"
66
},
77
"Flowmaps": true,
88
"Metrics": true,
99
"Snapshots": true,
10-
"Configuration": true,
11-
"Events": true
10+
"Events": true,
11+
"Configuration": true
1212
},
1313
"Target": [
1414
{

NLog.config

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@
99
<!-- optional, add some variables
1010
https://github.com/nlog/NLog/wiki/Configuration-file#variables
1111
-->
12-
<variable name="myvar" value="myvalue"/>
13-
1412
<!--
1513
See https://github.com/nlog/nlog/wiki/Configuration-file
1614
for information on customizing logging rules and outputs.
1715
-->
1816
<targets>
1917
<target name="mainLog" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
20-
<target name="mainLog1" xsi:type="File" fileName="logs/AppDynamics.Dexter.Main.${shortdate}.log" keepFileOpen="true" openFileCacheTimeout="30" autoFlush="false" layout="${longdate}|${level}|${processname}|${processid}|${threadid}|${logger}|${message}"/>
18+
<target name="mainLog1" xsi:type="File" fileName="logs/AppDynamics.Dexter.Main.${shortdate}.log" keepFileOpen="true" openFileCacheTimeout="30" autoFlush="false" archiveAboveSize="52428800" archiveFileName="logs/AppDynamics.Dexter.Main.${shortdate}.{#####}.log" layout="${longdate}|${level}|${processname}|${processid}|${threadid}|${logger}|${message}"/>
2119
</target>
2220
<target name="controllerApiLog" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
23-
<target name="controllerApiLog1" xsi:type="File" fileName="logs/AppDynamics.Dexter.Controller.${shortdate}.log" keepFileOpen="true" openFileCacheTimeout="30" autoFlush="false" layout="${longdate}|${level}|${processname}|${processid}|${threadid}|${logger}|${message}"/>
21+
<target name="controllerApiLog1" xsi:type="File" fileName="logs/AppDynamics.Dexter.Controller.${shortdate}.log" keepFileOpen="true" openFileCacheTimeout="30" autoFlush="false" archiveAboveSize="52428800" archiveFileName="logs/AppDynamics.Dexter.Controller.${shortdate}.{#####}.log" layout="${longdate}|${level}|${processname}|${processid}|${threadid}|${logger}|${message}"/>
2422
</target>
2523
<target name="consoleLog" xsi:type="File" fileName="logs/AppDynamics.Dexter.Console.${shortdate}.log" keepFileOpen="true" openFileCacheTimeout="30" autoFlush="true" layout="${longdate}|${level}|${processname}|${processid}|${threadid}|${logger}|${message}"/>
2624
<target name="console" xsi:type="ColoredConsole" layout="${message}" />
@@ -31,7 +29,6 @@
3129
<logger name="AppDynamics.Dexter.Program" minlevel="Trace" writeTo="mainLog" final="true" />
3230
<logger name="AppDynamics.Dexter.PrepareJob" minlevel="Trace" writeTo="mainLog" final="true" />
3331
<logger name="AppDynamics.Dexter.ProcessJob" minlevel="Trace" writeTo="mainLog" final="true" />
34-
<logger name="xxxxxxxAppDynamics.Dexter.JobConfigurationHelper" minlevel="Trace" writeTo="mainLog" final="true" />
3532
<logger name="AppDynamics.Dexter.FileIOHelper" minlevel="Trace" writeTo="mainLog" final="true" />
3633
-->
3734
<logger name="AppDynamics.Dexter.ControllerApi" minlevel="Trace" writeTo="controllerApiLog" final="true" />

0 commit comments

Comments
 (0)