Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

APM212 - Troubleshooting

Basics

Student Lab Guide


Credit s and Copy ri ght

Notice
Copyright

This document and all information and content contained herein are protected by U.S.
copyright and other intellectual property laws, and are the confidential information of
AppDynamics, LLC. No part of this document may be reproduced, distributed or
displayed in any form or by any means, or used to make any derivative work (such as a
translation or adaptation), without prior written permission from AppDynamics, LLC.

Copyright © 2022 AppDynamics LLC. All rights reserved.

The term APPDYNAMICS and any logos of AppDynamics are trademarked or


registered trademarks of AppDynamics, LLC.
Contents

APM212 Lab Exercises ..........................................................................................................2


212-1 Work with Diagnostic Sessions ................................................................................ 3
212-2 Troubleshoot Slow Business Transactions .............................................................. 5
212-3 Troubleshoot Business Transaction Errors ............................................................ 10
Accessing your AppDynamics University Lab Environment ..................................................16
Accessing your Lab Environment (Primary Method) ........................................................ 17
Accessing your Lab Environment with AWS (Alternate Method) ...................................... 18

© 2020 AppDynamics, LLC. i


APM212 Lab Exercises Student Lab Guide

APM212 Lab Exercises

© 2020 AppDynamics, LLC. 2


APM212 Lab Exercises Student Lab Guide

212-1 Work with Diagnostic Sessions


The Controller captures and retains transaction snapshots at regular intervals and
whenever a transaction experiences a performance issue. Snapshots may have full,
partial, or no call graphs.
You can trigger a manual diagnostic session to capture snapshots with complete
transaction call graphs at more frequent intervals. In a diagnostic session, the
Controller collects snapshots on all nodes that the BT passes through, which you can
use to analyze and troubleshoot the transaction.
Note: Diagnostic sessions can be triggered automatically by a health rule violation or in
response to a high volume of slow or error transactions. In a diagnostic session that is
triggered automatically, the system collects snapshots only on the triggering node.

Lab Preparation
1. In the MovieZtream application, navigate to the Admin > Server Management
page.
2. From the Command drop-down list, select Errors and then click Start Load
Command or Process.
Note: The Errors load triggers a problem with movie rental requests from this point
forward.
3. Verify that you see the confirmation message in the Log window.

Scenario
Because the /customer/rent.htm transaction is business critical, the Dev team
monitors this transaction closely. When errors begin to appear on this transaction in the
Controller, the Dev team asks if it is possible to view calls both before and after the
error. How can you provide this?

You need to run a diagnostic session to capture full call graph snapshots.

© 2020 AppDynamics, LLC. 3


APM212 Lab Exercises Student Lab Guide

Instructions

1. In the Controller UI, from the left navigation pane, click Business Transactions to
navigate to the Business Transactions page.
2. Right-click the /customer/rent.htm BT and select Start Diagnostic Session.
3. Configure the session to collect transaction snapshots for 10 minutes at a rate of 10
snapshots per minute, then click the Start Diagnostic Session button.
4. After approximately two minutes, navigate to the /customer/rent.htm dashboard,
and select the Transaction Snapshots tab.
5. Click the Diagnostic Sessions sub-tab.
6. Below Type, expand the Manual session to view a list of newly collected snapshots
with full call graphs.

Please let your instructor know that you have completed the exercise(s).

© 2020 AppDynamics, LLC. 4


APM212 Lab Exercises Student Lab Guide

212-2 Troubleshoot Slow Business Transactions


The AppDynamics Controller provides several strategies to diagnose and troubleshoot
slow response times. By correlating business transactions with browser snapshots, you
can identify potential issues that can cause a bad user experience. For example, you
might find server errors or database queries that cause a slow or very slow user
experience. This lab provides a basic overview of troubleshooting the root cause of slow
response times using two common workflows:
 Using the Troubleshooting Dashboard.
 Using Slow and Error Transactions.

Scenario A: Troubleshoot the Search.htm BT


