+ All Categories
Home > Documents > CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides...

CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides...

Date post: 05-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
94
IBM Tivoli Netcool Performance Manager 1.3.2 Wireline Component Document Revision R2E1 CME Formula API Developer’s Guide
Transcript
Page 1: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

IBM Tivoli Netcool Performance Manager 1.3.2Wireline ComponentDocument Revision R2E1

CME Formula API Developer’s Guide

���

Page 2: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

NoteBefore using this information and the product it supports, read the information in “Notices” on page 81.

© Copyright IBM Corporation 2010, 2012.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Page 3: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Contents

CME Formula API Developer’s Guide . . vAudience . . . . . . . . . . . . . . . vOrganization . . . . . . . . . . . . . . vTivoli Netcool Performance Manager - WirelineComponent . . . . . . . . . . . . . . vi

Chapter 1. Overview . . . . . . . . . 1CME formulas . . . . . . . . . . . . . . 1CME formula API inputs and controls . . . . . . 1

Metrics . . . . . . . . . . . . . . . 2Generic formulas . . . . . . . . . . . . 2Element and subelement properties . . . . . . 2Composite subelements. . . . . . . . . . 2Calendars . . . . . . . . . . . . . . 2Thresholds . . . . . . . . . . . . . . 3

CME formula API operation . . . . . . . . . 3Creating formula files . . . . . . . . . . 3Loading formula files into the database . . . . 3DataChannel processing of formula files . . . . 3

Chapter 2. Creating CME formula APIfiles . . . . . . . . . . . . . . . . 5Requirements . . . . . . . . . . . . . . 5

Experience . . . . . . . . . . . . . . 5ECMAScript syntax reference . . . . . . . . 5Supported tools . . . . . . . . . . . . 6

Model the network topology . . . . . . . . . 6Creating a model . . . . . . . . . . . . 6Defining resource relationships . . . . . . . 7

Plan the deployment of metrics in the inventory . . 7Period-based metrics. . . . . . . . . . . 7Event-based metrics . . . . . . . . . . . 8

Create a CME formula API file . . . . . . . . 8File storage locations . . . . . . . . . . 8General format . . . . . . . . . . . . 8formulas.documentName attribute . . . . . . 9

Create formula definitions in the CME formula APIfile . . . . . . . . . . . . . . . . . 10

formulas.defineFormula method . . . . . . 11name identifier . . . . . . . . . . . . 12arguments identifier . . . . . . . . . . 12window identifier (optional) . . . . . . . . 13windowSpecs (optional) . . . . . . . . . 16genericId identifier (optional) . . . . . . . 17reset function (optional) . . . . . . . . . 18calculate function . . . . . . . . . . . 18calculateIntermediate function (optional) . . . 20

Load CME formula API files into the CME andassign labels . . . . . . . . . . . . . . 21

FRMI formula tool . . . . . . . . . . . 21Loading formula files . . . . . . . . . . 21

Chapter 3. Using CME formula API files 29Scenario 1: Link status by using a single metric . . 29

Model . . . . . . . . . . . . . . . 29

Prerequisites . . . . . . . . . . . . . 29Formula file . . . . . . . . . . . . . 30

Scenario 2: Link Status Using Several Metrics . . . 31Model . . . . . . . . . . . . . . . 31Prerequisites . . . . . . . . . . . . . 31Formula file . . . . . . . . . . . . . 31

Scenario 3: Link status by using a generic formula 33Model . . . . . . . . . . . . . . . 33Prerequisites . . . . . . . . . . . . . 33Formula file . . . . . . . . . . . . . 33

Scenario 4: Link status by using metrics andproperties . . . . . . . . . . . . . . . 35

Model . . . . . . . . . . . . . . . 35Prerequisites . . . . . . . . . . . . . 35Formula file . . . . . . . . . . . . . 35

Scenario 5: SLA violation by using link status . . . 37Model . . . . . . . . . . . . . . . 37Prerequisites . . . . . . . . . . . . . 37Formula file . . . . . . . . . . . . . 38

Scenario 6: Accumulated downtime for a link . . . 39Model . . . . . . . . . . . . . . . 39Prerequisites . . . . . . . . . . . . . 39Formula file . . . . . . . . . . . . . 40

Scenario 7: Link status during SCP and Trapdeployment . . . . . . . . . . . . . . 41

Model . . . . . . . . . . . . . . . 41Prerequisites . . . . . . . . . . . . . 41Formula file . . . . . . . . . . . . . 41

Scenario 8: SLA violation by using latency andbandwidth metrics . . . . . . . . . . . . 44

Model . . . . . . . . . . . . . . . 45Prerequisites . . . . . . . . . . . . . 45Formula file . . . . . . . . . . . . . 45

Scenario 9: Link status by using several data sources 46Model . . . . . . . . . . . . . . . 47Prerequisites . . . . . . . . . . . . . 47Formula file . . . . . . . . . . . . . 47

Scenario 10: Service status by using several datasources and late data . . . . . . . . . . . 49

Model . . . . . . . . . . . . . . . 50Prerequisites . . . . . . . . . . . . . 50Formula file . . . . . . . . . . . . . 50

Scenario 11: Path latency by using probes . . . . 52Model . . . . . . . . . . . . . . . 52Prerequisites . . . . . . . . . . . . . 52Formula file . . . . . . . . . . . . . 53

Scenario 12: Penalty recalculation by using troubletickets or deferments . . . . . . . . . . . 55

Model . . . . . . . . . . . . . . . 55Prerequisites . . . . . . . . . . . . . 55Formula file . . . . . . . . . . . . . 56

Chapter 4. CME API object reference 63ECMAScript core objects . . . . . . . . . . 63CME formula API object model. . . . . . . . 63

© Copyright IBM Corp. 2010, 2012 iii

Page 4: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Input object . . . . . . . . . . . . . . 63FormulaOperator object . . . . . . . . . . 64Tivoli Netcool Performance Manager objects used bythe CME formula API . . . . . . . . . . . 64PVUtility objects. . . . . . . . . . . . . 64PVWindow objects . . . . . . . . . . . . 64Array . . . . . . . . . . . . . . . . 65FormulaOperator . . . . . . . . . . . . 66Input . . . . . . . . . . . . . . . . 69Logger . . . . . . . . . . . . . . . . 71PV.CalendarWindow . . . . . . . . . . . 72PV.CalendarAndTupleWindow . . . . . . . . 72PV.CMEWindow. . . . . . . . . . . . . 73PV.Math . . . . . . . . . . . . . . . 73

PV.PeriodWindow . . . . . . . . . . . . 74PV.PeriodAndTupleWindow . . . . . . . . . 75PV.TraceFile . . . . . . . . . . . . . . 75PV.Trap. . . . . . . . . . . . . . . . 76PV.TrapWriter . . . . . . . . . . . . . 76PV.TupleWindow . . . . . . . . . . . . 77

Chapter 5. Troubleshooting . . . . . . 79CME logs . . . . . . . . . . . . . . . 79CME messages . . . . . . . . . . . . . 79

Notices . . . . . . . . . . . . . . 81Trademarks . . . . . . . . . . . . . . 83

iv IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 5: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

CME Formula API Developer’s Guide

Tivoli Netcool Performance Manager 1.3.2 is a bundled product that consists of awireline component (formerly Tivoli Netcool/Proviso) and a wireless component(formerly Tivoli Netcool Performance Manager for Wireless).

This information describes how to create and deploy ECMAScript files that use theTivoli Netcool Performance Manager Complex Metric Engine (CME) Formula API.These formula files are used to calculate performance, event, and status metrics foryour network inventory.

The CME Formula API is intended to replace the CME formula language that isstill currently supported by Tivoli Netcool Performance Manager.

AudienceThe audience includes Micromuse Professional Services engineers, Service ProviderService Managers, and technology pack developers. The information assumes youcan perform a Tivoli Netcool Performance Manager installation and understand thepost-installation configuration tasks. The information also assumes that you have aworking knowledge of the following Tivoli Netcool Performance Manager modulesand their associated tools:v Tivoli Netcool Performance Manager DataChannelv Tivoli Netcool Performance Manager DataLoadv Tivoli Netcool Performance Manager DataMartv Tivoli Netcool Performance Manager DataView

To create CME Formula API files, you must understand how to program inECMAScript.

OrganizationThis information is organized as follows:v Chapter 1, “Overview,” on page 1

Provides an overview of the CME Formula API, its inputs, and controls, anddescribes the operation of the CME Formula API.v Chapter 2, “Creating CME formula API files,” on page 5

Describes CME Formula API file general syntax requirements, how to define CMEformulas, and how to load your files into the CME.v Chapter 3, “Using CME formula API files,” on page 29

Provides examples of CME formulas that are based on various types ofdeployment scenarios.v Chapter 4, “CME API object reference,” on page 63

Provides a summary description of the ECMAScript and CME Formula API objectsthat are used in writing formula definitions.v Chapter 5, “Troubleshooting,” on page 79

© Copyright IBM Corp. 2010, 2012 v

Page 6: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Provides information concerning issues that can occur when you create CMEFormula API files, where to find appropriate log files and other sources ofdiagnostic information.

Tivoli Netcool Performance Manager - Wireline ComponentIBM® Tivoli Netcool Performance Manager consists of a wireline component(formerly Netcool/Proviso) and a wireless component (formerly Tivoli® Netcool®

Performance Manager for Wireless).

Tivoli Netcool Performance Manager - Wireline Component consists of thefollowing subcomponents:v DataMart is a set of management, configuration, and troubleshooting GUIs. The

Tivoli Netcool Performance Manager System Administrator uses the GUIs todefine policies and configuration, and to verify and troubleshoot operations.

v DataLoad provides flexible, distributed data collection and data import of SNMPand non-SNMP data to a centralized database.

v DataChannel aggregates the data collected through Tivoli Netcool PerformanceManager DataLoad for use by the Tivoli Netcool Performance ManagerDataView reporting functions. It also processes online calculations and detectsreal-time threshold violations.

v DataView is a reliable application server for on-demand, web-based networkreports.

v Technology Packs extend the Tivoli Netcool Performance Manager system withservice-ready reports for network operations, business development, andcustomer viewing.

The following figure shows the different Tivoli Netcool Performance Managermodules.

vi IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 7: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Tivoli Netcool Performance Manager documentation consists of the following:v Release notesv Configuration recommendationsv User guidesv Technical notesv Online help

The documentation is available for viewing and downloading on the informationcenter at http://publib.boulder.ibm.com/infocenter/tivihelp/v8r1/topic/com.ibm.tnpm.doc/welcome_tnpm.html.

CME Formula API Developer’s Guide vii

Page 8: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

viii IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 9: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Chapter 1. Overview

The Tivoli Netcool Performance Manager CME Formula API is an extension of theTivoli Netcool Performance Manager DataChannel. You can create formulas thatare tailored to a specific environment or to meet specific needs by using the CMEFormula API.

The CME formula API introduces functionality that allows any metrics andproperties within the database to be used as inputs for calculations across bothinventory levels and time. This approach allows you to calculate performancecomputations, Service Level Agreement computations, and aggregationcomputations across multiple subelements.

Note: This information assumes that you are familiar with the architecture andfunction of the Tivoli Netcool Performance Manager DataChannel. For moreinformation, refer to the Tivoli Netcool Performance Manager functional overview.

CME formulasCME Formulas are used to define how various input metric data streams aretransformed into new output metric data stream values. Inputs for a CME formulacan include raw data output from Bulk or SNMP collection formulas, thresholds,properties, resource aggregation statistics, or other CME formulas.

The result of a CME formula is itself a metric, and it can be processed oraggregated like any other metric in Tivoli Netcool Performance Manager.

Formula triggering

A CME formula is dependent on the type and number of inputs that are definedfor it. A CME formula performs its calculation after all of its processing conditionsare satisfied.

For example, when a value for that metric arrives, a formula with a single inputmetric triggers. If multiple input metrics are required for a formula, then theformula does not trigger until values for both metrics arrive.

CME formula API inputs and controlsAs with traditional CME formulas, the formulas that are defined in a CMEFormula API file can accept as inputs any metrics defined within the TivoliNetcool Performance Manager database, including the results of one or more otherformulas: Bulk collection formulas, SNMP collection formulas, generic formulas,and even other CME formulas. CME formulas also use Tivoli Netcool PerformanceManager element and subelement properties as inputs.

The following sections outline what you can use as formula inputs and controlswhen you create CME Formula API files.

© Copyright IBM Corp. 2010, 2012 1

Page 10: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

MetricsThe CME Formula API extends functionality where you can use several types ofmetrics as inputs to formula definitions. You can use either time-based metrics,event-based metrics, or event-based metrics that occur during a specific timeinterval. The CME formula API handles each type of calculation by specifying thedata buffering requirements for a formula and defining how a formula is to betriggered.

Generic formulasThe CME formula API allows you to use generic formulas as inputs to otherformulas.

Aftere a generic formula usn created and exists in the Tivoli Netcool PerformanceManager database, the metric output (metric IDs) from any number of resourcescan be mapped to that generic formula (generic ID). As a result, status changesacross many resources can be monitored and manipulated in a single formula byusing the generic ID as an input.

Element and subelement propertiesYou can use element and subelement properties as inputs to formula definitions byusing the CME formula API.

Composite subelementsTivoli Netcool Performance Manager has traditionally used groups to describenetworks and services. While groups are scalable in different environments, theyare limited as there is a lack of structure between the subelements within groups.Subelements are placed into a group with no concepts of a hierarchical structure orhow the subelements are related to each other. In practice, this implies that there isno first or last subelement, and the only defined relationship is between eachsubelement and its parent group.

This approach is sufficient for modeling interfaces that are deployed for acustomer, but groups cannot model more complex situations such as network pathsor network services. Groups are suitable for modeling populations of subelementsof the same type or family, but they are not adapted for storing heterogeneoussubelements that rely on the definition of a relationship to provide an appropriatecontext.

Tivoli Netcool Performance Manager allows service managers to create logicalmodels of network services by using composite subelements (CSEs). CSEs areTivoli Netcool Performance Manager entities that describe the relationships anddependencies between inventory objects in a network service.

CalendarsThe CME formula API uses calendars to define time ranges when the processing offormulas must not occur. Calendars are defined in Tivoli Netcool PerformanceManager to control when the data for specific resources are processed.

This feature is important for CME calculations that must distinguish betweenoperational and non-operational periods within a network, and is controlled bydefining the triggering requirements of a formula.

2 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 11: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

ThresholdsThe CME formula API allows you to perform tests that trigger alarms whenthreshold violations are detected.

By specifying thresholds in a formula, you can trigger SNMP traps to monitorviolations, compare current network behavior with contractual values, and examinethreshold levels across subelements.

CME formula API operationDescribe the CME formula API and detail how it operates within Tivoli NetcoolPerformance Manager.

A CME formula API file is created by an API developer in ECMAScript (thestandard that defines JavaScript) by using the syntax that is defined in ECMA-262:ECMAScript Language Specification and the IBM Tivoli Netcool Performance Manager:CME Formula API Developer’s Guide. The syntax is used to define formulas thatinstruct the CME to perform calculations on data by using specified metrics orproperties. The formula files are loaded into Tivoli Netcool Performance Managerand are processed by the CME to return critical performance and statusinformation concerning objects that reside in an inventory.

Creating formula filesA formula file contains one or more formula definitions.

