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 theSampleEvent
matches the order of the properties declared insampleSources
.
scheduler
If you want theSampler
to perform sampling automatically, set this property to point to theScheduler
that schedules the samples:
scheduler=/atg/dynamo/service/Scheduler
schedule
If you want theSampler
to perform sampling automatically, set this property to specify the schedule used to run the samples:
schedule=every 10 seconds
sampleListeners
The list of theSampleListener
objects that receive theSamples
broadcast by theSampler
:
sampleListeners=\
MemorySampler,\
SampleGrapher
Dynamo comes with a Sampler
component at /atg/dynamo/service/Sampler
. It monitors various aspects of the Dynamo 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.