Users also complain that it takes a long time to search for movies using the Movies >
Search functionality of the MovieZtream application. To understand the underlying
problem with the response time for these requests and respond accordingly, let's
explore the Troubleshooting Dashboard.

Lab Preparation (for the the following Scenario B)

If you ran the Exercise 1 Load in Lab 211-1 today you may skip the lab preparation
steps and go directly to the Instructions section. Otherwise, follow the steps below.
1. In the MovieZtream application, navigate to the Admin > Server Management
page.
2. From the Command drop-down list, select Exercise 1 Load and then click Start
Load Command or Process.
Note: The Exercise 1 Load triggers higher response times for the
/movieztream_ui/login.htm BT.
3. Verify that you see the confirmation message in the Log window.

Instructions

1. In the Controller UI, from the left navigation pane, click Troubleshoot, then click
Slow Response Times.
2. Verify that the Slow Transactions tab is selected on the Slow Response Times
Dashboard.

© 2020 AppDynamics, LLC. 5


APM212 Lab Exercises Student Lab Guide

3. Set the Time Range drop-down to display data for the last 2 hours.
4. Type search into the search field so that the Slow Transaction Snapshots list
displays only /movie/search.htm snapshots.
5. Locate and double-click a very slow transaction snapshot for /movie/search.htm
that contains a full call graph.

Note: You can recognize a full call graph snapshot by the blue call graph icon: . If
no snapshots with full call graphs are available, double-click one with a partial call
graph, which is indicated by a grey call graph icon.
6. On the Overview tab, review the Flow Map.

7. Use the performance details on the Flow Map to determine the following:
a. How many monitored tiers does this request traverse? ________
b. How many back-ends are there? ________
c. On what tier does this BT spend the most time during the request? ________
8. Click the Drill Down button above the tier that displays the most time.

© 2020 AppDynamics, LLC. 6


APM212 Lab Exercises Student Lab Guide

9. Review the call graph to determine the following:

Which method or methods may be causing this performance issue?


_____________________________________________
10. Close the snapshot window.

Scenario B: Troubleshoot the Login.htm BT


After the Ops team performs a stress test on the MovieZtream application, users begin
to complain that it takes a long time to log in to the application. To help identify the
problem with /movieztream_ui/login.htm and respond accordingly, let's explore slow
and error transaction snapshots.

Instructions

1. In the Controller UI, from the left navigation pane, click Business Transactions.
2. On the Business Transactions page, double-click /movieztream_ui/login.htm.
3. Verify that the Time Range drop-down displays data for the last 2 hours.
4. Click the Transaction Snapshots tab, then click the Slow and Error Transactions
sub-tab.
5. Scroll through the list of snapshots to locate a snapshot that contains the full call
graph details for all of its constituent tiers.
6. Double-click a full call graph snapshot in the list to display transaction details for that
snapshot, including a Flow Map on the Overview tab.

© 2020 AppDynamics, LLC. 7


APM212 Lab Exercises Student Lab Guide

7. Review the performance details on the Flow Map and use the numbers beside the
tiers to determine the following:

On what tier does the BT spend the most time during this request? _______
8. Click the Drill Down button above that tier to display the call graph.

© 2020 AppDynamics, LLC. 8


APM212 Lab Exercises Student Lab Guide

9. Use the information in the Time, Percent %, and Thread State columns to
determine whether the problem with the /movieztream_ui/login.htm BT relates to a
systems fault or a code issue.
10. Select the method from the list that displays the most time, then click the Details
button.

11. Review the details in the pop-up and make a note of the Class and Method name.
__________________________
Note: These are useful details should you need to escalate the issue to a member of
the app dev, network, or database team to troubleshoot.
12. In the MovieZtream application, navigate to the Admin > Server Management
page.
13. From the Command drop-down list, select Exercise 4 Load and then click Start
Load Command or Process.
Note: The Exercise 4 Load load stops the Exercise 1 Load.
14. Verify that you see the confirmation message in the Log window.

Please let your instructor know that you have completed the exercise(s).

