This tutorial describes the basic steps for configuring and monitoring a tc Runtime instance with the Hyperic user interface and for managing applications deployed to the instance.
Install and start the components of Pivotal tc Server (Hyperic Server, Hyperic Agent, and at least one tc Runtime instance); invoke the Hyperic user interface in your browser; and log in with the administration username/password or with Hyperic user permissions to configure a tc Runtime instance. To accomplish these tasks, see:
Most Hyperic user interface pages have a Help link at the top-right corner. On the tc Runtime configuration pages, click the icon to the right of each field to get information about the field.
For simplicity, it is assumed in this tutorial that you are going to log in to the Hyperic user interface as the superuser (hqadmin
). If, however, you are going to log in as a non-superuser, see "User Permissions Required to Use the tc Server Hyperic Plugin Features" in Pivotal tc Server Administration for information about the required Hyperic user permissions to be able to use all the tc Server Hyperic plug-in features described in this tutorial.
In this procedure, you restart a currently running tc Runtime instance.
Click the Resources > Browse link at the top of the Hyperic user interface
Click the Servers (X) link to see the list of servers known by Hyperic. To limit the number of displayed servers to only tc Runtime instances, select SpringSource tc Runtime 7.0 or Pivotal tc Runtime 8.0 from the Search drop-down list, then click the green arrow to the far right.
In the table, click the tc Runtime instance you want to restart. The server is listed as platform-resource tc Runtime catalina-base-dir
, where
platform-resource
is the computer hosting the tc Runtime instance. catalina-base-dir
is the CATALINA_BASE
directory of the tc Runtime instance without the leading directory pathnames, such as myserver
.Click the Control tab. You use this Hyperic user interface page to stop, start, and restart the current tc Runtime instance, as described in the next step.
In the Quick Control section of the page, select Restart
from the Control Action drop-down list, then click the arrow to the right, as shown in the following graphic.
After you click the restart button, the Command State field in the Current Status section says In progress
until the tc Runtime instance is successfully restarted. The Current Status section always displays information about the last control action; in this case the restart of the tc Runtime instance.
The main Hyperic dashboard includes a Favorite Resources portlet that lists the resources you most often manage. When you first install Hyperic, the portlet is empty. However, as you manage a particular resource, you might decide that you want to add it to your favorites portlet because you return to it frequently. In this procedure you add a tc Runtime instance to the Favorite Resources portlet.
Navigate to the tc Runtime instance, as described in the first three steps of Restart a tc Runtime Instance.
Click the Tools Menu in the top-left corner and choose Add to Dashboard Favorites.
In the box, click the name of the user for whose dashboard the tc Runtime instance will show up as a favorite. Following our tutorial, click hqadmin
, although if you logged in as another user you can enter that one.
Click Add.
The tc Runtime instance is displayed in the Favorite Resources portlet on the main dashboard:
In this procedure you create an Hyperic group of multiple tc Runtime instances. You can then deploy a Web application to the group, and Hyperic does the work of deploying the Web application to each member of the group. Similarly, you can stop, start, and restart all the servers in the group with a procedure similar to Restart a tc Runtime Instance.
Using Hyperic groups saves a lot of time if you need to control multiple tc Runtime instances running on many different computers, as well as deploy and manage their applications.
It is assumed in this procedure that you have at least two tc Runtime instances running and that you have added them to the Hyperic inventory.
Tip: It might take a while for the Hyperic user interface to auto-detect a new tc Runtime instance after you start it. You can force a new auto-discovery to speed the process. To force an auto-discovery, browse to the platform resource where you started the new tc Runtime instance. For example, in this tutorial the platform resource is called juliet-desktop. Then click New Auto-Discovery in the Tools Menu. In the Quick Auto-Discovery Scan section, click OK. The new tc Runtime instance should show up in the Auto-Discovery portlet of the main Dashboard very shortly. You can then add it using the Add to Inventory button as usual.
Click the Resources > Browse link at the top of the Hyperic user interface.
Click the Servers (X) link to list all the servers in your resource inventory. The tc Runtime instances are listed as Server Type SpringSource tc Runtime 7.0 or Pivotal tc Runtime 8.0.
If there are many server resources listed in the table, you can narrow down the list by selecting a server type in the Search drop-down list, then clicking the green arrow all the way to the right of the Search line.
For each tc Runtime instance you want to include in the new group, check the box to the left of the instance's entry in the table.
Click Group.
The following graphic shows how to group together two tc Runtime instances called tc Runtime myotherserver
and tc Runtime myserver
.
In the Group Manager window, click Add to New Group.
In the General Properties section, enter a name for the group, such as tcserverGroup
and an optional description and location, such as San Francisco
.
Click OK.
Depending on the members of the group, Hyperic creates a Compatible Group/Cluster
or Mixed Group
. The first type of group consists of a single type of server, such as only tc Runtime instances. The second mixed group consists of different types of servers, such as both tc Runtime instances and Apache Tomcat servers.
To stop or restart the group of servers, and deploy an application to the group:
Click Resources > Browse at the top of the Hyperic user interface.
Click Compatible Groups/Clusters if your group consists of the same servers, or Mixed Groups if your group consists of different types of servers.
In the table, click on the name of the group.
To stop or start all the servers in the group, click the Control tab, then follow the steps for controlling a single server, as described in Restart a tc Runtime Instance. The breadcrumbs at the top of the console page list the group name (tcserverGroup
in this case) rather than the tc Runtime instance name.
To deploy and manage applications on all servers in the group, click the Views > Application Management tab, then follow the steps for deploying or managing the applications of a single server.
As soon as you add a resource (such as a tc Runtime instance) to the Hyperic inventory, Hyperic begins collecting a variety of metrics about the resource that you can use to monitor its state and health. Hyperic displays the values of the metrics over a specified period of time using indicator charts or tables.
Examples of the types of metrics that Hyperic collects about tc Runtime include:
The following procedure describes how to view the monitoring metrics for a tc Runtime instance.
Navigate to the tc Runtime instance, as described in the first three steps of Restarting the tc Runtime Instance.
Click the Monitor tab.
The charts under the Indicator tab show data about the entire tc Runtime instance, such as thread deadlocks detected and size of the free heap memory and the tc Runtime instance up time. Click the Metric Data tab to see the same information in tabular form.
The Services table to the left lists the services associated with the tc Runtime instance, such as the JSP and servlet monitors.
In the Services table, click SpringSource tc Runtime Servlet Monitor
. The chart on the right shows usage metrics about the servlets deployed to the tc Runtime instance.
Click on other services within the Monitoring tab to view more monitoring information for the tc Runtime instance.
You can create an alert for a resource that fires when a specified condition is met, and optionally specify a control action that occurs when the alert is fired. Hyperic is preconfigured for a deadlock detection alert; see Manage the Preconfigured Deadlock Detected Alert to modify it.
Hyperic includes a preconfigured alert that triggers once if the Deadlocks Detected metric exceeds 0. Hyperic applies this alert to all auto-discovered tc Runtime instances, enables it by default, and then checks the metric every two minutes to see if the condition has been met. After triggering, Hyperic disables the alert until an administrator marks it as Fixed.
The following procedure describes how to view this preconfigured alert, modify it so that Hyperic automatically restarts the tc Runtime instance in which the alert is triggered, and then disable it.
Navigate to the tc Runtime instance, as described in the first three steps of Restart a tc Runtime Instance.
Click the Alert tab at the top of the page.
Click the Configure button. A page is displayed with a table of alerts that have been defined for this tc Runtime instance. You should see the preconfigured Deadlocks Detected
alert; by default it is active (enabled.)
In the table, click Deadlocks Detected
to display the Alert Definition
page.
Click the Control Action tab at the bottom of the page, and then click the EDIT... button.
Select restart
from the Control Type drop-down list.
Click OK.
You have modified the alert so that Hyperic automatically restarts the affected tc Runtime instance when Hyperic detects a thread deadlock.
To disable the alert:
Return to the page that contains the Alert Definitions table by clicking the Return to Alert Definitions link at the top left corner of the page.
In the table, select the Deadlocks Detected
alert by checking the box to the left of its name.
At the bottom of the table, choose No
in the Set Active
drop-down list.
Click the arrow to the right of the drop-down list. The Active
column for the Deadlocks Detected
alert changes to No
.