Each formula or series of formulas instructs the DataChannel to performcalculations that are based on the specified metrics or properties. Thesecalculations, in turn, return critical performance and status information concerningobjects that reside in an inventory.

Loading formula files into the databaseFormula files are loaded into the Tivoli Netcool Performance Manager database byusing the FRMI Formula tool.

The FRMI tool is installed with DataChannel in the DC_HOME/bin directory. FRMIreads a formula file, examines the file for syntax errors, and reads each formuladefinition within the file to the Tivoli Netcool Performance Manager databaseformula table.

DataChannel processing of formula filesAfter the formulas from the CME Formula API files are written into the database,the formulas become part of the hourly DataChannel processing cycle.

At the beginning of the next hour, the DataChannel examines the database andcreates its network processing model for the current hour. After the currentconfiguration model is built, the DataChannel reads the input files and creates atable of expected metrics by using the formulas from the CME Formula API files.

Chapter 1. Overview 3

Page 12: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

4 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 13: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Chapter 2. Creating CME formula API files

Describes the requirements for creating CME formula API files for use with theComplex Metric Engine (CME) API in the Tivoli Netcool Performance ManagerDataChannel.

A CME formula API file is written in ECMAScript (the standard that definesJavaScript) by using the syntax that is defined by the ECMA standard and the IBMTivoli Netcool Performance Manager: CME Formula API Developer’s Guide. The syntaxis used to define formulas that instruct the DataChannel to perform calculations ondata by using specified metrics or properties. The formula files are loaded intoTivoli Netcool Performance Manager and are processed by the DataChannel toreturn critical performance and status information concerning objects that reside inan inventory.

To create and implement a CME formula API file, you must perform the followingtasks:1. Create a model of the network inventory.2. Plan the location and type of metrics to collect from the inventory.3. Create a CME formula API file.4. Create formula definitions within the file.5. Load the CME formula API files into the TTivoli Netcool Performance Manager

database.

RequirementsSummary of the general requirements for writing CME formula API files.

ExperienceThe CME formula API is primarily intended for use by IBM Professional Servicesengineers, Service Provider Service Managers, and technology pack developers.

Only qualified personnel with extensive knowledge of network topology, inventoryresources, and Tivoli Netcool Performance Manager properties and metrics mustwrite and deploy CME formula API files in a production environment.

ECMAScript syntax referenceThe CME formula API requires that you have experience in ECMAScriptprogramming and have access to ECMAScript documentation while you arewriting formula files for an environment.

For more information, see the Standard ECMA-262: ECMAScript LanguageSpecification. This information is available from the following location:http://www.ecma-international.org/publications/standards/Ecma-262.htm

© Copyright IBM Corp. 2010, 2012 5

Page 14: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Supported toolsYou can use any UNIX text editor to create CME formula API files.

Model the network topologyThe first task that you must complete is to create a model of the network topology.

This model serves as a model for how you want to implement performancemetrics, aggregation metrics, or Service Level Agreements. By identifying devices,interfaces, services, and customers, you can properly translate the calculation logicinto a collection of related formulas that can be deployed against the inventory.

Creating a modelThe model shows each of the resources that are involved in the various branchesthat define the customer requirements for their service.

The model also shows how the resources are related as well as their dependencies.The diagram represents an example of a service modelling tree that is used by aservice provider for one of its customers.

6 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 15: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Defining resource relationshipsModeling the relationships between network resources allows you to see howmetrics or properties that must be created or exist in Tivoli Netcool PerformanceManager (for example, technology pack properties and metrics) can be used todetermine status and availability at other levels of the inventory.

Relationships between objects in an inventory are defined by using CSE rules. CSErules are used to model sophisticated network entities by defining links orrelations between the subelements associated with different network resources.

After a logical CSE model is created, CME formula API files are designedspecifically for that structure and are deployed against it. The formulas that aredefined within the file use CSE definitions to navigate the structure and retrievethe appropriate input metrics for their calculations.

As CSE models and formula definitions are heavily dependent on each other, werecommend that the same personnel or team design both the model and thecorresponding CME formula API files.

Plan the deployment of metrics in the inventoryAfter you created a model of the network topology or service tree, the next task isto determine how you want the inventory to be collected. At each level of theinventory you must decide what type of metrics are required, where the metricsmust be collected, and how these metrics are to be used in calculating the overallperformance level or availability status monitoring objectives.

Period-based metricsPeriod-based metrics are performance statistics that are collected against inventoryobjects at regularly defined time intervals. This type of polling metric is typicallyused to monitor performance levels for a resource. By collecting data on items suchas throughput, latency, and health, the information can be used to establishbaseline criteria to detect critical performance issues, such as resource availabilityand threshold violations.

The typical period-based metric are shown:

Chapter 2. Creating CME formula API files 7

Page 16: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Event-based metricsEvent-based, or square-wave, metrics are performance statistics that are collectedagainst inventory objects whenever the status of a resource undergoes a change.This type of metric is typically used to monitor the operational status of a resourceso that the information can be used to compute availability figures for ServiceLevel Agreement computations.

The following diagram represents a typical event-based metric:

Create a CME formula API fileAfter you plan which metrics to deploy in the inventory, you must create a filethat will contain the formula definitions for the inventory. The following sectionsoutline the general format of a formula file and detail what is required to create avalid file.

File storage locationsCME Formula API files must be stored on the same system as the Tivoli NetcoolPerformance Manager DataChannel module, as the FRMI Formula tool that loadsformula files resides in the DataChannel application. The following is therecommended location for formula files:

<DCHOME>/scripts

Where DCHOME is the location where DataChannel is installed on your system(/opt/datachannel, by default).

General formatA CME Formula API file is written in ECMAScript and contains one or moreformula definitions.

Each formula definition or series of formula definitions instructs the CME toperform calculations that are based on the specified metrics or properties. Thesecalculations, in turn, return critical performance and status information concerningobjects that reside in the inventory.

In order for the CME Formula API file to be properly compiled and interpreted byboth the FRMI Formula tool and the CME, the formula file must have thefollowing sections:v File Name Declaration Section - The file name declaration section is used to

identify a specific CME formula API file to the FRMI Formula Loading tool, andconsists of the formulas.documentName method. For more information, see“formulas.documentName attribute” on page 9.

8 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 17: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

v Formula Block Section - The formula block section contains formula definitionsthat produce individual performance metrics or are grouped logically to monitorevents and produce change of status metrics. The formula block section consistsof one or more formula definitions. For more information, see “Create formuladefinitions in the CME formula API file” on page 10.

The general format for a CME formula API file is shown in the following example:

// This example illustrates how a CME Formula API file must be structured.//formulas.documentName = “full-path/filename.js”;////*************************************************//This is the definition for formula one://*************************************************formulas.defineFormula({formula one});...//*************************************************//This is the definition for formula n://*************************************************formulas.defineFormula({formula n});

formulas.documentName attributeformulas.documentName is an attribute of the host object Formulas. This attributeprovides identification functionality that allows a CME formula API file to beidentified by the FRMI Formula tool and the CME.

The general format for the formulas.documentName attribute is shown in thefollowing example:

formulas.documentName = "full-path/filename.js";

Where the statement uses the following syntax:

Syntax element Definition

full-path/filename.js Specifies the absolute path name of the CMEformula API file. This information is used toidentify the formula file to the FRMIFormula tool and the CME. You must ensurethat the formula file name is unique.

File naming conventions for a formula

CME Formula API files use a naming convention that is fully compliant with theECMAScript standard. You are free to name formula files according to a site’sstandards as appropriate.

File naming conventions for a formulaCME formula API files use a naming convention that is fully compliant with theECMAScript standard.

Chapter 2. Creating CME formula API files 9

Page 18: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

You are free to name formula files according to a site's standards as appropriate.

Name format: A valid CME Formula API file must have a name that uses thefollowing format:filename.js

Where filename represents any alphanumeric string whose length does not exceed14 characters, followed by the .js file extension. The name of each CME FormulaAPI file must be unique.

You can select characters from the following sets:v {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F,

G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z}v {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}v {period (.), underscore(_), comma(,)}

Examples of valid formula file names include the following JavaScript files:v SLA_ACME.js

v Tot-Outage.js

v InSCP_84.js

File hierarchy conventions:

The usage of full-path names is recommended within CME Formula API files.Full-path names simplify the processing of formula files and minimize the chancesof duplicate file names.

The following file hierarchy conventions are recommended:v If you are creating CME Formula API files for a Technology Pack, use a

hierarchy to identify the appropriate Technology Pack. For example:AP/Specific/Application_Pack_Name/Formulas/filename.js

v Where Application_Pack_Name is the target technology pack, and filename is thename of the formula file.

v If you are creating CME formula API files for a customer, use a hierarchy toidentify the customer or adopt their standards. For example:Customer_Name/Project/Formulas/filename.js

Where Customer_Name is the target customer, Project is a name that describesthe intended project, and filename is the name of the formula file.

Create formula definitions in the CME formula API fileAfter the CME Formula API file is created, you must write the formula block forthe file in ECMAScript.

The formula block section contains formula definitions that produce individualperformance metrics or are grouped logically to monitor events and producechange of status metrics. Each formula or series of formulas instructs the CME toperform calculations that are based on the specified metrics or subelementproperties. These calculations, in turn, return critical performance and statusinformation concerning objects that reside in an inventory.

The general format for a formula block section is shown in the following examples:

10 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 19: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

//**********************************************//This is the definition for formula one://**********************************************formulas.defineFormula({name: "full-path~formula_name",

arguments: {input_1: “full-path~metric_name”,input_2: “full-path~metric_name”,input_n: “full-path~property”},window: PV.window-type,reset:function

calculate:functioncalculateIntermediate:function});...//**********************************************//This is the definition for formula n://**********************************************formulas.defineFormula({name: "full-path~formula_name",

arguments: {input_1: “full-path~metric_name”,input_2: “full-path~property_name”,input_n: “full-path~metric_name”},window: PV.window-type,genericID: id,reset:function

calculate:functioncalculateIntermediate:function});

A formula block consists of the following components:

formulas.defineFormula methodformulas.defineFormula is a method of the host object formulas. This methodpasses a list of arguments that define a formula and specify how the CME is toprocess the formula for the set of inputs.

The general format for the formulas.defineFormula method is shown in thefollowing example:

formulas.defineFormula ({argument-list});

Where the statement uses the following syntax:

Syntax Element Definition

defineFormula Method of the formulas object that returns aformula definition and adds it to thecollection of formulas in the database.

{argument-list} Specifies the list of identifiers and functionsand defines the calculation that the formulainstructs the CME to perform.

Chapter 2. Creating CME formula API files 11

Page 20: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

For examples of how the formulas.defineFormula method is used, see Chapter 3,“Using CME formula API files,” on page 29.

To create a complete formula, the formulas.defineFormula method requires that aName identifier, Arguments identifier, Window identifier, and Calculatefunction are included in each formula definition. For special-case formulas, youcan optionally include the Reset and CalculateIntermediate functions. For moreinformation about these items, see the following sections.

name identifiername is an identifier in the list of arguments that are included in theformulas.defineFormula method. This identifier is used to define the name of aspecific formula within the formula file.

The general format for the name identifier is shown in the following example:

name: "full-path~formula_name",

Where the statement uses the following syntax:

Syntax Element Definition

full-path~formula_name Defines a specific formula in the CMEformula API file and its location in theformula table. You must ensure that thename identifier is unique within the formulafile.

For examples of how the name identifier is used, see Chapter 3, “Using CMEformula API files,” on page 29.

arguments identifierargument is an identifier in the list of arguments that are included in theformulas.defineFormula method. This identifier includes a list of metrics orproperties that are collected from an inventory that are used to define the inputs ofa formula.

The general format for the argument identifier is shown in the following example:

arguments: {input_1: “full-path~metric_name”,input_2: “full-path~metric_name”,...input_n: “full-path~property”},

Where the statement uses the following syntax:

Syntax element Definition

input_n Defines a variable name for a specific metricor property that is used within theCalculate, Reset, or CalculateIntermediatefunctions.

12 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 21: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Syntax element Definition

full-path~metric_name Identifies the name and location of a metricor property that you want to use as an inputfor the formula.

For examples of how the arguments identifier is used, see Chapter 3, “Using CMEformula API files,” on page 29.

When you are defining arguments for a formula, you can select any variable nameto describe the formula inputs you use in the calculation. The formula inputs thatthemselves must map to another formula, metric, or composite subelement thatexists either on the Tivoli Netcool Performance Manager database or elsewhere inthe CME Formula API file.

window identifier (optional)window is an optional identifier in the list of arguments that are included in theformulas.defineFormula method. This identifier specifies a PV.window_typeattribute that defines the data buffering requirements for formulas and controlshow the formula is triggered. For more information about the window objects thatare used by the CME formula API, see “CME formula API object model” on page63.

The general format for the window identifier is shown in the following example:

window: PV.window-type,

Where the statement uses the following syntax:

Syntax Element Definition

PV.window-type Attribute of the PV host object.

For examples of how the window identifier is used, see Chapter 3, “Using CMEformula API files,” on page 29.

The window identifier uses the following attributes of thePV host object:v PV.CalendarWindow attribute

v PV.CalendarAndTupleWindow attribute

v PV.CMEWindow attribute

v PV.PeriodWindow attribute

v PV.PeriodAndTupleWindow attribute

v PV.TupleWindow attribute

PV.CalendarWindow attributePV.CalendarWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for the formula. The PV.CalendarWindow attribute uses a TivoliNetcool Performance Manager calendar to define the data buffering requirementsfor the formula, and the formula is triggered at the end of the period.

Chapter 2. Creating CME formula API files 13

Page 22: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The general format for the PV.CalendarWindow attribute is shown in the followingexamples:

PV.CalendarWindow(“~cal~calendarName”),PV.CalendarWindow(“~cal~calendarName”,n),

Where the statements use the following syntax:

Syntax element Definition

~cal~calendarName Identifies the Tivoli Netcool PerformanceManager calendar that is being used as aninput to the window definition.

n An optional argument that is used to controla calculateIntermediate function. Specifiesthe buffer period in seconds for the function.

PV.CalendarAndTupleWindow attributePV.CalendarAndTupleWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for the formula. The PV.CalendarAndTupleWindow attribute uses aTivoli Netcool Performance Manager calendar to define the data bufferingrequirements for the formula, and also includes a specified number of tuples priorto the beginning of the period. The formula is triggered at the end of the period.

The general format for the PV.CalendarAndTupleWindow attribute is shown in thefollowing examples:

PV.CalendarAndTupleWindow(“~cal~calendarName”,m),PV.CalendarAndTupleWindow(“~cal~calendarName”,m,n),

Where the statements use the following syntax:

Syntax element Definition

~cal~calendarName Identifies the Tivoli Netcool PerformanceManager calendar that is being used as aninput to the window definition.

m Specifies the number of tuples prior to thebeginning of the period to include in thewindow definition.

n An optional argument that is used to controla calculateIntermediate function. Specifiesthe buffer period in seconds for the function.

PV.CMEWindow attributePV.CMEWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for the formula. The PV.CMEWindow object uses a specified number oftuples to define the data buffering requirements for the formula, and the formula istriggered whenever new values arrive for all inputs.

14 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 23: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The general format for the PV.CMEWindow attribute is shown in the followingexample:

PV.CMEWindow(n),

Where the statement uses the following syntax:

Syntax element Definition

n Specifies the number of tuples to include inthe window definition.

