Sei sulla pagina 1di 20

APM200

AppDynamics Essentials
Lab Guide for JAVA | .NET

AppDynamics University

Product Version 4.5

Last Updated October 2, 2018


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 © 2018 AppDynamics, LLC. All rights reserved.
The term APPDYNAMICS and any logos of AppDynamics are trademarked or
registered trademarks of AppDynamics, LLC.
APM200-45 – AppDynamics Essentials JAVA

Lab Exercises – JAVA


200-1: Business Transactions ......................................................................................................................... 4
200-2: Business Transaction Snapshots ......................................................................................................... 7
200-3: Metrics ..............................................................................................................................................10

3
APM200-45 – AppDynamics Essentials JAVA

200-1: Business Transactions


This lab is designed to give you a first taste of using the AppDynamics Controller
User Interface, to build familiarity with the core concepts and give you basic
experience of the system.

Scenario A: Time Navigation in AppDynamics


To change the time range of data that is visible in AppDynamics, you can select pre-
configured time ranges from the time range drop-down at the top right side of the
Controller window.

The pre-configured time ranges go from last 5 minutes with a resolution of 1


minute, to last 1 year with a resolution of 1 hour.

From the MovieZtream Application


1. To set up the correct MovieZtream load for this exercise, point your browser to
the MovieZtream application
http://<Your-IP-Address>/movieztream_ui
2. Log in using the username: HOLLY and password: FOX. They are case
sensitive.
3. From MovieZtream's left side navigation bar, to go to the Admin > Server
Management page, then select the Exercise 1 Load command from the
dropdown and click Start Load Command or Process.
4. Verify that you see the message “Exercise1 Load Started”

From the AppDynamics Controller

1. Open a new tab or window in your browser.


2. Log into the Appdynamics Controller:
http://<Your-IP-Address>/controller
3. Log in using the username and password provided by your instructor (or see
Appendix).
4. From the Home page, under Applications, click the MovieZtream application.
5. On the right of the upper pane, click on the Time Range drop down, which
should be set to last 1 hour by default, and select 2 hours to see MovieZtream
activity over that time range.

4
APM200-45 – AppDynamics Essentials JAVA

There is also a Custom option that allows you to set a specific time range, and a
Manage Custom Time Ranges (gear icon) item that allows you to create named time
ranges that will always be available to you and can be shared with other
AppDynamics users.

You can also set a custom time range by dragging the mouse across the part of a
graph that you’d like to see as a custom time range, and releasing the mouse. This
provides you with a context menu that shows you the exact custom time range
selected, and gives you the following three options:
● View Transaction Snapshots in Selected Time Range
● Set Time Range
● Zoom

1. Drag your mouse over approximately 30 minutes of the data in the Load graph
at the bottom left of the MovieZtream dashboard, and select Set Time Range.
2. Now instead of the Time Range drop-down, the Custom Time Range toolbar
appears with the dashboard data for the exact time range you selected. Notice
the top toolbar indicates beginning and ending dates and times. Similar to this:

The following tools are available:


1. Set the time range by typing values into the fields and clicking the Apply

Custom Time Range button.


2. Save this range as a named custom time range by clicking the Save Custom
Time Range button.

3. Click on the at the end of the time range field and reset the global time
range on your Controller to last 2 hours.

5
APM200-45 – AppDynamics Essentials JAVA

Scenario B: View top Business Transactions


How can you see which Business Transactions are contributing the most traffic to
MovieZtream? The most errors? The highest average response time?

Instructions
Use the Top Business Transactions dashboard to quickly see a sorted list of
Business Transactions by several criteria.
1. From the left navigation pane, navigate to the Application Dashboard page,
then select the Top Business Transactions tab (fourth from the left, on top).
2. You can now see a sorted list of Business Transactions by six important criteria:
● Load
● Response Time
● Errors
● Slow Transactions
● Stalls
● Health Rule Violations
3. Which Business Transaction has the highest load? _______ The highest
response time? ________ The highest error rate? ________

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