© 2020 AppDynamics, LLC. 9


APM212 Lab Exercises Student Lab Guide

212-3 Troubleshoot Business Transaction Errors


AppDynamics considers a BT to be in error if it detects one of the following types of
events:
 An unhandled error or a fatal exception.
 An exception caught in an exit call, such as a web service or database call.
 An HTTP error response, such as a status code 404 or 500 response.
 A custom-configured error method and error message.

This lab explores how to troubleshoot BT errors.

Scenario
Someone on your team reports that there are more errors than usual on the
customer/rent.htm BT. This is the BT that reflects the performance of the Customers
> Rent Movies page of the MovieZtream application. It is your job to find the root
cause of the issue before customers call in to complain. What do you do? You need to
access the error snapshots to troubleshoot the root cause of the issue.

Instructions

1. In the Controller UI, from the left navigation pane, click Troubleshoot > Errors to
navigate to the Errors page.
2. On the Error Transactions tab, below Error Transaction Snapshots, click Filters.
3. Click the Add Criteria button and select Business Transactions.
4. Click the Business Transactions: Not Specified drop-down.
5. In the Available column, select the /customer/rent.htm BT and click the arrow to
move it to the Selected column, then click Apply and Done to filter the list to display
only /customer/rent.htm error transaction snapshots.

© 2020 AppDynamics, LLC. 10


APM212 Lab Exercises Student Lab Guide

6. Double-click a /customer/rent.htm error transaction snapshots from the list and


review the Snapshot Flow Map on the Overview page. Notice that errors are
reported in both the mz_UI and mz_service tiers.

© 2020 AppDynamics, LLC. 11


APM212 Lab Exercises Student Lab Guide

7. Click the Slow Calls and Errors tab, then click the Errors sub-tab.
8. Select an exception to view the full stack trace including the class, method, and line
number where the root exception occurred.

Note: You have now come as close to finding the root cause of this error as your
application’s exception handling code allows.

6. Click the Link button to copy the snapshot link.


7. Open a new window in your browser and paste the snapshot link into the address
field to test it.
Note: You can share this link with colleagues who have access to your controller
and application.
8. Return to the Overview page and click the Drill Down button above the mz_UI tier.
9. The system opens a new tab in the same snapshot window to display an error
summary.

© 2020 AppDynamics, LLC. 12


APM212 Lab Exercises Student Lab Guide

Note: This summary contains little error detail other than the system reports an
HTTP error 500 in this tier.
10. Click the Transaction tab that contains the Request GUID to return to the
Snapshot Flow Map.

11. Click the Drill Down button above the mz_service tier to explore the error details for
this tier.

© 2020 AppDynamics, LLC. 13


APM212 Lab Exercises Student Lab Guide

Note: This summary contains more error detail which gives you a better idea of the
root cause of the issue.
12. On the mz_service tier tab, click the Actions drop-down and select Export to
create a Snapshot Export Summary document that contains the mz_service tier
portion of the snapshot.
Note: This report can be saved and shared as needed.
13. Consider the following:

a. Does the Snapshot Export Summary contain additional information about the
/customer/rent.htm BT that you did not see in the Controller?
b. In the error snapshots for the /customer/rent.htm transaction, what seems to be
the root cause: the error in the mz_UI tier or the mz_service tier?
c. Given this, what would you recommend as the next step to solve the issue?

____________________________________________________________

d. In the MovieZtream application, navigate to the Admin > Server Management


page.
e. From the Command drop-down list, select Errors and click Stop Load
Command or Process.

© 2020 AppDynamics, LLC. 14


APM212 Lab Exercises Student Lab Guide

Note: This stops the Errors load that triggered a problem with the
/customer/rent.htm BT.
f. Verify that you see the confirmation message in the Log window.

Please let your instructor know that you have completed the exercise(s).

© 2020 AppDynamics, LLC. 15


Accessing your AppDynamics University Lab Environment Student Lab Guide

Accessing your AppDynamics University Lab


Environment

