Note: Spring Insight templates are no longer supported. The documentation is here for reference only.
This section has instructions for installing and configuring Insight Developer, and documents the inisght.properties
file.
To install Spring Insight Developer, you install Pivotal tc Server Developer edition, use the Template Repository to retrieve the latest spring-insight-developer
template, and then create a new tc Runtime instance using the insight
template.
From the Pivotal tc Server product page, click Downloads.
Download tc Server Developer edition.
Create a directory for tc Server, for example:
/home/tcserver
Unpack the tc Server archive into the directory created in the previous step, such that the tc Server home directory is a sub- directory of it, for example:
/home/tcserver/pivotal-tc-developer-2.x.x.x.
Two options can be used to retrieve Spring Insight
You can download the Spring Insight Developer template zip files from the Pivotal tc Server product page and expand into the templates directory.
Retrieve the template using the Template Repository by executing tcruntime-admin get-template --list
command from your tc Server installation directory, which will list the available templates. Once you specify the template, it will be downloaded and then installed into your templates directory for use when creating your instance.
For example:
./tcruntime-admin.sh get-template spring-insight-developer
Create a tc Server instance where Insight will run:
In a terminal window, change to the tc Server home directory.
Create a tc Server instance with tcruntime-instance.sh
or tcruntime-instance.bat
, using the insight
template.
For example, to create an instance named "Insight", enter the following command:
./tcruntime-instance.sh create Insight -t insight
Start the new tc Server instance using the tcruntime-ctl.sh
or tcruntime-ctl.bat
command.
On Unix, to start an instance named "Insight":
./tcruntime-ctl.sh Insight start
On Windows, install a Windows service for the instance before you start it the first time (After that, you can control the service from the Windows services control panel.) To install an instance named "Insight" as a Windows service, and then start it :
tcruntime-ctl.bat Insight install
tcruntime-ctl.bat Insight start
Deploy your Web applications to tc Server by copying the WAR files to the webapps
directory of the tc runtime instance. If necessary, update conf/server.xml
and conf/context.xml
files to support the deployed application.
Access the Spring Insight Dashboard by opening http://localhost:8080/insight
in your browser.
See the Pivotal tc Server 3.x Documentation for more detailed information about installing and configuring tc Server.
You configure Spring Insight by editing the insight.properties
file, located in the insight
directory of the tc Runtime instance. For example, the properties file for an instance called insight-instance
is tc-server/pivotal-tc-server-developer-x.x.x/insight-instance/insight/insight.properties
.
The properties file lists supported properties in property: value
form. Comment lines begin with #
.
The following table defines the properties you can set in insight.properties
.
Property and Default Setting | Description |
---|---|
application.context.ignore.identifier |
(Optional) Specify application contexts that you want Spring Insight to ignore, and not instrument. (Instrumentation can increase application startup time. ) The default value (shown below) excludes the Insight Agent from being instrumented. The format for this property is where:
The following example ignores the Tomcat Manager application, which has the application context
Default:
|
database.driverClassName |
Specifies the class name of the JDBC Driver that Spring Insight uses to connect to the database. Default:
|
database.password |
Specifies the password of the user that connects to the database that Spring Insight uses to persist its data.
Default:
|
database.url |
Specifies the URL of the database that Spring Insight uses to persist its data. Note: Spring Insight bundles the H2 Java SQL database and uses it internally to persist its data. By default, a tc Runtime instance configured with Spring Insight is configured to use the H2 database.
Default:
|
database.username |
Specifies the name of the user that connects to the database that Spring Insight uses to persist its data. Default:
|
insight.data.dir |
Specifies the full pathname of the directory in which Spring Insight persists its data. Default: INSTANCE_DIR/insight/data . |
insight.purge.interval.min |
Specifies, in minutes, how frequently Spring Insight purges traces and resources from the database. Default:
|
metric.max.granularity.sec |
Specifies, in seconds, the maximum granularity at which Spring Insight aggregates metrics. Spring Insight collects metrics every 15 seconds, and aggregates metric values at various granularities from minute up to the default value of one year. Default:
|
trace.exclude.path.type |
This property configures Spring Insight to not save traces for application requests whose performance you do not wish to track, such as requests for static content. You specify the requests to ignore by specifying a pattern (in ant path format) against which requests are matched. Insight does not save traces that match a path specified by trace.exclude.path . Specify each path you wish excluded separately, as shown in the example below. This excerpt from the default Default:
|
trace.purge.batch |
Specifies how many traces Spring Insight purges each time it periodically purges traces from the database. Default:
|
trace.max.memory.mb |
The maximum amount of memory, in MB, that is available for trace storage. When this threshold is reached, traces are randomly removed, with older traces removed first. Default:
|
trace.purge.expiry.days |
Specifies how many days Spring Insight saves traces before purging them from the database. Default:
|
resource.purge.batch |
Specifies how many resources Spring Insight purges each time it periodically purges resources from the database. Note that, regardless of the value of this property, Spring Insight only purges resources that are not referenced by any traces. Default:
|
When you monitor an application with Spring Insight, you need to take into account the memory requirements of Insight itself. It may be necessary to increase the memory available to tc Runtime to ensure enough memory is available for both the monitored application and Spring Insight. Pivotal recommends 256MB permgen for an application, depending on the complexity. With the Sun JVM, you increase the size of the Permanent Generation using the -XX-MaxPermSize
JVM option.
To increase the memory used by tc Runtime, edit the CATALINA_BASE/bin/setenv.sh|bat
file, where CATALINA_BASE
refers to the root directory of your instance, such as /home/tcserver/pivotal-tc-server-developer-2.x.x.x/insight-instance
. The comments in the file itself show examples of setting the JVM options.