6
APM200-45 – AppDynamics Essentials JAVA

200-2: Business Transaction Snapshots


Scenario A: View Periodic Snapshots
You want to know how specific requests are being tracked by AppDynamics.
Periodic snapshots provide a reference for what path your Business Transaction
requests take through your application, and allow you to view detailed information
about the components used by each Business Transaction.

Instructions
Use the application dashboard to view periodic snapshots and drill down to see the
path that individual requests take through your application components.

Transaction Snapshots Dashboard


1. In the left navigation pane, navigate to the Application Dashboard page,
then select the Transaction Snapshots tab.
2. Click on the Periodic Collection sub-tab. This will display all Transaction
Snapshots that have been collected via periodic collection for the last two
hours.
NOTE: The majority of these snapshots are “green”, which means their execution
went normally. Also note that all periodic snapshots contain full call graphs
as indicated by the blue icon.
3. Select a snapshot for the /customer/rate.htm transaction that lasted longer
than 10 ms. You can sort by transaction by clicking on the top of the Name
column or by using the search box in the upper right. Double-click the
snapshot to open the snapshot window. Now you are viewing the flow map for
a specific transaction.
How many monitored tiers does this request traverse? ______ How many
back-ends? _____
4. Now find the mz_service tier, and click on its drill-down link.
5. You are now viewing the full call graph of this request’s path through the
mz_service tier of your application. Note the number of different components
that are traversed.
6. Note that each trace includes an icon representing the type of component, a
textual view of the type of component, class name, and method name, and an
indication of the relative time spent by the request in this component.
7. Single Click to select where this request spent the most time and click the
Details button. You can now see the details of this invocation.

7
APM200-45 – AppDynamics Essentials JAVA

8. Finish by closing the Snapshot window.

Scenario B: Troubleshoot slow transactions


The /movieztream_ui/login.htm transaction has been running very slowly ever
since the Ops team did a stress test of the MovieZtream application. You need to
find the problem and respond accordingly.

Instructions
Troubleshoot for the root cause of the slow response times using two common
workflows:
● Using Slow and Error Transactions
● Using the Troubleshooting Dashboard
Before you begin, make sure that your time range is set to show data for the last 2
hours.

Slow and Error Transactions


1. In the AppDynamics Controller, from the left navigation pane, navigate to the
Application Dashboard page, then select the Transaction Snapshots tab.
2. Click the Slow and Error Transactions sub-tab. You should now see all
Transaction Snapshots that are considered slow or very slow. Some of these
should represent executions of the /movieztream_ui/login.htm transaction.
NOTE: If you do not see any snapshots listed, check that you don’t have anything
entered into the search-filter field, above and to the right of the list area.
3. From the list of slow or very slow snapshots, locate one that shows a full call
graph for the /movieztream_ui/login.htm transaction. If you can’t find one
with a full call graph for this transaction, use a snapshot for a different
transaction that does have a full call graph, and lasts longer than 10ms.

NOTE: A full call graph is represented by a blue icon while partial call graphs
use a gray icon .
4. Double click on the call graph icon. This will open a new window with the
snapshot flow map.
5. Look at the flow map to get an idea of the relative percentage of time spent in
each tier. Find the tier where the most time is spent, and click on the Drill
Down link. This will open the call graph for the snapshot.

8
APM200-45 – AppDynamics Essentials JAVA

6. View the Percentage details of the elements in the call graph and determine
the method that is taking the most time and highlight it. Click the Details
button, and note the class and method name.
7. You will pass these to a specialist who will figure out why this particular
method is being called here. When you are done, close the snapshot window.

The Troubleshooting Dashboard


