Tutorial - Statistic Creation

Some things to note about VA2 Statistics:

Step 1 - Create a new Statistic
1. For this tutorial we assume you have VA2 setup correctly and collecting Siebel Server information, as can be seen in step 4 of the verification steps. Open VA2 MMC - Navigate to the Statitics folder. Right click and select Add from the menu. (You can also import pre-built Statistics. However, for this tutorial we will build a statistic by hand.)

2. You are now presented with a code editor for your statistic. Fill out the some properties:
We will then create a VA2 rule that counts the number of tasks for a particular Siebel component. In this example, we track the number of tasks for TxnMerge, or Siebel Transaction Merger, a component for Siebel remote, just as an example.

You will need the following values:

-Siebel Enterprise, set the $enterprise variable in the code below
-Siebel Appserver, set the $appserver variable in the code below

use siebsrvobj;

my $enterprise = 'siebel';
my $appserver = 'compaqamd';
my $compalias = 'TxnMerge';

my $entobj = siebsrvobj->newobj($datasession,$debug,$enterprise);  	#initialize the enterprise object

$retval = $entobj->numoftasksforappsrvrcomp($appserver,$compalias);	  #get number of running tasks for TxnMerge

Step 2 - Debugging Statistic
We have now written a statistic. Keep in mind that you need to customize the code with your Siebel $enterprise and $appserver values. The next step is to test the code - which we do by pressing the debug button.

When you press the debug button, the code in its current state is saved. A debug window pops up, executing the code in its current state. The quickest way to check the output is to look at the debug window, which displays what the $retval variable has returned or any error messages.

In this example, $retval = 1. That means if we activate this Statistic, the VA2 Central Server will execute this satistic on interval, every minute in this example, and graph the result which is the number of tasks for the TxnMerge Siebel Component.

To set the rule active, merely select the Active box, and press OK. The rule is saved, and VA2 will begin to execute the statistic an graph the results.

What if your rule retuned a zero or blank? A couple things to check:

And finally, here is the result, showing a graph of only four consecutive data points, all with a value of 1.