Key performance indicators (KPIs) are quantifiable measurements
of the improvement or deterioration in the performance of an activity
critical to the success of a business. A KPI can have a target, a
set of ranges, or both, which measure how well a business is achieving
its objectives. A KPI obtains its value either from aggregating a
metric or from a calculation based on other KPIs or user-defined XML
Path Language (XPath) functions.
Before defining a KPI, you must have defined a KPI context.
To define a KPI, complete the following steps:
- Click the KPI Model tab of the editor,
right-click the KPI context (or any element of the KPI context) in
the model tree, and click . Alternatively, click New
> KPI From Library. See "Adding KPIs from the KPI library"
for more details.
- In the Create New KPI window, type
a name in the Name field and click OK. The name is limited to 256 characters. As you type the name,
a default ID is created for you, although you can change it if you
prefer. The ID is required, and must be unique in the monitor model.
The ID must be an XML NCName (non-colonized name), which means that
it must start with a letter or underscore, and can only contain letters,
digits, underscores, hyphens, and periods.
Tip: You
might find the following naming scheme useful when naming KPIs:
- Operator name (such as maximum or average)
- Metric name
- Optionally, metric data type and whether the value is based on
a duration.
- Time reference (such as year or month)
as in the following examples of KPI names:
- Total Orders [Y]
- Max Completed Orders
- Max Orders $/Day [M]
- Max Orders $/Day [Y]
Although the name of the KPI should be meaningful, try to keep
it short for viewing at run time.
The
KPI is added to the model tree under the KPI context, and the form
editor opens so that you can define the KPI context.
- Specify the type of the KPI, either Decimal or Duration.
For a decimal KPI, select formatting options that control how the
KPI values are displayed at run time.
- To format the KPI as a currency value, select the type
of currency. The other options are disabled.
- Select the number of decimal places to include in the
KPI value.
- Select Show as a percentage to
format the KPI value as a percentage. At run time,
the value will be multiplied by 100 and a percent sign (%) will be
added. For example, 0.3 becomes 30%.
- To preserve the historical values of KPIs for viewing and
analysis, select Keep track of historical values for this
KPI. KPI values will be calculated
hourly and kept in a KPI history table. In the KPI Manager widget,
you will be able to create prediction models and use the collected
historical data to predict future trends for the KPI.
- Optional: Specify the initial target, ranges,
or both as follows:
- To add a target, click Details to
specify the display name, ID, description, and value. The
KPI target is added to the model tree under the KPI.
- To add ranges, select whether you want to specify each
range as a percentage of the target value (that is, the target is
treated as 100%) or as an actual value. Click Add to
add a range and specify the name and description in the Add
Range window. The description is used only in the Monitor
Model editor and is not displayed anywhere in WebSphere® Business
Monitor. In the table, click
the Start Value and End Value cells
and specify the values. Both values are required. The start
element of each row must equal the end element for the previous row.
Tip: If you add your start and end range values before creating
the next range, then, when you click Add, the
start value of the new range will be automatically configured with
the end value of the previous range.
- To select the color to be used for display at run time,
click the Color cell and click the button that
appears. You can specify a color for each range.
The ranges are added to the model tree under the KPI.
After adding ranges, you can click Sort to
sort them from the lowest start value to the highest start value.
You can also click a column heading to sort the values by that column.
Click the column heading a second time to reverse the sort order.
- Select whether this KPI is based on a metric and aggregation
function or on a calculation based on other KPIs or user-defined XPath
functions. In Business Space,
these KPIs are called Aggregate KPIs and Expression
KPIs.
- If the KPI is based on other KPIs or XPath functions, write
an expression to calculate the value of the KPI. For content
assist, press Ctrl+Space. You can use XPath functions to retrieve
KPI values from sources outside WebSphere Business
Monitor.
- If the KPI is based on a metric and aggregation function,
specify the details of the KPI as follows:
- Click Browse and select the monitoring
context in which the metric (or key, counter, or stopwatch) is found.
Click Browse and select the metric, or click New to
create a new metric.
When possible, use duration metrics
instead of stopwatches as the source of KPIs. KPIs based on stopwatches
will not perform as well as KPIs based on duration metrics, because
actively running stopwatch values are calculated in the database for
each instance to be aggregated. Basing a KPI on a stopwatch also limits
your options for tuning the database in the future.
- Select the aggregation function to apply to the metric. If the aggregation function is not appropriate for the type
of the metric, you will see a validation error. See "Aggregation functions"
for more information.
- Select whether the KPI calculation should use values
collected from all versions of the model, including all previous and
future versions, or use only the values from the currently selected
version of the model. In general, if the semantics of
the KPI have not changed, include all versions. However, if a new
version of the KPI has incompatible changes, choose only the current
version.
- Optional: To select a time period over which
the KPI should be evaluated, click Browse and
select a metric from the same monitoring context as the metric used
to calculate the KPI. The metric must have a type of Date or DateTime.
- To calculate the KPI based on data from a repeating time period,
click Repeating and select daily, monthly,
quarterly, or yearly. Select whether you want to evaluate data for
the last full period or for the period in progress. For example, if
you select a daily time period, then the KPI can either be based on
the values up to yesterday, or be based on the values that include
the day so far. Select the time zone. The default value is your current
time zone in the Monitor Model editor. If you want daylight saving
time to be taken into account at run time, select a location.
- To calculate the KPI over a window of time that moves continuously,
click Rolling. Select minutes, hours, days,
months, or years and enter the number that you want, for example,
10 minutes or 90 days. If you select 90 days, for example, the value
of the KPI will be based on the last 90 days up to the current time
(not from midnight to midnight). For example, if it is currently October
17th, 2007 12:30 PM and you select 3 months, the KPI will be based
on all instances from July 17th, 2007 12:30 PM to October 17th, 2007
12:30 PM. In Business Space, this
kind of time interval is called Sliding.
- To calculate the KPI over a single time period, click Fixed and
select the start date and the end date. If you specify a start date
only, the KPI is calculated beginning at that date and continuing
to the current date. If you specify an end date only, If you specify
an end date only, the KPI is calculated using all data up until the
end date. Select the time zone. The default value is your current
time zone in the Monitor Model editor. If you want daylight saving
time to be taken into account at run time, select a location.
- Optional: Select any data filters that apply
to the KPI. For example, you might have a KPI called Average
Order Amount for Longtime Customers, so you are only interested
in the Order Amount metric in monitoring contexts
in which the Customer Years metric contains
a number greater than 5. Click Add and
select the metric, key, counter, or stopwatch to use as a filter,
or click New to create a new one. The filter
is added to the table.