1. Now we’ll take a look at a different way to troubleshoot slow transactions in
AppDynamics: The Troubleshooting Dashboard. To begin, from the left
navigation pane section select Troubleshoot > Slow Response Times. This
brings up the Slow Response Times Dashboard.
2. The Slow Transactions sub-tab should be selected by default. If not, click
the Slow Transactions sub-tab.
3. Locate a very slow snapshot for the /movie/search.htm transaction – if
possible, select one with a full call graph. (If no snapshots with full call graphs
are available, select one with a partial call graph).
Double click on the snapshot to get the snapshot flow map. As with the
previous exercise, determine the tier where the most time is spent and drill
down.Examine the call graphs for the different tiers. What method is taking
the most time? When you are done, close the snapshot window.
Please let your instructor know that you have completed the exercise(s).

9
APM200-45 – AppDynamics Essentials JAVA

200-3: Metrics
Scenario: Troubleshoot Node Infrastructure Issues
AppDynamics can also tell you a lot about the performance and state of your
hardware. Let’s look at how to troubleshoot hardware issues by looking at the CPU
utilization for MovieZtream.

From the MovieZtream Application


1. Select the Admin -> Server Management page. Run the following
commands:
Exercise 4 Load and click Start Load Command or Process
Super Bowl Load and click Start Load Command or Process
This simulates an overload situation caused by the sale of pay-per-view
tickets for the Super Bowl, and will allow you to see how the hardware metrics
react to overload.
2. Switch back to the AppDynamics Controller UI.

From the AppDynamics Controller


1. On the left navigation pane, select Metric Browser to examine metrics.
2. The metric browser window appears. Here you can drag and drop any metric
or metrics into the graph, or double-click them to display them.
3. To view CPU utilization, expand Application Infrastructure Performance >
mz_UI > Hardware Resources > CPU and double-click on the %Busy
metric. The metric will be plotted on the graph.
Over the next few minutes, this metric may rise sharply in response to an increase in
the load on MovieZtream. The extra load will only run for about 7 to 8 minutes
however, before automatically stopping.

Consider the following questions after completing this exercise:


What was the highest CPU utilization recorded while running the Super Bowl Load?
Is this level of utilization OK for an enterprise server? What might be a solution to
this issue (if there is one)?

10
APM200-45 – AppDynamics Essentials JAVA

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

11
APM200-44 – AppDynamics Essentials .NET

Lab Exercises - .NET

200-1: Business Transactions .......................................................................................................................13


200-2: Business Transaction Snapshots .......................................................................................................16
200-3: Metrics ..............................................................................................................................................19

12
APM200-45 – AppDynamics Essentials .NET

200-1: Business Transactions


This lab is designed to give you a first taste of using the AppDynamics Controller
User Interface, to build familiarity with the core concepts and give you basic
experience of the system.

Scenario A: Time Navigation in AppDynamics


To change the time range of data that is visible in AppDynamics, you can select pre-
configured time ranges from the time range drop-down at the top right side of the
Controller window.

The pre-configured time ranges go from last 5 minutes with a resolution of 1


minute, to last 1 year with a resolution of 1 hour.

From the MovieZtream Application


1. To set up the correct MovieZtream load for this exercise, point your browser
to the MovieZtream application
http://<Your-IP- Address>/movieztream_ui
2. Log in using the username: HOLLY and password: FOX. They are case
sensitive.
3. From MovieZtream's left side navigation bar, to go to the Admin > Server
Management page, then select the Exercise 1 Load command from the
dropdown and press the Start Load Command or Process button.
4. Verify that you see the message “Exercise1 Load Started”

From the AppDynamics Controller

1. Open a new tab or window in your browser.


2. Log into the Appdynamics Controller:
http://<Your-IP-Address>/controller
3. Log in using the username and password provided by your instructor (or see
Appendix)
4. From the Home page, under Applications, click the MovieZtream application.
5. On the right of the upper pane, click on the Time Range drop down, which
should be set to last 1 hour, and select 2 hours to see MovieZtream activity
over that time range.

