The properties of a Sampler
component determine which properties of which services are to be sampled, how often they should be sampled, and to whom the samples should be sent. You can use the following properties to configure a Sampler
:
sampleSources
The list of services and properties to be sampled. Each element of the list is of the form <service name>.<property name>
. For example:
sampleSources=\
/atg/dynamo/server/HttpServer.handledRequestCount,\
/atg/dynamo/server/HttpServer.averageRequestHandlingTime,\
/atg/dynamo/server/HttpServer.activeHandlerCount
The order of the Samples
in the SampleEvent
matches the order of the properties declared in sampleSources
.
scheduler
If you want the Sampler
to perform sampling automatically, set this property to point to the Scheduler
that schedules the samples:
scheduler=/atg/dynamo/service/Scheduler
schedule
If you want the Sampler
to perform sampling automatically, set this property to specify the schedule used to run the samples:
schedule=every 10 seconds
sampleListeners
The list of the SampleListener
objects that receive the Samples
broadcast by the Sampler
:
sampleListeners=\
MemorySampler,\
SampleGrapher
Oracle ATG Web Commerce comes with a Sampler
component at /atg/dynamo/service/Sampler
. It monitors various aspects of the Oracle ATG Web Commerce HTTP server, including throughput, latency, and simultaneous connections. It is configured as follows:
$class=atg.service.statistics.Sampler scheduler=Scheduler schedule=every 60 sec sampleSources=\ ../../../VMSystem.freeMemory,\ ../servlet/sessiontracking/SessionManager.residentSessionCount,\ ../servlet/sessiontracking/SessionManager.createdSessionCount,\ ../servlet/pipeline/DynamoHandler.handledRequestCount,\ ../servlet/pipeline/DynamoHandler.averageRequestHandlingTime,\ ../servlet/pipeline/DynamoHandler.totalRequestHandlingTime,\ ../server/DrpServer.activeHandlerCount,\ ../server/HttpServer.activeHandlerCount sampleListeners=\ LogSampler
You can modify this component’s configuration, or define your own Sampler
component.