PV.PeriodWindow attributePV.PeriodWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for the formula. The PV.PeriodWindow attribute uses a specifiedperiod to define the data buffering requirements for the formula, and the formulais triggered at the end of the period.

The general format for the PV.PeriodWindow attribute is shown in the followingexamples:

PV.PeriodWindow(m),PV.PeriodWindow(m,n),

Where the statements use the following syntax:

Syntax element Definition

m Specifies the buffer period in seconds for thewindow definition.

n An optional argument that is used to controla calculateIntermediate function. Specifiesthe buffer period in seconds for the function.

PV.PeriodAndTupleWindow attributePV.PeriodAndTupleWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for a formula. The PV.PeriodAndTupleWindow attribute uses a specifiedperiod to define the data buffering requirements for the formula, and also includesa specified number of tuples before the beginning of the period. The formula istriggered at the end of the period.

The general format for the PV.PeriodAndTupleWindow attribute is shown in thefollowing example:

PV.PeriodAndTupleWindow(l,m),PV.PeriodAndTupleWindow(l,m,n),

Where the statement uses the following syntax:

Chapter 2. Creating CME formula API files 15

Page 24: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Syntax element Definition

l Specifies the buffer period in seconds for thewindow definition.

m Specifies the number of tuples before thebeginning of the period to include in thewindow definition.

n An optional argument that is used to controla calculateIntermediate function. Specifiesthe buffer period in seconds for the function.

PV.TupleWindow attributePV.TupleWindow is an attribute of the host object PV.

This attribute provides functionality that controls the data buffering and triggeringrequirements for a formula. The PV.TupleWindow object uses a specified number oftuples to define the data buffering requirements for the formula, and the formula istriggered whenever new values arrive for an input.

The general format for the PV.TupleWindow attribute is shown in the followingexamples:

PV.TupleWindow(m),PV.TupleWindow(m,n),

Where the statements use the following syntax:

Syntax element Definition

(m) Specifies the number of tuples to include inthe window definition.

(n) An optional argument that is used to controla calculateIntermediate function. Specifiesthe buffer period in seconds for the function.

windowSpecs (optional)The use of windowSpecs is an alternative to the use of PV.CalendarWindow and theother PV. * forms of window specification.

The windowSpecs syntax offers more flexibility in specifying the formula window.Instead of describing a window explicitly, windowSpecs can be used as analternative, allowing the definition of additional parameters. For example:windowSpecs:{calendarName: "~cal~Monthly",tupleSize: 1,intermediatePeriod: 3600,repeat: "on Jan 5"},

In the example above, the first three lines describe the formula window.calendarName indicates that the formula is based on a calendar. tupleSize specifiesthe number of tuples to be used. intermediatePeriod specifies any intermediateintervals at which the formula is invoked. The fourth line specifies when theperiod starts and is reset. In the example above the period starts on 7 January.

16 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 25: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The date on which the period begins and resets can also be based on a property ofthe subelement on which the formula is being deployed. This is accomplished byreferencing an argument of the formula. Arguments are referenced by passing astring by using the "~arg" path prefix. Formula arguments must refer to asubelement property. For example:formulas.defineFormula({name: "testFormulaWithParameterizedWindow1",arguments: {status: "F-1", anniversary: "contractAnniversaryTime"},windowSpecs:{calendarName: "~cal~Monthly",repeat: "~arg~anniversary"},calculate: function() { return this.status.value; },calculateIntermediate: function(tuple) { return this.calculate(tuple); }});

The general format for the windowSpecs is shown in the following example:

windowSpecs:{calendarName: "cal~calendarName",tupleSize:intermediatePeriod:...repeat:

},

Where the statement uses the following syntax:

Syntax element Definition

calendarName Identifies the calendar that is being used asan input to the definition.

tupleSize Optional. Number of tuples.

intermediatePeriod Optional. Intermediate intervals in secondsat which the formula is invoked.

repeat Optional. Specifies when the formula istriggered and is reset. Can be stated directly:repeat: "on Jan 5" or indirectly byreferencing an argument of the formula.

genericId identifier (optional)genericId is an identifier in the list of arguments that are included in theformulas.defineFormula method.

This identifier is used to define the generic ID of a formula within a formula file.The genericId identifies a generic formula that exists within the database thatserves at a data collection point across a number of resources.

The general format for the genericId identifier is shown in the following example:

genericId: id,

Chapter 2. Creating CME formula API files 17

Page 26: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Where the statements use the following syntax:

Syntax element Definition

id Specifies the ID of a generic formula thatexists in the database.

reset function (optional)reset is an optional function in the list of arguments that are included in theformulas.defineFormula method.

This function is used with thecalculate and calculateIntermediate functions andincludes a list of any counters, variables, attributes, and methods that must be resetto some initial value each time that the formula is triggered.

The general format for the reset function is shown in the following example:

reset:function( ){PV.name ( );this.variable_name = value;this.counter_name = value;},

Where the statement uses the following syntax:

Syntax element Definition

function ( ) ECMAScript function call used to create andinitialize a new function object.

PV.name ( ) (Optional) Any method or attribute of the PVhost object that must be reset.

this.variable_name = value Any variable that must be reset to an initialvalue.

this.counter_name = value Any counter that must be reset to an initialvalue.

calculate functioncalculate is a function in the list of arguments that are included in theformulas.defineFormula method.

This function is used to define and perform the actual mathematical operations onthe metrics that are used as inputs to the formula. The calculate function includesa list that forms the logic of the formula definition, and can contain anyconditional processing nests, variables, counters, attributes, or methods. The resultsof the formula definition are returned with the return method.

The general format for the calculate function is shown in the following examples:

18 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 27: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

calculate:function( ){

return (this.input_1.method operation this.input_2.method);},

calculate:function( ){ return (this.input_1.inputs.method operation this.input_2.inputs.method);},

Where the statements use the following syntax:

Syntax element Definition

function ( )ECMAScript function call used to create andinitialize a new function object.

The function statement can take anargument tuple as an additional input to theformula. For tuple-based windowdefinitions, both the value and timestamp ofthe last tuple are input to the formula. Forperiod-based window definitions, thetimestamp of the end of the period is inputto the formula.

return ( ) ECMAScript method that causes a functionto cease execution and return a value to thecaller.

this Creates an instance of the FormulaOperatorobject. For more information, see “CMEformula API object model” on page 63.

input_1 Specifies the variable name for a metric orproperty that is defined within thearguments identifier. This item can alsoinclude other functions or methods that aredefined within the formula.

inputs An optional statement that creates an arrayof Input objects. For more information, see“CME formula API object model” on page63.

method Specifies a FormulaOperator or Inputmethod. For more information, see “CMEformula API object model” on page 63.

operation Defines the mathematical operation to beperformed on the formula inputs.

input_2 Specifies a variable name for a metric orproperty that is defined within thearguments identifier. This item can alsoinclude or call other functions or methodsthat are defined within the formula.

For examples of how the calculate function is used, see Chapter 3, “Using CMEformula API files,” on page 29.

Chapter 2. Creating CME formula API files 19

Page 28: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

calculateIntermediate function (optional)calculateIntermediate is an optional function in the list of arguments that areincluded in the formulas.defineFormula method.

This function is used with calculate and performs more mathematical operationswithin the formula definition while the calculate function satisfies the databuffering requirements of the window definition. The calculateIntermediatefunction includes a list that forms the logic of the formula definition, and cancontain any conditional processing nests, variables, counters, attributes, ormethods. The results of the formula definition are returned with the returnmethod.

The general format for the calculateIntermediate function is shown in thefollowing examples:

calculateIntermediate:function( ){

return (this.input_1.method operation this.input_2.method);},

calculateIntermediate:function( ){

return (this.input_1.inputs.method operation this.input_2.inputs.method);

Where the statements use the following syntax:

Syntax element Definition

function ( )ECMAScript function call used to create andinitialize a new function object.

The function statement can take anargument heartbeat as an additional input tothe formula. For period-based windowdefinitions, the timestamp of the end of theperiod is input to the formula.

return ( ) ECMAScript method that causes a functionto cease execution and return a value to thecaller.

this Creates an instance of the FormulaOperatorobject. For more information, see “CMEformula API object model” on page 63.

input_1 Specifies the variable name for a metric orproperty that is defined within thearguments identifier. This item can alsoinclude other functions or methods that aredefined within the formula.

inputs An optional statement that creates an arrayof Input objects. For more information, see“CME formula API object model” on page63.

method Specifies a FormulaOperator or Inputmethod. For more information, see “CMEformula API object model” on page 63.

20 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 29: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Syntax element Definition

operation Defines the mathematical operation to beperformed on the formula inputs.

input_2 Specifies a variable name for a metric orproperty that is defined within thearguments identifier. This item can alsoinclude or call other functions or methodsthat are defined within the formula.

For examples of how the calculateIntremediate function is used, see Chapter 3,“Using CME formula API files,” on page 29.

Load CME formula API files into the CME and assign labelsThis section describes:v How to load a CME Formula API file into the CME for processing.v How to assign labels for cross resource formulas.

FRMI formula toolFRMI Formula Tool is installed with DataChannel in the DC_HOME/bin directory.

FRMI is used to:v Install all the formulas that are used in a systemv To organize and validate labels for formulas

When the FRMI tool loads formulas, it reads each line of the CME formula APIand examines the file for syntax errors. Any errors are flagged and reported so thatyou can quickly identify and correct problems. After a formula file has no syntaxerrors, the FRMI tool reads each formula definition within the formula block andcreates a record for each formula within the Tivoli Netcool Performance Managerdatabase formula table. Formulas that are successfully read into the database areviewable in the DataMart Formula Selector.

Note: A formula document cannot be renamed and reimported. In this case, theformula document must be removed and reimported with a new document name.

When the FRMI tool organizes cross resource formulas for the system into labels, itproduces formula-to-label assignments and validates the label assignments. Youcan review how the system would be labeled before it takes effect. Labels can thenbe manually assigned. FRMI saves the label assignments to a database table.

Loading formula filesTo load formula files into the CME, do the following steps:1. Log in as pvuser on the system where the DataChannel is installed.2. Change to the directory formula files are located (as described in “File storage

locations” on page 8) by entering the following command:cd /DCHOME/scripts

Where DCHOME is the location where DataChannel is installed on your system(/opt/datachannel, by default).

3. Load CME Formula API file by issuing the following command:frmi filename.js

Chapter 2. Creating CME formula API files 21

Page 30: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Where filename.js is the name of the CME Formula API file.

Cross resource formulasWhen a formula includes one or more inputs that navigate a relation, it is called across resource formula.

A cross resource formula might require input from several collectors, for examplewhen metrics are required from several subelements. To resolve this problem, crosscollector CMEs are used (also known as 2000 level CMEs). Cross collector CMEsare numbered starting with 2000, for example: CME.1.2000, CME.1.2001,CME.2.2002.

Cross resource formulas are assigned to cross collector CMEs by FRMI by usinglabels. Labels can be assigned automatically or manually. If you want to assignlabels manually, you must have a workable labeling strategy.

A label is a cluster of computations that are treated as a unit when deployed. Thetime series (mid/rid pairs) that arrive from collectors are also assigned to a label(based on the collector number). These computation clusters are identified forCMEs by using a labeling algorithm. The label assignment for a time series doeschange as more members of the relation are established. Instead, more data feedsare added to the label as necessary. This stability of lower-level formulasconcerning label assignment allows the higher level formulas to also be stable.

The following figure shows a logical formula stack. The dependencies in thisformula stack are shown without regard to the resources on which these formulasare deployed.

22 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 31: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The following figure illustrates the same set of computations that are deployed in asingle label. In this case, all computations can be delayed if any one of the threeinput collectors falls behind.

Chapter 2. Creating CME formula API files 23

Page 32: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Label assignment strategyThe next time that the system needs to put a formula into a label that is fed by oneor more collectors it will go into label 2000 if that label is not already at capacity.

When you consider which labels to assign to formulas, it is important to considerthe memory and CPU usage requirements of each formula. All of the formulas thatare assigned to a label are processed by a single CME. The total memory and CPUusage of all instances of formulas that are assigned to a single label must thereforebe within the processing capacity of a single CME.

The number of formulas in a label is capped at a designated maximum number toprevent too many TimeSeries in a single label:FRMI.MAX_FORMULAS_PER_LABEL=7

If MAX_FORMULAS_PER_LABEL is set to 7 and there are more than seven formulas thathave the same inputs, a new label is created with the same input definition. When

24 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 33: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

you assig a new formula to one of these labels the system picks the lowest labelnumber that can still accept additional formulas.

If not specified, MAX_FORMULAS_PER_LABEL defaults to 7.

Smalltalk formulas that have inputs from collectors are assigned to 1000 levellabels (due to limitations of these formulas, they cannot have inputs from multiplecollectors). ECMAScript formulas that do not involve cross resource computationsare assigned to 1000 level labels. ECMAScript formulas that do involve crossresource computations are assigned to 2000 level labels. If formula inputs do notchange, these ECMAScript formulas stay in the same 2000 level labels. If formulainputs change, then these formulas might be moved to other labels. If a higherlevel SLA formula has all inputs coming from the same 2000 level label then, it isassigned to that label.

Reviewing label assignmentsTo perform scenario testing, you can use the validateOnly mode in FRMI. FRMIdoes not assign the labels in this mode.

About this task

This validates the label assignments that the system would use, and provide youwith a list of label assignments that FRMI would assign.

To review labels, do the following steps:

Procedure1. Log in as pvuser on the system where the DataChannel is installed.2. Review and validate labels by issuing the following command:

frmi -doc filename.js -labels filename.txt -mode validateOnly

Where filename.js is the name of the CME Formula API file and filename.txtis the name of the text file to copy the output to.Example output:Validating FormulasValidation Failed! Problems found:Formula requires label: PSM~SLA~VPNS~RFS~Link TT StatusFormula Label Assignments are as follows:PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~BB Packets Loss (numeric)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~BB Round Trip Time (ms)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~GD Packets Loss (numeric)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~GD Round Trip Time (ms)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~IB Packets Loss (numeric)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~IB Round Trip Time (ms)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~RT Packets Loss (numeric)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~RT Round Trip Time (ms)=2000PSM~Cisco~IPSLA~Probes~Aggregate~Jitter~RT Source Destination Delay (ms)=2000PSM~Cisco~QoSLink~Discard Packets BB IN(percent)=2001PSM~Cisco~QoSLink~Discard Packets BB OUT(percent)=2001PSM~Cisco~QoSLink~Discard Packets GD IN(percent)=2001PSM~Cisco~QoSLink~Discard Packets GD OUT(percent)=2001PSM~Cisco~QoSLink~Discard Packets IB IN(percent)=2001PSM~Cisco~QoSLink~Discard Packets IB OUT(percent)=2001PSM~Cisco~QoSLink~Discard Packets RT IN(percent)=2001PSM~Cisco~QoSLink~Discard Packets RT OUT(percent)=2001PSM~SLA~CNC~RFS~Link TT Status=2003PSM~SLA~VPNS~Performance~RFS~RFS BB Probe Latency=2002PSM~SLA~VPNS~Performance~RFS~RFS GD Probe Latency=2002PSM~SLA~VPNS~Performance~RFS~RFS IB Probe Latency=2002PSM~SLA~VPNS~Performance~RFS~RFS Path Average Latency=2002

Chapter 2. Creating CME formula API files 25

Page 34: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

PSM~SLA~VPNS~Performance~RFS~RFS RT Probe Latency=2002PSM~SLA~VPNS~RFS~Link Performance Status=2003PSM~SLA~VPNS~RFS~Link TT Status=2003PSM~SLA~CNC~Availability~CFS Availability Status=2003PSM~SLA~VPNS~Availability~CFS Availability Status=2003PSM~SLA~VPNS~Performance~CFS BB Performance Violations Status=2003PSM~SLA~VPNS~Performance~CFS GD Performance Violations Status=2003PSM~SLA~VPNS~Performance~CFS IB Performance Violations Status=2003PSM~SLA~VPNS~Performance~CFS RT Performance Violations Status=2003PSM~SLA~VPNS~Performance~CFS BB Performance Violations Number=2003PSM~SLA~VPNS~Performance~CFS GD Performance Violations Number=2003PSM~SLA~VPNS~Performance~CFS IB Performance Violations Number=2003PSM~SLA~VPNS~Performance~CFS RT Performance Violations Number=2003Nothing installed because in validateOnly modePrinting Formula Hierarchy

Assigning labels automaticallyAbout this task

To assign and validate labels automatically, do the following steps:

Procedure1. Log in as pvuser on the system where the DataChannel is installed.2. Assign and validate labels by issuing the following command:

frmi -doc filename.js

Where filename.js is the name of the CME Formula API file.

Assigning labels manuallyYou can assign your own labels to formulas if needed. To user-assign labels, youspecify a formula file and a label file. The label file is a text file. The contents ofthe label file must include formula full names and labels, for example:Full~Path~To~Formula=2000

About this task

To user-assign and validate labels, do the following steps:

Procedure1. Log in as pvuser on the system where the DataChannel is installed.2. Assign and validate labels by issuing the following command:

frmi -doc filename.js -labels filename.txt

Where filename.js is the name of the CME Formula API file and filename.txtis the name of the labels text file.FRMI logs warning messages to alert the user to validation problems:Validating FormulasValidation Failed! Problems found:Formula requires label: Full~Path~To~Formula

Printing formulasYou can use FRMI to print your entire formula stack or to print just formulasmatching a formula name.

About this task

To print formulas, do the following steps:

26 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 35: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Where filename.js is the name of the CME Formula API file, filename.txt is thename of the text file to copy the output to and name is the name of a formula, forexample "packets loss ".

Procedure1. Log in as pvuser on the system where the DataChannel is installed.2. Print formulas.

To print all formulas, issue the following command:frmi -doc formulas.js -labels labels.txt -mode printOnly

To print formulas matching a formula name, issue the following command:frmi -doc formulas.js -labels labels.txt -mode printOnly -formula "name"

Chapter 2. Creating CME formula API files 27

Page 36: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

28 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 37: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Chapter 3. Using CME formula API files

Describes how you can use CME Formula API files to create metrics that aretailored to your environment and your needs. As the CME Formula API allowsany metrics and properties within the database to be used as formula inputs acrossboth inventory levels and time, you can use formula files to calculate traditionalperformance computations, Service Level Agreement computations andrecalculations, and aggregation computations.

This section introduces the types of computations that are supported by the CMEFormula API and provides sample formula definitions that illustrate commondeployment scenarios in typical network environments.

Scenario 1: Link status by using a single metricThis scenario illustrates how to create a formula file that determines the status of alink by using interface availability metrics. The link is considered to be in a "down"state if either interface is unavailable.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric.

rel_if_pE Composite subelement.

rel_if_cE Composite subelement.

© Copyright IBM Corp. 2010, 2012 29

Page 38: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula fileTo determine the status of a link by using interface availability metrics, considerthe following formula file:

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase1.js";//--------------------------------------------------------------------------------------// Operator: link_Status_cpx1// Metric : Link Status// Metric Description : Provides the link status// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to// extract information from collected Interface availability// Measurement Frequency : Every time data is collected on availability (Calculate)// Thresholds Estimation : Link is down if either interface is unavailable// Units: 1/0 - Up/Down//--------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~link_Status_cpx1",arguments: {

pEifStatus: "rel_if_pE/PS~if_Availability",cEifStatus: "rel_if_cE/PS~if_Availability"

},window: PV.TupleWindow(1),calculate: function( tuple ){return ( this.pEifStatus.value && this.cEifStatus.value );

}

});

