How to enable VSE Metrics and control the metric collection?
The following properties are used to control the metrics collection in LISA Virtual Services Environment servers. The metrics that are collected can be viewed in the web-based VSE dashboard. The values here are the defaults.
lisa.vse.metrics.collect=true
Main property to turn on the overall metrics collection (true) or off (false). This is true by default in the lisa.properties file
lisa.vse.metrics.txn.counts.level=service
This property controls the level at which transaction counts are recorded. When the named transaction counts are summed, you get transactions per any time period. Options are none (or false), service (the default), or request.
- Service: The name of the service names transaction counts.
- Request: The service name plus the request operation names transaction counts.
lisa.vse.metrics.sample.interval=5m
This property controls how often transaction rate and response times are sampled.
lisa.vse.metrics.delete.cycle=1h
lisa.vse.metrics.delete.age=30d
These properties control how often old metric data is scanned for and deleted, and what is considered old.
The VSE will collect the details in memory and then write out the details to the database every 5 minutes by default. The database tables are:
VSE_METRICS_EVENTS
VSE_METRICS_PERIODICS
VSE_METRICS_TXN_COUNTS
The min and max transaction values for example are in the VSE_METRICS_PERIODICS table.
If using the Derby database you will need a 3rd party tool (like Squirrel or DBVisualizer) that can query this database. If using SQL Server, then can use SQL Server Management Studio.
DevTest JDBC step can be used to read the contents of the tables.
Do a test run for at least 15 minutes (so there should be at least 2 * 5 minute intervals covered) and then check the contents of the VSE_METRICS_PERIODICS table. Note that the VS_NAME lists the name of the Virtual Service and PERIOD_TS should show the Time Stamp.
These database tables form the basis for the graphs under the Metrics tab in the VSE console. To view the metrics console in the browser you need the Adobe flash player.
To make sure that the metrics collection against a slow database is not holding the VSE up when doing a performance benchmark, it may be good to also try a test with
lisa.vse.metrics.collect=false
The design of the database might change in a later release. For that reason DevTest does not provide direct support with SQL statements. But the structure is not that difficult to understand.
It is not recommended using Derby for performance testing. For performance testing use an external database like SQL Server or Oracle.