Practices for Lesson 4 Practices Overview
Practice 4-2: Monitoring Diagnostic Metrics
Duration: 25 minutes Skills Learned
At the end of this practice, you should be able to:
• Access the Monitoring Dashboard
• Monitor standard views in the Monitoring Dashboard
• Define a custom view in the Monitoring Dashboard
• Configure charts within a view Overview
The WebLogic Server administration console provides a link to a dashboard that allows you to monitor diagnostic metrics and events. Values can be viewed over time as charts. Collections of related charts are known as views. In this practice, you experiment with the Monitoring
Dashboard and monitor MBean attributes. The Monitoring Dashboard architecture is shown in the following diagram:
Instructions
1. Monitor standard views.
a. Launch an admin console and log in.
b. On the Home page, click the Monitoring Dashboard link (under Charts and Graphs).
Tip: You may also enter the URL for the dashboard directly into a Web browser:
http://localhost:7020/console/dashboard
c. In the left panel, under the View List tab, locate the JVM Runtime Heap under Built-in Views. Select it.
d. Then click the green Start button above the tabs to begin collecting data.
e. Locate a Lab Framework command prompt or start a new one.
f. Run <LAB_WORK>/client/runclients.sh to test the MedRec application.
g. Return to the Monitoring Dashboard and view the heap statistics for MedRecSvr1. For example:
Oracle University and Sentra inversiones y servicios LTDA use only
h. Click the Stop All button to stop collecting this view’s MBean metrics.
2. Reactivate the metric collector.
a. Return to the administration console and Lock it.
b. Locate and edit your existing diagnostics module, MedRecDiagnostics.
c. Click the Configuration > Collected Metrics tab.
d. Select the Enabled check box and click Save.
e. Activate your changes.
f. Kill and restart MedRecSvr1 to reset its runtime MBean attributes.
g. To create more interesting data, from a Lab Framework prompt execute
<LAB_WORK>/client/runclients.sh.
3. Define a custom view for harvested metrics.
a. Return to the Monitoring Dashboard.
b. In the left panel, click the My Views folder. Click the drop-down menu arrow (below the tabs) and select New View. Type over the default name of the new view with:
MedRec Diagnostics.
c. Ensure the new view is selected and click the Metric Browser tab.
d. In the Servers drop-down list, select MedRecSvr1, select Collected Metrics Only, and click the Go button.
e. In the Types list of available MBeans on this server, locate and select JDBCConnectionPool.
f. Under Instances, select MedRecGlobalDataSourceXA.
g. Under Metrics, drag and drop the CurrCapacity (int) attribute onto the right panel. A new chart is created. To change the chart’s default name, click the menu down-arrow in the chart title bar and select Properties. For Chart Title enter JDBC Chart and click OK.
Tip: If you see no data points in the chart, then you must set the time of the chart to include when the metrics were actually collected (rather than the default time):
1) Go to the admin console.
2) Under Diagnostics > Log Files, select HarvestedDataArchive for
MedRecSvr1 and click View. Click Customize this table. For WLDF Query Expression, enter: ATTRNAME = 'CurrCapacity' and click Apply.
Oracle University and Sentra inversiones y servicios LTDA use only
3) Make note of the information in the Date field of the first CurrCapacity Attribute.
4) Return to the Monitoring Dashboard.
5) At the top-right of the chart, click the down arrow for the menu and select Properties.
6) Under Time Range select Custom and enter the Start Time. Use the correct format. For example: in the log file if the Date field was "02/11/11 18:50:41 820" you would enter it here as: "02/11/2011 6:50:41 PM"
Tip: Do not include the double quotes.
7) Enter a Duration of 5 minutes: 0 00:05 8) Click OK.
9) You may wish to zoom out by clicking the Zoom Out button.
h. Also drag and drop the ActiveConnectionsCurrentCount (int) attribute onto the same chart to create a second graph in a different color.
4. Work with charts and graphs in real time.
a. In the Monitoring Dashboard, click the View List tab and create another custom view.
Name it MedRec Sessions. Select the new, empty view.
b. Click the Metric Browser tab. In the Servers drop-down list, select MedRecSvr1, make sure Collected Metrics Only is NOT checked, and click the Go button.
c. In the Types list of available MBeans on this server, locate and select WebAppComponent.
d. Under Instances, select MedRecSvr1_/medrec, medrec.
e. Under Metrics, drag and drop the OpenSessionsCurrentCount (int) attribute onto the right panel.
f. Click the menu down-arrow in the chart title bar and select Properties. For Chart Title enter Sessions Chart and click OK.
g. Retest the MedRec application by using runclients.sh. While the script is still running return to the Monitoring Dashboard.
h. Click the green Start button and collect data for a few minutes. Re-run the clients script if you wish.
Tip: Mouse over a specific data point to view its value and timestamp.
5. Deactivate metric collection.
a. Stop All views, if any are still running.
b. Close the Monitoring Dashboard.
c. Return to the administration console and disable your diagnostic module’s metric collector once again.
Solution Instructions
No solution exists for this practice.