Formula descriptionsTestCase~Model_1~link_Status_cpx1

The TestCase~Model_1~link_Status_cpx1 formula defines the following processingrequirements:

Requirement Values Description

Inputs pEifStatuscEifStatus

Uses the pEifStatus and cEifStatuscollected availability metrics(0=Down, 100=Up) as inputs to thisformula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value for pEifStatusor cEifStatus arrives.

Output return ( this.pEifStatus.value &&this.cEifStatus.value ) Determines the status of the link.

The link is considered to be "up" ifboth pEifStatus AND if cEifStatusare "up" (0=Down, 100=Up).

30 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 39: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Scenario 2: Link Status Using Several MetricsThis scenario illustrates how to create a formula file that determines the status of alink by using interface availability and error percentage metrics.

The link is considered to be in a "down" state if either interface is unavailable, or ifeither interface is available and the percentage error rate exceeds 20%.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric

PS~if_Percentage_Errors Collected metric

rel_if_pE Composite subelement

rel_if_cE Composite subelement

Formula fileTo determine the status of a link using interface availability and error percentagemetrics, consider the following formula file:

Chapter 3. Using CME formula API files 31

Page 40: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase2.js";//---------------------------------------------------------------------------------// Operator: link_Status_cpx2// Metric : Link Status// Metric Description : Provides the link status taking into consideration Input error// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract informationfrom collected Interface availability and Percentage Error// Measurement Frequency : Every time data is collected on availability andInbound Errors (Calculate)// Thresholds Estimation : Link is down if either interface is unavailable and PercentageError > 20// Units: 1/0 - Up/Down//--------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~link_Status_cpx2",arguments: {

pEifStatus: "rel_if_pE/PS~if_Availability",pEPerError: "rel_if_pE/PS~if_Percentage_Errors",cEifStatus: "rel_if_cE/PS~if_Availability",cEPerError: "rel_if_cE/PS~if_Percentage_Errors"

},window: PV.TupleWindow(1),calculate: function( tuple ){if ( this.pEifStatus.value == 0 || this.cEifStatus.value == 0 ||(this.pEifStatus.value == 100 &&this.pEPerError.value > 20) ||(this.cEifStatus.value == 100 && this.cEPerError.value > 20) )

{ return ( 0 ); }else { return (1); }}

});

Formula DescriptionsTestCase~Model_1~link_Status_cpx2

The TestCase~Model_1~link_Status_cpx2 formula defines the following processingrequirements:

Requirement Values Description

Inputs pEifStatuspEPerError Uses the pEifStatus and cEifStatus

collected availability metrics (0=Down,100=Up) as inputs to this formula.

Uses the pEPerError and cEPerErrorcollected error metrics (0-100%) as inputs tothis formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggers eachtime a new value for pEifStatus,cEifStatus, pEPerError, or cEPerErrorarrives.

Output if ( this.pEifStatus.value == 0 ||this.cEifStatus.value == 0 ||(this.pEifStatus.value== 100 && this.pEPerError.value > 20) ||(this.cEifStatus.value== 100 && this.cEPerError.value > 20) ){ return ( 0 ); }else { return (1)}

Determines the status of the link.

The link is considered to be "down" ifeither pEifStatus or cEifStatus are "down"(0=Down, 100=Up), or if either pEPerErroror cEPerError exceed 20%.

32 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 41: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Scenario 3: Link status by using a generic formulaThis scenario illustrates how to create a formula file that determines the status of alink by using a generic formula.

The generic formula serves a data collection point for status changes that occur ineither of the defined interfaces, which is then used to determine the overall statusof the link. The link is considered to be in a "down" state if either interface isunavailable.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric

genericID ID of the generic formula that is created forthe resources that are used in this scenario

rel_if_pE Composite subelement

rel_if_cE Composite subelement

Formula fileTo determine the status of a link by using interface availability and generic metrics,consider the following formula file:

Chapter 3. Using CME formula API files 33

Page 42: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase1_Generic.js";//--------------------------------------------------------------------------------------// Operator: link_Status_cpx1_GenericID// Metric : Link Status// Metric Description : Provides the link status// Measurement Procedure : Operator uses window - PV.TupleWindow(1) toextract information from collected Interface availability// Measurement Frequency : Every time data is collected on availability (Calculate)// Thresholds Estimation : Link is down if either interface is unavailable// Units: 1/0 - Up/Down//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~link_Status_cpx1_GenericID",arguments:

{pEifStatus: "rel_if_pE/PS~if_Availability",cEifStatus: "rel_if_cE/PS~if_Availability"

},window: PV.TupleWindow(1),genericId: 10021216,calculate: function( tuple )

{

return ( this.pEifStatus.value && this.cEifStatus.value );

}

});

Formula descriptionsTestCase~Model_1~link_Status_cpx1_GenericID

The TestCase~Model_1~link_Status_cpx1_GenericID formula defines the followingprocessing requirements:

Requirement Values Description

Inputs cEifStatuspEifStatus

Uses the pEifStatus and cEifStatuscollected metrics (0=Down, 100=Up)as inputs to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value for pEifStatusor cEifStatus arrives.

Output return ( this.pEifStatus.value &&this.cEifStatus.value ) Determines the status of the link.

The link is considered to be "up" ifboth pEifStatus AND if cEifStatusare "up" (0=Down, 100=Up).

34 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 43: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Scenario 4: Link status by using metrics and propertiesThis scenario illustrates how to create a formula file that determines the status of alink by using interface availability metrics, error percentage metrics, and athroughput packet property.

The link is considered to be in a "down" state if either interface is unavailable, or ifeither interface is available and the percentage error rate exceeds the value of thethroughput packet property.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric

PS~if_Percentage_Errors Collected metric

rel_if_pE Composite subelement

rel_if_cE Composite subelement

ThrPacket Property

Formula fileTo determine the status of a link by using interface availability metrics, errorpercentage metrics, and a throughput packet property, consider the followingformula file:

Chapter 3. Using CME formula API files 35

Page 44: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase3.js";//--------------------------------------------------------------------------------------// Operator: link_Status_cpx3// Metric : Link Status// Metric Description : Provides the link status using interface property// to determine threshold// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract// information from collected Interface availability and Percentage Errors// Measurement Frequency : Every time data is collected on availability and Percentage// Errors (Calculate)// Thresholds Estimation : Link is down if either interface is unavailable and Input Error >// Interface error threshold property// Units: 1/0 - Up/Down//-------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~link_Status_cpx3",arguments: {

pEifStatus: "rel_if_pE/PS~if_Availability" ,pEPercError: "rel_if_pE/PS~if_Percentage_Errors",pEPercErrProps: "rel_if_pE/ThrPacket",cEifStatus: "rel_if_cE/PS~if_Availability",cEPercError: "rel_if_cE/PS~if_Percentage_Errors",cEPercErrProps: "rel_if_cE/ThrPacket"

},window: PV.TupleWindow(1),calculate: function( tuple ){if ( this.pEifStatus.value == 0 || this.cEifStatus.value == 0 ||

(this.pEifStatus.value == 100 && this.pEPercError.value > this.pEPercErrProps.value)|| (this.cEifStatus.value == 100 && this.cEPercError.value > this.cEPercErrProps.value) ){ return ( 0 ); }else { return (1); }}

});

Formula descriptionsTestCase~Model_1~link_Status_cpx3

The TestCase~Model_1~link_Status_cpx3 formula defines the following processingrequirements:

Requirement Values Description

Inputs pEifStatuscEifStatus

pEPercErrorcEPercError

pEPercErrPropscEPercErrProps

Uses the pEifStatus and cEifStatuscollected availability metrics (0=Down,100=Up) as inputs to this formula.

Uses the pEPercError and cEPercErrorcollected error metrics (0-100%) as inputs tothis formula.

Uses the pEPercErrProps andcEPercErrProps properties (0-100) as inputsto this formula.

36 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 45: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Formula trigger PV.TupleWindow(1)Specifies that this formula triggers each timea new value for

pEifStatus,cEifStatus,pEPercError,cEPercError,pEPercErrProps,or cEPercErrProps

arrives.

Output if ( this.pEifStatus.value == 0 ||this.cEifStatus.value == 0 ||(this.pEifStatus.value == 100 &&this.pEPercError.value >this.pEPercErrProps.value) ||(this.cEifStatus.value == 100 &&this.cEPercError.value >this.cEPercErrProps.value) ){ return ( 0 ); }else { return (1)

Determines the status of the link.

The link is considered to be "down" if eitherpEifStatus or cEifStatus are "down", ifpEPercError exceeds pEPercErrProps, or ifcEPercError exceeds cEPercErrProps.

Scenario 5: SLA violation by using link statusThis scenario illustrates how to create a formula file that uses the number of timesa link is "down" from Scenario 1 to determine if an SLA violation has occurred.

The SLA has been violated when the link has been "down" more than five times inone day.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

Link_Status_cpx1 Formula that is defined as part of Scenario1.

Chapter 3. Using CME formula API files 37

Page 46: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula fileTo determine whether an SLA violation has occurred by using the link status fromScenario 1, consider the following formula file:

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase4.js";//------------------------------------------------------------------------------------// Operator: SLA_link_Status_DownCount// Metric : Link Status SLA// Metric Description : Indicates when SLA is breached by counting the// number link down occurrences// Measurement Procedure : Operator uses window - PV.PeriodWindow( 1 day, 1 hour )// to trigger access tuple storage for variable// Measurement Frequency : At the end of the day (reset also occurs) and// every hour (Intermediate)// Thresholds Estimation : SLA breached when down count is greater than 5 in a day.// Units: 1/0 - BAD/OK//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~SLA_link_Status_DownCount",arguments: {

status: "TestCase~Model_1~link_Status_cpx1"},

window: PV.PeriodWindow( 86400,60*60 ),calculate:

function ( ){

return this.calculateIntermediate( )},

calculateIntermediate:function ( ){

var total = 0;var tuples = this.status.tuples( );for (var index in tuples ){

total += (tuples[index].value == 0);};if ( total >= 6 ) {return (1);}else {return (0);};

}});

Formula descriptionsTestCase~Model_1~SLA_link_Status_DownCount

The TestCase~Model_1~SLA_link_Status_DownCount formula defines the followingprocessing requirements:

Requirement Values Description

Inputs status Uses theTestCase~Model_1~link_Status_cpx1 formulathat is defined as part of the formula file thatis created for Scenario 1.

Formula trigger PV.PeriodWindow( 86400,60*60 ) Specifies that this calculate function triggersafter every 24 hours, and thecalculateintermediate function triggersevery hour.

38 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 47: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Output var total = 0;var tuples = this.status.tuples( );for (var index in tuples ){total += (tuples[index].value == 0);};if ( total >= 6 ) {return (1);}else {return (0);}

Determines the number of times that the linkwas "down" during the period.

Calculates the number of times the link wasdown (status=0) during the hour andaccumulates the total by using the Inputobject tuples method (see “Input” on page69). The SLA is considered to have beenviolated (0=Not violated, 1=Violated) if thetotal number of "down" events for the periodis greater than or equal to 6.

Scenario 6: Accumulated downtime for a linkThis scenario illustrates how to create a formula file that accumulates the totalamount of time for the periods when the link is "down" in Scenario 1.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

Link_Status_cpx1 Formula that is defined as part of Scenario1.