© 2020 AppDynamics, LLC. 16


Accessing your AppDynamics University Lab Environment Student Lab Guide

Accessing your Lab Environment (Primary Method)


Prior to class you received an email containing a unique URL and password. Use this
information to access your training lab environment.
1 Copy the unique password and then click the unique URL.
2 At the credentials page enter the following:
Username: appd
Password: Paste in your unique password.
3 Click Login.
You’ll be presented with a multi-tab interface. One tab contains your AppDynamics
Controller UI and in another is the application that is being monitored in this training.
Some lab environments have additional tabs.
4 Log in to the Controller UI using:
Account: Use the fist four characters at the beginning of your labs URL in the
browser address bar. For example if your labs URL was
https://ABCD.appdlabs.com/, you would enter ABCD as the Account.
Username: admin
Password: Paste in your unique password.
Shortcut: Click the pencil icon in the Controller tab to automatically populate the
Username and Password fields. You will still need to manually populate the Account
field.
5 Click Login.
6 Click the MovieZtream tab when it becomes necessary to change the traffic load on
your monitored application. To log in to MovieZtream use the credentials:
Username: HOLLY
Password: FOX
7 Click Login.

© 2020 AppDynamics, LLC. 17


Accessing your AppDynamics University Lab Environment Student Lab Guide

Accessing your Lab Environment with AWS (Alternate


Method)
Use these instructions only if instructed to by your trainer.
The lab environment for this class is hosted by AWS on a virtual machine, which you
need to access to complete the exercises.
In general, you should be able to complete all the exercises by accessing the virtual
machine via a web browser. To access your machine via a web browser, use the
parameters below.

AppDynamics Controller UI http://<Your-IP-Address>/controller

Username: admin
Password: labs4Appd*

MovieZtream Application http://<Your-IP-Address>/movieztream_ui

Username: HOLLY
Password: FOX

Log in and Access your Controller


The Controller UI is your command center for viewing, understanding, and analyzing
the data that is sent from AppDynamics Application Agents. Your Controller UI includes
pre-configured Application Agents that are installed and configured to monitor the
MovieZtream web application as well as a Machine Agent that monitors the
performance of the host machine.

Instructions

To log in to your Controller UI and navigate to the Application Dashboard, follow the
steps below.

© 2020 AppDynamics, LLC. 18


Accessing your AppDynamics University Lab Environment Student Lab Guide

1. For instructor-led training: direct your web browser to the IP address provided by
your instructor (http://<Your-IP-Address>/controller).
For self-paced/on-demand training: the controller window will open in a new tab after
you launch your on-demand lab environment.
2. Log in using the AppDynamics Controller UI username and password at the
beginning of this appendix.
3. On the Home page, within the Applications card, click the MovieZtream
application to display the Application Dashboard.

Note: The Dashboard tab on the Application Dashboard includes the Application
Flow Map which provides a high-level view of the MovieZtream application. From this
view you can navigate to other tabs on the Application Dashboard, or use the left
navigation pane of the Controller UI to navigate to a different area.

Log in and Access your MovieZtream Application


This lab does not require it, but the MovieZtream web application lets you run
command scripts to simulate load. This makes monitoring the MovieZtream application
with the AppDynamics Controller a more “real world” experience.

Instructions

To log in to the MovieZtream web application and run command scripts, follow the
steps below.
1. For instructor-led training: direct your web browser to the IP address provided by
your instructor (http://<Your-IP-Address>/movieztream_ui).
For self-paced/on-demand training: the MovieZtream interface window will open in a
new tab after you launch your on-demand lab environment.
2. Log in using the MovieZtream Application username and password at the beginning
of this appendix.
3. Navigate to the Admin > Server Management page.

Note: You can launch a command script for a lab exercise by selecting a command
from the Command drop-down and clicking the Start Load Command or Process
button.

© 2020 AppDynamics, LLC. 19


Accessing your AppDynamics University Lab Environment Student Lab Guide

© 2020 AppDynamics, LLC. 20

You might also like