Documente Academic
Documente Profesional
Documente Cultură
Environment
Performance Agent
Guide
Version 7.2
Date: 10-2007
Copyright © 2007, CA. All rights reserved.
Wily Technology, the Wily Technology Logo, Introscope, and All Systems Green are registered
trademarks of CA.
Blame, Blame Game, ChangeDetector, Get Wily, Introscope BRT Adapter, Introscope
ChangeDetector, Introscope Environment Performance Agent, Introscope ErrorDetector, Introscope
LeakHunter, Introscope PowerPack, Introscope SNMP Adapter, Introscope SQL Agent, Introscope
Transaction Tracer, SmartStor, Web Services Manager, Whole Application, Wily Customer Experience
Manager, Wily Manager for CA SiteMinder, and Wily Portal Manager are trademarks of CA. Java is a
trademark of Sun Microsystems in the U.S. and other countries. All other names are the property of
their respective holders.
For help with Introscope or any other product from CA Wily Technology, contact Wily Technical
Support at 1-888-GET-WILY ext. 1 or support@wilytech.com.
If you are the registered support contact for your company, you can access the support Web site
directly at http://support.wilytech.com.
We value your feedback. If you have comments or suggestions about Wily documentation, please
send us an e-mail at wily-techpubs@ca.com.
6000 Shoreline Court, Suite 200 US Toll Free 888 GET WILY ext. 1
South San Francisco, CA 94080 US +1 630 505 6966
Fax +1 650 534 9340
Europe +44 (0)870 351 6752
Asia-Pacific +81 3 6868 2300
Japan Toll Free 0120 974 580
www.wilytech.com
CONTENTS
Table of Contents
Contents iii
CA Wily Introscope
Command-line arguments . . . . . . . . . . . . . . . 23
apacheLogReader.pl, weblogicLogReader.pl, and websphereLogReader.pl
24
Metrics produced . . . . . . . . . . . . . . . . . . 24
Command-line arguments . . . . . . . . . . . . . . . 24
httpSvcAvailability.pl . . . . . . . . . . . . . . . . . . 25
Metrics produced . . . . . . . . . . . . . . . . . . 25
Command-line arguments . . . . . . . . . . . . . . . 25
Perl support issues . . . . . . . . . . . . . . . . . . 25
kstat.pl . . . . . . . . . . . . . . . . . . . . . . 26
Metrics produced . . . . . . . . . . . . . . . . . . 26
Command-line arguments . . . . . . . . . . . . . . . 26
Perl support issues . . . . . . . . . . . . . . . . . . 27
iisLogReader.pl . . . . . . . . . . . . . . . . . . . . 27
Metrics produced . . . . . . . . . . . . . . . . . . 27
Command-line arguments . . . . . . . . . . . . . . . 27
iisLogReader.cfg Configuration File . . . . . . . . . . . . 28
Configuring IIS Web Server logging in IIS4.0 and IIS5.0 . . . . 32
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
iv Contents
CHAPTER
1
This section covers installing and using the Introscope Environment Performance
Agent version 7.2 add-on component for Introscope in the following sections:
EPAgent takes advantage of the facility available in many operating systems for
one process to spawn a sub-process and receive standard output from the sub-
process via operating system pipes (standard IPC mechanism). When the ability
to initiate a sub-process is combined with a flexible scripting environment (such
as Perl) the result is an adaptable and powerful facility for gathering application
performance information from virtually any source.
a Perl script.
EPAgent expects the text it receives via STDOUT to conform to a specific format,
either:
a simple name/value pair, or
XML
The EPAgent text format requirements and options are fully explained later in this
document.
Scripts can gather information from a wide variety of sources. For example, a
script may:
call a library function or system utility to check for the existence of a critical
application such as a database.
scan and parse application logfiles to detect application errors.
Wily emphasizes the use of Perl with EPAgent because Perl interpreters are
available on a wide variety of platforms and have broad support for data APIs to
operating systems, middleware, and third party products. Introscope EPAgent
includes a set of sample Perl scripts to perform a variety of functions such as
checking for process availability, obtaining disk performance statistics and
reading HTTP logs. These scripts may be extended to perform other functions.
Supported plug-ins
The EPAgent supports both stateful and stateless plug-ins.
Plug-in types
Error logging
Errors can be logged through the standard error channel of the plug-in, enabling
EPAgent to log this error output as it would any other errors.
Default plug-ins
The EPAgent includes a library of default plug-ins that may be used with minimal
configuration. The following table summarizes the function of each plug-in and
the operating systems they are supported on.
Custom plug-ins
The EPAgent supports gathering data from arbitrary programs and plug-ins, with
the requirement that they produce output in one of two supported formats. For
more information, see Using custom plug-ins with the EPAgent on page 13.
lib/EPAgent.jar
epaplugins/apache/apacheLogReader.pl
epaplugins/iis/iisLogReader.pl
epaplugins/iis/LogReader.cfg
epaplugins/solaris/diskStats.pl
epaplugins/solaris/kstat.pl
epaplugins/solaris/httpSvcAvailability.pl
epaplugins/solaris/processAvailability.pl
epaplugins/weblogic/weblogicLogReader.pl
epaplugins/websphere/websphereLogReader.pl
epaplugins/windows/diskStats.pl
epaplugins/windows/httpSvcAvailability.pl
epaplugins/windows/processAvailability.pl
EPAgent7.2.x.yebcdic.tar
EPAgent7.2.x.yunix.tar
After extracting the EPAgent installer, these files are installed into the <EPA
directory>/epagent directory:
config/IntroscopeEPAgent.properties
lib/EPAgent.jar
epaplugins/apache/apacheLogReader.pl
epaplugins/iis/iisLogReader.pl
epaplugins/solaris/diskStats.pl
epaplugins/solaris/kstat.pl
epaplugins/solaris/httpSvcAvailability.pl
epaplugins/solaris/processAvailability.pl
epaplugins/weblogic/weblogicLogReader.pl
epaplugins/websphere/websphereLogReader.pl
epaplugins/windows/diskStats.pl
epaplugins/windows/httpSvcAvailability.pl
epaplugins/windows/processAvailability.pl
» Note Since the file structure of the EPAgent files is parallel within the
<Introscope home> and <EPAgent directory>/epagent, for
simplicity, we will show file examples originating in <Introscope
home>.
» Note The EPAgent will fail to start if it encounters any errors in the properties
file settings—for example, invalid filename path—so be sure properties
are set correctly if you are going to be starting the EPAgent automatically
at boot-time.
For example, if you wanted the EPAgent to report in Verbose mode to a logfile,
the property would look like this:
log4j.logger.EPAgent=VERBOSE#com.wily.util.feedback.Log4JSeverityL
evel,logfile
3 If desired, change the name and/or location of the EPAgent logfile in the property
log4j.appender.logfile.File.
4 Save changes and close the IntroscopeEPAgent.properties file.
However, you may want to remove plug-ins you don’t need from the default plug-
ins in the IntroscopeEPAgent.properties file, or add additional plug-ins.
The stateful names property specified in the previous step would require four
lines:
introscope.epagent.stateful.APACHE.command=/usr/bin/perl <Introscope
home>/epaplugins/apache/apacheLogReader.pl
introscope.epagent.stateful.WEBLOGIC.command=/usr/bin/perl <Introscope
home>/epaplugins/weblogic/weblogicLogReader.pl
introscope.epagent.stateful.WEBSPHERE.command=/usr/bin/perl <Introscope
home>/epaplugins/websphere/websphereLogReader.pl
introscope.epagent.stateful.IIS.command=/usr/bin/perl <Introscope home>/
epaplugins/iis/iisLogReader.pl
» Note On Windows machines, when adding a path, you must escape a
backslash (\) with another backslash (each one doubled), such as:
introscope.epagent.stateful.TEST.command=perl
c:\\mydirectory\\myscript.pl
Next steps
Continue to the next section, Adding stateless plug-ins on page 10, if adding
stateless plug-ins. Otherwise, save changes and restart the EPAgent if you are
finished.
introscope.epagent.stateless.HTTP.command=/usr/bin/perl <Introscope
home>/epaplugins/solaris/httpSvcAvailability.pl
introscope.epagent.stateless.HTTP.delayInSeconds=900
introscope.epagent.stateless.KSTAT.command=/usr/bin/perl <Introscope
home>/epaplugins/solaris/kstat.pl
introscope.epagent.stateless.KSTAT.delayInSeconds=900
» Note The examples above are the default values for these properties. To use
them, uncomment each of the properties.
To configure a plug-in that is a Java class that is executed within the EPAgent
JVM, configure these properties in the EPAgent properties file:
introscope.epagent.stateful.JAVA-CLASS.class=my.package.path.Class
arg1 arg2 arg3
» Note Supply the fully qualified class name followed by any optional
arguments, for example:
introscope.epagent.plugins.stateful.names=add
introscope.epagent.stateful.add.class=com.wily.math.Add 1 2
http://epaHost:epaPort/?metricType=type&metricName=name&metricValue=
value
Add the EPAgent files to the appropriate classpath as in the following example:
XML
Specify one metric name and value per line using the format:
<metric_name>=<value>
For example:
diskWrites=37
<resource_segment>:<metric_name>=<value>
Where the “simple” format limits the Introscope metric types, XML style format
allows the plug-in to report additional information, such as Introscope metric
name, Introscope metric type, and value, as in the following example:
<metric type="LongCounter" name="Resource Usage|File IO:diskWrites"
value="37" />
<metric type="StringEvent" name="Apache Errors:LastErrorString"
value="ERROR: Apache shutdown unexpectedly" />
PerIntervalCounter
IntCounter
IntAverage
IntRate
LongCounter
LongAverage
StringEvent
Timestamp
The comparison is case-insensitive (to make it easy for the plug-in writer). If
a numeric type is supplied, but the value is non-numeric, nothing is reported
to Introscope and an error will be logged by the EPAgent.
XML
In general, simple format scripts start with the following fixed string:
event:
The example below is the output of a hypothetical script that monitors the Firefox
browser process and sends a notification when the browser exits.
event:type=processWentAway&processName=firefox
Events can also be specified in an XML format, which gives the full expressive
power of events in the Agent. The simplest XML format event gives the name of
a resource that generated the event (an example might be “Connection Pool” or
“Java Virtual Machine”). The example below provides a notification that some
event happened in Some Resource.
The timestamp will be the time the event was created, and the duration of the
event will be zero.
XML Format for error or event data with parameters and time data
You can configure event notification with an explicit timestamp and an explicit
duration. The timestamp format is any Java-parsable format. The duration is in
milliseconds. The example below is an event with a duration of one minute.
Nested components
The example below shows an event with nested subcomponents. An event can
have from zero to an infinite number of sub-components, and each of those can
also have from zero to an infinite number of sub-components. In practice, the
level of nesting tends to be small or zero.
Trace views are easier to understand if time information is contained in the event
sent by the EPAgent. To do this, use the startTime and offset attributes on
the <event> and <calledComponent> tags.
The startTime attribute is absolute time. Its format is anything that can be
parsed by java.util.Date.parse(). Specifying startTime in the <event>
element is not required—if absent, it defaults to the value of the current time, as
specified by the Java methods System.currentTimeMillis() or new
Date().getTime(). Omitting startTime from a <calledComponent> element
makes the time default to the time of the containing element, so that if no
startTime attribute is specified anywhere, everything defaults to the current
time.
Example 1
<event resource="Customized Web Server" startTime="123456789"
duration="500">
<calledComponent resource="Web Server Module" offset="300"
duration="100"/>
</event>
The trace view of this event will have "Customized Web Server" starting at
1234567879 and "Web Server Module" starting at 123457089 (123456789 +
300). Specifying a duration in each element produces a useful trace view
showing:
"Customized Web Server" running 300 milliseconds
"Web Server Module" called by "Customized Web Server" and running for 100
milliseconds
"Customized Web Server" running for another 100 milliseconds after "Web
Server Module" returns
Example 2
<event resource="Customized Web Server" duration="500">
<calledComponent resource="Web Server Module" offset="300"
duration="100"/>
</event>
This example is similar to Example 1 except that "Customized Web Server" starts
at the current time, and "Web Server Module" starts 300 milliseconds later. Note
how no part of this example requires the EPAgent script to know the current time.
Example 3
<event resource="Customized Web Server" startTime="123000000" offset="1000"
duration="5000">
<calledComponent resource="Web Server Module" startTime="123003000"
duration="200"/>
</event>
<xs:sequence>
<xs:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="calledComponent" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="startTime" type="xs:dateTime" use="optional"/>
<xs:attribute name="offset" type="xs:integer" use="optional"
default="0"/>
<xs:attribute name="duration" type="xs:dateTime" use="optional"
default="0"/>
</xs:complexType>
</xs:schema>
This section describes the provided default plug-ins provided with Introscope
Environment Performance Agent and their optional command-line arguments in
the following sections:
solaris/diskStats.pl . . . . . . . . . . . . . . . . . . 22
windows/processAvailability.pl AND solaris/processAvailability.pl . . . 22
windows/diskStats.pl . . . . . . . . . . . . . . . . . . 23
apacheLogReader.pl, weblogicLogReader.pl, and websphereLogReader.pl . 24
httpSvcAvailability.pl . . . . . . . . . . . . . . . . . . 25
kstat.pl . . . . . . . . . . . . . . . . . . . . . . 26
iisLogReader.pl . . . . . . . . . . . . . . . . . . . 27
solaris/diskStats.pl
This plug-in returns metrics containing information about the system hard disks.
Metrics produced
Metrics produced by the /solaris/diskStats.pl plug-in are detailed in Solaris
kernel statistics (Kstat) metrics on page 37.
Command-line arguments
This plug-in takes disk names as command-line arguments. If no disk names are
specified, the information about all disks is reported.
For example, the following command reports metrics on all local disks:
perl diskStats.pl
The following command reports metrics on only the disks '/' and '/usr':
Metrics produced
Metrics produced by the /windows/processAvailability.pl and solaris/
processAvailability.pl plug-in are detailed in Process availability metrics on
page 38.
Command-line arguments
Each of these plug-ins take five optional command-line arguments:
The following example reports the number of processes that begin with the
characters 'sh':
windows/diskStats.pl
This plug-in reports disk usage/capacity statistics based on the statistics
available from the Windows 2000 Performance Monitor.
In order for this plug-in to report all statistics properly you must issue the
'diskperf -y' command. You must then reboot your machine in order to activate
the new settings.
Metrics produced
Metrics produced by the /windows/diskStats.pl plug-in are detailed in Disk
Stats (Win 2000) metrics on page 38.
Command-line arguments
This plug-in takes disk names as command-line arguments. If no disk names are
specified, information about all disks is reported.
For example, the following command reports metrics on all local disks:
perl diskStats.pl
The following command reports metrics on only the disks c: and d:
perl diskStats.pl c: d:
» Note You may want to use this argument to narrow your results.
windows/diskStats.pl 23
CA Wily Introscope
Each web server application logfile parser has its own configuration file with the
default values for sleep delay, subresource name, resource name, logfile
directory, and logfile name pattern.
» Note When using any of these log reader plug-ins, the EPAgent won’t begin
reporting to the Enterprise Manager until a new entry is added to the log
file.
Metrics produced
Metrics produced by these plug-ins are detailed in:
Command-line arguments
Each of these plug-ins take four optional command-line arguments:
Example:
httpSvcAvailability.pl
This plug-in reports metrics based on the availability and performance of the http
service at the specified URL.
Metrics produced
Metrics produced by the httpSvcAvailability.pl plug-in are detailed in
HTTP/HTTPS service availability metrics on page 37.
Command-line arguments
This plug-in takes three optional command-line arguments:
Example:
httpSvcAvailability.pl 25
CA Wily Introscope
kstat.pl
This plug-in reports metrics based on the kernel statistics available from Solaris’s
Kstat utility.
Metrics produced
Metrics produced by the kstat.pl plug-in are detailed in Solaris kernel statistics
(Kstat) metrics on page 37.
Command-line arguments
» Note You may want to use these arguments to narrow your results. If no
command-line switches are specified, the plug-in will return all Solaris
kernel information for class, module, name and statistics.
Example:
The Introscope metric would create node VM, then resource UNIX, then segmap,
then see “free”, then value.
» Note If kstat reports a null value for a resource name, no metric will be
generated.
iisLogReader.pl
This plug-in reports metrics based on the configuration in the
iisLogReader.cfg file.
» Note When using this log reader plug-in, the EPAgent won’t begin reporting to
the Enterprise Manager until a new entry is added to the log file.
Metrics produced
Metrics produced by the iisLogReader.pl plug-in are detailed in IIS log reader
metrics on page 36.
Command-line arguments
Example:
iisLogReader.pl 27
CA Wily Introscope
Each web server application logfile parser has its own configuration file with
default values for sleep delay, subresource name, resource name, logfile
directory, and logfile name pattern. The config file also contains a list of metrics
to match and report on. Each metric configuration has a match (regular
expression), metricType, metricName, and metricValue.
LINE_FORMAT sub-properties
The following table describes the property, LINE_FORMAT, and all its sub-
properties.
The following properties for LINE_FORMAT must match EXACTLY the fields that
are logged to the logfile by the IIS Web Server, or the iisLogReader.pl plug-
in will fail to report some or all metrics.
The exact fields for the IIS Web Server are configured within the IIS Admin Tool
(or web page in older versions of IIS). To configure logging fields in IIS4.0 and
IIS5.0, see Configuring IIS Web Server logging in IIS4.0 and IIS5.0 on page 32.
ClientIPAddress
Method
URIStem
ProtocolStatus
To match, the default iisLogReader.cfg file also enables only these five
LINE_FORMAT sub-properties.
So out of the box, the iisLogReader.pl plug-in will expect a default IIS Web
Server logging configuration, and can report all metrics, with the exception of
“Bytes Transferred,” which requires that the “BytesSent” data field be logged by
IIS Web Server and the iisLogReader.cfg sub-property, “BytesSent,” be
uncommented/enabled. If the user fails to enable “BytesSent” in IIS Web Server
and in the iisLogReader.cfg, then the metric, “Bytes Transferred,” will not be
reported to Introscope.
iisLogReader.pl 29
CA Wily Introscope
iisLogReader.pl 31
CA Wily Introscope
Web Site
W3C Extended Log File Format is selected in the Active log format drop-
down box.
» Note Only W3C Extended Log File Format is supported in Introscope version
4.2.x.
5 Click Properties.
6 In the General Properties tab, the LogFile Directory is specified and must match
the LOGFILEDIR property in the iisLogReader.cfg file.
7 In the Extended Properties tab, the following fields are required/mandatory for
the iisLogReader.pl plug-in to report all of its metrics:
Time
Client IP Address
Method
URIStem
Protocol Status
All fields that are enabled (are checked) must match the enabled (uncommented)
fields in the iisLogReader.cfg file, under the LINE_FORMAT->FIELDS section.
This part of the iisLogReader.cfg file tells the iisLogReader.pl plug-in what
exact line format to expect in the logfile. If there is a mis-match, then the
iisLogReader.pl plug-in will fail to report metrics or will report incorrect
metrics.
» Note The default iisLogReader.cfg matches the default IIS Web Server 5.0
logging configuration.
iisLogReader.pl 33
CA Wily Introscope
This chapter describes the metrics produced by the default plug-ins included with
the Environment Performance Agent.
The count for these metrics is per interval, since the last time the plug-in checked
the logfile.
The names of specific metrics produced by the kstat plug-in will vary depending
on both the Solaris system being monitored, Solaris naming concepts, as well as
the command-line invocation of the kstat.pl plug-in by the Environment
Performance Agent (as configured in IntroscopeEPAgent.properties).
This appendix describes the properties files and the settings you can customize
for using the Environment Performance Agent version 7.2 in your Introscope®
deployment. The Enterprise Manager reads these files on startup; you must
restart the EPAgent for changes to take effect. You can read the files themselves
for other information (located at <Introscope home>/config/
IntroscopeEPAgent.properties.)
» Note In these files, on Windows machines, when adding a path, you must
escape a backslash (\) with another backslash (each one doubled), such
as C:\\Introscope\\lib\\Agent.jar.
IntroscopeEPAgent.properties file
The settings for the EPAgent are the same type as found in the Introscope Agent
profile.
Log 4J settings
Two properties define the level of detail in the EPAgent logs, and the name and
location of EPAgent log files.
This setting defines the order in which the Agent will attempt to connect to the
Enterprise Managers listed in the Enterprise Manager Locations and Names
section.
These settings define the host, port, and unique names of the Enterprise
Managers the Agent can connect to.
These properties are optional. If the Agent name is not defined, it will be known
as UnknownAgent.
Process name
Introscope names the EPAgent according to these criteria, which take precedence
in their shown order.
1 A name defined by the property, introscope.agent.customProcessName.
2 A name inferred from the name of the main class of the application.
3 The name set by introscope.agent.defaultProcessName.
Agent name
IntroscopeEPAgent.properties settings
The following table contains information about all available properties for the
EPAgent.
IntroscopeEPAgent.properties file 45
CA Wily Introscope
IntroscopeEPAgent.properties file 47
CA Wily Introscope
Index
A I
Agent installing 7
configuration
verbose mode 8 K
apacheLogReader.pl 24 kstat 22, 26
C L
configuring LINE_FORMAT property 29
adding stateless plug-ins 10 log reader 27
logging options 8 logfile 28
plug-ins 9 logging 32
removing stateful and stateless plug-ins 11
N
D network sources 4
data sources 3
diskstats.pl P
Solaris 22 Perl 4
Windows 23 perl 27
platform support 5
E plug-ins
EP Agent plug-in, definition 3 adding
EPA stateful 9
installing stateless 10
with base Introscope installer 6 custom 6, 13
with EPA standalone installer 7 XML format 14
EPA default plugins 21, 33 default 5
Metrics produced by 35, 41 installation directories 6
EPA properties 43 platform support for 5
EPAgent stateful/stateless 5
redirecting output to a file 8 types 5
running 8, 13 PRINT function 2
verbose mode 8 processAvailability.pl
ErrorSnapshot 16 solaris 22
Windows 22
H properties
httpSvcAvailability.pl 25 files 43
Index 49
CA Wily Introscope
settings 43
R
running
as Java application 13
as standalone .jar file 13
S
scripting environments 3
stateful/stateless plug-ins 5
STDERR 2, 5
STDOUT 2
T
transaction tracing 16
offset 17
startTime 17, 18
XML schema for errors/events 18
V
verbose mode
running Agent in 8
W
weblogicLogReader.pl 24
websphereLogReader.pl 24
X
XML schema 18
50 Index