13
APM200-45 – AppDynamics Essentials .NET

Under the Time Range drop down, there is also a Custom option that allows you
to set a specific time range, and a Manage Custom Time Ranges (gear icon)
item that allows you to create named time ranges that will always be available to
you and can be shared with other AppDynamics users.
You can also set a custom time range by dragging the mouse across the part of
a graph that you’d like to see as a custom time range, and releasing the mouse.
This provides you with a context menu that shows you the exact custom time
range selected, and gives you the following three options:
● View Transaction Snapshots in Selected Time Range
● Set Time Range
● Zoom

1. Drag your mouse over approximately 30 minutes of the data in the Load
graph at the bottom, left of the MovieZtream dashboard, and select Set Time
Range.
2. Now instead of the Time Range drop-down, the Custom Time Range toolbar
appears with the dashboard data for the exact time range you selected.
Notice the top tool bar indicates beginning and ending dates and times.
Similar to this:

The following tools are available:


1. Set the time range by typing values into the fields and clicking the Apply

Custom Time Range button.


2. Save this range as a named custom time range by clicking the Save Custom
Time Range button.

3. Click on the at the end of the time range field and reset the global time
range on your Controller to last 2 hours.

14
APM200-45 – AppDynamics Essentials .NET

Scenario B: View top Business Transactions


How can you see which Business Transactions are contributing the most traffic to
MovieZtream? The most errors? The highest average response time?

Instructions
Use the Top Business Transactions dashboard to quickly see a sorted list of
Business Transactions by several criteria.
1. From the left navigation pane, navigate to the Application Dashboard page
(if not already viewing it), then select the Top Business Transactions tab
(fourth from the left, on top).
2. You can now see a sorted list of Business Transactions by six important
criteria:
• Load
• Response Time
• Errors
• Slow Transactions
• Stalls
• Health Rule Violations
3. Which Business Transaction has:
The highest load? _______
The highest response time? ________
The highest error rate? ________

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

15
APM200-45 – AppDynamics Essentials .NET

200-2: Business Transaction Snapshots


Scenario A: View Periodic Snapshots
You want to know how specific requests are being tracked by AppDynamics.
Periodic snapshots provide a reference for what path your Business Transaction
requests take through your application, and allow you to view detailed information
about the components used by each Business Transaction.

Instructions
Use the application dashboard to view periodic snapshots and drill down to see the
path that individual requests take through your application components.

Transaction Snapshots Dashboard


1. In the left navigation pane, click the Application Dashboard page, then
select the Transaction Snapshots tab along the top of the page.
2. Click on the Periodic Collection sub-tab. This will open all Transaction
Snapshots that have been collected via periodic collection for the last two
hours.
NOTE: The majority of these snapshots are “green”, which means their execution
went normally. Also note that all periodic snapshots contain full call graphs
as indicated by the blue icon.
3. Select a snapshot for the /movieztream_admin/Sales URL. You can sort by
URL by clicking on the top of the URL column or by using the search box in
the upper right. Double-click to open the snapshot window. Now you are
viewing the flow map for a specific transaction.
How many monitored tiers does this request traverse? ______
How many back-ends? _____
4. Now find the Admin_SV tier and click the Drill Down button.
5. You are now viewing the full call graph of this request’s path through the
Admin_SV tier of your application. Note the number of different components
that are traversed.
NOTE: Each component trace includes an icon representing the type of component,
a textual view of the type of component, class name, and method name,
and an indication of the relative time spent by the request in this component.

16
APM200-45 – AppDynamics Essentials .NET

6. Single click to select the component where this request spent the most time
and click the Details button. You can now see the details of this invocation.
7. Finish by closing the Snapshot window.

Scenario B: Troubleshoot slow transactions


The /movieztream_admin/Sales URI has been running very slowly ever since the
Ops team did a stress test of the MovieZtream application. You need to find the
problem and respond accordingly.