Chapter 3. Using CME formula API files 39

Page 48: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula fileTo calculate the total amount of time for periods when the link was "down" fromScenario 1, consider the following formula file:

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase5.js";//------------------------------------------------------------------------------------// Operator: link_Status_AccumulatedDownTime_cpx1// Metric : Accumulated down time// Metric Description : Simply provides the accumulated downtime.// Measurement Procedure : Operator uses window -// PV.PeriodAndTupleWindow(86400,1,900) and an inbuilt function to// determine accumulated downtime// Measurement Frequency : Once a day - 24 hours (Calculate) and 15 mins// (calculateIntermediate).// Thresholds Estimation :// Units: Seconds//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~link_Status_AccumulatedDownTime_cpx1",arguments: {status: "TestCase~Model_1~link_Status_cpx1"

},window: PV.PeriodAndTupleWindow(86400,1,900),calculate: function ( tuple ) {

return this.downtime ( tuple, function ( t ) { return t.value == 1 } );},calculateIntermediate: function ( heartbeat ) {

return this.downtime ( heartbeat, function ( t ) { return t.value == 1 } ) ;}

});

Formula descriptionsTestCase~Model_1~link_Status_AccumulatedDownTime_cpx1

The TestCase~Model_1~link_Status_AccumulatedDownTime_cpx1 formula defines thefollowing processing requirements:

Requirement Values Description

Inputs status Uses theTestCase~Model_1~link_Status_cpx1formula that is defined as part of theformula file that is created for Scenario 1.

Formulatrigger

PV.PeriodAndTupleWindow(86400,1,900

Specifies that this calculate functiontriggers after every 24 hours and includethe last known value of status. Alsospecifies that the calculateintermediatefunction triggers every 15 minutes.

Output return this.downtime ( tuple, function ( t ){ returnt.value == 1 } )

return this.downtime ( heartbeat, function ( t ){ return t.value == 1 } )

Determines the total amount of time whenthe link was "down" during the period.

Calculates the amount of time the link wasdown during the period by using the Inputobject downtime method (see “Input” onpage 69). When the link is down, the linkstatus is polled every 15 minutes.

40 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 49: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Scenario 7: Link status during SCP and Trap deploymentThis scenario illustrates how to create a formula file that determines whether a linkis "down" during an SCP, calculates the total downtime for the link, and deploystraps to issue warning messages if the downtime exceeds key thresholds.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric

rel_if_pE Composite subelement

rel_if_cE Composite subelement

Calendar "Weekly" Tivoli Netcool Performance Managercalendar

Calendar "SCP" Tivoli Netcool Performance Managercalendar

Formula fileTo calculate the total amount of time for periods when the link was "down" fromScenario 1, consider the following formula file:formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase6a.js";//--------------------------------------------------------------------------------------// Operator: link_Status_cpx5// Metric : Link Status// Metric Description : Provides the link status taking into consideration service cover periods.// Measurement Procedure : Operator uses window - PV.TupleWindow(1)to extract information from collected Interface availability// Measurement Frequency : Every time data is collected on availability (Calculate)and service cover period changes.// Thresholds Estimation : Link is down if interface is unavailable during the service cover period.// Units: 1/0 - Up/Down//-------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~link_Status_cpx5",arguments: {

pEifStatus: "rel_if_pE/PS~if_Availability" ,

Chapter 3. Using CME formula API files 41

Page 50: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

cEifStatus: "rel_if_cE/PS~if_Availability",sCP: "~cal~SCP"},

window: PV.TupleWindow(1),calculate: function( tuple )

{if ( (this.pEifStatus.value == 0 || this.cEifStatus.value == 0) &&

this.sCP.value == 1 ) { return ( 0 ); }else { return (1); }}

});//--------------------------------------------------------------------------------------// Operator: link_Status_AccumulatedDownTime_cpx3// Metric : Link status accumulated downtime// Metric Description : Determines accumulated downtime// Measurement Procedure : Operator uses window - PV.CalendarAndTupleWindow("~cal~weekly",1,900)// Measurement Frequency : End of the week (Calculate) and at 15 mins intervals (calculateIntermediate).// Thresholds Estimation :// Units: Seconds//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~link_Status_AccumulatedDownTime_cpx3",arguments: {

status: "TestCase~Model_1~link_Status_cpx5"},

window: PV.CalendarAndTupleWindow("~cal~weekly",1,900),calculate: function ( tuple ) {

return this.downtime ( tuple, function ( t ) { return t.value == 1 } );},calculateIntermediate: function ( heartbeat ) {

return this.downtime ( heartbeat, function ( t ) { return t.value == 1 } ) ;}

});//--------------------------------------------------------------------------------------// Operator: SLA_link_Status_AccumulatedDownTime_cpx1// Metric : Link Status SLA// Metric Description : Indicates when SLA is breached, determined by the accumulated downtime// within a week that occurred during SCP// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to trigger access// tuple storage for variable// Measurement Frequency :// Thresholds Estimation :// Units://--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~SLA_link_Status_AccumulatedDownTime_cpx1",arguments: {

aDowntime: "TestCase~Model_1~link_Status_AccumulatedDownTime_cpx3"},

window: PV.TupleWindow(1),calculate: function ( tuple ) {

if (this.aDowntime.value > 3600 && this.aDowntime.value <= 7200 ) {var trap = PV.trapWriter.newTrap( );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.1", "Action Required" );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.2","WeeklyAccumulatedDowntimeSLA");trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.3", this.aDowntime.value);trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.4","exceeds" );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.5", 3600 );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.6", "Warning" );PV.trapWriter.send( trap );//return ( 1 );

}if (this.aDowntime.value > 7200 && this.aDowntime.value <= 10600 ) {

var trap = PV.trapWriter.newTrap( );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.1", "Action Required" );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.2","WeeklyAccumulatedDowntimeSLA");trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.3", this.aDowntime.value);trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.4","exceeds" );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.5", 7200 );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.6", "Critical" );PV.trapWriter.send( trap );//return ( 2 );

}if (this.aDowntime.value > 10600) {

var trap = PV.trapWriter.newTrap( );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.1", "Threshold Surpassed" );trap.addBinding("1.3.6.1.4.1.2929.2.2.8.2","WeeklyAccumulatedDowntimeSLA");

42 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 51: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.3", this.aDowntime.value);trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.4","exceeds" );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.5", 10600 );trap.addBinding( "1.3.6.1.4.1.2929.2.2.8.6", "Clear" );PV.trapWriter.send( trap );//return ( 3 );

}}

});

Formula descriptionsTestCase~Model_1~link_Status_cpx5

The TestCase~Model_1~link_Status_cpx5 formula defines the following processingrequirements:

Requirement Values Description

Inputs pEifStatuscEifStatus

sCP

Uses the pEifStatus and cEifStatuscollected availability metrics(0=Down, 100=Up) as inputs to thisformula.

Uses the sCP calendar as an input tothis formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value forpEifStatus, cEifStatus, or sCParrives.

Output if ( (this.pEifStatus.value == 0 ||this.cEifStatus.value == 0) &&this.sCP.value == 1 ){ return ( 0 )

Determines the status of the link.

The link is considered to be "down" ifeither pEifStatus or cEifStatus are"down," and the SCP is true (0=NoSCP, 1=SCP).

TestCase~Model_1~link_Status_AccumulatedDownTime_cpx3

The TestCase~Model_1~link_Status_AccumulatedDownTime_cpx3 formula defines thefollowing processing requirements:

Requirement Values Description

Inputs status Uses theTestCase~Model_1~link_Status_cpx5formula defined above as an input tothis formula.

Formula trigger PV.CalendarAndTupleWindow("~cal~weekly",1,900)

Specifies that the calculate functiontriggers at the end of the period thatis defined by the Tivoli NetcoolPerformance Manager calendarcal~weekly, and include the lastknown value of status . Alsospecifies that thecalculateintermediate functiontriggers every 15 minutes.

Chapter 3. Using CME formula API files 43

Page 52: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Output return this.downtime( tuple, function ( t ){return t.value == 1} )

return this.downtime( heartbeat, function ( t ){ return t.value == 1} )

Determines the total amount of timewhen the link was "down" during thecalendar period.

Calculates the amount of time thelink was down during the definedcalendar by using the Input objectdowntime method (see “Input” onpage 69). When the link is down, thelink status is polled every 15minutes.

TestCase~Model_1~SLA_link_Status_AccumulatedDownTime_cpx1

The TestCase~Model_1~SLA_link_Status_AccumulatedDownTime_cpx1 formuladefines the following processing requirements:

Requirement Values Description

Inputs aDowntime Uses the

TestCase~Model_1~link_Status_AccumulatedDownTime_cpx3

formula that is defined earlier as aninput to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value for aDowntimearrives.

Output if (this.aDowntime.value >3600 && this.aDowntime.value<= 7200 )send trap

if (this.aDowntime.value >7200 &&this.aDowntime.value<= 10600)send trap

if (this.aDowntime.value >10600)send trap

Creates an SNMP trap if the value foraDowntime is greater than 1 day andless than 2 days. (See“PV.TrapWriter” on page 76 ).

Creates an SNMP trap if the value foraDowntime is greater than 2 days andless than 3 days. (See“PV.TrapWriter” on page 76).

Creates an SNMP trap if the value foraDowntime is greater than 3 days. (See“PV.TrapWriter” on page 76).

Scenario 8: SLA violation by using latency and bandwidth metricsThis scenario illustrates how to create a formula file that uses latency andbandwidth utilization CME metrics to determine if an SLA violation has occurred.The SLA has been violated if a link's latency exceeds 80 ms, but its bandwidthutilization is below 90%.

44 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 53: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~Outbound Throughput bps_CBQoS CME metric

Bandwidth CME metric

Latency (ms) CME metric

rel_if_cE_voice Composite subelement

rel_if_pE_voice Composite subelement

rel_Probe_voice Composite subelement

Formula fileTo determine whether an SLA violation has occurred by using latency andbandwidth utilization CME metrics, consider the following formula file:

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase7.js";//--------------------------------------------------------------------------------------// Operator: link_Status_cpx6// Metric : link Status// Metric Description : Provides the link status determined by Bandwidth utilization and latency// Measurement Procedure : Operator uses window - PV.CMEWindow(1) to extract information needed.// Measurement Frequency : Every time data is generated by inputs.// Thresholds Estimation : Link is bad if latency > 80ms and bandwidth utilization < 90%// Units: 1/0 - BAD/GOOD//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_2~link_Status_cpx6",arguments: {

pEthroughPut: "rel_if_pE_voice/PS~OutboundThroughputbps_CBQoS" ,pEBandwidth: "rel_if_pE_voice/Bandwidth",cEthroughPut: "rel_if_cE_voice/PS~OutboundThroughputbps_CBQoS",cEBandwidth: "rel_if_cE_voice/Bandwidth",latency: "rel_probe_voice/PS~Latency(ms)"

},window: PV.CMEWindow(1),calculate: function( tuple )

{return ( ( this.pEthroughPut.value/this.pEBandwidth.value +

this.cEthroughPut.value/this.cEBandwidth.value )/2 *100 < 90 && this.latency.value > 80 );

}});

Chapter 3. Using CME formula API files 45

Page 54: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula descriptionsTestCase~Model_2~link_Status_cpx6

The TestCase~Model_2~link_Status_cpx6 formula defines the following processingrequirements:

Requirement Values Description

Inputs pEthroughPutcEthroughPut

pEBandwidthcEBandwidth

latency

Uses the pEthroughPut and cEthroughPutCME throughput metrics as inputs to thisformula.

Uses the pEBandwidth and cEBandwidthCME bandwidth utilization metrics asinputs to this formula.

Uses the latency CME latency metric as aninput to this formula.

Formula trigger PV.CMEWindow(1) Specifies that this formula triggers whenpEthroughPut, cEthroughPut, pEBandwidth,cEBandwidth, and latency all receive newvalues.

Output return( (this.pEthroughPut.value/this.pEBandwidth.value +this.cEthroughPut.value/this.cEBandwidth.value )/2 *100 < 90 &&this.latency.value > 80)

Determines whether the link's bandwidthutilization exceeds defined thresholds.

Calculates the link's latency and bandwidthutilization. The SLA is considered to havebeen violated (0=Not violated, 1=Violated)if the latency exceeds 80 ms and thebandwidth utilization is less than 90%.

Scenario 9: Link status by using several data sourcesThis scenario illustrates how to create a formula file that determines the status of alink by testing several data sources. The link is considered to be "down" if eitherinterface is "down", or if there have been any major events on either interface or itsassociated device.

46 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 55: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~if_Availability Collected metric

PS~event_Interface_Status Collected metric

PS~event_Device_Status Collected metric

rel_if_cE Composite subelement

rel_if_pE Composite subelement

Formula fileTo determine the status of a link that is based on the status of its interfaces andassociated devices, consider the following formula file:

Chapter 3. Using CME formula API files 47

Page 56: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase8.js";//--------------------------------------------------------------------------------------// Operator: if_Status_cE// Metric : Interface Status// Metric Description : Provides the interface status// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract information// Measurement Frequency : Every time data is collected on any Input (Calculate)// Thresholds Estimation : interface down if availability !=100 or interface event >=// 4 or device event >=4// Units: 1/0 - Up/Down//--------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~if_Status_cpx2",arguments: {

perfInterfaceStatus: "PS~if_Availability",eInterfaceStatus: "PS~event_Interface_Status",eDeviceStatus: "rel_device/PS~event_Device_Status"},

window: PV.TupleWindow(1),calculate: function( tuple )

{return ( ( this.perfInterfaceStatus.value == 100) &&

( this.eInterfaceStatus.value < 3) && (this.eDeviceStatus.value < 3) );}

});//------------------------------------------------------------------------------------// Operator: P_link_Status// Metric : Link Status// Metric Description : Provides the link status// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract information// Measurement Frequency : Every time data is collected on any Input (Calculate)// Thresholds Estimation :// Units: 1/0 - Up/Down//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~P_link_Status",arguments: {

pEfInterfaceStatus: "rel_if_pE/TestCase~Model_1~if_Status_cpx2",cEfInterfaceStatus: "rel_if_cE/TestCase~Model_1~if_Status_cpx2"},

window: PV.TupleWindow(1),calculate: function( tuple )

{return

( this.pEfInterfaceStatus.value && this.cEfInterfaceStatus.value);

}});

Formula descriptionsTestCase~Model_1~if_Status_cpx2

The TestCase~Model_1~if_Status_cpx2 formula defines the following processingrequirements:

Requirement Values Description

Inputs perfInterfaceStatuseInterfaceStatuseDeviceStatus

Uses the perfInterfaceStatus,eInterfaceStatus, and eDeviceStatuscollected status metrics as inputs to thisformula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggers eachtime a new value for perfInterfaceStatus,eInterfaceStatus, or eDeviceStatusarrives.

48 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 57: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Output return ((this.perfInterfaceStatus.value == 100)&&(this.eInterfaceStatus.value < 3)&&(this.eDeviceStatus.value < 3) )

Determines the status of the interfaces.

The interfaces are considered to be "up" ifperfInterfaceStatus is "up" (0=Down,100=Up), and both eInterfaceStatus andeDeviceStatus do not experience any majorevents (0=Clear, 4=Major, 5=Critical).

TestCase~Model_1~P_link_Status

The TestCase~Model_1~P_link_Status formula defines the following processingrequirements:

Requirement Values Description

Inputs pEfInterfaceStatuscEfInterfaceStatus

Uses theTestCase~Model_1~if_Status_cpx2formula that is defined earlier as aninput to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggers eachtime a new value forpEfInterfaceStatus orcEfInterfaceStatus arrives.

Output return(this.pEfInterfaceStatus.value&&this.cEfInterfaceStatus.value)

Determines the status of the link.

The link is considered to be "up" if bothpEfInterfaceStatus andcEfInterfaceStatus are "up".

Scenario 10: Service status by using several data sources and latedata

This scenario illustrates how to create a formula file that determines the status of aservice by using the link status from Scenario 8 and late-arriving backup linkstatus. The service is considered to be "up" is either the primary or the backuplinks are "up".

Chapter 3. Using CME formula API files 49

Page 58: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

TestCase~Model_1~P_link_Status Formula that is defined as part of Scenario 8

PS~isdn_Status Late-arriving metric

rel_if_cE Composite subelement

rel_if_pE Composite subelement

rel_if_ISDN Composite subelement

rel_link Composite subelement

Formula fileTo determine the status of a service that is based on the primary link status fromScenario 8 and late-arriving backup link data, consider the following formula file:

50 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 59: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase9.js";//-------------------------------------------------------------------------------------// Operator: B_link_Status// Metric : Link Status// Metric Description : Provides the link status for the backup link// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract information// Measurement Frequency : Every time data is collected on any Input (Calculate)// Thresholds Estimation :// Units: 1/0 - Up/Down//--------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~B_link_Status",arguments: {

isdnStatus: "rel_if_ISDN/PS~isdn_Status"},

window: PV.TupleWindow(1),calculate: function( tuple )

{return (this.isdnStatus.value );

}});//--------------------------------------------------------------------------------------// Operator: Service_Status// Metric : Service Status// Metric Description : Provides the service status// Measurement Procedure : Operator uses window - PV.TupleWindow(1) to extract information// Measurement Frequency : Every time data is collected on any Input (Calculate)// Thresholds Estimation :// Units: 1/0 - Up/Down//-------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~Service_Status",arguments: {

pStatus: "rel_link/TestCase~Model_1~P_link_Status",bStatus: "rel_link/TestCase~Model_1~B_link_Status"},

window: PV.TupleWindow(1),calculate: function( tuple )

{return ( this.pStatus.value || this.bStatus.value );

}});

Formula descriptionsTestCase~Model_1~B_link_Status

The TestCase~Model_1~B_link_Status formula defines the following processingrequirements:

Requirement Values Description

Inputs isdnStatus Uses the isdnStatuslate-arriving status metric asan input to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formulawill trigger each time a newvalue for isdnStatus arrives.

Output return(this.isdnStatus.value) Determines the status of the

backup link.

The link is considered to be"up" based on thelate-arriving data.

TestCase~Model_1~Service_Status

Chapter 3. Using CME formula API files 51

Page 60: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The TestCase~Model_1~Service_Status formula defines the following processingrequirements:

Requirement I Values Description

Inputs pStatusbStatus Uses the

TestCase~Model_1~P_link_Status formuladefined as part of the formula file createdfor Scenario 8.

Uses the TestCase~Model_1~B_link_Statusformula defined above as an input to thisformula.

Formula trigger PV.TupleWindow(1) Specifies that this formula will trigger eachtime a new value for pStatus orbStatusarrives.

Output return (this.pStatus.value || this.bStatus.value )Determines the status of the service.

The service is considered to be "up" if eitherpStatus or bStatus are "up".

Scenario 11: Path latency by using probesThis scenario illustrates how to create a formula file that determines the latency ofa path across an entire network by using probes. The latency across the path iscalculated even if not all values are present.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

PS~Latency(ms) Late-arriving metric

rel_Probe_Access Composite subelement

rel_Probe_Core Composite subelement

52 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 61: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula fileTo determine the path latency across a network, consider the following formulafile:formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase10.js";//-------------------------------------------------------------------------------------// Operator: Latency Path (ms)// Metric : Latency// Metric Description : Provides the total Latency as calculated from Path CE-PE---PE-CE// Measurement Procedure : Operator uses window - PV.PeriodWindow(300) to// extract information from relevant probes// Measurement Frequency : 5 minutes (300 seconds)// Thresholds Estimation : N/A// Units: milliseconds//-------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~Latency Path (ms)",arguments: {// A multidimensional tuple arrayLatency_Access : "rel-Probe-Access/PS~Latency(ms)",//Single tuple array

Latency_Core : "rel-Probe-Core/PS~Latency(ms)" },window: PV.PeriodWindow(300),

calculate:function ( ){var Latency_Access_Total = 0;var Latency_Core_var = 0;

for (var index in this.Latency_Access.inputs){var val = this.Latency_Access.inputs[index].value;if ( val != undefined ){

Latency_Access_Total += this.Latency_Access.inputs[index].value ;}};

var val2 = this.Latency_Core.value;if ( val2 != undefined ){

Latency_Core_var = val2;}return (Latency_Core_var + Latency_Access_Total);

}});//------------------------------------------------------------------------------------// Operator: Latency Path (ms)-cpx1// Metric : Latency// Metric Description : Provides the total Latency as calculated from path CE-PE-PE-CE .Path latency is only produced if all probes// produce data in the 5 minute window. Returns 0 if all probes do not produce data.// Measurement Procedure : Operator uses window - PV.PeriodWindow(300)// to extract information from relevant probes// Measurement Frequency : 5 minutes (300 seconds)// Thresholds Estimation : N/A// Units: milliseconds//------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~Latency Path (ms)-cpx1",arguments: {// A multidimensional tuple arrayLatency_Access : "rel-Probe-Access/PS~Latency(ms)",//Single tuple array

Latency_Core : "rel-Probe-Core/PS~Latency(ms)" },

window: PV.PeriodWindow(300),calculate:function ( ){var Latency_Access_Total = 0;var Latency_Core_var = 0;var tracker = 1;

for (var index in this.Latency_Access.inputs){var val = this.Latency_Access.inputs[index].value;if ( val != undefined ){

Latency_Access_Total += this.Latency_Access.inputs[index].value ;}

Chapter 3. Using CME formula API files 53

Page 62: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

else {tracker = -1;}};

var val2 = this.Latency_Core.value;if ( val2 != undefined ){

Latency_Core_var = val2;}else{

tracker = -1;}

if ( tracker * ( Latency_Access_Total + Latency_Core_var ) < 1 ){

return 0;}else {return ( Latency_Access_Total + Latency_Core_var ) ;}

}});

Formula descriptionsTestCase~Model_1~Latency Path (ms)

The TestCase~Model_1~Latency Path (ms) formula defines the following processingrequirements:

Requirement Values Description

Inputs Latency_AccessLatency_Core Uses the Latency_Access collected

status metric as an input to thisformula.

Uses the Latency_Core collectedstatus metric as an input to thisformula.

Formula trigger PV.PeriodWindow(300) Specifies that this formula triggersevery 5 minutes.

Output return (Latency_Core_var +Latency_Access_Total)

Creates an array for allLatency_Access and Latency_Corevalues and sums the totals even ifnot all values are present.

TestCase~Model_1~Latency Path (ms)-cpx1

The TestCase~Model_1~Latency Path (ms)-cpx1 formula defines the followingprocessing requirements:

Requirement Values Description

Inputs Latency_AccessLatency_Core

Uses the Latency_Access collected statusmetric as an input to this formula.

Uses the Latency_Core collected statusmetric as an input to this formula.

Formula trigger PV.PeriodWindow(300) Specifies that this formula triggers every 5minutes.

54 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 63: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Output if ( tracker *(Latency_Access_Total + Latency_Core_var )< 1 ){ return 0; }else{ return (Latency_Access_Total +Latency_Core_var )

Creates an array for all Latency_Access andLatency_Core values and sums the totalsonly if all values are present.

Scenario 12: Penalty recalculation by using trouble tickets ordeferments

This scenario illustrates how to create a formula file that recalculates SLA penaltymetrics that are based on late-arriving data from trouble tickets or deferments.

ModelThe following diagram represents the service modelling tree for this scenario:

PrerequisitesBefore you write the formula file for this scenario, you must either create thefollowing items or verify that they exist in the Tivoli Netcool Performance Managerenvironment:

Name Item type

TestCase~Model_1~link_Status_cpx1 Formula that is defined as part of Scenario 1

TEL~SLA~example1~tel_tt_status Aperiodic metric

TEL~SLA~example1~tel_tt_status Aperiodic metric

Chapter 3. Using CME formula API files 55

Page 64: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Formula fileTo recalculate penalty metrics by using late-arriving trouble ticket and defermentdata, consider the following formula file:formulas.documentName = "/opt/proviso/datachannel/formulas/TestCase11.js";//------------------------------------------------------------------------------------// Operator: Link_Status_TT// Metric : Overall Link Status// Metric Description : Link Status taking into consideration deferment status and trouble ticket state.// Considered Down if Physical Link Status is down or if Physical Link Status is up and// TT open and no deferment and Telco fault// DeferStatus: 1 - active (open) , 0 - not active (close)// Measurement Procedure : Operator uses window - PV.TupleWindow(1)// Measurement Frequency : Everytime a status change occurs on any of physical link, deferment or ticket state// Thresholds Estimation : N/A// Units: 1 - Up / 0 - Down//------------------------------------------------------------------------------------// Trouble Ticket codes : 1 - open, 2 - cleared, 3 -closed, 4 - Unavailable// Link Status effect : false - adverse, true - no effectfunction TTImpact(code) {if ((code == 2) || (code == 3) || (code == 4) ) {return true;} else {return false;}};formulas.defineFormula({name: "TestCase~Model_1~Link_Status_TT",arguments: {phyLinkStatus: "TestCase~Model_1~link_Status_cpx1",tTStatus: "TEL~SLA~example1~tel_tt_status",deferStatus: "TEL~SLA~example1~tel_defer_status"},

window: PV.TupleWindow(1),calculate: function( tuple ){var defer_status = 0;var TTstatus = 4;if ( this.deferStatus.value != undefined ){var defer_status = this.deferStatus.value;}if ( this.tTStatus.value != undefined ){var TTstatus = this.tTStatus.value;}return ( (this.phyLinkStatus.value && TTImpact(TTstatus)) || defer_status );}

});//-------------------------------------------------------------------------------------// Operator: Service_Status_TT// Metric : Service status// Metric Description : Determines service status based on each overall Link status// Measurement Procedure : Operator uses window - PV.TupleWindow(1)// Measurement Frequency : Everytime an overall link status change occurs// Thresholds Estimation : N/A// Units: 1 - Up / 0 - Down//-----------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~Service_Status_TT",arguments: {compositeLink: "rel_link/TestCase~Model_1~Link_Status_TT"},

window: PV.TupleWindow(1),calculate: function( tuple ){var service_status = 0;for (var index in this.compositeLink.inputs){var val = this.compositeLink.inputs[index].value;if ( val != undefined ){

service_status += this.compositeLink.inputs[index].value ;}};return ( service_status == 2 );

}

56 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 65: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

});//------------------------------------------------------------------------------------// Operator: Service_DownTime// Metric : Current DownTime// Metric Description : Determine Service downtime. Service is down if Service_Status_TT down.// Measurement Procedure : Operator uses window - PV.TupleWindow(2,150)// Measurement Frequency : When the Service status comes back online and every 2.5 mins (Intermediate)// Thresholds Estimation : N/A// Units: Seconds//------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~Service_DownTime",arguments: {service_Status: "TestCase~Model_1~Service_Status_TT"},

window: PV.TupleWindow(2,150),calculate: function ( tuple ) {if ( this.service_Status.value )return ( this.service_Status.lastTimestamp( ) - this.service_Status.firstTimestamp() );elsereturn ( 0 );

},calculateIntermediate: function ( heartbeat ) {if ( this.service_Status != undefined )if ( !this.service_Status.value )return ( heartbeat.timestamp - this.service_Status.lastTimestamp( ) );

}});//---------------------------------------------------------------------------------// Operator: Service_Penalty// Metric : Instant Percentage penalty// Metric Description : Determines the Instant percentage penalty after an outage// Measurement Procedure : Operator uses window - PV.TupleWindow(1)// Measurement Frequency : Triggered by the generation of Service downtime// Thresholds Estimation : N/A// Units: Percentage//-------------------------------------------------------------------------------------formulas.defineFormula({name: "TestCase~Model_1~Service_Penalty",arguments: {downTime: "TestCase~Model_1~Service_DownTime "},

window: PV.TupleWindow(1),calculate: function ( tuple ){if ( (this.downTime.value - 3600) > 0){

var val = Math.floor((this.downTime.value - 3600) / 300);if ( val < 10){return ( val * 10 );} else {return ( 100 );}} else {return ( 0 );}}

});//-----------------------------------------------------------------------------------// Operator: Service_accumulatedDownTime// Metric : Service accumulated downtime// Metric Description : Provides accumulated down time experienced by the Service within a week.// Measurement Procedure : Operator uses window - PV.PeriodAndTupleWindow// to extract information from service availability.// An inbuilt function extrapolates the needed data//// Measurement Frequency : Proviso calendar defined time interval i.e. One week (Calculate)//and 15 mins (calculateIntermediate).// Thresholds Estimation : N/A// Units: Seconds//-------------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~Service_accumulatedDownTime",arguments: {

status: "TestCase~Model_1~Service_Status_TT"},

Chapter 3. Using CME formula API files 57

Page 66: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

window: PV.CalendarAndTupleWindow("~cal~Weekly",1,900),calculate: function ( tuple ) {

return this.downtime ( tuple, function ( t ) { return t.value == 1 } );},calculateIntermediate: function ( heartbeat ) {

return this.downtime ( heartbeat, function ( t ) { return t.value == 1 } ) ;}

});//-----------------------------------------------------------------------------------// Operator: Service_Penalty_Weekly// Metric : Percentage penalty// Metric Description : Determines the weekly percentage penalty// Measurement Procedure : Operator uses window - PV.TupleWindow(1)// Measurement Frequency : Triggered by the generation of accumulated downtime// Thresholds Estimation : N/A// Units: Percentage//-----------------------------------------------------------------------------------formulas.defineFormula({

name: "TestCase~Model_1~Service_Penalty_Weekly",arguments: {

downTime: "TestCase~Model_1~Service_accumulatedDownTime"},

window: PV.TupleWindow(1),calculate: function ( tuple )

{if ( (this.downTime.value - 3600) > 0){

var val = Math.floor((this.downTime.value - 3600) / 300);if ( val < 10){

return ( val * 10 );} else {

return ( 100 );}

} else {return ( 0 );

}}

});

Formula descriptionsTestCase~Model_1~Link_Status_TT

The TestCase~Model_1~Link_Status_TT formula defines the following processingrequirements:

Requirement Values Description

Inputs phyLinkStatus

tTStatus

deferStatus

Uses theTestCase~Model_1~link_Status_cpx1formula that is defined as part of theformula file that is created forScenario 1.

Uses the tTStatus collected statusmetric as an input to this formula.

Uses the deferStatus collected statusmetric as an input to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value forphyLinkStatus, tTStatus, ordeferStatus arrives.

58 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 67: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Output return ( (this.phyLinkStatus.value&& TTImpact(TTstatus)) ||defer_status )

Determines the status of the link.

