<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Altentee &#187; Performance &#38; Test Automation Experts &#187; sitescope</title>
	<atom:link href="http://altentee.com/tag/sitescope/feed/" rel="self" type="application/rss+xml" />
	<link>http://altentee.com</link>
	<description>Performance and Test Automation Experts</description>
	<lastBuildDate>Sat, 12 Jun 2010 00:35:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Monitoring Weblogic using JMX in SiteScope</title>
		<link>http://altentee.com/2008/monitoring-weblogic-using-jmx-in-sitescope/</link>
		<comments>http://altentee.com/2008/monitoring-weblogic-using-jmx-in-sitescope/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 03:45:45 +0000</pubDate>
		<dc:creator>Tim Koopmans</dc:creator>
				<category><![CDATA[90kts]]></category>
		<category><![CDATA[Altentee]]></category>
		<category><![CDATA[JMX]]></category>
		<category><![CDATA[sitescope]]></category>

		<guid isPermaLink="false">http://90kts.com/blog/2008/monitoring-weblogic-using-jmx-in-sitescope/</guid>
		<description><![CDATA[<p>Using JMX (Java Management Extensions) it is possible to monitor Managed Beans published by MBean servers. Weblogic (WL) provides MBeans for both admin and managed servers.</p>
<p>You can find out more info about WebLogic MBeans and accessing them with JMX here &#8230;</p>
<p>Following are some augmented instructions for setting up JMX monitors within SiteScope. I used this [...]]]></description>
			<content:encoded><![CDATA[<p>Using JMX (<a href="http://en.wikipedia.org/wiki/Java_Management_Extensions">Java Management Extensions</a>) it is possible to monitor Managed Beans published by MBean servers. Weblogic (WL) provides MBeans for both admin and managed servers.</p>
<p>You can find out more info about WebLogic MBeans and accessing them with JMX <a href="http://edocs.bea.com/wls/docs92/wlsmbeanref/core/index.html">here</a> &#8230;</p>
<p>Following are some augmented instructions for setting up JMX monitors within SiteScope. I used this <a href="http://www.performanceengineer.com/monitoring/monitoring-weblogic-using-jmx">excellent </a>article as a starting point.<br />
<span id="more-121"></span><br />
<strong>Types</strong><br />
There are two types of MBeans which we&#8217;re interested in namely:</p>
<blockquote><p>1. Configuration MBeans, which expose attributes and operations<br />
   for configuring WebLogic Server resources.<br />
2. Runtime MBeans, which provide information about the runtime state of its resources.</p></blockquote>
<p>In terms of performance monitoring we&#8217;re more interested in the latter, but from an overall system level monitoring point of view, sysadmins may also be interested in static config MBeans.</p>
<p>In reality there are 1,000&#8217;s of runtime MBeans available for WebLogic and navigating/finding the correct bean inside SiteScope can be difficult due to it&#8217;s clunky web interface &#8230;</p>
<p>As a starting point refer to the MBean reference previously mentioned to get an overview of runtime beans available. In this case I&#8217;m interested in the JMSRuntime bean &#8230;</p>
<p><strong>Using the WL Scripting Tool</strong><br />
If you are working on the WL server you can use the WL Scripting Tool to browse the available Runtime beans:<br />
<code>D:\Data\bea\wlserver_10.0\server\bin>setWLSEnv.cmd<br />
D:\Data\bea\wlserver_10.0\server\bin>java weblogic.WLST<br />
connect('username','password','t3://host:8003')<br />
serverRuntime()<br />
ls()<br />
cd("JMSRuntime")<br />
ls()<br />
cd("server01_01.jms")<br />
ls()</p>
<p>dr-\-   Connections<br />
dr-\-   JMSServers</p>
<p>-r-\-   ConnectionsCurrentCount                      14<br />
-r-\-   ConnectionsHighCount                         14<br />
-r-\-   ConnectionsTotalCount                        18<br />
-r-\-   HealthState                                  State:HEALTH_OK,ReasonCode:\[\]<br />
-r-\-   JMSServersCurrentCount                       2<br />
-r-\-   JMSServersHighCount                          2<br />
-r-\-   JMSServersTotalCount                         2<br />
-r-\-   Name                                         server01_01.jms<br />
-r-\-   Type                                         JMSRuntime</code></p>
<p>This will help identify the name of the MBean (in this case server01_01.jms) and the indicative path<br />
to that MBean when using JConsole or SiteScope.</p>
<p><strong>Setting up IIOP access on monitored machines</strong><br />
SiteScope relies on the IIOP protocol to talk to the WL server. In order to get remote access with JMX via IIOP you need to provide a default username and password for the IIOP user.</p>
<p>This can be done via the WL admin console as in:<br />
<code>domServiceBus->Environment->Servers->server01_nn->Protocols [tab]\->IIOP->advanced</code></p>
<p>Then provide a default username and password for the IIOP user.</p>
<p>Note: IIOP is already enabled by default, but a username and pwd is not. This change requires a server restart for WL. You must make sure that the username and password is >= 8 digits, otherwise the CORBA connection will fail when using SiteScope.</p>
<p><strong>Testing connectivity from JConsole</strong><br />
Before setting up a SiteScope monitor it is worth using JConsole to familiarize yourself with the published MBeans.<br />
Assuming you have the Java SDK installed, launch JConsole as per the following:<br />
<code>C:\Program Files\Java\jdk1.5.0_14\bin\jconsole.exe \-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:60000:500:10</code></p>
<p>Note: you must provide the additional read timeout arguments otherwise you will get a connection error like this:<br />
<code>Unable to retrieve counters: Error receiving browse data: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079696 Maybe; nested exception is: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe</code></p>
<p>To connect to the target server, click on New Connection->advanced and provide the following details:<br />
<code>JMX URL: service:jmx:rmi:///jndi/iiop://hostname:8003/weblogic.management.mbeanservers.runtime<br />
Username: <whatever you set for the IIOP user><br />
Password: <whatever you set for the IIOP user></code></p>
<p>You will then get a tree-like broswer in which you can look at all available MBeans.</p>
<p><strong>Setting up a SiteScope JMX monitor</strong><br />
Before setting up the monitor, make sure you change the following registry key for SiteScope to avoid the aforementioned timeout errors:<br />
<code>@="-server -Xmx256m -showversion -Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:30000:500:10<br />
-Dcatalina.home=\"D:\\SiteScope\\Tomcat\" -Dflipper.param.file=..\\conf\\flipperSiteScope.properties<br />
-Dtopaz.home=.. -cp \"D:\\SiteScope\\Tomcat\\bin\\bootstrap.jar\" org.apache.catalina.startup.Bootstrap start"</code></p>
<p>Note the added parameter argument:<br />
<code>-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:30000:500:10</code></p>
<p>You will need to stop/start the SiteScope windows service for this change to take affect.</p>
<p>Now create a new JMX monitor:<br />
<code>Name: 8003 - Managed server<br />
Frequency: 2 minutes<br />
JMX URL: service:jmx:rmi:///jndi/iiop://host:8003/weblogic.management.mbeanservers.runtime<br />
Domain filter:<br />
Username: weblogic<br />
Password: password</code></p>
<p>Then click Get Counters &#8230;</p>
<p>If you used the WLST you&#8217;d now know what path the MBean exists on. In this case:<br />
<code>com.bea/server01_01/server01_01.jms/JMSRuntime</code></p>
<p>And suggested counters to collect might be:<br />
<code>ConnectionsCurrentCount<br />
ConnectionsHighCount<br />
ConnectionsTotalCount<br />
JMSServersCurrentCount<br />
JMSServersHighCount<br />
JMSServersTotalCount</code></p>
<p>Now you will be able to use SiteScope as the central repository for collecting metrics (long term monitoring). When running a load test scenario, you will be able to poll these same metrics using the SiteScope monitor available to the Controller.</p>
]]></content:encoded>
			<wfw:commentRss>http://altentee.com/2008/monitoring-weblogic-using-jmx-in-sitescope/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Monitoring Typical User Transactions with Ruby and SiteScope</title>
		<link>http://altentee.com/2008/monitoring-typical-user-transactions-with-ruby-and-sitescope/</link>
		<comments>http://altentee.com/2008/monitoring-typical-user-transactions-with-ruby-and-sitescope/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:26:30 +0000</pubDate>
		<dc:creator>Tim Koopmans</dc:creator>
				<category><![CDATA[90kts]]></category>
		<category><![CDATA[Altentee]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sitescope]]></category>

		<guid isPermaLink="false">http://90kts.com/blog/2008/monitoring-typical-user-transactions-with-ruby-and-sitescope/</guid>
		<description><![CDATA[<p>A colleague asked me the other day if it was possible to setup a workstation with just LoadRunner installed and have it automatically carry out a typical user transaction to determine the &#8216;health&#8217; of the target server. After explaining to him that it would be a clunky approach at best, and currently lacking an installation [...]]]></description>
			<content:encoded><![CDATA[<p>A colleague asked me the other day if it was possible to setup a workstation with just LoadRunner installed and have it automatically carry out a typical user transaction to determine the &#8216;health&#8217; of the target server. After explaining to him that it would be a clunky approach at best, and currently lacking an installation of HP&#8217;s Business Availability Center which could achieve such a thing (Bah, humbug to that) I suggested we write a simple Ruby script, using the &#8216;watir&#8217; gem which can be periodically called by the existing SiteScope installation.</p>
<p>If you didn&#8217;t have SiteScope installed, you could just as easily run this script as a scheduled task within Windows or via cron within a Unix environment, no sweat &#8230;<br />
<span id="more-116"></span></p>
<p><a href="http://wiki.openqa.org/display/WTR/">Watir </a>(pronounced &#8216;water&#8217;) stands for Web Application Testing In Ruby and IMHO it really is starting to kick the pants off heavily licensed tools such as Quick Test Pro. I mean, if you&#8217;re only testing web apps, then why fork out $$$ for licenses? Just pay some decent money for someone to write you a script &#8230; </end soapbox> <img src='http://altentee.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>But anyway, a simple Ruby script that uses watir looks like this:<br />
<code><br />
require 'watir'<br />
include Watir<br />
require 'test/unit'</p>
<p>class CustomerSearch < Test::Unit::TestCase</p>
<p>  def test_search<br />
    ie = IE.new<br />
    ie.goto("https://targetwebsite.com.au")</p>
<p>    # Login<br />
    ie.frame(:name, "WORK_SPACE").text_field(:name, "inf_user").set<br />
    ("foxmulder")<br />
    ie.frame(:name, "WORK_SPACE").text_field(:name, "inf_password").set<br />
    ("scully")<br />
    ie.frame(:name, "WORK_SPACE").button(:value, "Submit").click</p>
<p>    # Work Mode<br />
    ie.frame(:name, "WORK_SPACE").select_list(:name, "mode").set<br />
    ("Some Drop Down Menu")<br />
    ie.frame(:name, "WORK_SPACE").button(:name, "submit_button").click</p>
<p>    #Product Search<br />
    ie.frame(:name, "WORK_SPACE").text_field(:name, "NUM_advertiserId").set<br />
    ("123456789")<br />
    ie.frame(:name, "WORK_SPACE").button(:name, "submit_button").click</p>
<p>    #p ie.frame(:name, "WORK_SPACE").text<br />
    assert(ie.frame(:name, "WORK_SPACE").text.include?<br />
    ("Queried by: Advertiser ID: 123456789"))<br />
  end<br />
end<br />
</code></p>
<p>As you can probably read from above, this script logs into a target website, provides user credentials, searches for a product ID then checks (with an assert statement) that some form of expected text exists in the result.</p>
<p>If you ran this script from the command line with<br />
<code>ruby myScript.rb</code></p>
<p>You would see ruby fire up an actual Internet Explorer browser and drive the screen, just like you're probably familiar with in Quick Test Pro.</p>
<p>If you drive it with the -b parameter, it will hide the browser which is what I recommend.</p>
<p>Now to get it running in SiteScope, you just need to add a custom script monitor. I wrote a simple batch file and placed it in the <code><installdir>/scripts</code> directory of the SiteScope server (so that it appears in the drop down list when adding a script monitor). The batch file looked like this:</p>
<p><code><br />
echo ##### ruby_myScript.bat called ##########<br />
ruby "D:\SiteScope\scripts\myScript.rb" -b &#038;&#038; exit 0 || exit 1<br />
</code></p>
<p>The reason I do that is so that I can exit with the appropriate return code. That way, if any of the test components/assertions inside the Ruby script don't pass, they will pass on an exit code of 1 to the batch file, which then feeds that info back to SiteScope so that you get a little red traffic light for script failures.</p>
<p>The script monitor properties in SiteScope ends up looking like this:<br />
<a href='http://90kts.com/blog/wp-content/uploads/2008/02/sitescopesetup.jpg' title='Site Scope Setup'><img src='http://90kts.com/blog/wp-content/uploads/2008/02/sitescopesetup.jpg' alt='Site Scope Setup' /></a></p>
<p>The dashboard will end up looking like this (I've demostrated an error, note how it also shows you the script round trip which also equates to the time that it takes for the end-to-end transaction to take place including launching the broswer)<br />
<a href='http://90kts.com/blog/wp-content/uploads/2008/02/sitescopeerror.jpg' title='Site Scope Error'><img src='http://90kts.com/blog/wp-content/uploads/2008/02/sitescopeerror.jpg' alt='Site Scope Error' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://altentee.com/2008/monitoring-typical-user-transactions-with-ruby-and-sitescope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
