SiteScope利用Database Query monitor监控指定的数据库,通过SiteScope监控器的SHOW STATUS 命令,获得相应数据,命令如下:show status where variable_name like ‘innodb_buffer_pool_pages_total’为了确保监控请确认LoadRunner and SiteScope之间的端口, SiteScope和MySQL必须打开TCP 8888 和TCP 3306 . 还有SiteScope要监控必须要确保有JDBC的安装。
以下为监控前需要注意的地方:1. SiteScope to be deployed. 2. Sufficient license points for Database Query monitor. 3. TCP 8888 (default) opened two-way for LoadRunner to SiteScope. 4. TCP 3306 (default) opened two-way for SiteScope to MySQL. 5. Monitoring privileges for SiteScope to monitor MySQL. 6. JDBC driver to be installed on SiteScope. 7. Have knowledge of the counter you want to monitor.转自SiteScope帮助:Monitoring mySQL Databases Monitoring a MySQL database requires the use of a JDBC driver. To enable SiteScope to monitor a MySQL database:Download the JDBC driver from http://www.mysql.com/downloads/api-jdbc.html Uncompress the distribution file Among all the other files, you should find a file with a .jar extension. Copy the .jar file into the <SiteScope install path>/SiteScope/java/lib/ext directory Stop and restart SiteScope Now, use your browser to add a Database Query Monitor within SiteScope. The Database Connection URL format for the MySQL JDBC driver is:jdbc:mysql://<database hostname>
[:<tcp port>]/<database> For example to connect to the MySQL database "aBigDatabase" on a machine using the standard MySQL port number 3306 you would use:jdbc:mysql://206.168.191.19/aBigDatabase If you are using a different port to connect to the database then you should include that port number as part of the IP address. The specification for the MySQL JDBC driver is: org.gjt.mm.mysql.Driver Enter this string into the Database Driver text box under the Advanced Options section of the Add Database Query Monitor form.除此之外还可以利用Mysql 提供的监控接口 ,编写dll 然后利用lr中用户定义监控器进行监控,由于最近时间比较忙,忙过这段时间在提供demo例子。