The link is considered to be "up" if itsphysical status is "up" and there areno adverse trouble tickets, or if it is"down" but is in a deferment state.

TestCase~Model_1~Service_Status_TT

The TestCase~Model_1~Service_Status_TT formula defines the following processingrequirements:

Requirement Values Description

Inputs compositeLink Uses theTestCase~Model_1~Link_Status_TTformula that is defined earlier as aninput to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggerseach time a new value forcompositeLin arrives.

Output return ( service_status == 2 )Creates an array for allcompositeLink values and sums thetotals (0=Down, 1=Up).

The service is considered to be "up"only if both of its links are "up".

TestCase~Model_1~Service_DownTime

The TestCase~Model_1~Service_DownTime formula defines the following processingrequirements:

Requirement Values Description

Inputs service_Status Uses theTestCase~Model_1~Service_Status_TTformula that is defined earlier as an inputto this formula.

Formula trigger PV.TupleWindow(2,150) Specifies that the calculate functiontriggers after two new values forservice_Status arrive, and thecalculateIntermediate function triggersevery 2.5 minutes.

Output return ( this.service_Status.lastTimestamp( ) -this.service_Status.firstTimestamp() )

return ( heartbeat.timestamp -this.service_Status.lastTimestamp( ) )

Determines the total downtime for theservice.

Calculates the amount of time the servicewas down. When the link is down, theservice status is polled every 2.5 minutes.

TestCase~Model_1~Service_Penalty

The TestCase~Model_1~Service_Penalty formula defines the following processingrequirements:

Chapter 3. Using CME formula API files 59

Page 68: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Inputs downTime Uses theTestCase~Model_1~Service_DownTimeformula that is defined earlier as aninput to this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggers eachtime a new value for downTime arrives.