Instructions
Troubleshoot for the root cause of the slow response times using two common
workflows:
● Using Slow and Error Transactions
● Using the Troubleshooting Dashboard
Before you begin, make sure that your time range is set to show data for the last 2
hours.

Slow and Error Transactions


1. In the AppDynamics Controller, from the left navigation pane, navigate to the
Application Dashboard page, then select the Transaction Snapshots tab.
2. Click the Slow and Error Transactions sub-tab. You should now see all
Transaction Snapshots that are considered slow or very slow. Some of these
should represent executions of the /movieztream_admin/Sales transaction.
3. From the list of slow or very slow snapshots, locate one that shows a full call
graph for the /movieztream_admin/Sales transaction. If you can’t find one
with a full call graph for this transaction, use a snapshot for a different
transaction that does have a full call graph.

NOTE: A full call graph is represented by a blue icon while partial call graphs
use a gray icon
4. Double click on the call graph icon. This will open a new window with the
snapshot flow map.
5. Look at the flow map to get an idea of the relative percentage of time spent in
each tier. Find the tier where the most time is spent, and click on the Drill
Down link. This will open the call graph for the snapshot.

17
APM200-45 – AppDynamics Essentials .NET

6. Look to the right of the call graph and find the method that is taking the most
time and highlight it. Click the Details button, and note the class and method
name.
7. You will pass these to a specialist who will figure out why this particular
method is being called here. When you are done, close the snapshot window.

The Troubleshooting Dashboard


1. Now we’ll take a look at a different way to troubleshoot slow transactions in
AppDynamics: The Troubleshooting Dashboard. To begin, from the left
navigation pane section select Troubleshoot > Slow Response Times. This
brings up the Slow Response Times Dashboard.
2. Ensure the sub tab Slow Transactions is selected in the Slow Reponse
Times page.
3. Locate a very slow snapshot for the /Customer/Rentals transaction – if
possible; select one with a full call graph. (If no snapshots with full call graphs
are available, widen your time period, or select one with a partial call graph)
4. Double click on the snapshot to get the snapshot flow map. As with the
previous exercise, determine the tier where the most time is spent and drill
down. The Tier may have multiple call graphs, in which case, you will need to
drill down on the call that took the most time.
5. Examine the call graphs for the different tiers. What method is taking the most
time? When you are done, close the snapshot window.

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

18
APM200-45 – AppDynamics Essentials .NET

200-3: Metrics
Scenario: Troubleshoot node infrastructure issues
AppDynamics can also tell you a lot about the performance and state of your
hardware. Let’s look at how to troubleshoot hardware issues by looking at the CPU
utilization for MovieZtream.

From the MovieZtream Application


1. Select the Admin -> Server Management page. Run the following
commands:
- Dot Net Extra Load and click Start Load Command or Process
- Super Bowl Load and click Start Load Command or Process
This simulates an overload situation caused by the sale of pay-per-view
tickets for the Super Bowl, and will allow you to see how the hardware metrics
react to overload.
2. Switch back to the AppDynamics Controller.

From the AppDynamics Controller


1. On the left navigation pane, select Metric Browser to examine metrics.
2. The metric browser window appears. Here you can drag and drop any metric
or metrics into the graph, or double-click them to display them.
3. To view CPU utilization, expand Application Infrastructure Performance
and expand any of the application tiers listed. Continue to drill down to
Hardware Resources > CPU and double-click on the %Busy metric. The
metric will be plotted on the graph.
Over the next few minutes, this metric may rise sharply in response to an
increase in the load on MovieZtream. The extra load will only run for about 7
to 8 minutes however, before automatically stopping.

Consider the following questions after completing this exercise:


What was the highest CPU utilization recorded while running the Super Bowl
Load? Is this level of utilization OK for an enterprise server? What might be a
solution to this issue?

19
APPENDIX

Appendix
1. Logging in to your University Lab Environment

20

Potrebbero piacerti anche