Output return ( val * 10 );

} else {return ( 100 );}} else {return ( 0 );

Determines the service penalty forexcessive downtime of the service.

If the service downtime has notexceeded 1 hour, no service penalty isassessed. If the service downtime isbetween 1 hour and 110 minutes, apercentage service penalty is assessed. Ifthe service downtime exceeds 110minutes, a full service penalty isassessed.

TestCase~Model_1~Service_accumulatedDownTime

The TestCase~Model_1~Service_accumulatedDownTime formula defines the followingprocessing requirements:

Requirement Values Description

Inputs status Uses theTestCase~Model_1~Service_Status_TT formula that is defined earlier as an input tothis formula.

Formula trigger PV.CalendarAndTupleWindow("~cal~ weekly",1,900)

Specifies that the calculate functiontriggers at the end of the period that isdefined by the Tivoli Netcool PerformanceManager calendar cal~weekly, and includethe last known value of status. Alsospecifies that the calculateintermediatefunction triggers every 15 minutes.

Output return this.downtime( tuple, function ( t ){ return t.value == 1 } )

return this.downtime( heartbeat, function ( t ){ return t.value == 1 } )

Determines the total amount of time whenthe service was "down" during the period.

Calculates the amount of time the servicewas down during the period by using theInput object downtime method (see “Input”on page 69). When the link is down, thelink status is polled every 15 minutes.

TestCase~Model_1~Service_Penalty_Weekly

The TestCase~Model_1~Service_Penalty_Weekly formula defines the followingprocessing requirements:

60 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 69: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Requirement Values Description

Inputs downTime Uses the

TestCase~Model_1~Service_accumulatedDownTime

formula that is defined earlier as an inputto this formula.

Formula trigger PV.TupleWindow(1) Specifies that this formula triggers eachtime a new value for downTime arrives.

Output return ( val * 10 );

} else {return ( 100 );}} else {return ( 0 );

Determines the weekly service penalty forexcessive downtime of the service.

If the service downtime has not exceeded1 hour, no service penalty is assessed. Ifthe service downtime is between 1 hourand 110 minutes, a percentage servicepenalty is assessed. If the servicedowntime exceeds 110 minutes, a fullservice penalty is assessed.

Chapter 3. Using CME formula API files 61

Page 70: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

62 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 71: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Chapter 4. CME API object reference

The following sections provide reference tables that identify these developmentresources.

The CME Formula API provides the following development resources todevelopers who must write formula files:v ECMAScript core objectsv CME Formula API core objectsv Tivoli Netcool Performance Manager resource methods

ECMAScript core objectsThe CME Formula API exposes the ECMAScript core objects that are listed here.Refer to the Standard ECMA-262: ECMAScript Language Specification for moreinformation.

This information is available from the following location:

http://www.ecma-international.org/publications/standards/Ecma-262.htm

ECMAScript core objects

Object Summary description

Array The Array object that the CME Formula APIexposes provides built-in support for theECMAScript Array object. See “Array” onpage 65.

CME formula API object modelThe CME Formula API uses the following objects:v “Input object”v “FormulaOperator object” on page 64

The following sections identify the specific objects that make up each of thesecategories. The sections also identify where you can find more information abouteach object.

Input object“Input object” lists the Input object that the CME Formula API provides for use informula files.

Input object

Object For more information

Input See “Input” on page 69.

© Copyright IBM Corp. 2010, 2012 63

Page 72: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

FormulaOperator object“FormulaOperator object” lists the FormulaOperator object that the CME FormulaAPI provides for use in formula files.

FormulaOperator objects

Object For more information

FormulaOperator See “FormulaOperator” on page 66.

Tivoli Netcool Performance Manager objects used by the CME formulaAPI

The CME Formula API defines a PV object that provides the top-level namespace toallow formula files access to Tivoli Netcool Performance Manager objects.Specifically, the PV object encapsulates the following categories of objects:v “PVUtility objects”v “PVWindow objects”

The following sections identify the specific objects that make up each of thesecategories. The sections also identify where you can find more information abouteach object.

PVUtility objects“PVUtility objects” lists the PVUtility category of objects that the CME FormulaAPI provides for use in formula files.

PVUtility objects

Object For more information

Logger See “Logger” on page 71.

PV.TraceFile See “PV.TraceFile” on page 75.

PV.Trap See “PV.Trap” on page 76.

PV.TrapWriter See “PV.TrapWriter” on page 76.

PVWindow objects“PVWindow objects” lists the PVWindow category of objects that the CME FormulaAPI provides for use in formula files.

PVWindow objects

Object For more information

PV.CalendarWindow See “PV.CalendarWindow” on page 72.

PV.CalendarAndTupleWindow See “PV.CalendarAndTupleWindow” onpage 72.

PV.CMEWindow See “PV.CMEWindow” on page 73.

PV.PeriodWindow See “PV.PeriodWindow” on page 74.

64 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 73: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Object For more information

PV.PeriodAndTupleWindow See “PV.PeriodAndTupleWindow” on page75.

PV.TupleWindow See “PV.TupleWindow” on page 77.

ArrayDescription

The Array object encapsulates the attributes that are associated with storing asequence of values. The values are stored in indexed locations within the array.You use the Array(), Array(... arguments), or Array(length) constructors to create aninstance of an array object. The constructors also allow reference to the arrayobject’s associated methods and properties. These methods and properties tell anapplication how to operate on the values that are stored in the array object.

Constructorsnew Array ()new Array (... arguments)new Array (length)

Propertieslength

Returns the length of (number of elements in) the array.

Methods

anySatisfy(function)The anySatisfy method takes a function as its sole argument and iteratesover the elements in the receiver passing each one into the suppliedfunction (which must answer a Boolean). When an element is encounteredwhere the supplied function returns true, this function immediately returnstrue and stops the enumeration. If no element yields a true response fromthe supplied function, this function returns false.

concat(... arguments)See the Standard ECMA-262: ECMAScript Language Specification.

detect(function, absentFunction)The detect method takes two functions as arguments. The first function,the "test" function, must take one argument and return a Boolean. Thesecond function, the "absent" function, must not expect any arguments andcan answer any object. The absent function enumerates over the elementsin the receiver, passing each one into the test function. When the testfunction returns true, enumeration stops and that element is returned. If noelement satisfies the test, the absent function is called and its result isreturned.

includes(anObject)The includes method takes one argument and tests whether it is present inthe elements of the receiver.

isEmpty()The isEmpty method tests whether the receiver has any elements.

Chapter 4. CME API object reference 65

Page 74: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

join(separator)See the Standard ECMA-262: ECMAScript Language Specification.

pop() See the Standard ECMA-262: ECMAScript Language Specification.

push(... arguments)See the Standard ECMA-262: ECMAScript Language Specification.

reverse()See the Standard ECMA-262: ECMAScript Language Specification.

shift() See the Standard ECMA-262: ECMAScript Language Specification.

slice(start, end)See the Standard ECMA-262: ECMAScript Language Specification.

sort(comparisonFunction)See the Standard ECMA-262: ECMAScript Language Specification.

splice(start, deleteCount, ... items)See the Standard ECMA-262: ECMAScript Language Specification.

toLocaleString()See the Standard ECMA-262: ECMAScript Language Specification.

toString()The toString method converts the receiver into a string.

unshift(... arguments)See the Standard ECMA-262: ECMAScript Language Specification.

valueOf()The valueOf method returns the internal value of the receiver.

FormulaOperatorDescription

The FormulaOperator object encapsulates the attributes that specify the operationsthat are to be performed by a formula on a specific set of inputs. FormulaOperatoris a list of inputs that is built by Tivoli Netcool Performance Manager according tothe PVWindow object used for a formula definition. The FormulaOperator object isinstantiated in a formula definition by the statement.

Constructors

The constructors for the FormulaOperator object are private.

Properties

value The value property is the numeric value that is associated with a specifictuple.

timestampThe timestamp property is the timestamp that is associated with a specifictuple.

inputs The inputs property is the list of inputs that are associated with a specificformula.

66 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 75: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Methods

average( )The average method returns the average value for all currently bufferedtuples or nil if no tuples are buffered. The value is calculated by dividingthe value that is returned for the sum method by the value that is returnedfrom the count method.

count ( )The count method returns the number of currently buffered tuples. Thisvalue also represents the size of the Input array.

delta( )The delta method returns the difference between the last tuple value andthe previous tuple value. The value is calculated by subtracting the valueof the last tuple from the value of the next-to-last tuple.

downtime( )The downtime method returns the downtime for an operator up to thecurrent heartbeat timestamp given a user-defined criteria function. Thedowntime method takes two functions as arguments. The first function is atuple and its timestamp, while the second function is a test function thatreturns one parameter of type tuple. The test function returns true if thevalue of tuple is up, and false otherwise.

firstBeforeLastValue( )The firstBeforeLastValue method returns the value for the next to lasttuple.

firstTimeStamp( )The firstTimeStamp method returns the timestamp of the oldest tuple forall inputs.

firstTuple( )The firstTuple method returns the oldest tuple for all inputs.

firstValue( )The firstValue method returns the oldest value of the tuple for all inputs.

inputs( )The inputs method returns the most recent value for all inputs.

lastTimeStamp( )The lastTimeStamp method returns the timestamp of the last tuple for allinputs.

lastTimeStamps( )The lastTimeStamps method returns an array of last timestamps for allinputs.

lastTuple( )The lastTuple method returns the last tuple for all inputs.

lastTuples( )ThelastTuples method returns an array of last tuples for all inputs.

lastValue( )The lastValue method returns the value of the last tuple for all inputs.

lastValues( )The lastValues method returns an array of last values for all inputs.

Chapter 4. CME API object reference 67

Page 76: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

maxTimestamp( )The maxTimestamp method returns the timestamp of the tuple with thegreatest value from all currently buffered tuples, or nil if no tuples arebuffered.

maxTuple( )The maxTuple method returns the tuple with the greatest value from allcurrently buffered tuples, or nil if no tuples are buffered.

maxValue( )The maxValue method returns the greatest value from all currently bufferedtuples, or nil if no tuples are buffered.

minTimestamp( )The minTimestamp method returns the timestamp of the tuple with thesmallest value from all currently buffered tuples, or nil if no tuples arebuffered.

minTuple( )The minTuple method returns the tuple with the smallest value from allcurrently buffered tuples, or nil if no tuples are buffered.

minValue( )The minValue method returns the smallest value from all currently bufferedtuples, or nil if no tuples are buffered.

sum( ) The sum method returns the sum of all values for all currently bufferedtuples, or nil if no tuples are buffered.

endOfPeriod( )The endOfPeriod method returns the endOfPeriod in seconds for thecurrent TimeSeries. If the current timeseries has a monthly period window,then the endOfPeriod returns the end of the month.

periodDuration( )The periodDuration method returns the duration in seconds of the currentTimeSeries period.

startOfPeriod( )The startOfPeriod in seconds for the current TimeSeries. If the currenttimeseries has a monthly period window, then the startOfPeriod returnsthe start of the month.

tuples( )The tuples method returns an array of tuples for all tuples that belong tothe PVWindow definition for this input.

values( )The values method returns an array of values for all tuples that belong tothe PVWindow definition for this input.

68 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 77: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

InputDescription

The Input object encapsulates the attributes that specify the operations that are tobe performed by a formula on a specific set of tuples. Input is a list of tuples thatis built by Tivoli Netcool Performance Manager according to the PVWindow objectused for the formula definition. The Input object is instantiated in a formuladefinition by the this.input_n statement, and an array of Input objects can becreated by using the this.input_n.inputs statement.

Constructors

The constructors for the Input object are private.

Properties

value The value property is the numeric value that is associated with a specifictuple.

timestampThe timestamp property is the timestamp that is associated with a specifictuple.

Methods

average( )The average method returns the average value for all currently bufferedtuples or nil if no tuples are buffered. The value is calculated by dividingthe value that is returned for the sum method by the value that is returnedfrom the count method.

count ( )The count method returns the number of currently buffered tuples. Thisvalue also represents the size of the Input array.

delta( )The delta method returns the difference between the last tuple value andthe previous tuple value. The value is calculated by subtracting the lasttuple value from the next to last tuple value.

downtime( )The downtime method returns the downtime for an operator up to thecurrent heartbeat timestamp given a user-defined criteria function. Thedowntime method takes two functions as arguments. The first function is atuple and its timestamp, while the second function is a test function thatreturns one parameter of type tuple. The test function returns true if thevalue of tuple is up, and false otherwise.

firstBeforeLastValue( )The firstBeforeLastValue method returns the value for the next to lasttuple.

firstTimeStamp( )The firstTimeStamp method returns the timestamp of the oldest tuple forthis input.

firstTuple( )The firstTuple method returns the oldest tuple for this input.

Chapter 4. CME API object reference 69

Page 78: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

firstValue( )The firstValue method returns the oldest value of the tuple for this input.

getCalendarEndOfPeriod( )The getCalendarEndOfPeriod method returns the end of the current periodfor the calendar input. If the input is not a calendar then, it returns nil.

getCalendarPeriodDuration( )The getCalendarPeriodDuration method returns the duration of the currentperiod for the calendar input. If the input is not a calendar then, it returnsnil.

getCalendarStartOfPeriod( )The getCalendarStartOfPeriod method returns the start of the currentperiod for the calendar input. If the input is not a calendar then, it returnsnil.

getCalendarTransitionAtOrBefore(time)The getCalendarTransitionAtOrBefore method returns the most recenttuple (responds to timestamp and value) that represents an up or downtransition that is less than or equal to the time specified. If the input is nota calendar then, it returns nil.Instead of arming calendar inputs on creation, this function can be calledto determine if you are in or out of an SCP.

getCalendarTransitions(startTime endTime)The getCalendarTransitions method returns an array of tuples (respondsto timestamp and value) that represent the up and down transitions of theinput calendar for the time range that is specified by startTime andendTime.If the input is not a calendar then, it returns an empty array.

inputs( )The inputs method returns the most recent value for this input.

lastTimeStamp( )The lastTimeStamp method returns the timestamp of the last tuple for thisinput.

lastTimeStamps( )The lastTimeStamps method returns an array of last timestamps for thisinput.

lastTuple( )The lastTuple method returns the last tuple for this input.

lastTuples( )The lastTuples method returns an array of last tuples for this input.

lastValue( )The lastValue method returns the value of the last tuple for this input.

lastValues( )The lastValues method returns an array of last values for this input.

maxTimestamp( )The maxTimestamp method returns the timestamp of the tuple with thegreatest value from all currently buffered tuples, or nil if no tuples arebuffered.

maxTuple( )The maxTuple method returns the tuple with the greatest value from allcurrently buffered tuples, or nil if no tuples are buffered.

70 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 79: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

maxValue( )The maxValue method returns the greatest value from all currently bufferedtuples, or nil if no tuples are buffered.

minTimestamp( )The minTimestamp method returns the timestamp of the tuple with thesmallest value from all currently buffered tuples, or nil if no tuples arebuffered.

minTuple( )The minTuple method returns the tuple with the smallest value from allcurrently buffered tuples, or nil if no tuples are buffered.

minValue( )The minValue method returns the smallest value from all currently bufferedtuples, or nil if no tuples are buffered.

sum( )The sum method returns the sum of all values for all currently bufferedtuples, or nil if no tuples are buffered.

tuples( )The tuples method returns an array of tuples for all tuples that belong tothe PVWindow definition for this input.

values( )The values method returns an array of values for all tuples that belong tothe PVWindow definition for this input.

LoggerDescription

The Logger object encapsulates the attributes that are associated with the loggingfunctionality.

Constructors

None

Properties

toStringThe toString property converts the receiver into a string.

valueOfThe valueOf property returns the internal value (number, string, orBoolean) of this object if one is associated with the object. Otherwise, itreturns the object itself.

Methods

logDebug(severity, code, messageId, text)The logDebug method writes a debug message to the proviso.log file.

logFatal(code, messageId, text)The logFatal method writes a fatal message to the proviso.log file.

logInfo(code, messageId, text)The logInfo method writes an informational message to the proviso.logfile.

Chapter 4. CME API object reference 71

Page 80: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

logWarning(code, messageId, text)The logWarning method writes a warning message to the proviso.log file.

toString()The toString method converts the receiver into a string.

valueOf()The valueOf method returns the internal value of the receiver.

PV.CalendarWindowDescription

The PV.CalendarWindow object is used to control the data buffering, triggeringrequirements, and scrolling behavior for a formula. For the PV.CalendarWindowobject, the window definition is used to filter the data buffered for a formula tolimit its scope based on a defined period of time, and the formula is triggered atthe end of the period. Once the formula has triggered, the window definitionscrolls the window to the next time period.

The PV.CalendarWindow object is typically used whenever a formula is based on aquantity of time that varies from period to period, such as the duration of a weekor month. The PV.CalendarWindow object takes a calendar defined in TivoliNetcool Performance Manager as an input. Optionally, another period-based inputcan be specified to define a calculateIntermediate function.

ConstructorsPV.CalendarWindow ( )PV.CalendarWindow ( , )

Properties

None

Methods

None

PV.CalendarAndTupleWindowDescription

The PV.CalendarAndTupleWindow object is used to control the data buffering,triggering requirements, and scrolling behavior for a formula. For thePV.CalendarAndTupleWindow object, the window definition is used to filter thedata that is buffered for a formula to limit its scope that is based on a definedperiod, and also includes a specified number of tuples before the beginning of theperiod. The formula is triggered at the end of the period. After the formula hastriggered, the window definition scrolls the window to the next time period andincludes the last collected tuple.

The PV.CalendarAndTupleWindow object is typically used whenever a formula isbased on a quantity of time that varies from period to period, such as the durationof a week or month, and the formula must determine the last known status of aninventory object.

72 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 81: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

The PV.CalendarAndTupleWindow object takes a calendar that is defined in TivoliNetcool Performance Manager as an input, and also defines the number of tuplesto include before the beginning of the current period. Optionally, anotherperiod-based input can be specified to define a calculateIntermediate function.

Properties

None

Methods

None

PV.CMEWindowDescription

The PV.CMEWindow object is used to control the data buffering, triggeringrequirements, and scrolling behavior for a formula. For the PV.CMEWindow object,the window definition is used to filter the data that is buffered for a formula tolimit its scope that is based on a defined number of events, and the formula istriggered whenever new values arrive for all inputs. After the formula hastriggered, the window definition scrolls the window over one tuple for all inputs.

The PV.CMEWindow object is typically used whenever a formula is based onsynchronized inputs. The PV.CMEWindow object takes a specified number oftuples as an input. Optionally, another period-based input can be specified todefine a calculateIntermediate function.

ConstructorsPV.CMEWindow ( )PV.CMEWindow ( , )

Properties

None

Methods

None

PV.MathDescription

The PV.Math object encapsulates the methods that allow you to performmathematical computations over an array of time intervals or tuples.

Constructors

None

Properties

None

Chapter 4. CME API object reference 73

Page 82: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Methods

getAccumulatedDurationForIntervals(array)

This method returns an integer that is the sum of the time intervals array.v array is a list of time intervals.

getAccumulatedDurationForTuples(array fromTimestamp toTimestamp functionboolean)

This method returns an integer that is the accumulated duration inseconds.v array is a list of tuples representing up and down transitions.v fromTimestamp and toTimestamp defines a range of time to fix the

tuples to.v function allows you to define how a tuple is considered, up or down.v boolean allows you to describe the state at start or end, if there is too

little information in the tuples.

getDurationsForIntervals(array)

This method returns an array of durations in seconds that describe theduration of each interval.v array is a list of time intervals.

getIntervalsForTuples(array fromTimestamp toTimestamp function boolean)

This method returns an array of time intervals.v array is a list of tuples representing up and down transitions.v fromTimestamp and toTimestamp defines a range of time to fix the

tuples to.v function allows you to define how a tuple is considered, up or down.v boolean allows you to describe the state at start or end, if there is too

little information in the tuples.

PV.PeriodWindowDescription

The PV.PeriodWindow object is used to control the data buffering, triggeringrequirements, and scrolling behavior for a formula. For the PV.PeriodWindowobject, the window definition is used to filter the data that is buffered for aformula to limit its scope that is based on a defined period, and the formula istriggered at the end of the period. After the formula has triggered, the windowdefinition scrolls the window to the next time period.

The PV.PeriodWindow object is typically used whenever a formula is based on aquantity of time that does not vary from period to period, such as a numberseconds, minutes, or hours.

The PV.PeriodWindow object takes a specified number of seconds as an input.Optionally, another period-based input can be specified to define acalculateIntermediate function.

ConstructorsPV.PeriodWindow ( )PV.PeriodWindow ( , )

74 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 83: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Properties

None

Methods

None

PV.PeriodAndTupleWindowDescription

The PV.PeriodAndTupleWindow object is used to control the data buffering,triggering requirements, and scrolling behavior for a formula. For thePV.PeriodAndTupleWindow object, the window definition is used to filter the datathat is buffered for a formula to limit its scope that is based on a defined period,and also includes a specified number of tuples before the beginning of the period.

The formula is triggered at the end of the period. After the formula has triggered,the window definition scrolls the window to the next time period and includes thelast collected tuple.

The PV.PeriodAndTupleWindow object is typically used whenever a formula isbased on a quantity of time that does not vary from period to period, such as anumber seconds, minutes, or hours. The PV.PeriodAndTupleWindow object takes aspecified number of seconds as an input. Optionally, another period-based inputcan be specified to define a calculateIntermediate function.

ConstructorsPV.PeriodAndTupleWindow ( , )PV.PeriodAndTupleWindow ( , , )

Properties

None

Methods

None

PV.TraceFileDescription

The PV.TraceFile object encapsulates the methods that allow you to create trace/logfiles. You use the PV.TraceFile() constructor to create an instance of a trace fileobject.

The constructor allows reference to the trace file object’s associated methods. Theconstructor takes a string parameter, which specifies the name of the file in whichto write the log information.

Constructors

new PV.TraceFile(String anObject)

Chapter 4. CME API object reference 75

Page 84: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Properties

None

Methods

close() The close method closes the trace file.

flush()The flush method writes buffered trace information to disk.

put(...)The put method writes strings to the trace file.

toString()The toString method converts the receiver into a string.

valueOf()The valueOf method returns the internal value of this of the receiver.

PV.TrapDescription

The PV.Trap object encapsulates the methods that allow you to create SNMP trapsfor log messages. Before you use the PV.Trap object, you must enable SNMP trapfunctionality within Tivoli Netcool Performance Manager. See Netcool/ProvisoTechnical Note: Setting SNMP Traps for Log Messages for more information.

Constructors

PV.Trap( )

Properties

None

Methods

addBinding( )The addBinding method returns an OID and a corresponding value.

PV.TrapWriterDescription

The PV.TrapWriter object encapsulates the methods that allow you to write SNMPtraps for log messages. Before you use the PV.TrapWriter object, you must enableSNMP trap functionality within Tivoli Netcool Performance Manager. SeeNetcool/Proviso Technical Note: Setting SNMP Traps for Log Messages for moreinformation.

Constructors

PV.TrapWriter( )

Properties

None

76 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 85: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Methods

newTrap( )The newTrap method returns an instance of the Trap class.

send( )The send method returns the trap information.

PV.TupleWindowDescription

The PV.TupleWindow object is used to control the data buffering, triggeringrequirements, and scrolling behavior for a formula. For the PV.TupleWindowobject, the window definition is used to filter the data that is buffered for aformula to limit its scope that is based on a defined number of events, and theformula is triggered whenever new values arrive for an input. After the formulahas triggered, the window definition scrolls the window over one tuple.

The PV.TupleWindow object is typically used whenever a formula is based on achange in status for an inventory object or some other event. This type of windowdefinition can also be used to convert period-based metrics such as CPU usage toevent-based metrics such as device status.

The PV.TupleWindow object takes a specified number of tuples as an input.Optionally, another period-based input can be specified to define acalculateIntermediate function.

ConstructorsPV.TupleWindow ( )PV.TupleWindow ( , )

Properties

None

Methods

None

Chapter 4. CME API object reference 77

Page 86: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

78 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 87: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Chapter 5. Troubleshooting

Provides information concerning issues that can occur when you create CMEFormula API files, where to find appropriate log files and other sources ofdiagnostic information.

CME logsCME logs are generated in the CME directory and reside in the cme.log.n file,where n represents subsequent runs of the CME. The CME generates the followinglogs:

CME Log Description

CME-I-FLUSHSTART Indicates the start of flushing records to thedatabase.

CME-I-FLUSHSTOP Indicates the end of flushing records to thedatabase.

CME-I-START Indicates that the CME is starting.

CME-I-STOP Indicates that the CME is stopping.

CME-I-DONENRAW Indicates that the CME is finishedprocessing the indicated raw directory.

CME-I-WTNXTHOUR Indicates that the CME is waiting for thenext hour's data to arrive.

CME-I-WAITDIRCLS Indicates that the CME is waiting for thedirectory to close and that the next hourlydirectory does not exist.

CME-I-WAITLTARVLS Indicates that the CME is waiting for latearrivals and that the hourly directory exists.

CME-I-PROCDIR Indicates processing the specified directory.

CME messagesThe CME generates the following messages in the logs, where (I = information, W= warning):

Message Description

BAD_FILE (W) A metric file is not an even multiple of 20bytes.

STATERR (W) Stats collector failed to parse an incomingstats message.

BAD_RECORD (W) A metric record being processed is bad.

NO_RESOURCES (W) After an initial metadata load or a resync,the model has no elements or subelements.

STATQERR (W) Error processing the collector messagequeue.

NOSTARTSTATSCOLLECTOR (W) Failed attempt to start the CORBA eventchannel that is used by the stats collector.

© Copyright IBM Corp. 2010, 2012 79

Page 88: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Message Description

BAD_FILE (I) Error opening a metric file.

CURRENT_HOUR (I) Displays hour the CME started processing.

DONENRAW (I) Finished processing an incoming metric file.Includes record count and processing time.

FLUSHSTART (I) Starting flush cycle.

FLUSHSTOP (I) Finishing flush cycle. Includes record countsand the flush time.

FLUSHNONE (I) Indicates nothing to flush at the end of thehour.

REBUILD (I) Indicates the start and finish of the restartrecovery cycle.

REALTIME-WAIT (I) Indicates that the CME is waiting on thereal-time next hour.

80 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 89: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

Notices

This information was developed for products and services offered in the U.S.A.IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not give youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785 U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan, Ltd.19-21, Nihonbashi-Hakozakicho, Chuo-kuTokyo 103-8510, Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law:

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THISPUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHEREXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESSFOR A PARTICULAR PURPOSE.

Some states do not allow disclaimer of express or implied warranties in certaintransactions, therefore, this statement might not apply to you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct and use of those Web sites is at your own risk.

© Copyright IBM Corp. 2010, 2012 81

Page 90: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM Corporation2Z4A/10111400 Burnet RoadAustin, TX 78758 U.S.A.

Such information may be available, subject to appropriate terms and conditions,including in some cases payment of a fee.

The licensed program described in this document and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement or any equivalent agreementbetween us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurement may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operatingplatform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. You may copy,modify, and distribute these sample programs in any form without payment toIBM for the purposes of developing, using, marketing, or distributing applicationprograms conforming to IBM‘s application programming interfaces.

82 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 91: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

If you are viewing this information in softcopy form, the photographs and colorillustrations might not be displayed.

TrademarksIBM, the IBM logo, and ibm.com are trademarks or registered trademarks ofInternational Business Machines Corp., registered in many jurisdictions worldwide.Other product and service names might be trademarks of IBM or other companies.A current list of IBM trademarks is available on the Web at “Copyright andtrademark information” at http://www.ibm.com/legal/copytrade.shtml.

Adobe, Acrobat, PostScript and all Adobe-based trademarks are either registeredtrademarks or trademarks of Adobe Systems Incorporated in the United States,other countries, or both.

Cell Broadband Engine and Cell/B.E. are trademarks of Sony ComputerEntertainment, Inc., in the United States, other countries, or both and is used underlicense therefrom.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo,Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks orregistered trademarks of Intel Corporation or its subsidiaries in the United Statesand other countries.

IT Infrastructure Library is a registered trademark of the Central Computer andTelecommunications Agency which is now part of the Office of GovernmentCommerce.

ITIL is a registered trademark, and a registered community trademark of the Officeof Government Commerce, and is registered in the U.S. Patent and TrademarkOffice.

Java and all Java-based trademarks and logos are trademarks or registeredtrademarks of Sun Microsystems, Inc. in the United States, other countries,or both.

Linux is a trademark of Linus Torvalds in the United States, other countries, orboth.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks ofMicrosoft Corporation in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and othercountries.

Notices 83

Page 92: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

84 IBM Tivoli Netcool Performance Manager: CME Formula API Developer’s Guide

Page 93: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used
Page 94: CME FormulaAPI Developer’s Guide › sites › all › themes › ... · 2014-05-22 · Provides a summary description of the ECMAScript and CME Formula API objects that are used

����

Printed in USA


Recommended