Solutions Guide
Solutions Guide
Solutions Guide
IBM
Note
Before using this information and the product it supports, read the information in "Notices".
Edition notice
This edition applies to version 7.1.0.29 of IBM Tivoli Netcool®/Impact and to all subsequent releases and modifications
until otherwise indicated in new editions.
References in content to IBM products, software, programs, services or associated technologies do not imply that they
will be available in all countries in which IBM operates. Content, including any plans contained in content, may change
at any time at IBM's sole discretion, based on market opportunities or other factors, and is not intended to be a
commitment to future content, including product or feature availability, in any way. Statements regarding IBM's future
direction or intent are subject to change or withdrawal without notice and represent goals and objectives only. Please
refer to the IBM Community terms of use for more information.
© Copyright International Business Machines Corporation 2006, 2023.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
Contents
iii
Working with data types............................................................................................................................ 13
Data types overview............................................................................................................................. 13
Data type categories............................................................................................................................ 13
Data type fields.....................................................................................................................................15
Data type keys ..................................................................................................................................... 17
Setting up data types........................................................................................................................... 17
Data type caching................................................................................................................................. 19
Working with event sources.......................................................................................................................19
Event sources overview........................................................................................................................19
ObjectServer event sources................................................................................................................. 19
Non-ObjectServer event sources.........................................................................................................20
Event source architecture.................................................................................................................... 21
Setting up ObjectServer event sources............................................................................................... 21
iv
Chapter 5. Handling data..................................................................................... 63
Working with data items............................................................................................................................ 63
Field variables...................................................................................................................................... 63
DataItem and DataItems variables......................................................................................................63
Retrieving data by filter..............................................................................................................................63
Working with filters.............................................................................................................................. 63
Retrieving data by filter in a policy.......................................................................................................66
Retrieving data by key................................................................................................................................68
Keys...................................................................................................................................................... 68
Key expressions....................................................................................................................................68
Retrieving data by key in a policy.........................................................................................................69
Retrieving data by link............................................................................................................................... 70
Links overview...................................................................................................................................... 70
Retrieving data by link in a policy........................................................................................................ 70
Adding data................................................................................................................................................ 71
Example of adding a data item to a data type..................................................................................... 72
Updating data.............................................................................................................................................72
Example of updating single data items................................................................................................73
Example of updating multiple data items............................................................................................73
Deleting data.............................................................................................................................................. 74
Example of deleting single data items.................................................................................................74
Example of deleting data items by filter.............................................................................................. 74
Example of deleting data items by item.............................................................................................. 75
Calling database functions........................................................................................................................ 75
v
Create the CityHumidity rule for the CityWeather template.....................................................................96
Create a city service...................................................................................................................................97
Customizing a Service Tree portlet............................................................................................................98
Adding a custom Services portlet to a freeform page.............................................................................. 99
vi
Working with the OSLC service provider................................................................................................. 190
Creating OSLC service providers in Netcool/Impact.........................................................................191
Registering OSLC service providers with Netcool/Impact................................................................ 192
Registering OSLC resources...............................................................................................................194
Working with Netcool/Impact policies and OSLC................................................................................... 202
Accessing policy output parameters as OSLC resources..................................................................202
Configuring custom URIs for policy results and variables................................................................ 212
Passing argument values to a policy..................................................................................................214
Configuring hover previews for OSLC resources.....................................................................................214
Hover preview properties for OSLC resources.................................................................................. 216
Example scenario: Using OSLC with Netcool/Impact policies............................................................... 218
OSLC reference topics............................................................................................................................. 219
OSLC urls............................................................................................................................................ 219
OSLC pagination................................................................................................................................. 220
Support for OSLC query syntax.......................................................................................................... 221
RDF functions..................................................................................................................................... 226
vii
Activating MWM in a Netcool/Impact cluster......................................................................................... 271
Configure the MWM_Properties policy.............................................................................................. 271
Configuring MWMActivator service properties..................................................................................272
Logging on to Maintenance Window Management............................................................................273
About MWM maintenance windows.................................................................................................. 273
Index................................................................................................................ 305
viii
About this publication
The Solutions Guide contains end-to-end information about using features in Netcool/Impact.
Intended audience
This publication is for users who are responsible creating Netcool/Impact data models, writing Netcool/
Impact policies and running Netcool/Impact services.
Publications
This section lists publications in the Netcool/Impact library and related documents. The section also
describes how to access Tivoli® publications online and how to order Tivoli publications.
Netcool/Impact library
• Administration Guide
Provides information about installing, running and monitoring the product.
• Policy Reference Guide
Contains complete description and reference information for the Impact Policy Language (IPL).
• DSA Reference Guide
Provides information about data source adaptors (DSAs).
• Operator View Guide
Provides information about creating operator views.
• Solutions Guide
Provides end-to-end information about using features of Netcool/Impact.
Accessibility
Accessibility features help users with a physical disability, such as restricted mobility or limited vision,
to use software products successfully. In this release, the Netcool/Impact console does not meet all the
accessibility requirements.
Obtaining fixes
A product fix might be available to resolve your problem. To determine which fixes are available for your
Tivoli software product, follow these steps:
1. Go to the IBM Software Support Web site at http://www.ibm.com/software/support.
2. Navigate to the Downloads page.
3. Follow the instructions to locate the fix you want to download.
4. If there is no Download heading for your product, supply a search term, error code, or APAR number in
the search field.
For more information about the types of fixes that are available, see the IBM Software Support Handbook
at http://www14.software.ibm.com/webapp/set2/sas/f/handbook/home.html.
Submitting problems
You can submit your problem to IBM Software Support in one of two ways:
Online
Click Submit and track problems on the IBM Software Support site at http://www.ibm.com/software/
support/probsub.html. Type your information into the appropriate problem submission form.
By phone
For the phone number to call in your country, go to the contacts page of the IBM Software Support
Handbook at http://www14.software.ibm.com/webapp/set2/sas/f/handbook/home.html and click the
name of your geographic region.
Typeface conventions
This publication uses the following typeface conventions:
Bold
• Lowercase commands and mixed case commands that are otherwise difficult to distinguish from
surrounding text
• Interface controls (check boxes, push buttons, radio buttons, spin buttons, fields, folders, icons,
list boxes, items inside list boxes, multicolumn lists, containers, menu choices, menu names, tabs,
property sheets), labels (such as Tip:, and Operating system considerations:)
• Keywords and parameters in text
Italic
• Citations examples: titles of publications, diskettes, and CDs
• Words defined in text (example: a nonswitched line is called a point-to-point line)
• Emphasis of words and letters (words as words example: "Use the word that to introduce a
restrictive clause."; letters as letters example: "The LUN address must start with the letter L.")
• New terms in text (except in a definition list): a view is a frame in a workspace that contains data.
• Variables and values you must provide: ... where myname represents....
Monospace
• Examples and code examples
• File names, programming keywords, and other elements that are difficult to distinguish from
surrounding text
• Message text and prompts addressed to the user
• Text that the user must type
• Values for arguments or command options
Solution components
The components of a solution are a data model, services, and policies.
Most solutions use a combination of these three components.
Data models
A data model is a model of the business and metadata used in a Netcool/Impact solution.
A data model consists of data sources, data types, data items, links, and event sources.
Policies
A policy is a set of operations that you want Netcool/Impact to perform.
These operations are specified using one of the following programming languages, JavaScript or a
language called the Netcool/Impact policy language (IPL).
Solution types
You can use Netcool/Impact to implement a wide variety of solution types. Some common types are event
enrichment, X events in Y time, event notification, and event gateways.
Setting up a solution
To set up a Netcool/Impact solution, you create a data model, set up services, and create policies.
For more information, see “Setting up a solution” on page 2.
Setting up services
Different types of solutions require different sets of services, but most solutions require an OMNIbus
event reader.
Solutions that use hibernations also require the hibernating policy activator. Solutions that receive, or
send email require an email reader and the email sender service.
The first category of services is built in services like the event processor and the command-line service
manager. You can have only a single instance of this type of service in Netcool/Impact. The second
category is services like the event reader and policy activator. You can create and configure multiple
instances of this type of service.
Creating policies
You create policies in the GUI Server, that contains a policy editor, a syntax checker, and other tools you
need to write, run, test, and debug your policies.
For more information, see Managing Polices section in IBM Documentation or the Netcool/Impact Policy
Reference Guide.
Running a solution
To start a solution, you start each of the service components.
Start the components in the following order:
• Hibernating policy activator, e-mail sender, and command execution manager.
• Event processor
• Event reader, event listener, e-mail reader, or policy activator
You can configure services to run automatically at startup, or you can start them manually using the GUI
and CLI. By default, services that run automatically at startup run in the proper order. If all other services
are already running, starting services like the event processor that trigger policies effectively starts the
solution.
To stop a solution, you stop any services, like the event processor, that trigger your policies.
Data sources
Data sources are elements of the data model that represent real world sources of data in your
environment.
These sources of data include third-party SQL databases, LDAP directory servers, or other applications
such as messaging systems and network inventory applications.
Data sources contain the information that you need to connect to the external data. You create a data
source for each physical source of data that you want to use in your Netcool/Impact solution. When you
create an SQL database, LDAP, or Mediator data type, you associate it with the data source that you
created. All associated data types are listed under the data source in the Data Sources and Types task
pane.
Procedure
1. Create data sources
Identify the data you want to use and where it is stored. Then, you create one data source for each real
world source of data. For example, if the data is stored in one MySQL database and one LDAP server,
you must create one MySQL and one LDAP data source.
2. Create data types
After you have set up the data sources, you create the required data types. You must create one data
type for each database table (or other data element, depending on the data source) that contains data
you want to use. For example, if the data is stored in two tables in an Oracle database, you must create
one data type for each table.
3. Optional: Create data items
For most data types, the best practice is to create data items using the native tools supplied by the
data source. For example, if your data source is an Oracle database, you can add any required data to
the database using the native Oracle tools. If the data source is the internal data repository, you must
create data items using the GUI.
4. Optional: Create links
After you create data types, you can define linking relationships between them using dynamic links.
You can also define linking relationships between internal data items using static links. That makes it
easier to traverse the data programmatically from within a policy. Use of links is optional.
Procedure
1. Click Data Model to open the Data Model tab.
2. From the Cluster and Project lists, select the cluster and project you want to use.
3. In the Data Model tab, click the New Data Source icon in the toolbar. Select a template for the data
source that you want to create. The tab for the data source opens.
4. Complete the information, and click Save to create the data source.
If you want to specify that only rows where the Location is either New York or New Jersey, you can
use the following expression:
Make sure that you enclose any strings in single quotation marks.
To specify the data item filter, type the filter string in the Filter text box in the Data Filter and Ordering
area of the data type editor.
Name ASC
To retrieve data items in descending order first by the Location field and then in ascending order by
Name, you use the following string:
Procedure
• Get the connection information for the ObjectServer.
This information is the host name or IP address of the ObjectServer host system and the port number.
The default port number for the ObjectServer is 4100.
Services overview
Services perform much of the functionality associated with the Impact Server, including monitoring event
sources, sending and receiving e-mail, and triggering policies.
The most important service is the OMNIbus event reader, which you can use to monitor an ObjectServer
for new, updated or deleted events. The event processor, which processes the events retrieved from the
readers and listeners is also important to the function of the Netcool/Impact.
Internal services control the application's standard processes, and coordinate the performed tasks, for
example:
• Receiving events from the ObjectServer and other external databases
• Executing policies
• Responding to and prioritizing alerts
• Sending and receiving e-mail and instant messages
• Handling errors
Some internal services have defaults, that you can enable rather than configure your own services, or
in addition to creating your own. For some of the basic internal services, it is only necessary to specify
whether to write the service log to a file. For other services, you need to add information such as the port,
host, and startup data.
User defined services are services that you can create for use with a specific policy.
Generally, you set up services once, when you first design your solution. After that, you do not need to
actively manage the services unless you change the solution design.
To set up services, you must first determine what service functionality you need to use in your solution.
Then, you create and configure the required services using the GUI. After you have set up the services,
you can start and stop them, and manage the service logs.
Predefined services
Predefined services are services that are created automatically when you install Netcool/Impact. You can
configure predefined services, but you cannot create new instances of the predefined services and you
cannot delete existing ones.
These services are predefined:
• Event processor
• E-mail sender
• Hibernating policy activator
• Policy logger
• Command-line manager
Event queuing
After it retrieves new or updated events, or has received events through delete notification, the OMNIbus
event reader compares the field data in the events to its set of filters.
If the event matches one or more of its filters, the event reader places the event in the event queue with
a pointer to the corresponding policy. After the events are in the event queue, they can be picked up by
the event processor service. The event processor passes the events to the corresponding policies to the
policy engine for processing.
Mappings
Event mappings allow you to specify which policies you want to be run when certain events are retrieved.
Each mapping consists of a filter that specifies the type of event and a policy name. You must specify at
least one event mapping for the event reader to work.
The syntax for the filter is the same as the WHERE clause in an SQL SELECT statement. This clause
consists of one or more comparisons that must be true in order for the specified policy to be executed. For
more information about the SQL filter syntax, see the Policy Reference Guide.
The following examples show event mapping filters.
Actions
By default, the event broker monitors the ObjectServer for new alerts, but you can also configure it to
monitor for updated alerts and to be notified when an alert is deleted.
In addition, you can configure it to get all the unprocessed alerts from the ObjectServer at startup.
Event locking
Event locking allows a multithreaded event broker to categorize incoming alerts based on the values of
specified alert fields and then to process them within a category one at a time in the order that they were
sent to the ObjectServer.
Event locking locks the order in which the event reader processes alerts within each category.
Remember: When event locking is enabled in the reader, the events read by it are only processed in the
primary server of the cluster.
You use event locking in situations where you want to preserve the order in which incoming alerts are
processed, or in situations where you want to prevent a multithreaded event processor from attempting to
access a single resource from more than one instance of a policy running simultaneously.
You specify the way the event reader categorizes incoming alerts using an expression called a locking
expression. The locking expression consists of one or more alert field names concatenated with a plus
sign (+) as follows:
field[+field...]
Where field is the name of an alert field in the alerts.status table of the ObjectServer.
When an event reader retrieves alerts from the ObjectServer, it evaluates the locking expression for each
incoming alert and categorizes it according to the contents of the alert fields in the expression.
For example, when using the locking expression Node, the event broker categorizes all incoming alerts
based on the value of the Node alert field and then processes them within a category one at a time in the
order that they were sent to the ObjectServer.
In the following example:
Node+AlertKey
The event broker categorizes all incoming alerts based on the concatenated values of the Node and
AlertKey fields. In this example, an alert whose Node value is Node1 and AlertKey value is 123456 is
categorized separately.
Note: Event locking on a certain field or fields affects all event readers that lock on those fields.
Event order
The reader first sorts based on StateChange or Serial value depending on whether Get Updates is used or
not.
Each event has a unique Serial so the Order by field is ignored. In instances where there is more than one
event with the same StateChange, the reader uses the Order By field to sort events after they are sorted in
ascending order of StateChange.
select top 1000 * from alerts.status where Class != 10500 AND Serial >
9000 order by Serial;
NCOMSA goes down and Netcool/Impact connects to the secondary ObjectServer which is NCOMSB.
When connected, Netcool/Impact issues a select statement:
select top 1000 * from alerts.status where Class != 10500 AND Serial >
9000 order by Serial;
NCOMSB has Serial 7000 and any new events that are inserted into NCOMSB would have Serial values
as 7001, 7002, and so on. However, Netcool/Impact does not maintain a Serial value per ObjectServer
instance and continues to look for events that are based on its last internal check pointed value, which
was 9000.
As a result Netcool/Impact does not pick up the new events 7000, 7002, 7003, and so on. It would miss
reading 2000 events from 7000 to 9000.
Once the inserted event gets a Serial value of 9001, Netcool/Impact starts fetching those events.
Procedure
1. Identify the OMNIbusEventReader that is to query the Netcool/OMNIbus failover/failback pair. A new
Netcool/Impact installation provides a reader that is called OMNIbusEventReader but you can create
more instances in the Services UI.
2. Stop the Impact Server. In a Netcool/Impact clustered environment, stop all the servers.
3. Go to your $IMPACT_HOME/etc directory and look for the .props file that corresponds to your
OMNIbusEventReader.
The file is in the following format:
impact.<readernameinlowercase>.objectserver.queryfornewevents=true
impact.<readernameinlowercase>.objectserver.updatefornewevents=true
For example:
impact.omnibuseventreader.objectserver.queryfornewevents=true
impact.omnibuseventreader.objectserver.updatefornewevents=true
Note:
The queryfornewevents property configures the event reader to add "ImpactFlag=0" to the
SQL query. The updatefornewevents property configures the event reader to automatically set
ImpactFlag to 1 after the event is processed.
If you have two or more readers that are processing the same events, you should use different flags for
each reader so that one reader does not set the flag before the other reader(s) get an opportunity to
pick up the event. See . “Additional customization using a field other than ImpactFlag” on page 32.
5. Copy the sql file nci_omnibus_update.sql in the $IMPACT_HOME/install/dbcore/OMNIbus
folder to the machines where the primary and secondary instances of the ObjectServer are running.
This script adds the Integer field ImpactFlag to the alerts.status schema. Run this script against
both the primary and secondary ObjectServer pairs.
• For UNIX based platforms, you can run the SQL script:
For example, if the nci_omnibus_update.sql is placed in the /opt/scripts folder and I want
to run this script against the ObjectServer instance NCOMS, connecting as the root user with no
password, the script can be run as:
• For Windows platforms, you can run the SQL script as:
For example, place the nci_omnibus_update.sql file in the OMNIHOME/bin folder and run this
script against ObjectServer instance NCOMS, connecting as root with no password:
Make sure that -P is the last option. You can ignore providing the password and enter it when
prompted instead. For information aboutNetcool/OMNIbus, see the IBM Tivoli Netcool/OMNIbus
Administration Guide available from the following website:
https://www.ibm.com/support/knowledgecenter/SSSHTQ/landingpage/NetcoolOMNIbus.html.
6. When the script is completed, an Integer field ImpactFlag is added to the alerts.status schema.
Check that the integer field called ImpactFlag is added for each ObjectServer instance primary and
secondary.
Important: The ImpactFlag must be included in the omnibus bidirectional gateway mapping file.
7. Start your Netcool/Impact server and the OMNIbusEventReader.
impact.<reader name>.objectserver.updateforreadevents
impact.<reader name>.objectserver.updateforreadeventsexpr
updateforreadevents
This property instructs the reader to update a field in the event after reading it and before sending it for
processing.
To enable this feature for a reader, add the following property to the event reader .props file and restart
the server:
impact.<reader name>.objectserver.updateforreadevents=true
For example:
impact.omnibuseventreader.objectserver.updateforreadevents=true
updateforreadeventsexpr
This property allows you to specify an alternative field and value that the reader sets after the event is
read.
To change the field that the reader sets and the value that the field gets set to, add the following property
to the reader .props file and restart the server:
impact.<reader name>.objectserver.updateforreadeventsexpr=
impact.omnibuseventreader.objectserver.updateforreadeventsexpr=ImpactReadFlag=1
This instructs the reader to set the ImpactReadFlag field to 1 after reading and before processing.
Note: The processing policy should handle the new field, namely: it should check that
@ImpactReadFlag = 0; is added before the ReturnEvent gets issued:
@ImpactReadFlag = 0;
ReturnEvent(EventContainer);
If any filter level settings are set (regardless of whether this particular event passes the filter) then only
filter level will apply. If no filter level settings are set, only reader level will apply. This is to avoid the
situation where the reader level is set to update ImpactFlag = 1 and a filter set to update ImpactFlag
= 2
So the filter level setting are instead of the reader level settings:
• If only reader level settings are set, then they apply.
• If only filter level settings are set, then they apply.
• If both filter level and reader level settings are set, then the reader level settings are ignored.
To set filter level field/value to update, edit the etc\<server>_<reader name>.props properties file
for the reader. Any changes require a restart of the impact server.
The properties are:
For example:
impact.omnibuseventreader.updateforreadevents.2=true
impact.omnibuseventreader.updateforreadeventsexpr.2=ImpactReadFlag2\=4
impact.omnibuseventreader.updateforreadevents.3=true
impact.omnibuseventreader.updateforreadeventsexpr.3=ImpactReadFlag\=7
Procedure
1. For the policy to handle the ImpactFlag field, check that @ImpactFlag = 1; is added before the
ReturnEvent gets issued.
@ImpactFlag = 1;
ReturnEvent(EventContainer);
Procedure
1. Customize the field Netcool/Impact uses by adding the following additional properties:
impact.<readernameinlowercase>.objectserver.queryforneweventsexpr=<select
expression>
impact.<readernameinlowercase>.objectserver.updateforneweventsexpr=<update
expression>
For example, your reader name is OMNIbusEventReader and you want to use a Integer field called
Impacted for this reader instead of ImpactFlag, the properties become:
impact.omnibuseventreader.objectserver.queryfornewevents=true
impact.omnibuseventreader.objectserver.updatefornewevents=true
impact.omnibuseventreader.objectserver.queryforneweventsexpr=Impacted = 0
impact.omnibuseventreader.objectserver.updateforneweventsexpr=Impacted = 1
2. Make sure that the field Impacted in this example exists in both the primary and backup Netcool/
OMNIbus instances configured for the data source. You can edit the nci_omnibus_update.sql
script and change ImpactFlag to Impacted.
3. Then run the script against Netcool/OMNIbus using steps 5 and “6” on page 29 in Configuring the
OMNIbusEventReader with an ObjectServer pair for New Events or Inserts.
Changing the default JDBC gateway name for the Event Reader service
The default name for the JDBC gateway is gateway. If you want, you can change this name.
Procedure
1. Stop the Impact Server.
2. Add the following properties to the <NCI>_server.props file in the $IMPACT_HOME/etc/
directory:
impact.objectserver.appname=<qualified_name>
impact.objectserver.username=<user>
impact.objectserver.password=<password>
where <qualified_name> is the name that you want to use for the JDBC gateway, <user> is the
name of the user, and <password> is the associated password.
impact.<readername>.objectserver.maxrereadsamestatechange=xxx
For example:
impact.omnibuseventreader.objectserver.maxrereadsamestatechange=500
Note: This only affects ObjectServer readers with Get Updates selected.
Symptoms
If you are not using the Get Updates option in the OMNIbus reader service, Netcool/Impact uses the
Serial field to query Netcool/OMNIbus. Serial is an auto increment field in Netcool/OMNIbus and has a
maximum limit before it rolls over and resets.
Resolution
Complete the following steps to set up Netcool/Impact to handle Serial rollover:
1. Identify the OMNIbusEventReader that queries the Netcool/OMNIbus failover/failback pair. A Netcool/
Impact installation provides a reader called OMNIbusEventReader but you can create more instances
in the Services GUI.
2. Stop the Impact Server. In a Netcool/Impact clustered environment, stop all the servers.
3. Copy the sql file serialrotation.sql in the $IMPACT_HOME/install/dbcore/OMNIbus folder
to the machines where the primary and secondary instances of the ObjectServer are running. This
script creates a table called serialtrack in the alerts database and also creates a trigger called
newSerial to default_triggers.
4. Run this script against both the primary and secondary ObjectServer pairs.
• For UNIX based operating systems:
For example, if the serialrotation.sql is placed in the /opt/scripts folder and I want to run
this script against the ObjectServer instance NCOMS, connecting as the root user with no password,
the script can be run as:
For example, place the serialrotation.sql file in the OMNIHOME/bin folder and run this script
against the ObjectServer instance NCOMS, connecting as a root user with no password:
Further steps
When the script completes, make sure that you enable the newSerial trigger.
1. Start your Netcool/Impactserver and the OMNIbusEventReader. In a clustered setup, start the primary
server first followed by all the secondary servers.
2. Log in to the Netcool/Impact GUI and create an instance of the DefaultPolicyActivator service. In the
Configuration, select the policy to trigger as SerialRollover and provide an interval at which that policy
gets triggered.
3. The SerialRollover policy assumes that the data source used to access Netcool/OMNIbus
is the defaultobjectserver and the event reader that accesses Netcool/OMNIbus is the
OMNIbusEventReader. If you are using a different data source or event reader, you must update the
DataSource_Name and Reader_Name variables in the policy accordingly.
4. Start the instance of the DefaultPolicyActivator service that you created.
Procedure
1. The correlation policy is EventCorrelationUsingXinYExample.ipl and is in the Global project
folder
2. Update the policy to match a specific filter. Each section of the policy has a description. Also, note that
the policy uses @ITMHostname for ITM TEMS because this example is specifically for MS_Offline event
floods. Make sure to update the filter accordingly.
a) Setting the thresholds for the time window and number of existing events.
/*
* number of older events exist in the database before the incoming events
*/
numberOfEventsToCheck=5;
b) Filter
/*The following filter is used to correlate the events. It can be changed as needed
*This specific example is to filter events to handle ITM MS_OFFLine events flood
*/
CorrelationFilter="ITMHostname='" + @ITMHostname + "' AND Summary Like 'MS_Offline'
AND Severity = 5 AND Serial != " + @Serial ;
CorrelationFilter = CorrelationFilter + " AND LastOccurrence <= " + DiffTime ;
/*ORDER BY can be used to rank the events and check which one came in first
*/
CorrelationOrderBy = "ORDER BY LastOccurrence ASC";
} else {
Results
When the Event Reader finds a matching event, it runs the correlation policy. The policy queries the same
ObjectServer by using the same filter (or different, based on the configuration) and adds a threshold
and time window (Y) as well as number of events found. If the number of events that are found in the
threshold is greater than the count required (X), the incoming event is correlated by updating the Severity
and the SupressEscl fields.
Procedure
1. Copy the client package to the system where Oracle is running and extract its contents.
a) Copy the relevant client package from Netcool/Impact into a temporary directory on the system
where Oracle is running.
On UNIX systems, copy $IMPACT_HOME/install/agents/oracleclient-1.0.0.tar.
On Windows, copy $IMPACT_HOME/install/agents/oracleclient-1.0.0.zip .
impact.nameserver.0.host=NCI1
impact.nameserver.0.port=9080
impact.nameserver.0.location=/nameserver/services
impact.nameserver.userid=impactadmin
impact.nameserver.password=impactpass
impact.nameserver.count=1
In this example, the Name Server is located on the NCI1 Impact Server, and is running on the default
port, 9080. The Name Server user and password have default values, impactadmin, and impactpass.
The following example shows a sample of the nameserver.props file that the database client can use
to connect to a cluster that consists of two NameServer instances.
impact.nameserver.0.host=NCI1
impact.nameserver.0.port=9080
impact.nameserver.0.location=/nameserver/services
impact.nameserver.1.host=NCI2
impact.nameserver.1.port=9080
impact.nameserver.1.location=/nameserver/services
impact.nameserver.userid=impactadmin
impact.nameserver.password=impactpass
In this example, the NameServers are located on systems named NCI1, and NCI2 Impact Servers, and
are running on the default port, 9080.
Property Description
username, and password is a valid user name and password for a user whose schema contains the
database resources where the Java stored procedures are run.
Procedure
1. Log in as the oracle user and set the environment variables ORACLE_HOME and ORACLE_SID.
2. Go to the ORACLE_HOME/bin directory.
3. Install the client jar, and property files. The property files must be in the same $ORACLE_HOME/bin
directory as the loadjava utility with no other directory attached to the property files.
a) Use the following command to install the commons-codec-1.3.jar file:
Important: You must follow this order of installation, otherwise loadjava cannot resolve external
references between files, and report errors during installation.
Procedure
1. Log in to sqlplus as the sysdba user: sqlplus "sys as sysdba"
2. Grant the permissions by entering the following commands at an Oracle command line:
SCHEMA
Is the name of the user creating the triggers and procedures.
hostname
Is the name of the host where you are running the Impact Server.
port
Is the HTTP port on the server.
listener_port
Is the port that is used by the database event listener.
3. Grant socket permissions to specific ports, or all ports, for Oracle.
• Use the next two port numbers in the allocation sequence to connect to the database event
listener service. You can adjust the communication port on the Impact Server so that the
$IMPACT_HOME/etc/<servername>_server.props impact.server.rmiport=50000
Grant the permission to connect to this port in your Oracle database, port 50000 in the example,
otherwise the Impact Server starts at a random port. You must grant permissions for a different port
each time the Impact Server is restarted.
• Grant the permission to all ports for the Impact Server by using the command:
exec dbms_java.grant_permission( 'CMDBUSR','SYS:java.net.SocketPermission',
'hostname:*', 'connect,resolve' ), where hostname is the host name or IP address of the
Impact Server.
Table 2. Event mapping settings for database event listener service configuration window
Window element Description
Test events with all filters Click this button, when an event matches more
than one filter, you want to trigger all policies that
match the filtering criteria.
Stop testing after first match Click this button if you want to trigger only the first
matching policy.
You can choose to test events with all filters and
run any matching policies or to stop testing after
the first matching policy.
New Mapping: New Click on the New button to create an event filter.
Analyze Event Mapping Table Click this icon to view any conflicts with filter
mappings that you set for this service.
Starts automatically when server starts Select to automatically start the service when the
server starts. You can also start and stop the
service from the GUI.
sendEvent(java.sql.Array x)
Where each element in array x is a string that contains a name/value pair in the event.
In this example, db_varray_type is a user-defined VARRAY that can be described using the following
statement:
In order for Oracle objects to call this function, you must create a call spec that publishes it to the
database as a stored procedure. The following example shows a call spec that publishes sendEvent()
as a procedure named test_varray_proc:
This call spec and VARRAY type are used in examples elsewhere in this chapter.
When you call the procedure published with this call spec, you pass it an Oracle VARRAY in which each
element is a string that contains a name/value pair in the event. The name and value in the string
are separated using the pipe character (|) or another character as specified when you configured the
database client.
The procedures and triggers created for the event listener should not be created by the sys user.
Creating triggers
You can create triggers for DML events, DDL events, system events, and user events.
end;
/
/* Initialize dept1 */
dept_pkg.dept1 := dept_pkg.emptyDept;
end;
/
end;
/
/* Loop through rows in dept1 and send field data to database client */
/* using call proc defined in previous section of this chapter */
db_varray_type('EVENTSOURCE | SCOTT.DEPT',
'DEPTNO | '||:NEW.DEPTNO, 'LOC | '||:NEW.LOC,
'DNAME | '||:NEW.DNAME, 'IMPACTED | '||:NEW.IMPACTED);
In this example, the VARRAY contains an EVENTSOURCE field and fields that contain values derived
from the inserted row, as contained in the NEW pseudo-record passed to the trigger. The value of the
EVENTSOURCE field in this example is the dept table in the Oracle SCOTT schema.
The following example shows a complete trigger that copies new row data to the temporary table dept1
in package dept_pkg.
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT', 'DEPTNO | '||:NEW.DEPTNO,
'LOC | '||:NEW.LOC, 'DNAME | '||:NEW.DNAME,
'IMPACTED | '||:NEW.IMPACTED);
end;
/
For a complete example that shows how to send an insert event, see “Insert event trigger example” on
page 46.
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT',
'DEPTNO | '||:OLD.DEPTNO, 'LOC | '||:OLD.LOC,
'DNAME | '||:OLD.DNAME, 'IMPACTED | '||:OLD.IMPACTED);
end;
/
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT',
'DEPTNO | '||:OLD.DEPTNO, 'LOC | '||:OLD.LOC,
'DNAME | '||:OLD.DNAME, 'IMPACTED | '||:OLD.IMPACTED);
end;
/
db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
The following example shows a complete trigger that sends an event to Netcool/Impact before Oracle
executes a CREATE command.
DECLARE
my_before_create_varray db_varray_type;
BEGIN
my_before_create_varray :=
db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name,
'USERNAME | '||Sys.login_user,'INSTANCENUM | '||Sys.instance_num,
'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_before_create_varray);
end;
/
db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
' OBJECTNAME | '||Sys.database_name,
' USER_NAME | '||Sys.login_user,
' INSTANCE_NUM | '||Sys.instance_num);
The following example shows a complete trigger that sends an event to Netcool/Impact at Oracle startup.
DECLARE
v_array_inp db_varray_type;
BEGIN
v_array_inp := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
' OBJECTNAME | '||Sys.database_name,
' USER_NAME | '||Sys.login_user, ' INSTANCE_NUM | '||Sys.instance_num);
test_varray_proc(v_array_inp);
end;
/
db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE |'||Sys.database_name, 'LOGINUSER | ' ||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'TRIGGERNAME | USER_LOGIN');
The following example shows a complete trigger that sends an event to Netcool/Impact at when a user
logs in.
DECLARE
my_login_varray db_varray_type;
BEGIN
my_login_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE |'||Sys.database_name, 'LOGINUSER | ' ||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'TRIGGERNAME | USER_LOGIN');
test_varray_proc(my_login_varray);
end;
/
dept1 deptTable;
emptyDept deptTable;
end;
/
dept_pkg.dept1 := dept_pkg.emptyDept;
end;
/
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT', 'DEPTNO | '||:NEW.DEPTNO,
'LOC | '||:NEW.LOC, 'DNAME | '||:NEW.DNAME, 'IMPACTED | '||:NEW.IMPACTED);
end;
/
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
dept1 deptTable;
emptyDept deptTable;
end;
/
dept_pkg.dept1 := dept_pkg.emptyDept;
end;
/
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT', 'DEPTNO | '||:OLD.DEPTNO,
'LOC | '||:OLD.LOC, 'DNAME | '||:OLD.DNAME, 'IMPACTED | '||:OLD.IMPACTED);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
dept1 deptTable;
emptyDept deptTable;
end;
/
dept_pkg.dept1 := dept_pkg.emptyDept;
end;
/
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT', 'DEPTNO | '||:OLD.DEPTNO,
'LOC | '||:OLD.LOC, 'DNAME | '||:OLD.DNAME, 'IMPACTED | '||:OLD.IMPACTED);
end;
/
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
BEGIN
my_before_create_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_before_create_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_after_create_varray db_varray_type;
BEGIN
my_after_create_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_after_create_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_before_alter_varray db_varray_type;
BEGIN
my_before_alter_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_before_alter_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_after_alter_varray db_varray_type;
BEGIN
my_after_alter_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_after_alter_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_before_drop_varray db_varray_type;
BEGIN
my_before_drop_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_before_drop_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_after_drop_varray db_varray_type;
BEGIN
my_after_drop_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'USERNAME | '||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'OBJECTTYPE | '||Sys.dictionary_obj_type,
'OBJECTOWNER | '||Sys.dictionary_obj_owner);
test_varray_proc(my_after_drop_varray);
end;
/
DECLARE
v_array_inp db_varray_type;
BEGIN
v_array_inp := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
' OBJECTNAME | '||Sys.database_name, ' USER_NAME | '||Sys.login_user,
' INSTANCE_NUM | '||Sys.instance_num);
test_varray_proc(v_array_inp);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
v_array_inp db_varray_type;
BEGIN
v_array_inp := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
' OBJECTNAME | '||Sys.database_name, ' USER_NAME | '||Sys.login_user,
' INSTANCE_NUM | '||Sys.instance_num);
test_varray_proc(v_array_inp);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
BEGIN
my_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE | '||Sys.database_name, 'INSTANCENUM | ' ||Sys.instance_num,
'LOGINUSER | '||Sys.login_user, 'ERRORNUM | '||Sys.server_error(1));
test_varray_proc(my_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_login_varray db_varray_type;
BEGIN
my_login_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE |'||Sys.database_name, 'LOGINUSER | ' ||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'TRIGGERNAME | USER_LOGIN');
test_varray_proc(my_login_varray);
end;
/
In this example, test_varray_proc is a call spec that publishes the sendEvent() function exposed
by the database client. The type db_varray_type is a user-defined data type that represents an Oracle
VARRAY. The example uses the Oracle SCOTT sample schema.
DECLARE
my_logoff_varray db_varray_type;
BEGIN
my_logoff_varray := db_varray_type('TRIGGEREVENT | '||Sys.sysevent,
'EVENTSOURCE |'||Sys.database_name, 'LOGINUSER | ' ||Sys.login_user,
'INSTANCENUM | '||Sys.instance_num, 'TRIGGERNAME | USER_LOGOFF');
test_varray_proc(my_logoff_varray);
end;
/
The example prints the field values in the event to the policy log.
Procedure
• Make sure that the database trigger that sends the event populates a special set of connection event
fields.
• Call the ReturnEvent function in the policy that handles the events.
Field Description
USERNAME User name to use when connecting to the Oracle database server.
Field Description
KEYFIELD Key field in the database table, or any other field that uniquely identifies a
table row.
When the database client sends the event to Netcool/Impact, it encrypts the connection information
(including the database user name and password) specified in the event fields. The connection
information is then unencrypted when it is received by Netcool/Impact.
The following example shows a trigger that sends an event to Netcool/Impact when a new row is inserted
into the dept table. In this example, you populate the connection event fields by specifying elements in
the Oracle VARRAY that you pass to the database.
dept_pkg.dept1(dept_pkg.dept1.count + 1) :=
db_varray_type('EVENTSOURCE | SCOTT.DEPT', 'DEPTNO | '||:NEW.DEPTNO,
'LOC | '||:NEW.LOC, 'DNAME | '||:NEW.DNAME, 'IMPACTED | '||:NEW.IMPACTED,
'RETURNEVENT | TRUE', 'USERNAME | ora_user', 'PASSWORD | ora_passwd',
'HOST | ora_host', 'PORT | 4100', 'SID | ora_01', 'KEYFIELD | DEPTNO');
end;
/
ReturnEvent(EventContainer);
The following example shows how to delete an event from the database.
// Set the event field variables required by the database event listener
// in order to connect to Netcool/Impact
ReturnEvent(EventContainer);
To commit the updates to the rows, enter the command set autocommit on in Oracle.
If you are updating or deleting the events from Netcool/Impact, you must modify two triggers,
dept_reset and dept_after_stmt, to trigger only on insert, not on update or delete.
Procedure
1. Click Services to open the Services tab.
2. If required, select a cluster from the Cluster list.
3. Click the Create New Service icon in the toolbar and select OMNIbusEventListener to open the
configuration window.
4. Enter the required information in the configuration window.
5. Click the Save icon in the toolbar to create the service.
6. Start the service to establish a connection to the ObjectServer and subscribe to one or more IDUC
channels to get notifications for inserts, updates, and deletes.
Initializing Service
Connecting to the Data Source: defaultobjectserver
Creating Triggers
You must create triggers before Netcool/Impact can receive accelerated events from Netcool/OMNIbus.
Triggers notify Netcool/Impact of accelerated events. For more information about creating triggers, see
the IBM Tivoli Netcool/OMNIbus Administration Guide available from the following website:
https://www.ibm.com/developerworks/wikis/display/tivolidoccentral/OMNIbus.
This example shows how to create a trigger to immediately notify Netcool/Impact when there is an alert
with a severity of 5 from Node called ImpactNode:
Another example shows how to create a trigger that sends an accelerated event to Netcool/Impact when
an event with Customer internet_banking is deleted:
The following example shows how to create a trigger that immediately notifies Netcool/Impact if a
reinsertion of the event with the Node as New York is received:
The following example shows how to create a signal trigger that notifies you when a gateway connection
is established with the ObjectServer:
Yet another example shows how to create a signal trigger that notifies you when connection gets
disconnected:
@Node = 'Impacted';
@Severity = @Severity + 1;
ReturnEvent(EventContainer);
Another example shows how to delete the event from alerts.status by using the ReturnEvent
function:
@DeleteEvent = TRUE;
ReturnEvent(EventContainer);
Procedure
1. In the OMNIbusEventListener configuration window, in One or more Channels field, add the
channel from which Netcool/Impact processes events.
2. To subscribe to more than one channel, add a comma between each channel name.
3. To change the channel name or to add or remove one or more entries add the changes and restart the
OMNIbusEventListener service to implement the changes.
Results
When Netcool/Impact receives a Fast Track event from a channel that matches one of the configured
channels, the OMNIbusEventListener service log displays the following message:
Received Fast Track Message from channel: <channel_name>
When Netcool/Impact receives a Fast Track event that does not match any configured channels, the
OMNIbusEventListener service log displays the following message:
Fast Track Message from channel:
<channel name> did not match any configured channels.
Restriction: Filtering messages by channel is only supported for Fast Track messages that are sent
by using the iduc evtf command. For signal messages sent by using the iduc sndmsg command,
Knowing that Netcool/Impact is connected with the Spid 2, you can use the Client ID, and configure the
trigger to send the Accelerated Event Notification only to the client with Spid=2 (Impact). An OMNIbus
trigger has the following syntax:
Where:
• destination = spid | iduc_channel
– spid = integer_expression (The literal client connection ID)
– iduc_channel = string_expression (Channel name)
• action_type = INSERT | UPDATE | DELETE
• row = variable (Variable name reference of a row in the automation)
For example, the following trigger would tell OMNIbus to send notifications only to Spid=2, which in this
case is Netcool/Impact:
For more information about OMNIbus triggers and accelerated event notification, see the OMNIbus
Administration Guide available from this website:
https://www.ibm.com/developerworks/wikis/display/tivolidoccentral/OMNIbus
Events overview
An event is a set of data that represents a status or an activity on a network. The structure and content
of an event varies depending on the device, system, or application that generated the event but in most
cases, events are Netcool/OMNIbus alerts.
These events are generated by Netcool probes and monitors, and are stored in the ObjectServer
database. Events are obtained using event readers, event listeners, and email readers services.
Incoming event data is stored using the built-in EventContainer variable. This variable is passed to the
policy engine as part of the context when a policy is executed. When you write a policy, you can access the
fields in the event using the member variables of EventContainer.
Log(EventContainer.Node);
Log(EventContainer.Severity);
Log(EventContainer.Summary);
Log(@Node);
Log(@Severity);
Log(@Summary);
Procedure
1. Assign the journal text to the JournalEntry variable.
JournalEntry is an event state variable used to add new journal entries to an existing event. For
more information, see “Assigning the JournalEntry variable” on page 61.
2. Send the event to the event source using the ReturnEvent function.
Call ReturnEvent and pass the event container as an input parameter, in the following manner:
ReturnEvent(EventContainer);
Example
The following example shows how to add a new journal entry to an incoming event.
Procedure
1. Create an event container using the NewEvent function
To create an event container, you call the NewEvent function and pass the name of the event reader
associated with the event source, in the following manner:
MyEvent = NewEvent("OMNIbusEventReader");
MyEvent.EventReaderName = "OMNIbusEventReader";
MyEvent.EventReaderName = "OMNIbusEventReader";
MyEvent.Node = "192.168.1.1";
MyEvent.Summary = "Node down";
MyEvent.Severity = 5;
MyEvent.AlertKey = MyEvent.Node + ":" + MyEvent.Summary;
4. Send the event to the data source using the ReturnEvent function.
Call the ReturnEvent function, and pass the new event container as an input parameter, in the
following manner:
ReturnEvent(MyEvent);
Example
The following example shows how to create, populate, and send a new event to an event source.
MyEvent.EventReaderName = "OMNIbusEventReader";
MyEvent.Node = "192.168.1.1";
MyEvent.Summary = "Node down";
MyEvent.Severity = 5;
MyEvent.AlertKey = MyEvent.Node + ":" + MyEvent.Summary;
ReturnEvent(MyEvent);
Deleting events
Use this procedure to delete an incoming event from the event source.
Procedure
1. Set the DeleteEvent variable in the event container.
The DeleteEvent variable is an event state variable that you use to specify that an event is to be
deleted when it is sent back to the event source. You must set the value of DeleteEvent to True in
order for an event to be deleted. For example:
@DeleteEvent = True;
2. Send the event to the event source using the ReturnEvent function.
For example:
ReturnEvent(EventContainer);
@DeleteEvent = True;
ReturnEvent(EventContainer);
• JavaScript:
EventContainer.DeleteEvent = true;
ReturnEvent(EventContainer);
Field variables
Field variables are member variables in a data item. There is one field variable for each data item field.
Field variable names are the same as the names in the underlying data item fields. For example, if you
have a data item with two fields named UserID and UserName, it will also have two field variables
named UserID and UserName.
SQL filters
SQL filters are text strings that you use to specify a subset of the data items in an internal or SQL database
data type.
For SQL database and internal data types, the filter is an SQL WHERE clause that provides a set of
comparisons that must be true in order for a data item to be returned. These comparisons are typically
between field names and their corresponding values.
Field
Operator
Value [AND | OR | NOT (Field
Operator
Value) ...]
where Field is the name of a data type field, Operator is a comparative operator, and Value is the field
value.
Attention: Note that for both internal and SQL data types, any string literals in an SQL filter must
be enclosed in single quotation marks. The policy engine interprets double quotation marks before
it processes the SQL filter. Using double quotation marks inside an SQL filter causes parsing errors.
Operators
The type of comparison is specified by one of the standard comparison operators. The SQL filter syntax
supports the following comparative operators:
• >
• <
• =
• <=
• =>
• !=
• LIKE
Restriction: You can use the LIKE operator with regular expressions as supported by the underlying
data source.
The SQL filter syntax supports the AND, OR and NOT boolean operators.
Tip: Multiple comparisons can be used together with the AND, OR, and NOT operators.
Order of operation
You can specify the order in which expressions in the SQL are evaluated using parentheses.
Examples
Here is an example of an SQL filter:
Location = 'NYC'
Location LIKE 'NYC.*'
Facility = 'Wandsworth' AND Facility = 'Putney'
Facility = 'Wall St.' OR Facility = 'Midtown'
NodeID >= 123345
NodeID != 123234
You can use this filter to get all data items where the value of the Location field is New York:
To get all data items where the value of the Location field is Chicago or Los Angeles and the value of
the Level field is 3:
LDAP filters
LDAP filters are filter strings that you use to specify a subset of data items in an LDAP data type.
The underlying LDAP data source processes the LDAP filters. You use LDAP filters when you do the
following tasks:
• Retrieve data items from an LDAP data type using GetByFilter.
• Retrieve a subset of linked LDAP data items using GetByLinks.
• Delete individual data items from an LDAP data type.
• Specify which data items appear when you browse an LDAP data type in the GUI.
Syntax
An LDAP filter consists of one or more boolean expressions, with logical operators prefixed to the
expression list. The boolean expressions use the following format:
Attribute
Operator
Value
where Attribute is the LDAP attribute name and Value is the field value.
The filter syntax supports the =, ~=, <, <=, >, >=, and ! operators, and provides limited substring matching
using the * operator. In addition, the syntax also supports calls to matching extensions defined in the
LDAP data source. White space is not used as a separator between attribute, operator, and value, and
those string values are not specified using quotation marks.
For more information on LDAP filter syntax, see Internet RFC 2254.
Operators
As with SQL filters, LDAP filters provide a set of comparisons that must be true in order for a data item
to be returned. These comparisons are typically between field names and their corresponding values. The
comparison operators supported in LDAP filters are:
• =
• ~=,
• <
• <=
• >
• >=
• !
One difference between LDAP filters and SQL filters is that any Boolean operators used to specify multiple
comparisons must be prefixed to the expression. Another difference is that string literals are not specified
using quotation marks.
(cn=Mahatma Gandhi)
(!(location=NYC*))
(&(facility=Wandsworth)(facility=Putney))
(|(facility=Wall St.)(facility=Midtown)(facility=Jersey City))
(nodeid>=12345)
You can use this example to get all data items where the common name value is Mahatma Gandhi:
(cn=Mahatma Gandhi)
Using this example you get all data items where the value of the location attribute does not begin with
the string NYC:
(!(location=NYC*))
To get all data items where the value of the facility attribute is Wandsworth or Putney:
(|(facility=Wandsworth)(facility=Putney))
Mediator filters
You use Mediator filters with the GetByFilter function to retrieve data items from some Mediator data
types.
The syntax for Mediator filters varies depending on the underlying DSA. For more information about the
Mediator syntax for a particular DSA, see the DSA documentation.
Log(CurrentContext());
DataType = "Node";
Filter = "IPAddress = '" + @Node + "'";
CountOnly = False;
Log(CurrentContext());
Make sure that you understand the filter syntax used in the sample code. When using the value of a
variable inside an SQL filter string, the value must be encapsulated in single quotation marks. This is
because Netcool/Impact processes the filter string in two stages. During the first stage, it evaluates the
variable. During the second stage, it concatenates the filter string and sends it to the data source for
processing.
A shorter version of this example is as follows:
DataType = "User";
Filter = "(cn=Brian Huang)";
CountOnly = False;
Log(CurrentContext());
In the second example, you get all data items from a data type named Node where the value of the
Location field is New York or New Jersey. As above, you print the fields and values in the data items to
the policy log.
DataType = "Node";
Filter = "(|(Location=NewYork)(Location=New Jersey))";
CountOnly = False;
Log(CurrentContext());
DataType = "SWNetworkElement";
Filter = "ne_name = 'DSX1 PNL-01 (ORP)'";
CountOnly = False;
Log(CurrentContext());
MyElements = GetByFilter("SWNetworkElement", \
"ne_name = 'NSX1 PNL-01 (ORP)'", False);
Log(CurrentContext());
Keys
A key is a special field in a data type that uniquely identifies a data item.
You specify key fields when you create a data type. The most common way to use the key field is to use it
to identify a key field in the underlying data source. For more information about data type keys, see “Data
type keys ” on page 17.
Key expressions
The key expression is a value or array of values that key fields in the data item must equal in order to be
returned.
The following key expressions are supported:
Single key expressions
A single key expression is an integer, float, or string that specifies the value that the key field in a data
item must match in order to be retrieved.
Example of returning data from a data type using a single key expression
In this example, you retrieve a data item from a data type called Node where the value of the key field is
ID-00001.
Then, you print the data item fields and values to the policy log using the Log and CurrentContext
functions.
DataType = "Node";
Key = "ID-00001";
MaxNum = 1;
Log(CurrentContext());
Type = "Customer";
Key = {"R12345", "D98776"};
MaxNum = 1;
Links overview
Links are an element of the data model that defines relationships between data items and between data
types.
They can save time during the development of policies because you can define a data relationship once
and then reuse it several times when you need to find data related to other data in a policy. Links are an
optional part of a data model. Dynamic links and static links are supported.
Netcool/Impact provides two categories of links.
Static links
Static links define a relationship between data items in internal data types.
Dynamic links
Dynamic links define a relationship between data types.
DataType = "Node";
Filter = "Hostname = '" + @Node + "'";
CountOnly = False;
Log(CurrentContext());
In the second example, you use a link filter to specify a subset of data items in the target data type
to return. As above, you call GetByFilter and retrieve a data item from the Node data type whose
Hostname value matches the Node field in an incoming event. Then you call GetByLinks to retrieve all
the data items in the Customers data type whose Location is New York that are linked to the Node.
You then print the fields and values in the data items to the policy log before exiting.
DataType = "Node";
Filter = "Hostname = '" + @Node + "'";
CountOnly = False;
DataTypes = {"Customer"};
Filter = "Location = 'New York'";
MaxNum = "10000";
DataItems = MyNodes;
Log(CurrentContext());
Adding data
Use this procedure to add a data item to a data type.
Procedure
1. Create a context using the NewObject function.
The following example shows how to create a context named MyNode.
MyNode = NewObject();
2. Populate the member variables in the context with data that corresponds to the values you want to set
in the new data item.
MyNode.Name = "Achilles";
MyNode.IPAddress = "192.168.1.1";
MyNode.Location = "London";
AddDataItem("Node", MyNode);
MyUser = NewObject();
MyUser.ID = "00001";
MyUSer.Name = "Jennifer Mehta";
MyUser.Location = "New York";
DataType = "User";
AddDataItem(DataType, MyUser);
MyUser=NewObject();
MyUser.ID = "00001";
MyUser.Name = "Jennifer Mehta";
MyUser.Location = "New York";
AddDataItem("User", MyUser);
Updating data
You can update single data items, and multiple data items.
To update single a data item, you must first retrieve the data from the data type using GetByFilter,
GetByKey or GetByLinks. Then you can update the data item fields by changing the values of the
corresponding field variables.
When you change the value of the field variables, the values in the underlying data source are updated in
real time. This means that every time you set a new field value, Netcool/Impact requests an update at the
data source level.
To update multiple data items in a data type, you call the BatchUpdate function and pass the name
of the data type, a filter string that specifies which data items to update, and an update expression.
Netcool/Impact updates all the matching data items with the specified values.
The update expression uses the same syntax as the SET clause in the UPDATE statement supported by
the underlying data source. This clause consists of a comma-separated list of the fields and values to be
updated.
Updating multiple data items is only supported for SQL database data types.
DataType = "Node";
Filter = "Location = '" + @Node + "'";
CountOnly = False;
MyNode.Name = "Host_01";
MyNode.ID = "00001";
Log(CurrentContext());
DataType = "Customer";
Filter = "Location = 'New York'";
UpdateExpression = "Location = 'London', Node = 'Host_02'";
DataType = "Customer";
Filter = "Location = 'London'";
CountOnly = False;
Log(CurrentContext());
DataType = "User";
Filter = "Name = 'John Rodriguez'";
CountOnly = False;
DeleteDataItem(MyUser);
DataType = "Node";
Filter = "Location = 'New York'";
DataItems = NULL;
DataType = "Customer";
Filter = "Location = 'New York'";
CountOnly = False
DataType = "Node";
Filter = "Location = 'New York'";
MyFunction = "COUNT(Location)";
Log(NumItems);
High-level description
In this Slack project, when an event occurs, the Slack event reader receives the event from ObjectServer
and triggers the Slack policies to run, The policies create the Slack channel, invite users to the channel,
post events to channel, and send the user response buttons to the channel.
Users can choose to respond to an event by clicking one of the response buttons, the event will be
reloaded. Users can also click on the event to view its details. This launches the Event Viewer for the
event.
The Slack project described in this section is an example. You can use the code in the policies to further
develop your own Slack customization.
Note: The ObjectServer and probe configurations described in this section are optional. For an example of
the sending a simple message to Slack, see the following Slack API page: Sending messages.
Configure the RESTful API Data Source to send event data to Slack
This step is required.
1. On the Impact GUI, select the project Slack.
2. Open the Data Model tab and the Slack datasource.
3. Change the Authorization header to your own Slack Bot User OAuth token.
You can obtain the Slack Bot User OAuth Token from https://api.slack.com/apps/ by navigating
to Slack App workspace -> OAuth & Permissions -> OAuth Tokens for Your Workspace -> Bot User
OAuth Token.
4. Create an ObjectServer datasource or use an existing one.
Note: The default Event Mapping table has the restriction filter "Slack=1". The Slack event reader
name is specified by slackeventreader in the NCI_slackeventreader.props file.
b. Import the certificate to the Impact truststore using the following command:
c. For information about Impact on OCP, see Enabling SSL communications from Netcool/Impact on
Red Hat OpenShift.
You can modify this in the getEventDetails function in NCI_Slack_Utils.js during the creation
of the channel.
2. Customize the events sent to Slack
The default event sent to Slack is the affected event Serial on the Dashboard Event Viewer.
You can modify this in the postEventToChannel function in NCI_Slack_Utils.js.
The color and the text of the event sent to Slack is handled in the translateSeverity function in
NCI_Slack_Utils.js, and can be customized. More event data can also be added by modifying this
function.
3. Customize the channel event user buttons.
The possible default user response buttons are:
• Acknowledge
• Resolve
• Escalate
• Reload event
You can modify this in the postEventToChannel function in NCI_Slack_Utils.js. Or you can add
more response buttons.
Note: You will also have to change the Netcool/OMNIbus message_bus_slack.rules file
accordingly.
Tutorial overview
This tutorial uses a sample environment that provides the background for understanding various event
enrichment concepts and tasks.
The environment is a network operations center for a large enterprise where the company has installed
and configured Netcool/OMNIbus and is currently using it to manage devices on its network. The sample
environment is a scaled down representation of what you might actually find in a real world operations
center. It contains only the network elements and business data needed for this tutorial.
This tutorial leads you through the following steps:
• Understanding the Netcool/Impact installation
• Understanding the business data
• Analyzing the workflow in the environment
• Creating a project
• Setting up a data model
• Setting up services
• Writing an event enrichment policy
• Configuring the OMNIbus event reader to run the policy
• Running the complete solution
Procedure
1. Open the GUI in a web browser and log in.
2. Click one of the links, for example Data Model, to view the project and cluster selection lists on the
Data Model tab.
3. Select a cluster from the Cluster list. From the Project list, select Global.
4. Click the New Project icon on the toolbar to open the New Project window.
5. Use the New Project window to configure your new project.
6. In the Project Name field, type NCI_TUT_01.
7. Click OK then click Close.
Procedure
1. Click Data Model to open the Data Model tab.
2. Select a cluster from the Cluster list. From the Project list, select NCI_TUT_01.
3. Click the New Data Source icon and select ObjectServer from the list.
The New Data Source opens.
4. Type NCOMS in the Data Source Name field.
5. Type the name and password of an ObjectServer user in the Username and Password fields.
6. Type NCO_HOST_01 in the Primary Host Name field.
7. Type 4100 in the Primary Port field.
8. Click Test Connection to test the ObjectServer connection.
9. Type NCO_HOST_02 in the Backup Host Name field.
10. Type 4100 in the Backup Port field.
11. Click Test Connection to test the ObjectServer connection.
12. Click OK.
Procedure
1. Click Data Model to open the Data Model tab.
2. Click the New Data Source icon and select Oracle from the list.
The New Data Source window opens.
3. Type ORACLE_01 in the Data Source Name field.
4. Type an Oracle user name and password in the Username and Password fields.
5. Type ORA_HOST_01 in the Primary Host Name field.
6. Type 1521 in the Primary Port field.
7. Type ORA_01 in the SID field.
8. Click Test Connection to test the ObjectServer connection.
9. Click OK.
Results
Repeat these steps to create another data source that corresponds to the ORA_02 database. Name this
data source ORACLE_02.
Procedure
1. Click Data Model to open the Data Model tab.
2. Select ORACLE_01 from the data sources list.
3. Click the New Data Type icon.
Results
Repeat these steps to create another data type that corresponds to the Department table in the ORA_02
database. Name this data type Department.
Location = '%Facility%'
This filter tells Netcool/Impact that Device data items are linked to Department data items if the value
of the Location field in the Department is equal to the value of the Facility field in the Device.
To create the dynamic link:
Procedure
1. Double click Data Model to open the Data Model tab.
2. Click the name of the Device data type.
A new Data Type Editor tab opens in the Main Work panel of the GUI. This editor displays configuration
information for the Device data type.
3. Select the Dynamic Links tab in the editor.
The Links From This Data Type area opens in the editor.
4. Click the New Link By Filter button to open the Link By Filter window.
5. Select Department from the Target Data Type list.
Setting up services
The next step in this tutorial is to set up the OMNIbus event reader required by the solution.
Procedure
1. Click Services to open the Services tab.
2. Click the Create New Service icon and select OMNIbusEvent Reader from the list.
3. Type TUT_READER_01 in the Service Name field.
4. Select NCOMS from the Data Sourcelist.
5. Type 3000 in the Polling Interval field.
6. Select the Startup option. This option specifies whether the service starts automatically when you run
Netcool/Impact.
7. Click Save.
DataType = "Device";
Filter = "Hostname = '" + @Node + "'";
CountOnly = False;
Here, GetByFilter is retrieving data items from the Device data type where the value of the Hostname
field is equal to the value of the Node field in the incoming alert. The data items are stored in an array
named MyDevices.
Although GetByFilter is able to return more than one data item in the array, you only expect the array
to contain one data item in this situation, as each device in the database has a unique Hostname. The first
element of the MyDevices array is assigned to the MyDevice variable so that MyDevice can be used as
shorthand later in the policy.
Because you want to retrieve only one data item from the data type, the policy also prints error messages
to the policy log if GetByFilter retrieves less than or more than one.
DataTypes = {"Department"};
Filter = NULL;
Here, GetByLinks retrieves up to 10,000 Department data items that are linked to data items in the
MyDevices array. Since you are certain that the business has less than 10,000 departments, you can use
a large value such as this one to make sure that all Department data items are returned.
The returned data items are stored in the MyDepts array. Because you want at least one data item from
the data type, the policy also prints an error message to the policy log if GetByLinks does not return any.
Count = Length(MyDepts);
Index = Count - 1;
MyDept = MyDepts[Index];
Count = Count - 1;
Here, you use a While loop to iterate through the elements in the MyDepts array. MyDepts is the array of
Department data items that were returned previously in the policy by a call the GetByLinks.
Before the While loop begins, you set the value of the Count variable to the number of elements in the
MyDepts array. Each time the loop runs, it tests the value of Count. If Count is greater than zero, the
statements inside the loop are executed. If Count is less than or equal to zero, the statements are not
executed. Because Count is decremented by one each time the loop is performed, the While loop runs
once for each data item in MyDepts.
A variable named Index is used to refer the current element in the array. The value of Index is the value
of Count minus one, as Netcool/Impact arrays are zero-based structures whose first element is counted
as zero instead of one.
Inside the loop, the policy uses an If statement to test the name of the current Department in the
array against the name of the two mission-critical business departments. If the name of the current
Department matches the mission-critical departments, the policy sets the value of the Severity field in
the alert to 5, which signifies a critical severity.
DataType = "Device";
Filter = "Hostname = '" + @Node + "'";
CountOnly = False;
DataTypes = {"Department"};
Filter = NULL;
MaxNum = 10000;
Count = Length(MyDepts);
Index = Count - 1;
MyDept = MyDepts[Index];
Count = Count - 1;
Expected Result
When you have completed this scenario, you will have a freeform custom page displaying data in TBSM,
gathered from an Impact policy.
Overview
Use the PasstoTBSM function to send event information from Netcool/Impact to TBSM.
Netcool/Impact uses the function PasstoTBSM to send event information to TBSM. In an Impact policy,
you can add the PassToTBSM function to the policy. When you activate the policy using a Netcool/Impact
service, the event information is sent to TBSM.
In TBSM, you can manually configure an Incoming status rule to look for events coming from Netcool/
Impact. The Data Feed list menu shows the Netcool/Impact service used to run the policy containing
the PasstoTBSM function. To show the fields available for the selected Netcool/Impact service, you must
manually customize the field names in Customize Fields window to match the fields in the policy.
You can also use the PasstoTBSM feature to transfer event information from a remote Netcool/Impact
cluster to TBSM. To do this some additional configuration is required.
Configuration
You can use the PassToTBSM function on both local and remote installations. The syntax for
PassToTBSM is the same as it is for a policy running on a TBSM server. For a remote installation the
following tasks must be completed:
• The TBSM server must share a clustered name server with the remote Impact Server to view the
Netcool/Impact services in the Data Feed list menu in the Edit Incoming status rule window.
• In TBSM an administration user configures impact.sla.remoteimpactcluster=<cluster name
of remote impact server> in etc/TBSM_sla.props on the TBSM server.
• In Netcool/Impact, an administrator user exports the project, For ImpactMigration from TBSM and
imports it into the remote version of Netcool/Impact. Netcool/Impact needs the For ImpactMigration
project to access the TBSM data sources, and data types.
To call the PassToTBSM function from a remote Impact Server, the remote Netcool/Impactcluster needs
the data type ImpactEvents. The ImpactEvents data type points to the ImpactEvents table in the DB2
database that TBSM uses. This data type uses a data source called TBSMDatabase. The TBSMDatabase
data source and the ImpactEvents data type belong to the project called ForImpactMigration in the
TBSM server.
You can export this project from the TBSM server and import it into the remote Impact Server to provide
the Impact Server with the data sources and data types required from TBSM.
Procedure
1. In the TBSM server instance, run the nci export command.
<INSTALL_DIR>/tbsm/bin/nci_export TBSM --project ForMigration <exported dir>
2. Copy the exported directory to the remote Impact server or to a location where the Impact server can
access the directory.
3. In the Impact server instance, run the nci import command.
<INSTALL_DIR>/impact/bin/nci_import NCI <exported dir> to import the
ForImpactMigration into the remote Impact server.
Creating a policy
A policy example to use for PassToTBSM using the Web Services wizard to create the policy
Procedure
1. In the Policies tab, select the arrow next to the New Policy icon. Select Use Wizard > Web Services
to open the Web Service Invoke-Introduction window.
2. In the Web Service Invoke-Introduction window, type in the policy name in the Policy Name field,
for example Weather and click Next to continue.
3. In the Web Service Invoke-WSDL file and client stub window, in the URL or Path to WSDL field,
enter the URL or a path for the target WSDL file.
For example http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl.
In instances where the GUI server is installed separately from the Impact Server, the file path for the
WSDL file refers to the Impact Server file system, not the GUI server file system. If you enter a URL
for the WSDL file, that URL must be accessible to the Impact Server host and the GUI server host.
4. In the Client Stub area, select Provide a package name for the new client stub.
5. Enter a name for the package, for example getWeatherInfoPkg.
Click Next.
//Specify parameters
GetCityWeatherByZIPDocument=WSNewObject
("com.cdyne.ws.weatherws.GetCityWeatherByZIPDocument");
_GetCityWeatherByZIP=WSNewSubObject
(GetCityWeatherByZIPDocument,"GetCityWeatherByZIP");
_ZIP = '27513';
_GetCityWeatherByZIP['ZIP'] = _ZIP;
WSParams = {GetCityWeatherByZIPDocument};
ec = NewEvent("WeatherActivator");
// Using a Policy Activator called WeatherActivator
ec.city=city;
ec.temperature=temperature;
ec.humidity=humidity;
log(" City : " + ec.city + " Temp : " + ec.temperature + " Humid :
" + ec.humidity);
PassToTBSM(ec);
Procedure
1. In the navigation tree, expand System Configuration > Event Automation click Services to open the
Services tab.
2. In the Services tab, click the Create New Service icon.
3. From the menu, select a template for the service that you want to create. In this instance, select Policy
Activator.
4. Add the Service Name for example WeatherActivator, the Activation Interval in seconds, for
example 300 and select the policy Weather you created earlier policy from the Policy list menu.
5. Startup: Automatically when server starts Select the checkbox to automatically start the service
when the server starts. You can also start and stop the service from the GUI.
6. Service log: Write to file Select the checkbox to write log information to a file.
7. Click the Save Service icon.
8. Start the service.
Procedure
1. From the Service Navigation pull-down menu, select Templates.
2. Click Create New Template button.
The Edit Template tab opens in the Service Editor.
3. Enter CityWeather in the Template Name field.
4. Enter Weather data by city in the Description field.
5. In the Rules tab after Children, click Create Incoming Status rule button.
6. Select the Based on a Numeric Value radio button and click the OK button.
The Edit Incoming status rule window opens.
7. Type CityTemperature in the Rule Name field.
Marginal 80
Bad 95
Select the Store data for this rule for TWA checkbox.
14. Click OK.
The CityTemperature rule is listed in the Rules tab.
15. You can repeat the same steps to create a CityHumidity incoming status rule to collect humidity data
from WeatherActivator data feed. Select humidity as the output value and choose values between 0
and 100 for status thresholds.
16. To save the rule, click the Save button in the Edit Template tool bar.
Procedure
1. From the Service Navigation pull-down menu, select Templates.
2. If it is not already open, click the Edit Template 'CityWeather' tab.
3. Click the Incoming Status Rule button to open the Edit Incoming Status Rule Type window.
Marginal 60
Bad 85
Select the Store data for this rule for TWA checkbox.
12. Click the OK button.
13. Click the Save button in Edit Template 'CityWeather' tab.
Note: The rule will not be saved to the TBSM database until you click the Save button.
The CityHumidity rule displays in the Rules tab.
What to do next
Next: Create the service by hand.
In this topic, you create a service for city weather.
Procedure
1. From the Service Navigation pull down menu, select Services.
2. Click the Create New Service button.
The Edit Service tab opens in the Service Editor.
3. In the Service Name field type Cary.
4. In the Templates tab, click the template CityWeather in the Available Templates list and click the
>> button.
The CityWeather template moves to the Selected Templates list.
5. Click the Save button in the Edit Service tab toolbar.
6. The Service Navigation portlet displays the new service in the Services tree.
7. In order to have a custom service tree with just the cities containing weather information, create
another service (let's say, Weather) and make Cary a dependent of it.
8. Create a new tree template CityWeather, adding the Temperature and Humidity columns for the
CityWeather template. Associate the new columns to @CityTemperature and @CityHumidity,
respectively.
For information on creating custom trees, see the Service Configuration Guide > Custom service trees.
Results
Next: Customize a Service Tree portlet
When you have created the service, you can customize a Service Tree portlet to only show the City
weather information.
Procedure
1. Click Settings –> Portlets in the navigation pane. A list of all navigation nodes in the console are
displayed, grouped the same way as they are in the console navigation. The page includes all the
portlets you can choose to customize.
2. Click New. The welcome page of the Create Widget wizard opens. Click Next. The next page is
launched with the title Select a Base Widget.
3. Select the Services portlet. Click Next.
4. On the General page, enter Weather by City in the Name field.
5. Scroll through the thumbnail icon choices for the portlet, and choose according to the figure below.
6. Choose the Description Image for the new portlet as shown in the figure below:
7. Select TBSM and click the Add > button to add the new portlet to the TBSM catalog.
8. Click Next.
The Security page is launched.
9. On the Security page, select User from the Selected Roles list.
10. Click Add to view a list of roles that can access this page.
11. Select these roles from the list of Available Roles:
• tbsmReadOnlyUser
• tbsmAdminUser
•
12. Select User from the Selected Roles drop down list for user access levels. Click Add.
13. From the list of Available Roles, select tbsmAdminUser, select Privileged User from the Selected
Roles drop down list for user access levels.
14. Click Add.
15. Click Next
The Customize section opens.
16. On the General page, enter Weather by City for the portlet title.
17. Click Next.
The Context page opens. Select Weather as starting instance.
18. Click Next.
The View page opens.
19. In the Tree Template drop-down list, select CityWeather. Keep the defaults for the other fields.
20. Click Next. The Summary page displays.
21. Click Finish.
22. Verify in Settings –> Portlets that the new portlet is listed.
Procedure
1. Click Settings –> Pages in the navigation pane. A list of all navigation nodes in the console are
displayed, grouped the same way as they are in the console navigation.
2. Click New Page. A new page is launched with the title Page Settings.
3. Enter Weather Service in the Page name field.
4. In the Page location field, click Location to browse for the location you want your page. console/
Availability/. This value page specifies that the page will be listed under Availability in the
console task list. Keep the defaults for the other fields.
5. In the Page location field, click Location to browse for where the new page will be listed in the
console task list. Drag the new page into the Availability folder.
This page is for read-only users who will not need to edit services. As a result, you add the page to the
Availability group. The Location field is updated with console/Availability/. Keep the defaults
for the other fields.
6. Click OK.
7. Select Freeform option under Page Layout.
8. Expand Optional setting to add roles access to this page.
9. Select User from the Selected Roles list.
10. Click Add to view a list of roles that can access this page.
11. Select these roles from the list of Available Roles:
• tbsmReadOnlyUser
• tbsmAdminUser
•
12. Click Add .
13. For tbsmReadOnlyUser, select User from the Access Level drop-down list.
14. For tbsmAdminUser, select Privileged User from the Selected Roles list.
15. Click OK. The Portlet palette displays, which is used to select portlet content.
16. Select the All folder.
17. Use the arrows at the bottom of the Portlet palette to find and select the Weather by City portlet.
18. Drag the City Weather Tree portlet into the empty space below the Portlet palette. --> Weather by
City
19. Drag a Time Window Analyzer and place it under the Weather by City.
20. In the Time Window Analyzer, click Add Service.
21. Search for Cary, and click on it.
Prerequisites
Check that the correct components are installed.
You must configure the user authorization.
Create the data source and data types or the policy that you want to use to provide data to the UI data
provider.
Component overview
A typical distributed deployment can consist of two or more instances of the Impact Server installed on
separate systems and configured as part of a server cluster, and an instance of the GUI Server installed
on a system that is configured to allow users access the GUI though a web browser. Server clustering
provides failover and load-balancing functionality for the Impact Server instances.
The custom dashboard server uses the widgets that are created in Jazz for Service Management to
connect to the GUI Server. The custom dashboard uses the Registry Services component that is provided
by Jazz for Service Management to connect to a DB2 database. For more information about the Registry
Services component, see http://pic.dhe.ibm.com/infocenter/tivihelp/v3r1/topic/com.ibm.psc.doc_1.1.0/
psc_ic-homepage.html.
Procedure
You must assign one of the following roles to users to enable access to the UI data provider:
• iscadmins
• impactFullAccessUser
• impactUIDataProviderUser
For more information about this role, see the information about the impactUIDataProviderUser role in
the working with roles section of the Administration Guide.
If the SQL data type has a sort order applied to it by the Order By field, this sort order will be appended
to all queries from the UI data provider and connected widgets. If the connected widget (such as a table
or list) applies its own sort order, then both sort orders will be used when retrieving table rows from the
database.
If you want the widget's sorting order to always override the data type's sort order, you can use the
following procedure:
1. Open the .type file for the SQL data type:
<IMPACT_HOME>/etc/<SERVER_NAME>_<DATA_TYPE>.type
<DATA_TYPE>.SQL.APPENDSORTORDER=false
Procedure
1. Open a page in the console or create a new one.
See “Creating a page in the console” on page 105.
2. Select a widget. To select a widget, click All and drag the widget into the content area.
General steps for integrating the UI data provider and the console
You can use a variation of the general steps that are listed here to visualize data from the Netcool/Impact
UI data provider in the console.
The exact steps differ depending on whether you use a data type or policy to provide the data. However, in
general, to integrate the UI data provider and the console, you must complete the following activities:
1. Create the remote connection.
If you want to connect to the local UI data provider by using the UI data provider data source with
an SSL enabled connection, the signed certificate must be exchanged between the GUI Server and
Impact Server. For more information see Configuring SSL with scripts in the Security section of the
documentation.
2. Create the information provider.
If you want to visualize data directly from a DB2 table or other data source, you must set up the data
model in Netcool/Impact.
If you want to visualize data directly from a policy in Netcool/Impact, you must create the policy. For
example, if you want to use a policy to mashup data from two different sources, you must create a
policy in Netcool/Impact that summarizes the data.
3. Create a page and widget in the console.
Procedure
1. Open the console.
2. To open the Connections window, click Settings > Connections. The Connections window lists all the
available data providers.
3. To create a new remote provider to represent the Netcool/Impact UI data provider, click the Create
new remote provider icon and complete the following settings:
a. Select the protocol from the list. For example, HTTPS.
b. Enter the host name. For example, the IP address of the GUI Server.
c. Enter the port number. For example, for HTTP-SSL the value is 16311.
d. Enter the user name and password that you used when you installed the Impact Server.
e. Select the data provider that you created. To view all the available data providers, click Search.
After you select the data provider, the Name and Provider ID fields are automatically populated.
If you use multiple servers in a clustered environment, a connection is displayed for each server.
For example, if you use Netcool/Impact in a cluster with TBSM, a connection is displayed for both
members of the cluster.
4. To create the remote provider connection, click Ok.
Procedure
1. Create a data source.
2. Create a data type.
Results
The changes are only visible after the refresh interval. The refresh rate is 5 minutes by default. For more
information about how to change this setting, see “UI data provider customization” on page 166.
Procedure
1. Open the console.
2. To create a page, click the Console Settings icon at the bottom left side of the screen. Choose Pages >
New Page.
Results
The page is created. You can now create a widget to visualize the data.
Procedure
1. Open the page that you want to use for this widget in the console.
2. Select a widget. To select a widget, click All and drag the widget into the content area.
For example, click All, select the table widget, and drag the widget into the content area.
3. Configure the widget data. To configure the widget data, click it in the content area and click the Down
arrow icon > Edit. The Select a dataset window is displayed.
4. Select the data set that you want to use to provide the data. To search for the data source, data type,
or policy that provides the data, enter the data type name and click the Search button. If you use
a data type from Netcool/Impact to provide data for the widget, you can search for either the data
source or data type name. If you use a policy from Netcool/Impact, you can search for the policy name
or the output parameter name.
If you configured any specific policy-related actions on a policy to be used with a UI data provider
when you create the widget and right-click an action in the widget the policy-related actions are
displayed.
The data type is only displayed after the defined refresh interval. The default is 5 minutes. If you use a
data type that you just created, you must wait 5 minutes before the data type displays.
5. If you want to use the line or pie chart widget, you must change the number of items per page form All
to a number. To do so, click Settings. In the Items per page list list, change the number of items per
page from All to a number.
6. To save the new widget, click OK.
Results
You can now use the new widget to visualize the data from the specified data type in the console.
Procedure
1. Click the Polices tab. To open the Policy Settings Editor in the policy editor toolbar, click the
Configure Policy Settings icon. Create a JavaScript or an IPL policy.
2. To create a policy output parameter, click New Output Parameter:New. To create a policy input
parameter, click New Input Parameter:New.
Mandatory fields are denoted by an asterisk (*). You must enter a unique name in the Name field.
3. Define the custom schemas for the output parameters if required.
If you are using the DirectSQL policy function with OSLC, you must define the custom schema for it.
You need to create an output parameter for this policy to create a UI Data Provider policy-related
action.
If you are using DirectSQL, Impact Object, or Array of Impact Object with the UI data provider or the
chart widget, you must define the custom schema for these values.
For more information, see “Creating custom schema values for output parameters” on page 110
4. Click New to create a UI Data Provider policy-related action.
You can use this option to enable a policy action on a widget in the console (Dashboard the Dashboard
Application Services Hub) in Jazz for Service Management. For more information, see “Creating a
widget on a page in the console” on page 106.
a) In the Name field, add a name for the action.
The name that you add displays in the widget in the console when you right-click on an action in the
specified widget.
b) In the Policy Name menu, select the policy that you want the action to relate to.
c) In the Output Parameter menu, select the output parameter that will be associated with this
action, if you select the All output parameters option, the action becomes available for all output
parameters for the selected policy.
Example
This example demonstrates how to create output parameters for a policy. First, you define a simple policy,
like:
first_name = “Mark”;
zip_code = 12345;
Log(“Hello “ + first_name + “ living at “ + zip_code);
Next, define the output parameters for this policy. In this case, there are two output parameters. You
enter the following information:
Procedure
1. To open the policy user parameter editor, click the Configure Policy Settings icon in the policy editor
toolbar. You can create policy input and output parameters. Click New to open the Create a New
Policy Output Parameter window.
2. Select Impact Object from the Format list. The Schema Definition form control appears on the form.
3. Beside the Schema Definition form control, click the Open Schema Definition Editor and add a field.
For example, enter the policy object name in the Policy Variable Name field.
Example
The following example demonstrates how to make an Impact object variable available to the UI data
provider. First, you create the following policy, called Test_Policy2:
MyObject = NewObject();
MyObject.fname = 'Sam';
MyObject.age = 25;
MyObject.bmi = 24.5;
Procedure
1. To open the policy settings editor, click the Configure Policy Settings icon in the policy editor toolbar.
You can create policy input and output parameters for the policy. To open the Create a New Policy
Output Parameter window, click New.
2. Select data type as the format.
3. Enter the name of the data item to which the output of the GetByFilter function is assigned in the
Policy Variable Name field.
4. Enter the name of the data source in the Data Source Name field.
5. Enter the name of the data type in the Data Type Name field.
Example
This example demonstrates how to make the output from the GetByFilter function available to the
Netcool/Impact UI data provider.
You created a data type that is called ALERTS that belongs to the defaultobjectserver data source. This
data type belongs to Netcool/OMNIbus and it points to alerts.status. The key field is Identifier.
The following four rows of data are associated with the key field:
• Event1
• Event2
• Event3
• Event4
Create the following policy, called Test_Policy3:
Select the output parameter as the data set for the widget that you are using to visualize the data.
1. Open the console and open a page.
2. Drag a widget into the content area.
3. To configure the widget data, click it. Click the down arrow icon and click Edit. The Select a dataset
window is displayed.
4. Select PolicyData1 as the data type that belongs to the defaultobjectserver data source.
5. To ensure that the policy runs when the widget is displayed, select the executePolicy check box. Click
Ok.
Procedure
1. To open the policy user parameter editor, click the Configure Policy Settings icon in the policy editor
toolbar. You can create policy input and output parameters. To open the Create a New Policy Output
Parameter window, click New.
2. Select DirectSQL / UI Provider Datatype as the format.
3. Enter a name for the output parameter.
4. Enter the name of the data item to which the output of the DirectSQL function is assigned in the
Policy Variable Name field.
5. To define the DirectSQL format values, click the Open the schema definition editor editor icon. For
detailed information about how to create custom schema values, see “Creating custom schema values
for output parameters” on page 208
O1.city="NY"
O1.ZIP=07002
You define the following custom schemas values for this policy:
If you use the DirectSQL policy function with the UI data provider or OSLC, you must define a custom
schema value for each DirectSQL value that you use.
If you want to use the chart widget to visualize data from an Impact object or an array of Impact objects
with the UI data provider and the console, you define custom schema values for the fields that are
contained in the objects. The custom schemas help to create descriptors for columns in the chart during
initialization. However, the custom schemas are not technically required. If you do not define values for
either of these formats, the system later rediscovers each Impact object when it creates additional fields
such as the key field. UIObjectId, or the field for the tree widget, UITreeNodeId. You do not need to
define these values for OSLC.
Procedure
1. In the Policy Settings Editor, select DirectSQL, Impact Object, or Array of Impact Object in the
Format field.
2. The system shows the Open the Schema Definition Editor icon beside the Schema Definition
field. To open the editor, click the icon.
3. You can edit an existing entry or you can create a new one. To define a new entry, click New. Enter a
name and select an appropriate format.
To edit an existing entry, click the Edit icon beside the entry that you want to edit
4. To mark an entry as a key field, select the check box in the Key Field column. You do not have to define
the key field for Impact objects or an array of Impact objects. The system uses the UIObjectId as the
key field instead.
5. To delete an entry, select the entry and click Delete.
Table 16. Output parameter for a policy that contains the Array of Impact Objects array
Field Instructions
Name Enter a name for the output parameter.
Policy Variable Name Enter a name that is identical to the name of the
array of Netcool/Impact objects in the policy that
you want to reference.
Format Select Array of Impact Objects.
2. After you create the output parameter, you define the custom schema values for the array of Impact
objects. For more information, see “Creating custom schema values for output parameters” on page
208.
3. To display all the fields and values that are associated with the array, use the following URL:
https://<hostname>:<port>/ibm/tivoli/rest/providers/
Impact_NCICLUSTER /datasources/<datasourceid>/datasets/
<outputparametername>/items?properties=all
where <outputparametername> is the name of the parameter that is defined in the previous step.
Example
For example, consider the following Netcool/Impact objects:
MyObject1=NewObject();
MyObject1.firstname="first_name";
MyObject1.lastname="last_name";
MyObject2=NewObject();
MyObject2.city="mycity";
MyObject2.state="mystate";
MyArrayOfObjects={MyObject1,MyObject2};
MyArrayOfObjects=[MyObject1,MyObject2];
To map MyArrayOfObjects to the output parameters, create the output parameter for the array of
objects as follows:
To map the values that are contained in the array, create the custom schema values as follows:
Use the following URL to view the fields and values for MyArrayofObjects:
https://<hostname>:<port>/ibm/tivoli/rest/providers/
Impact_NCICLUSTER /datasources/<datasourceid>/datasets/
MyArrayObj1/items?properties=all
Procedure
• To filter data provided by Netcool/Impact policies, you must select the executePolicy check box
to include the executePolicy Boolean parameter in the policy. The executePolicy parameter
ensures that the policy runs when the user opens the widget. The system then populates the widget
with the required data from the policy.
Attention: The input parameters must be already defined in the policy. If the input parameters
are not defined in the policy, the system cannot pass the values for the input parameters to
the policy. For more information about how to create policy input parameters, see “Configuring
policy settings” on page 207.
• To filter data from other sources, such as data derived from a database table, users can enter values
for the filter parameters in the Configure Optional Dataset Parameters section in the console.
Netcool/Impact uses the values that are entered here to filter the results that are displayed in the
console.
Procedure
1. If the object is a parent with an indexed ID, add the UITreeNodeId field for the object. If the object is
a child, add the UITreeNodeParent field for the object. If you do not add these values, the object is
not displayed as a tree hierarchy.
The following conditions also apply:
• The first object in the hierarchy cannot be a child, as is the case for all hierarchies.
• You must specify the parent object before the child.
• A child object cannot use the same ID for itself and its parent.
• The parent ID is an indexed ID and it must start with 0. If you want to skip the parent ID, you must do
so in this order.
• The schema of each object must be the same, as is the case for all objects that use the tree widget.
In other words, an object can use fewer schema elements than its parent object but these elements
must be defined in the parent object. A child object cannot use additional schema elements that are
not defined in the parent object.
The UITreeNodeId and UITreeNodeParent fields are not displayed in the console
2. Create a policy output parameter for the Impact object or the array of Impact objects. To create a
policy output parameter, click the Configure Policy Settings icon in the policy editor toolbar. To open
the Create a New Policy Output Parameter window, click New. Create the following entries:
Table 22. User output parameters for Impact object or array of Impact objects
Field Instructions
Name Enter a name for the output parameter.
Table 23. Custom schema values for Impact object or array of Impact objects
Field Instructions
Name Enter the name of the custom schema value. For
example, this could be the name of the Impact
object or the name of one of the objects in the
array of Impact objects.
Format Choose the format of the custom schema value.
For example, if the parameter is a string, choose
String.
Example
The following example demonstrates how to integrate an array of Impact objects and the tree widget.
1. Create a policy that contains an array of Impact objects and the additional fields that are required for
the tree widget, UITreeNodeId and UITreeNodeParent.
O2=NewObject();
O2.UITreeNodeId=1;
O2.UITreeNodeParent=0;
O2.fname="o2fname";
O2.lname="o2lname";
O2.dob="o2dob";
O3=NewObject();
O3.UITreeNodeId=2;
O3.UITreeNodeParent=1;
O3.fname="o3fname";
O3.lname="o3lname";
O3.dob="o3odb";
O4=NewObject();
O4.UITreeNodeId=3;
O4.UITreeNodeParent=20;
O4.fname="o4fname";
O4.lname="o4lname";
O5=NewObject();
O5.UITreeNodeId=4;
O5.fname="o5fname";
O5.lname="o5lname";
O5.dob="o5odb";
O6=NewObject();
O6.UITreeNodeParent=4;
O6.fname="o6fname";
O6.lname="o6lname";
O6.dob="o6odb";
O7=NewObject();
O7.UITreeNodeParent=4;
O7.fname="o7fname";
O7.lname="o7lname";
O7.dob="o7odb";
O8=NewObject();
O8.UITreeNodeParent=4;
O8.fname="o8fname";
O8.lname="o8lname";
O8.dob="o8odb";
O9=NewObject();
O9.fname="o9fname";
O9.lname="o9lname";
O9.dob="o9odb";
O10=NewObject();
O10.fname="NJ";
O10.lname="Bayonne";
O10.dob="April 1st 2011";
O11=NewObject();
O11.UITreeNodeParent=11;
O11.fname="o11fname";
O11.lname="o11lname";
O11.dob="o11odb";
O12=NewObject();
O12.UITreeNodeId=11;
O12.UITreeNodeParent=0;
O12.fname="o12fname";
O12.lname="o12lname";
O12.dob="o12odb";
Oa=NewObject();
Oa.UITreeNodeId=12;
Oa.UITreeNodeParent=2;
Oa.fname="oafname";
Oa.lname="oalname";
Oa.dob="oaodb";
Ob=NewObject();
Ob.UITreeNodeId=13;
Ob.UITreeNodeParent=12;
Ob.fname="obfname";
Ob.lname="oblname";
Ob.dob="obodb";
Oc=NewObject();
Oc.UITreeNodeId=14;
Oc.UITreeNodeParent=14;
Oc.fname="ocfname";
Oc.lname="oclname";
Oc.dob="ocodb";
Oe=NewObject();
Oe.UITreeNodeParent=14;
Oe.fname="oefname";
Oe.lname="oelname";
Oe.dob="obedb";
Os={O1,O2,O3,O4,O5,O6,O7,O8,O9,O10,O12,O11,Oa,Ob,Oc,Oe};
log("os " + Os);
Procedure
• You must include the following statement in the first object in the policy:
where <Node Type> is either GRAPH or TREE. If you do not specify a value, the default value is TREE.
• You must specify a label for each object. If you do not, the system displays No label was specified for
the label and tooltip. To specify a label, add the following statement for each object:
ObjectName.UITreeNodeLabel=<Tooltip text>
where <Tooltip text> is the text that is used for the label and tooltip.
• Define the status for each node. This status is not mandatory. If you do not add this statement, the
status is unknown. If you want to display the status for each object, add the following statements for
each node.
ObjectName.UITreeNodeStatus=<Status>;
Example
The following examples illustrate how to define a policy that you want to use with the tree and topology
widgets. This example policy includes a multi-level topology and a node status that represents severity.
Log("Test Topo");
O0=NewObject();
O0.UITreeNodeType="GRAPH";
O0.UITreeNodeId=0;
O0.UITreeNodeLabel="NJ-Bayonne";
O0.UITreeNodeStatus="Warning";
O0.state="NJ";
O0.city="Bayonne";
O1=NewObject();
O1.UITreeNodeId=1;
O1.UITreeNodeStatus="Normal";
O1.UITreeNodeParent=0;
O1.UITreeNodeLabel="NY-Queens";
O1.state="NY";
O1.city="Queens";
O2=NewObject();
O2.UITreeNodeId=2;
O2.UITreeNodeStatus="Critical";
O2.UITreeNodeParent=1;
O2.UITreeNodeLabel="NC-Raleigh";
O2.state="NC";
O2.city="Raleigh";
O3=NewObject();
O3.UITreeNodeId=3;
O3.UITreeNodeParent=0;
O3.UITreeNodeStatus="Warning";
O3.UITreeNodeLabel="CA-Los Angeles";
O3.state="CA";
O3.city="Los Angeles";
O4=NewObject();
O4.UITreeNodeId=4;
O4.UITreeNodeParent=3;
O4.UITreeNodeStatus="Normal";
O4.UITreeNodeLabel="CO-Denver";
O4.state="CO";
O4.city="Denver";
O5=NewObject();
O5.UITreeNodeId=5;
O5.UITreeNodeStatus="Critical";
O5.UITreeNodeParent=4;
O5.UITreeNodeLabel="MA-Main";
O5.state="MA";
O5.city="Main";
O6=NewObject();
O6.UITreeNodeId=6;
O6.UITreeNodeParent=0;
O7=NewObject();
O7.UITreeNodeId=7;
O7.UITreeNodeParent=6;
O7.UITreeNodeStatus="Normal";
O7.UITreeNodeLabel="TX-Hudson";
O7.state="TX";
O7.city="Houston";
O8=NewObject();
O8.UITreeNodeId=8;
O8.UITreeNodeParent=7;
O8.UITreeNodeStatus="Critical";
O8.UITreeNodeLabel="VA-Virgina Beach";
O8.state="VA";
O8.city="Virigina Beach";
Obs={O0,O1,O2,O3,O4,O5,O6,O7,O8};
After you implement the policy you need to create the output parameters and custom schema values. For
more information about how to do this, see “Configuring policy settings” on page 207.
ImpactUICustomValues.put("FieldName,Type",VariableName);
Where Type is either Percentage or Status. VariableName, can be a variable or hardcoded value.
Always cast the variable name to String to avoid any error even if the value is numeric. See the following
examples:
ImpactUICustomValues.put("MyField,Percentage",""+VariableName);
ImpactUICustomValues.put("MyField,Percentage","120");
ImpactUICustomValues.put("FieldName,Percentage",""+(field1/40));
The status field expects the value to be similar to the Topology widget configuration:
There is no limit to how many fields you can put in the variable ImpactUICustomValues. The variable must
be at the very end of the script. Anything before the variable must be in JavaScript and can be anything if
the variable ImpactUICustomValues is populated correctly.
Example 1:
Assigns the field name from the table to be the status or the percentage and assigns the field value. This
example assigns SHAREDOWN and PROFIT as the percentages, and STANDING as the status.
ImpactUICustomValues.put("SHAREUP,Percentage",SHAREUP);
ImpactUICustomValues.put("SHAREDOWN,Percentage",SHAREDOWN);
ImpactUICustomValues.put("PROFIT,Percentage",PROFIT);
ImpactUICustomValues.put("STANDING,Status",STANDING);
Example 2:
This example has an extra calculation to determine the value of percentage or status fields. The
percentage assumes the maximum value to use is 100. Then, a factor is used to scale the values that
are based on the maximum value that is expected by the user. The status and percentage is scaled based
on a factor.
Example 3:
ImpactUICustomValues.put("CPUPercentUsage,Percentage",CPUUsage);
ImpactUICustomValues.put("RAMPercentUsage,Percentage",RAMUsage);
ImpactUICustomValues.put("DiskPercentUsage,Percentage",DiskUsage);
ImpactUICustomValues.put("NetworkAvailability,Status",NetworkStatus);
Tip: The Table or List widget shows duplicate entries or have missing data when you compare the data to
the data type data items. Check the data source to ensure that all keys are unique.
Tip: In an instance where you use a policy function to create a dynamic filter, and you get a message in
the policy log. The messages states that the filter variable is not defined in policy. No eventing occurs
between widgets. Check that you are not using any special characters in the custom value in the data
type for example, ImpactUICustomValues.put("CPU%,Percentage",""+value). The widgets do
not support special characters in field names.
Tip: If a data type field type is incorrectly defined, for example the field is defined as an integer, but
contains float values the widget fails to load. The widget shows a message similar to this example:
Failed to load
To resolve the issue, edit the data type field and select the correct data type float.
Example:
Object.UITreeNodeScalarImage= "[widget]/resources/common_assets/common_resource_icons/
re64_mainframe1.json";
UITreeNodeSmallImage
The UITreeNodeSmallImage property should link to a .png type image that is 16 x 16 pixels in size.
Example:
Object.UITreeNodeSmallImage= "[widget]/resources/common_assets/common_resource_icons_16/
mainframe.png";
UITreeNodeLargeImage
You can also configure an optional large size image for the topology node. The UITreeNodeLargeImage
property should link to a .png type image with a recommended size of 64 x 64 pixels.
Example:
Object.UITreeNodeLargeImage= "[widget]/resources/common_assets/common_resource_icons/
re64_mainframe1_8.png";
Example policy
The following example is a policy that demonstrates the images by using the widget relative path:
Log("Customize Links");
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.NetworkStatus = Obj.UITreeNodeStatus;
Obj.UITreeNodeLabel = "World";
Obj.LastUpdate= LocalTime(GetDate()*90);
worldObject = worldObject + Obj;
Obj1 = NewObject();
Obj1.Node = "Africa";
Obj1.UITreeNodeId = 1;
Obj1.UITreeNodeLabel = "Africa";
Obj1.UITreeNodeParent = 0;
Obj1.UITreeNodeStatus = "Critical";
Obj1.NetworkStatus = Obj1.UITreeNodeStatus;
Obj1.UITreeNodeRelation="Network in Africa is Down";
Obj1.LastUpdate= LocalTime(GetDate()+300*1);
worldObject = worldObject + Obj1;
Obj2 = NewObject();
Obj2.Node = "Asia";
Obj2.UITreeNodeId = 2;
Obj2.UITreeNodeLabel = "Asia";
Obj2.UITreeNodeParent = 0;
Obj2.UITreeNodeStatus = "Major";
Obj2.NetworkStatus = Obj2.UITreeNodeStatus;
Obj2.UITreeNodeRelation="Network in Asia is having an issue"; //this text will show up when
user hover on the link
Obj2.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj2.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj2.LastUpdate= LocalTime(GetDate()+300*3);
worldObject =worldObject + Obj2;
Obj3 = NewObject();
Obj3.Node = "North America";
Obj3.UITreeNodeId = 3;
Obj3.UITreeNodeLabel = "North America";
Obj3.UITreeNodeParent = 0;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in North America is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject = worldObject + Obj3;
Obj4 = NewObject();
Obj4.Node = "South America";
Obj4.UITreeNodeId = 2;
Obj4.UITreeNodeLabel = "South America";
Obj4.UITreeNodeParent = 0;
Obj4.UITreeNodeStatus = "Normal";
Obj4.UITreeNodeRelation="Network in South America is Normal";
worldObject =worldObject + Obj4;
Obj4 = NewObject();
Obj4.Node = "South America";
Obj4.UITreeNodeId = 2;
Obj4.UITreeNodeLabel = "South America";
Obj5 = NewObject();
Obj5.Node = "Brazil";
Obj5.UITreeNodeId = 5;
Obj5.UITreeNodeLabel = "Brazil";
Obj5.UITreeNodeParent = 2;
Obj5.UITreeNodeStatus = "Normal";
Obj5.NetworkStatus = Obj5.UITreeNodeStatus;
Obj5.UITreeNodeRelation="Network in Brazil is Normal";
Obj5.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_j2ee1_8.png";
Obj5.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_j2ee1.json";
Obj5.LastUpdate= LocalTime(GetDate()+300*100);
worldObject =worldObject + Obj5;
Obj6 = NewObject();
Obj6.Node = "Egypt";
Obj6.UITreeNodeId = 6;
Obj6.UITreeNodeLabel = "Egypt";
Obj6.UITreeNodeParent = 1;
Obj6.UITreeNodeStatus = "Warning";
Obj6.NetworkStatus = Obj6.UITreeNodeStatus;
Obj6.UITreeNodeRelation="Network in Egypt is down";
Obj6.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_j2ee1_8.png";
Obj6.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_j2ee1.json";
Obj6.LastUpdate= LocalTime(GetDate()+300*80);
worldObject =worldObject + Obj6;
Log(worldObject);
Troubleshooting
If the topology widget displays a TCTUI1008W error message when trying to load the image, verify that
the .json image path for UITreeNodeScalarImage is correct in the policy. In the JazzSM server, you
should verify that the image file exists at the [widget] path:
<JazzSM_HOME>/profile/installedApps/JazzSMNode01Cell/isc.ear/isclite.war/secure/isclite/scripts/
tipdojo/ibm/tivoli/tip/navwidget/themes/
The .json image file must define valid JSON content that conforms to the Dojo GFX format and should be
free of errors.
Setting the topology node to have multiple parents in the topology widget
Topology widget nodes can be set to have multiple parents.
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.NetworkStatus = Obj.UITreeNodeStatus;
Obj.UITreeNodeLabel = "World";
Obj.LastUpdate= LocalTime(GetDate()*90);
worldObject = worldObject + Obj;
Obj1 = NewObject();
Obj1.Node = "Africa";
Obj1.UITreeNodeId = 1;
Obj1.UITreeNodeLabel = "Africa";
Obj1.UITreeNodeParent = 0;
Obj1.UITreeNodeStatus = "Critical";
Obj1.NetworkStatus = Obj1.UITreeNodeStatus;
Obj1.UITreeNodeRelation="Network in Africa is Down";
Obj1.LastUpdate= LocalTime(GetDate()+300*1);
worldObject = worldObject + Obj1;
Obj2 = NewObject();
Obj2.Node = "Asia";
Obj2.UITreeNodeId = 2;
Obj2.UITreeNodeLabel = "Asia";
Obj2.UITreeNodeParent = 0;
Obj2.UITreeNodeStatus = "Major";
Obj2.NetworkStatus = Obj2.UITreeNodeStatus;
Obj2.UITreeNodeRelation="Network in Asia is having an issue";
//this text will show up when user hover on the link
Obj2.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj2.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj2.LastUpdate= LocalTime(GetDate()+300*3);
worldObject =worldObject + Obj2;
Obj2 = NewObject();
Obj2.Node = "India";
Obj2.UITreeNodeId = 12;
Obj2.UITreeNodeLabel = "India";
Obj2.UITreeNodeParent = "2,1;
Obj2.UITreeNodeStatus = "Major";
Obj2.NetworkStatus = Obj2.UITreeNodeStatus;
Obj2.UITreeNodeRelation="Network in India is having an issue";
//this text will show up when user hover on the link
Obj2.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj2.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj2.LastUpdate= LocalTime(GetDate()+300*3);
worldObject =worldObject + Obj2;
• To set the topology widget node with circular relationship, the circular relationship can be used only in
the topology widget and not in the tree widget. See the following example.
worldObject =[];
index = 0;
Obj3 = NewObject();
Obj3.Node = "Link1";
Obj3.UITreeNodeId = 13;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 16;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link2";
Obj3.UITreeNodeId = 14;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 13;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_1
resource_icons/re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link3";
Obj3.UITreeNodeId = 15;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 14;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link4";
Obj3.UITreeNodeId = 16;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 15;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
Log(""+worldObject);
• To set the topology widget node with circular relationship, the circular relationship can be used only in
the topology widget and not in the tree widget unless there is a parent node for the first node. See the
following example.
worldObject =[];
index = 0;
Obj3 = NewObject();
Obj3.Node = "Parent";
Obj3.UITreeNodeId = 12;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
index = index + 1;
Obj3.Node = "Link1";
Obj3.UITreeNodeId = 13;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = "16,12";
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link2";
Obj3.UITreeNodeId = 14;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 13;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link3";
Obj3.UITreeNodeId = 15;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 14;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
index = index + 1;
Obj3 = NewObject();
Obj3.Node = "Link4";
Obj3.UITreeNodeId = 16;
Obj3.UITreeNodeLabel = Obj3.Node;
Obj3.UITreeNodeParent = 15;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in " + Obj3.Nod + " is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/
re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject[index] = Obj3;
Log(""+worldObject);
impact.uidataprovider.additional.status.1.name=newmajor
impact.uidataprovider.additional.status.1.icon=[widget]/resources/common_assets/
status_icons/PNG/64x64/st64_fatal.png
impact.uidataprovider.additional.status.1.number=9
impact.uidataprovider.additional.status.1.color=0xff0000
impact.uidataprovider.additional.status.1.svgicon=[widget]/resources/common_assets/
status_icons/SWF/st64_fatal.json
impact.uidataprovider.additional.status.2.name=newminor
impact.uidataprovider.additional.status.2.icon=[widget]/resources/common_assets/
status_icons/PNG/64x64/st64_warning.png
impact.uidataprovider.additional.status.2.number=10
impact.uidataprovider.additional.status.2.color=15790080
impact.uidataprovider.additional.status.2.svgicon=[widget]/resources/common_assets/
status_icons/SWF/st64_warning.json
Name: worldObject
Policy Variable Name: worldObject
Format: Array of Impact Object
For the Schema Definition field, you must define the following three fields:
Note: With this customization you will see the same widget functionality, but Node Status name-value
could be one of the defaults or a new customized Status objects.
Log("Customize Links");
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.NetworkStatus = Obj.UITreeNodeStatus;
Obj.UITreeNodeLabel = "World";
Obj.LastUpdate= LocalTime(GetDate()*90);
worldObject = worldObject + Obj;
Obj1 = NewObject();
Obj1.Node = "Africa";
Obj1.UITreeNodeId = 1;
Obj1.UITreeNodeLabel = "Africa";
Obj1.UITreeNodeParent = 0;
Obj1.UITreeNodeStatus = "Critical";
Obj1.NetworkStatus = Obj1.UITreeNodeStatus;
Obj1.UITreeNodeRelation="Network in Africa is Down";
Obj1.LastUpdate= LocalTime(GetDate()+300*1);
worldObject = worldObject + Obj1;
Obj2 = NewObject();
Obj2.Node = "Asia";
Obj2.UITreeNodeId = 2;
Obj2.UITreeNodeLabel = "Asia";
Obj2.UITreeNodeParent = 0;
Obj2.UITreeNodeStatus = "Major";
Obj2.NetworkStatus = Obj2.UITreeNodeStatus;
Obj2.UITreeNodeRelation="Network in Asia is having an issue"; //this text will show up when user hover on the link
Obj2.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1_8.png";
Obj2.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1.json";
Obj2.LastUpdate= LocalTime(GetDate()+300*3);
worldObject =worldObject + Obj2;
Obj3 = NewObject();
Obj3.Node = "North America";
Obj3.UITreeNodeId = 3;
Obj3.UITreeNodeLabel = "North America";
Obj3.UITreeNodeParent = 0;
Obj3.UITreeNodeStatus = "Minor";
Obj3.NetworkStatus = Obj3.UITreeNodeStatus;
Obj3.UITreeNodeRelation="Network in North America is under maintenance";
Obj3.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1_8.png";
Obj3.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1.json";
Obj3.LastUpdate= LocalTime(GetDate()-300*60);
worldObject = worldObject + Obj3;
Obj4 = NewObject();
Obj4.Node = "South America";
Obj4.UITreeNodeId = 4;
Obj4.UITreeNodeLabel = "South America";
Obj4.UITreeNodeParent = 0;
Obj4.UITreeNodeStatus = "Normal";
Obj4.NetworkStatus = Obj4.UITreeNodeStatus;
Obj4.UITreeNodeRelation="Network in South America is Normal";
Obj4.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1_8.png";
Obj4.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/re64_hypervisor1.json";
Obj4.LastUpdate= LocalTime(GetDate()+300*9);
worldObject =worldObject + Obj4;
Obj5 = NewObject();
Obj5.Node = "Brazil";
Obj5.UITreeNodeId = 5;
Obj5.UITreeNodeLabel = "Brazil";
Obj5.UITreeNodeParent = 4;
Obj5.UITreeNodeStatus = "Normal";
Obj5.NetworkStatus = Obj5.UITreeNodeStatus;
Obj5.UITreeNodeRelation="Network in Brazil is Normal";
Obj5.UITreeNodeSmallImage = "[widget]/resources/common_assets/common_resource_icons/re64_jobinstance1_8.png";
Obj5.UITreeNodeScalarImage = "[widget]/resources/common_assets/common_resource_icons/re64_jobinstance1.json";
Obj5.LastUpdate= LocalTime(GetDate()+300*100);
worldObject =worldObject + Obj5;
Obj6 = NewObject();
Obj6.Node = "Egypt";
Log(worldObject);
Procedure
1. Create a DB2 data source.
a. Enter NewDataSource in the Data Source Name field.
b. Enter the user name and password for the database.
c. Complete the other fields as required.
d. Save the data source.
2. Create a data type for the DB2 data source.
a. Enter NewUIDPDT as the name and complete the required fields.
b. To ensure that the data type is compatible with the UI data provider, select the UI data provider:
enabled check box.
c. Select the key fields for the data type.
d. Save the data type.
3. Create a page in the console.
a. Open the console.
b. To create a page, click Settings > New Page.
c. Enter Page for DB2 in the Page Name field.
d. Save the page.
4. Create a widget in the console.
a. Open the Page for DB2 page that you created.
b. Drag the Line Chart widget into the content area.
c. To configure the widget data, click it. Click the down arrow icon and click Edit. The Select a dataset
window is displayed.
d. Select the dataset. Select the NewUIDPDT data type that belongs to the NewDataSource data
source. The data type is only displayed after the defined refresh interval. The default is 5 minutes.
e. The Visualization Settings UI is displayed. Enter the values that you want to use for the y axis. You
can select multiple lines. You can also select a text to display as a tooltip. Click Ok.
f. To ensure that the console can display all the items, change the number of items that are allowed
per page from all to a number. Click Settings. In the Items per page list list, change the number of
items per page from All to a number.
g. To save the widget, click the Save and exit button on the toolbar.
Results
When you display the widget, the data is retrieved directly from the data type in Netcool/Impact and
displayed in a line chart.
Procedure
1. Create a policy to provide the data for the pie chart widget. The policy must group all the items from a
database table into a single Impact object.
For example, define the following policy, called Policyforpiechart, that gathers the rows in the
database table into a single Impact object:
You must enter the name of the Impact object exactly as it is defined in the policy in the Policy
Variable Name field.
b. You must create the custom schema values for the fields in the object. In this example, the Impact
object contains two fields that are integers.
After you select Impact Object in the Format field, the system displays the Open the Schema
Definition Editor icon beside the Schema Definition field. To open the editor, click the icon.
You define the following custom schema definitions for the policy.
Results
The data from the UI data provider is displayed as a pie chart in the console.
Procedure
1. Create a policy called WorldNetworkActionPolicy to provide the data for the policy action.
Policy example:
2. To enable a policy to run with an UI data provider, click the Configure Policy Settings and select the
Enable Policy for UI Data Provider Actions check box.
3. Create the following policy WorldNetwork:
Log("Customize Links");
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.UITreeNodeLabel = "World";
worldObject = worldObject + Obj;
Obj1 = NewObject();
Obj1.Node = "Africa";
Obj1.UITreeNodeId = 1;
Obj1.UITreeNodeLabel = "Africa";
Obj1.UITreeNodeParent = 0;
Obj1.UITreeNodeStatus = "Critical";
Obj1.UITreeNodeRelation="Network in Africa is Down";
worldObject = worldObject + Obj1;
Obj2 = NewObject();
Obj3 = NewObject();
Obj3.Node = "North America";
Obj3.UITreeNodeId = 3;
Obj3.UITreeNodeLabel = "North America";
Obj3.UITreeNodeParent = 0;
Obj3.UITreeNodeStatus = "Minor";
Obj3.UITreeNodeRelation="Network in North America is under maintaenance";
Obj4 = NewObject();
Obj4.Node = "South America";
Obj4.UITreeNodeId = 2;
Obj4.UITreeNodeLabel = "South America";
Obj4.UITreeNodeParent = 0;
Obj4.UITreeNodeStatus = "Normal";
Obj4.UITreeNodeRelation="Network in South America is Normal";
Log(worldObject);
4. Create the policy output parameters for the policy in the WorldNetwork policy.
a) In the policy editor toolbar, click the Configure Policy Settings icon to create the output
parameters.
b) To create a policy output parameter, click New Output Parameter:New.
You must create the custom schema value for the fields in the object. In this example, the Impact
object contains one field which is a node.
After you select Array Of Impact Object in the Format field, the system displays the Open the
Schema Definition Editor icon beside the Schema Definition field. To open the editor, click
the icon.
You define the following custom schema definitions for the policy.
actions.numactions=<number of actions>
actions.0.actiontype=<action type>
actions.0.actionname=<action name>
actions.0.action=<action>
actions.0.restricted=boolean
actions.0.restricted.fieldname=<field name>
Where:
<number of actions> specifies the number of actions defined in the properties file. The actions
are numbered sequentially starting from 0 and each has a type and a name.
<action type> is url, dashpage, or policy.
<action name> is a descriptive name for the action.
<action> specifies the action performed.
For url, <action> must be a full URL including protocol, for example http://www.ibm.com.
actions.numactions=3
actions.0.actiontype=dashpage
actions.0.actionname=Open Test Page Rec
actions.0.action=com.ibm.isclite.admin.Freeform.navigationElement.pagelayoutA.
modified.SXxNbLNnpq3SoBksMd6nEYw1434578685588
actions.0.restricted=true
actions.0.restricted.fieldname=COLUMN3
actions.1.actiontype=url
actions.1.actionname=Go to IBM Site
actions.1.action=http://www.ibm.com
actions.2.actiontype=policy
actions.2.actionname=Execute Test Policy
actions.2.action=TestPolicy.
When you right-click on an item in the DASH widget, the menu displays the available actions. For the
above example, there are three actions that allow you to perform one of the following actions:
• dashpage: Open a new page tab within the DASH widget. All the data from the right-clicked menu
passed to the policy as Input parameters is passed to the DASH page as input parameters.
• url: Open a new tab in the browser. All the data from the right-clicked menu passed to the policy as
Input parameters is passed to the URL as a URL parameter, for example:
http://www.ibm.com?param1=value¶m2=value,...
• policy: Execute the policy specified.
Results
The UI Data Provider policy related actions that you configure in the policy editor display automatically
in the widget in the console when you right-click on an item. Any changes that you make to the UI Data
Provider policy-related actions in the policy editor are updated automatically on the widget.
When you run the action, the policy runs in the backend and displays the log statement similar to the
follow information:
WSSetDefaultPKGName('weather');
GetCityWeatherByZIPDocument=WSNewObject("com.cdyne.ws.weatherws.
GetCityWeatherByZIPDocument");
_GetCityWeatherByZIP=WSNewSubObject(GetCityWeatherByZIPDocument,
"GetCityWeatherByZIP");
_ZIP = '07002';
_GetCityWeatherByZIP['ZIP'] = _ZIP;
WSParams = {GetCityWeatherByZIPDocument};
WSService = 'Weather';
WSEndPoint = 'http://wsf.cdyne.com/WeatherWS/Weather.asmx';
WSMethod = 'GetCityWeatherByZIP';
d. Use the GetbyXpath policy function to get the value for the element that you want.
nsMapping= NewObject();
nsMapping.tns = "http://ws.cdyne.com/WeatherWS/";
nsMapping.xsd="http://www.w3.org/2001/XMLSchema" ;
nsMapping.soap="http://www.w3.org/2003/05/soap-envelope" ;
nsMapping.xsi="http://www.w3.org/2001/XMLSchema-instance";
Object1=NewObject();
Object1.City=Result1.Result.City[0];
Object1.State=Result1.Result.State[0];
Object1.Temperature=Result1.Result.Temperature[0];
_ZIP = '23455';
_GetCityWeatherByZIP['ZIP'] = _ZIP;
WSParams = {GetCityWeatherByZIPDocument};
log("About to invoke Web Service call GetCityWeatherByZIP ......");
Object2=NewObject();
Object2.City=Result2.Result.City[0];
Object2.State=Result2.Result.State[0];
Object2.Temperature=Result2.Result.Temperature[0];
CustomObjs= {Object1,Object2};
log(CustomObjs);
You must enter the exact name of the array as it is in the policy in the Policy Variable Name field.
3. Use the following schema definition values.
• City - String
• State - String
• Temperature - String
4. Create a page.
a. Open the console.
b. To create a page, click Settings > New Page.
c. Enter Page for Array of Objects in the Page Name field.
d. To save the page, click Ok.
5. Create a table widget.
a. Open the Page for Array of Objects page that you created.
b. Drag the Table widget into the content area.
c. To configure the widget data, click the down arrow icon and click Edit. The Select a dataset
window is displayed.
d. Select the dataset. Select the MyArrayofCustomObjects data type that belongs to the
TestArrayOfObjectsWebService data source. The dataset information is only displayed after the
defined refresh interval. The default is 5 minutes.
e. The Visualization Settings UI is displayed. The system displays all the available columns by
default. You can change the displayed columns in the Visualization Settings section of the UI. You
can also select the row selection and row selection type options.
f. To ensure that the policy runs when the widget is displayed, select the executePolicy check box.
Click Ok.
g. To save the widget, click the Save and exit button on the toolbar.
Results
When you open the table widget, the data from two different sources is displayed in a table.
Procedure
1. In the policy editor, create a policy that is called MultipleObjectsPolicy. The policy uses the
DirectSQL policy function to retrieve the data from the defaultobjectserver data source. The
policy also retrieves data from one other source.
Create the following policy called MultipleObjectsPolicy.
2. Define the user output parameters for the array of objects in the policy.
In the policy editor, click the Configure Policy Settings icon to create the output parameters for the
array of objects.
You must enter the exact name of the array as it is in the policy in the Policy Variable Name field.
3. Use the following schema definition values.
• fname = String
• lname = String
• city = String
• Node = String
• Identifier = String
• Severity = Integer
4. Create a page.
• Open the console.
• To create a page, click Settings > New Page.
• Enter Page for Table in the Page Name field.
• Save the page.
Results
When you display the table widget, the data from the DirectSQL policy function and the other source is
displayed in a table.
Procedure
1. In the Netcool/Impact policy editor, create a Netcool/Impact policy.
Create a policy that is called IPLGetByFilterPolicy that includes the GetByFilter policy
function. You want to visualize the data that is output by the policy function. In this example, the
filter is defined statically within the policy. In a real world situation, you might want to pass the values
dynamically from the UI data provider to the policy function.
Note: When you use the GetByFilter to access or view data for a UI data provider data type, the
filter condition must match the UI data provider standard, see the following two example filters.
AGG_NAME starts 'DayTrader'¶m_SourceToken=fit-vm15-23:TO
(AGG_NAME starts 'DayTrader' OR AGG_NAME starts 'Client')
¶m_SourceToken=fit-vm15-23:TO
The token before the & is used as a condition parameter that is used as a filter in the UI data provider,
and the tokens after the & are sent as request parameters. Using the second example filter, it is sent to
the UI data provider as:
For more information about format of Jazz for Service Management filters, see “Format of Jazz for
Service Management filters” on page 140.
2. Define the output parameter for the data items. This parameter is made available to the UI data
provider and are displayed as a data type in the console.
In the policy editor, click the Configure Policy Settings icon and the Policy output parameter:New
button to create the output parameters for the data items.
Results
When you display the widget, the policy is run. The information that is contained in the policy results is
added to the widget and is displayed as a list.
Procedure
1. In the policy editor in Netcool/Impact, create a policy that uses the DirectSQL policy function.
Create the following policy that includes the DirectSQL policy function called TestDirectSQL:
Log("TestDirectSQL");
query= "select SUM(VALUE) as sumvalue, HISTORYRESOURCENAME, METRICNAME ,
( HISTORYRESOURCENAME || METRICNAME ) as key from
TBSMHISTORY.HISTORY_VIEW_RESOURCE_METRIC_VALUE;
DirectSQL ('directSQLSample'.query.false);
This policy accesses data from a database table and sums a particular column in the table to create a
sum value. The policy also groups a number of columns.
2. Define the output parameters for the policy.
To define the output parameters for the policy, click the Configure user output parameters icon.
You must also create new custom schema values to represent the values that are contained in the
fields of the DirectSQL policy function. After you select DirectSQL in the Format field, the system
displays the Open the Schema Definition Editor icon. To create a value, click the icon. You must enter
a name for each new value and select a format. For this example, create the following custom schema
values:
Results
When you display the widget, the policy is run and the information that is contained in the policy results is
displayed as a gauge.
Procedure
1. In the policy editor in Netcool/Impact, create a policy that is called TestTreeTopoPolicy.
The policy uses the ArrayofImpactObjects policy function to retrieve information about addresses.
This information is hierarchical. Entries are ordered by number, city, and country. You also want to add
topological information about the status of an entry to the policy.
MyObject1=NewObject();
MyObject1.country="United States";
MyObject1.city="New York";
MyObject2=NewObject();
MyObject2.country="United States";
MyObject2.city="Philadelphia";
MyObject3=NewObject();
MyObject3.country="England";
MyObject3.city="London";
MyArrayOfObjects={MyObject1,MyObject2,MyObject3};
2. Next, you must make the policy compatible with the tree widget. To make the policy compatible with
the tree widget, you must add the UITreeNodeId and UITreeNodeParent parameters to the policy.
MyObject1=NewObject();
MyObject1.UITreeNodeId=0;
MyObject1.country="United States";
MyObject1.city="New York";
MyObject3=NewObject();
MyObject3.UITreeNodeId=2;
MyObject3.UITreeNodeParent=1;
MyObject3.country="England";
MyObject3.city="London";
MyArrayOfObjects={MyObject1,MyObject2,MyObject3}
3. Next, you must make the policy compatible with the topology widget. To make the policy
compatible with the tree widget, you must add the UITreeNodeType, UITreeNodeLabel, and
UITreeNodeStatus fields to the policy.
MyObject1=NewObject();
MyObject1.UITreeNodeId=0;
MyObject1.country="United States";
MyObject1.city="New York";
MyObject1.UITreeNodeType="GRAPH";
MyObject1.UITreeNodeLabel="NY";
MyObject1.UITreeNodeStatus="Major";
MyObject2=NewObject();
MyObject2.UITreeNodeId=1;
MyObject2.UITreeNodeParent=0;
MyObject2.country="United States";
MyObject2.city="Philadelphia";
MyObject2.UITreeNodeLabel="PA";
MyObject2.UITreeNodeStatus="Minor";
MyObject3=NewObject();
MyObject3.UITreeNodeId=2;
MyObject3.UITreeNodeParent=1;
MyObject3.country="England";
MyObject3.city="London";
MyObject3.UITreeNodeLabel="LN";
MyObject3.UITreeNodeStatus="Warning";
MyArrayOfObjects={MyObject1,MyObject2,MyObject3};
4. Define the user output parameters for the array of objects in the policy.
Results
The data from the UI data provider is displayed in a hierarchy in the console alongside the status.
When you hover on the link, it shows the value. The property must be added to every child relationship in
the policy.
Procedure
1. To implement this feature, go to $IMPACT_HOME/etc/server.props file. Identify the following
section in the server.props file, which shows the default settings.
impact.uidataprovider.linkstyle.showstatusicon=true
impact.uidataprovider.linkstyle.usecoloredlinks=true
impact.uidataprovider.linkstyle.relationshipname=IMPACT_NODES_RELATIONSHIP
impact.uidataprovider.linkstyle.usecoloredlinks=false
This property overrides the option to show the status icon on the links in the widget.
2. To show the colors and status icons in the topology widget:
impact.uidataprovider.linkstyle.showstatusicon=true
To change the colors and style of the links in the topology widget:
impact.uidataprovider.linkstyle.linestyle=<VALUE>
<VALUE> can be SOLID, DASHED, ALTERNATE
impact.uidataprovider.linkstyle.relationshipname=<some label>
Log("Customize Links");
worldObject = {};
Obj = NewObject();
Obj.Node = "World";
Obj.UITreeNodeId = 0;
Obj.UITreeNodeStatus = "Critical";
Obj.UITreeNodeLabel = "World";
worldObject = worldObject + Obj;
Obj1 = NewObject();
Obj1.Node = "Africa";
Obj1.UITreeNodeId = 1;
Obj1.UITreeNodeLabel = "Africa";
Obj1.UITreeNodeParent = 0;
Obj1.UITreeNodeStatus = "Critical";
Obj1.UITreeNodeRelation="Network in Africa is Down";
worldObject = worldObject + Obj1;
Obj2 = NewObject();
Obj2.Node = "Asia";
Obj2.UITreeNodeId = 2;
Obj2.UITreeNodeLabel = "Asia";
Obj2.UITreeNodeParent = 0;
Obj2.UITreeNodeStatus = "Major";
Obj2.UITreeNodeRelation="Network in Asia is having issue";
//this text will show up when a user hovers on the link
Obj3 = NewObject();
Obj3.Node = "North America";
Obj3.UITreeNodeId = 3;
Obj3.UITreeNodeLabel = "North America";
Obj3.UITreeNodeParent = 0;
Obj3.UITreeNodeStatus = "Minor";
Obj4 = NewObject();
Obj4.Node = "South America";
Obj4.UITreeNodeId = 2;
Obj4.UITreeNodeLabel = "South America";
Obj4.UITreeNodeParent = 0;
Obj4.UITreeNodeStatus = "Normal";
Obj4.UITreeNodeRelation="Network in South America is Normal";
Log(worldObject);
Optionally, you can configure the node links to have their own status by adding the following properties
to the object:
Obj2.UITreeLinkStatus = "Critical";
Or if the node has more than one parent, add a comma-separated list of the parent nodes, for
example:
Obj2.UITreeNodeParent = "2,3";
Obj2.UITreeLinkStatus = "Normal,Critical";
Note: Without this property, the link's status is the same as the child node status:
Obj2.UITreeNodeStatus.
5. Define the user output parameters for the array of objects in the policy.
You must create the custom schema value for the fields in the object. In this example, the Impact
object contains one string.
After you select Array Of Impact Object in the Format field, the system shows the Open the Schema
Definition Editor icon beside the Schema Definition field. To open the editor, click the icon.
You define the following custom schema definitions for the policy.
Results
The data from the UI data provider is displayed in the topology widget with the customized links and
status. When a user hovers on the link, the status information is displayed in the console.
Procedure
1. Create a policy that contains input parameters.
In this example, create a policy that is called TestKey that contains the GetByKey policy function.
The input parameter is the Key parameter.
DataType = "<DATA_TYPE_NAME>";
MaxNum = 1;
MyCustomers = GetByKey(DataType, Key, MaxNum);
2. Create the Key user input parameter. In the policy editor, click the Configure Policy Settings icon to
create the user input parameter.
Procedure
1. Create a policy.
For example, create the following policy that is called DB2Emailpolicy that retrieves values for some
rows in a DB2 table and sends these values to an email address:
Address = "[email protected]";
Subject = "Netcool/Impact Notification";
Message = EventContainer.Node + " has reported the following error condition: "
+ EventContainer.Summary;
Sender = "impact";
ExecuteOnQueue = false;
Results
After you complete this task, the Send button is displayed on the console. When a user clicks the Send
button, the information that is contained in the row in the table is sent as an email to the address
specified by the policy.
Tip:
When passing string values to policies in Netcool/Impact, you may need to escape any double quote
characters found within the strings. You can enable automatic escaping of these characters by adding the
following statement to the <servername>_server.props file in the IMPACT_HOME/etc folder:
impact.policy.escapestrings=true
Then restart the Impact server.
Procedure
1. Create the publisher policy.
The following policy is called PolicyEventingPublisher and uses the DirectSQL policy function
to retrieve data from the defaultobjectserver data source. You need to create a new integer field
called SiteStatus in the ObjectServer if you have not done so already.
Create the output parameter so that the widget can visualize the data.
Create the custom schema values for the fields that you want to display in the console. You must
create three custom schema values. You also must select the Key Field check box for the SiteStatus
value.
Results
When a user selects a row in the table widget, the SiteStatus is displayed in the gauge widget.
Procedure
1. Use the UI data provider DSA to create two data sources. Each data source connects to a different IBM
Tivoli Monitoring system.
For example, create the following data sources:
• Data source 1 retrieves data from ITM1
• Data source 2 retrieves data from ITM2
a. Create the data source that retrieves data from ITM1:
i) Enter ITM_DS1 in the Data Source Name field.
ii) Enter the user name and password for the database.
iii) Complete the other fields as required.
iv) Save the data source.
b. Create the data source that retrieves data from ITM2:
i) Enter ITM_DS2 in the Data Source Name field.
ii) Enter the user name and password for the database.
iii) Complete the other fields as required.
iv) Save the data source.
For more information about how to create a data source for the UI data provider DSA, see the section
about creating a UI data provider data source in the Netcool/Impact DSA Guide.
2. Create two data types for each data source that you created in the previous step.
Later, you combine the data from the two data types that belong to the same data source into a single
object. Then, you combine the data from the two objects so that the data from the different systems is
merged.
For example, create the following data types:
• Datatype1A - select Tivoli Enterprise Monitoring Agent
• Datatype1B - select Tivoli Enterprise Monitoring Agent
• Datatype2A - select Tivoli Enterprise Monitoring Agent
• Datatype2B - select Tivoli Enterprise Monitoring Agent
a. Create the data types as follows, changing the name for each data type:
ipaddress01="";
DataType="datatype1A";
Filter="¶m_SourceToken=paramValue";
c. Datatype1B retrieves data from a Tivoli Enterprise Monitoring Agent and it also provides processor
usage data for each node. The policy creates an array of metrics for each monitored node. It also
enhances this information with the IP address:
DataType="datatype1B";
Filter="¶m_SourceToken=paramValue&sort=BUSYCPU";
MyFilteredItems = GetByFilter( DataType, Filter, false );
index = 0;
if(Num > index){
while(index<Num){
cpu=NewObject();
cpu.TIMESTAMP= MyFilteredItems[index].TIMESTAMP;
cpu.ORIGINNODE= MyFilteredItems[index].ORIGINNODE;
cpu.BUSYCPU= MyFilteredItems[index].BUSYCPU;
cpu.IPADDRESS=ipaddress01;
cpuLinuxITM = cpuLinuxITM+{cpu};
index=index+1;
}
}
Log(" Finished collecting cpu usage from Metrics Agant :" + DataType );
For more information about using the GetByFilter function with the UI data provider, see the topic
about accessing data types output by the GetByFilter Function in the Netcool/Impact Solutions Guide.
4. Create the user output parameters for the policies.
In this example, cpuLinuxITM is the output parameter that is defined in the policy. You must
create an output parameter for cpuLinuxITM as outlined in the table. To create a user output
This parameter ensures that the policy is exposed as part of the Netcool/Impact UI data provider.
For more information about how to configure policy settings, see configure policy settings in the
Netcool/Impact Solutions Guide.
5. Use the following schema definition values.
• TIMESTAMP = String
• ORIGINNODE = String
• BUSYCPU = Float
• IPADDRESS = String
6. Create a data source and data type that are based on the policy.
In this example, create the data source as follows:
a. Select ITM_mashup_policy from the list in the Data Source Name field.
b. Enter the user name and password for the database.
c. Select the Netcool/Impact UI data provider, Impact_NCICLUSTER, as the provider.
d. Complete the other fields as required.
e. Save the data source.
Create the data type as follows:
a. Enter ITM_mashup_dt as the name and complete the required fields.
b. To ensure that the data type is compatible with the UI data provider, select the UI data provider:
enabled check box.
c. Select the key fields for the data type.
d. Save the data type.
7. To confirm that the policy returns the correct data when it runs, right-click the data type and select
View Data Items. Enter &executePolicy=true in the filter and refresh.
8. Create a page in the console.
a. Open the console.
b. To create a page, click Settings > New Page.
c. Enter Page for ITM mashup in the Page Name field.
d. Save the page.
9. Create a table widget that visualizes data from the policy's data type.
a. Open the Page for ITM mashup page that you created.
b. Drag the Table widget into the content area.
c. To configure the widget data, click it. Click the down arrow icon and click Edit. The Select a dataset
window is displayed.
d. Select the dataset. Select the ITM_mashup_dt data type that belongs to the ITM_mashup_policy
data source. The data type is only displayed after the defined refresh interval. The default is 5
minutes.
Results
After you create the table widget, the same data that was displayed in step 6 in Netcool/Impact is
displayed in the console.
Procedure
1. Create a page in the console.
a. Open the console.
b. To create a page, click Settings > Pages > New Page.
c. Enter Page for Event Isolation and Correlation in the Page Name field.
d. To save the page, click Ok.
2. Configure one table widget called Events Rules for the data type EVENTRULES to show all the rules
in the database. This table widget is the main widget that drives the second table widget.
a. Open the Page for Event Isolation and Correlation page that you created.
b. Drag the Table widget into the content area.
c. To configure the widget data, click the down arrow icon and click Edit. The Select a dataset
window is displayed.
d. Select the data set. Select the EVENTRULES data type that belongs to the EventrulesDB data
source. The data set information is only displayed after the defined refresh interval. The default is 5
minutes.
e. The Visualization Settings UI is displayed. The system shows all the available columns by default.
You can change the displayed columns in the Visualization Settings section of the UI. You can also
select the row selection and row selection type options.
f. To save the widget, click Save and exit on the toolbar.
Results
When you click an item in the EVENTRULES table widget, it populates the EICPrimaryEvents table with
the primary events from the objects. When you click an item in the EICPrimaryEvents table widget,
it populates the Topology widget when the Event Isolation and Correlation operation is completed.
Procedure
1. Log on to the Impact server.
2. Go to the add-ons directory, $IMPACT_HOME/add-ons/ssd.
3. Copy the Impact_SSD_Dashlet.war file over to the Dashboard Application Services Hub Server.
Note the location where you download the file to. For example,
C:\build\Impact_SSD_Dashlet.war.
4. On the Dashboard Application Services Hub Server, run the wsadmin tool by using one of the following
commands:
• UNIX: INSTALL/JazzSM/profile/bin/wsadmin.sh -lang jacl
Where INSTALL is the installed location of Jazz for Service Management.
5. Run the following command all on one line to install the Impact_SSD_Dashlet.war file.
Where <ImpactSSDWar> is the location of the copied war file. For example,
C:\build\Impact_SSD_Dashlet.war.
6. If the wsadmin command succeeds without any errors, use the following command to save the
changes:
$AdminConfig save
7. Use one of the following commands to restart the Dashboard Application Services Hub Server:
• UNIX:
INSTALL/JazzSM/profile/bin/stopServer.sh server1
INSTALL/JazzSM/profile/bin/startServer.sh server1
Procedure
1. On the Dashboard Application Services Hub Server, use one of the following commands to run the
wsadmin tool:
• UNIX: %INSTALL%/JazzSM/profile/bin/wsadmin.sh -lang jacl
2. Run the following command to uninstall the Impact_SSD_Dashlet.war file.
3. If the wsadmin command succeeds without errors, run the following command to save the changes:
$AdminConfig save
4. Use one of the following commands to restart the Dashboard Application Services Hub Server.
• UNIX:
%INSTALL%/JazzSM/profile/bin/stopServer.sh server1
%INSTALL%/JazzSM/profile/bin/startServer.sh server1
1. In the title bar, click the Edit options icon and select Edit.
2. Choose the Netcool/Impact policy that you want to run. You can search for the policy by completing
the search field with either a full or partial name and clicking Search. You can also view the complete
list of available data sets by clicking the Show All button in the center of the results panel.
1. In the title bar, click the Edit options icon and select Edit.
2. Choose the Netcool/Impact policy that you want to run. You can search for the policy by completing
the search field with either a full or partial name and clicking Search. You can also view the complete
list of available data sets by clicking the Show All button in the center of the results panel.
3. Select that data set, and click the right arrow to show the Visualization Settings page. In the
Visualization Settings page, you can configure the button title and Netcool/Impact policy parameters.
4. In the Required Settings section, select the executePolicy option.
5. Optional. Select Optional Settings, add the name of the button to the Title field. The title is also used
for the label of the form submission button.
6. Optional. Configure Optional Dataset Parameters: You can also set default values for any input
parameters that are attached to the Netcool/Impact policy.
7. Click OK to implement the changes, or Cancel to discard the changes.
8. On the dashboard, click the button on the widget to run the policy. The input parameters are passed to
the policy as policy input parameters. The results are displayed in the widget.
Tip: To change the values of the input parameters, you must edit the Button widget and change the
parameters in the Visualization Settings page before you run the policy again from the dashboard.
Procedure
1. In Netcool/Impact, create a DB2 data source.
a. Enter NewDataSource in the Data Source Name field.
Results
When you click a row in the Table widget, a NodeClickedOn event is generated. The Button widget
processes the event by extracting the data for the clicked table row. When you click the button on the
Button widget, it runs the policy that is configured in the widget. The data passes from the table row to
the policy as policy input parameters. The GetByFilter function runs and uses the input parameter that is
provided by the table row.
Reference topics
You can use custom URLs and the UI data provider to access data directly. You can also customize the UI
data provider and enable large data model support.
Restrictions
• Sybase databases and associated data types are not supported. You can limit the data by using the
input filters in the data type or in the widget.
Important: If you access a Netcool/OMNIbus or Sybase data type that has a huge number of rows,
for example more than 10,000 rows you can potentially run out of memory. Out of memory issues can
occur when the number of rows stored in memory exceed the available heap memory allocated to the
Java virtual machine. If you plan to access large amounts of data for a Netcool/OMNIbus or Sybase
data type, consider increasing the heap memory settings for the GUI Server and Impact Server from
Procedure
1. To disable the integration of the UI data provider and large
data models, change impact.uidataprovider.largetablemodel=true to
impact.uidataprovider.largetablemodel=false in the server.props file.
Tip: If this parameter does not exist, you can add it to the server.props file.
2. Restart the GUI Server.
Enabling and disabling the large data model for the ObjectServer
Large data model integration is disabled by default for the ObjectServer and is not supported unless you
use Netcool/OMNIbus version 7.4.0. fix pack 1. This fix pack has functions that can be used to perform
paging in the ObjectServer.
$IMPACT_HOME/bin/stopGUIServer.sh
[-username adminuser -password adminpassword]
On Windows operating systems, use the following command.You can also you use the Services Extension
in the Microsoft Management Console.
1. In the Start menu, select Control Panel > Administrative Tools > Services.
Procedure
1. To enable the integration of the UI data provider and large data models for the ObjectServer,
change the property impact.uidataprovider.largetablemodel.objectserver=false to
impact.uidataprovider.largetablemodel.objectserver=true in the server.props file.
If the property does not exist, you can create it.
2. Restart the GUI Server.
• On UNIX systems, enter the following command at the command line.
$IMPACT_HOME/bin/startGUIServer.sh
[-username adminuser -password adminpassword]
%IMPACT_HOME%\bin\startGUIServer.bat.
You can also you use the Services Extension in the Microsoft Management Console to start the GUI
Server from the Services panel.
a. In the Start menu, select Control Panel > Administrative Tools > Services.
b. Right-click Tivoli Netcool/Impact GUI Server.
c. Select Properties. In the Properties dialog box, click Start and then click OK.
Procedure
1. Create the large model policy.
This policy will handle two types of requests from a remote widget, returning either the total row count
or a specific range of rows from the database.
The type of request is determined by the GET_NUMBEROFROWS parameter.
The GET_NUMBEROFROWS variable is a string value and instructs the policy to return the number of
rows to be displayed. The number of rows should be assigned into the policy variable NUMBEROFROWS.
The NUMBEROFROWS variable should always be of type integer. You can cast it to an integer with the Int
function.
2. Netcool/Impact runs the policy twice, first to get the NUMBEROFROWS as the total count. Then, the
policy runs again to get the actual node. Netcool/Impact sends the input parameters start and
count and these number variables are used to run only the query with this filter.
Remember:
The ObjectServer using Netcool/OMNIbus version 7.4.0. fix pack 1 supports paging by using the SKIP
and TOP key words in the SQL.
Important: The STATUS and PERCENTAGE data types are treated as integers.
Example 2
Here is an example policy that implements large data model support for a DB2 table.
filter="";
sorting="";
if (SORTING_CLAUSE != NULL) {
sorting = " ORDER BY " + SORTING_CLAUSE;
}
if(CUSTOM_FILTER != NULL) {
filter = " WHERE " + CUSTOM_FILTER;
}
if (start == NULL) {
start = 0;
}
// Calculate the index for the last row by adding the start index
// to the row count
lastRowIndex = Int(start) + Int(count);
// The inner clause of the SQL query implements filtering and sorting
// The outer clause will return the subset as
SQL="SELECT * FROM (SELECT IDENTIFIER, SERIAL, NODE, SEVERITY, row_number()
over ( " + sorting +
" ) RNUM FROM SA.STATUSTABLE " + filter +
" ) WHERE RNUM BETWEEN " + start + " AND " + lastRowIndex + " ";
}
3. Create a new properties file for the large model policy under the IMPACT_HOME/
uiproviderconfig/properties/ directory.
largemodel.enabled=true
Refresh rate
You can configure how often the UI data provider is refreshed. This interval is set to 20 seconds.
To change this setting, add the following statement to the <server name>_server.props file (for
example NCI_server.props) that is in the $IMPACT_HOME/etc/ folder:
impact.uidataprovider.refreshrate=<refresh_rate_in_miliseconds>
For example, add the following statement to change the refresh interval to 3 minutes:
impact.uidataprovider.refreshrate=180000
impact.uidataprovider.sql.initializenodes=true
Restriction: This setting can have an adverse affect on performance and memory usage. This restriction
depends on the amount of data that is held by the data type. This setting is disabled by default for this
reason.
impact.uidataprovider.refreshclusters=true
Character encoding
By default, Netcool/Impact uses UTF-8 character encoding to parse parameter values and to send these
values to the UI data provider. You change this setting if, for example, you want to use Chinese characters
impact.uidataprovider.encoding=<charset>
Start your GUI server. Netcool/Impact uses the encoding that is defined in the charset variable to parse
parameter values.
impact.uidataprovider.enable=false
Note: In a split installation, add the statement to the server.props file in the GUI Server.
To complete the change, restart the GUI Server.
impact.httpclient.maxconnectionsperhost=<max_number>
Note: Starting in Fix Pack 7.1.0.27, searches of a large model dataset will now use the Match
Case option from a widget unless overridden by the filter.casesensitive property.
Configure case sensitivity
You can configure the search behavior for each dataset with the filter.casesensitive property.
Procedure
1. Open the $IMPACT_HOME/uiproviderconfig/properties/ directory.
2. Create a properties file for the policy or data type.
filter.casesensitive=false
filter.casesensitive.function=upper
For example, a Data Type with the name TestCSV would have the following properties file:
DataType_TestCSV.properties.
impact.uidataprovider.config.directory=<new location>
For example:
impact.uidataprovider.config.directory=/opt/IBM/tivoli/impact/uiproviderconfig
The base directory path for the data provider configuration. The default path is $IMPACT_HOME/
uiproviderconfig.
To change the location of the properties directory, set the
uidataprovider.customprops.directory property in $IMPACT_HOME/etc/server.props:
impact.uidataprovider.customprops.directory=<directory name>
For example:
impact.uidataprovider.customprops.directory=properties
The sub-directory where property files are found. The default directory name is properties.
To enable the use of multiple clusters from the same data provider, set the
uidataprovider.customprops.usecluster property in $IMPACT_HOME/etc/server.prop:
impact.uidataprovider.customprops.usecluster=true
The properties for each cluster should be specified under it's own sub-directory:
<UI Data Provider Config Base Directory>/<UI configuration directory>/<CLUSTER
NAME>/properties/
For example:
/opt/IBM/tivoli/impact/uiproviderconfig/NCICLUSTER/properties
Location.displayvalue.NY=New York
Location.displayvalue.New\ Jersey =NJ
By default display values are supported for the data types String, Numeric (Float,
Double, integer), Status, and Percentage. If you want to use a display value
for data types like Date, Timestamp, or other data types that are supported by
Netcool/Impact, then add the numeric type number to $IMPACT_HOME/etc/server.props
file: impact.uidataprovider.displayvalue.types=<numeric value for each type
separated by,> and restart the UI server. For example:
Customization example
To customize the column label that is called REVIEWED to Chinese as Mark as Reviewed, you must
complete the following steps:
1. Create or edit the customization file:
Procedure
1. Enable the tooltip property.
a) Enable the policy and data type for both non-locale and locale descriptions.
• For non-locale:
DataType_Status.properties
Policy_<policyname>_<output_parameter_name>.properties
DataType_Status_fr.properties
Policy_<policyname>_<output_parameter_name>_fr.properties
When a user hovers on the Severity field that has a value of 5 and depending on the locale in use, the
tooltip displays either Critical or Critique.
For policies
Policies: Status
Field Name: Severity
Create a file:
No Locale: IMPACT_HOME/uidataprovider/customization/DataType_Status.properties
SEVERITY.tooltip.5=This is a critical event.
SEVERITY.tooltip.2=This is a normal event.
Results
Customization takes precedence over <fieldname>.tooltip.enabled=true.
However, if you add Severity.tooltip.enabled=true but do not add
<FieldName>.tooltip.<value>=<tooltip text>, then the tooltip displays the <value>.
Known issue when viewing field values when a mouse hovers over a column
The UI data provider supplies a tooltip property to enable viewing of field values when a mouse hovers
over a column. When the same DASH page is opened in multiple tabs on the same browser, then the
mouse-over data from tab 1 can be displayed on tab 2.
Resolution
Set a key field in the Schema Definition for the Output Parameter of the policy of in the Policy Settings.
See the "To mark an entry as a key field" step in the following topic of the User Interface Guide: Creating
custom schema values for output parameters .
Procedure
Use the following URL to access the Netcool/ImpactUI data provider
https:/<hostname>:<port>/ibm/tivoli/rest/providers/
providername
https://example.com:16311/ibm/tivoli/rest/providers/Impact_NCICLUSTER
function myFunction() {
//…..
}
delete myFunction;
Additionally, any Java objects that are created inside the JavaScript policy must be deleted as well. For
example,
If the Java object contains the information that is to be used in a user output parameter. The value of the
Java object must be stored by using a Netcool/Impact policy function to convert the Java object to the
correct variable type.
If the variable is returned from an invocation of a function or call, you must delete that object as well.
Procedure
If your policy only has one output parameter, to run a policy and make the output parameter available to
the UI data provider, add executePolicy=true to the following URL:
https://<hostname>:<port>/ibm/tivoli/rest/providers/Impact_NCICLUSTER/
datasources/IMPACT_POLICY_<policyname>/datasets/
<policyname>_policy_variables/items?executePolicy=true
If your policy has more than one output parameter, to run a policy and make all the output parameters
available to the UI data provider, add executePolicy=true to the following URL and a comma
separated list of the output parameters:
https://<hostname>:<port>/ibm/tivoli/rest/providers/Impact_NCICLUSTER/
datasources/IMPACT_POLICY_<policyname>/datasets/<policyname>_policy_variables/
items?executePolicy=true&properties=<param1>,<param2>,...<paramn>
https://example.com:16311/ibm/tivoli/rest/providers/Impact_NCICLUSTER/datasources/
IMPACT_POLICY_Test_Policy/datasets/Test_Policy_policy_variables/
items?executePolicy=true
If you have a policy with more then one output parameter, for example you have a policy called z3 with
output parameters myString and myInteger, use the following URL to make both parameters available:
https://example.com:16311/ibm/tivoli/rest/providers/
Impact_NCICLUSTER/datasources/IMPACT_POLICY_Test_Policy/datasets/
z3_policy_variables/items?param_executePolicy=true&properties=myInteger,myString
MyObject=NewObject();
MyObject.IntField=String(""+value);
Procedure
1. Create a properties file for the topology widget using the following file naming convention (unless a
properties file already exists for the policy):
$IMPACT_HOME/uiproviderconfig/properties/Policy_<PolicyName>_<Output
Parameter name>.properties
For example, for a policy named TestTopology and an output parameter named Result, the
properties file would be:
$IMPACT_HOME/uiproviderconfig/properties/
Policy_TestTopology_Result.properties
2. Edit the file and add the following properties:
topology.layout=hierarchical
topology.layout.params={flowDirection: "bottom", globalLinkStyle: "orthogonal"}
In this example, the layout has been set to hierarchical. You can set topology.layout to one of
the following values:
• tree
layoutMode • free
• level
• tip over
• tip leaves over
• tip roots over
• tip roots and leaves over
• radial
• alternating radial
flowDirection • right
• left
• top
• bottom
globalLinkStyle • straight
• no reshape
• orthogonal
• mixed
connectorStyle • automatic
• centered
• evenly spaced
globalAlignment • center
• border center
• east
• west
• tip over
• tip over west
• tip over east west
• tip over both sides
• mixed
levelAlignment • center
• north
• south
aspectRatio • 1
• 10
flowDirection • right
• left
• top
• bottom
levelJustification • center
• left
• right
• top
• bottom
levelingStrategy • optimal
• semi optimal
• higher levels
• lower levels
• spread out
globalLinkStyle • polyline
• orthogonal
• straight
• mixed
• no reshape
connectorStyle • automatic
• centered
• evenly spaced
horizontalNodeOffset • 0
• 100
horizontalLinkOffset • 0
• 100
horizontalNodeLinkOffset • 0
• 100
verticalNodeOffset • 0
• 100
verticalLinkOffset • 0
• 100
verticalNodeLinkOffset • 0
• 100
globalHorizontalAlignment • center
• left
• right
globalVerticalAlignment • center
• top
• bottom
maxNumberOfNodesPerRowOrColumn • 1
• 10
preferredLinksLength • 25
• 45
linkStyle • straight
• no reshape
maxAllowedMaxPerIteration • 5
• 25
allowedNumberOfIterations • 250
• 1250
convergenceThreshold • 0.1
• 3.5
globalLinkStyle • direct
• orthogonal
• mixed
• no reshape
globalConnectorStyle • automatic
• fixed offset
• evenly spaced
• mixed
linkOffset • 0
• 20
minFinalSegmentLength • 10
• 100
flowDirection • right
• left
• top
• bottom
levelJustification • center
• left
• right
• top
• bottom
levelingStrategy • optimal
• semi optimal
• higher levels
• lower levels
• spread out
connectorStyle • automatic
• centered
• evenly spaced
globalLinkStyle • direct
• orthogonal
• mixed
• no reshape
verticalMinOffset • 1
• 20
horizontalMinOffset • 1
• 20
flowDirection • right
• left
• top
• bottom
levelJustification • center
• left
• right
• top
• bottom
levelingStrategy • optimal
• semi optimal
• higher levels
• lower levels
• spread out
connectorStyle • automatic
• centered
• evenly spaced
Note:
Changes to the properties file do not appear in the widget immediately, you have to wait for the
automatic refresh that is done by Impact in the backend or restart Impact UI server.
Usage Scenarios
Netcool/Impact is able to act as an OSLC provider and an OSLC client. You can use Netcool/Impact as a
generic OSLC adapter for other OSLC and non-OSLC service providers.
Response Formats
Netcool/Impact uses the RDF/XML format for all OSLC responses, as required by the OSLC Core
Specification v2.
Important: When viewed in some web browsers, such as Mozilla Firefox, the raw RDF/XML is
automatically translated into the abbreviated RDF/XML format, which omits blank nodes. For more
information, see the RDF/XML Syntax Specification (http://www.w3.org/TR/REC-rdf-syntax/#section-
Syntax-blank-nodes)
The raw RDF/XML and the abbreviated version are semantically identical. You can use Internet Explorer,
Mozilla Firefox, the Netcool/Impact GetHTTP function, or the Linux curl utility to retrieve the raw XML/
RDF.
Warning: If you are working with the Netcool/Impact GUI in the Mozilla Firefox browser and you
simultaneously open a second instance to view an OSLC URL, the system logs you out of the first
instance. To prevent this problem, you must create a second profile in Mozilla Firefox for viewing
OSLC URLs. For more information about how to do so, see the help section about profiles on the
Mozilla website (http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-
profiles).
Introducing OSLC
Before you use OSLC for Netcool/Impact, read this information about the specifics of this implementation.
The following graphic outlines an example of a typical system architecture for OSLC:
OSLC roles
You use the impactAdminUser and impactOSLCDataProviderUser roles to regulate access to the
OSLC service provider.
The impactAdminUser role is assigned to your Netcool/Impact administrator, who is, in most cases, the
GUI administrator.
• To add users to roles, use the script $IMPACT_HOME/install/security/mapRoles.sh
• To add users to the impactOSLCDataProviderUser role, use the command ./mapRoles -add
-user username -roles "impactOSLCDataProviderUser"
• To add groups to the impactOSLCDataProviderUser role, use the command ./mapRoles -add
-group groupname -roles "impactOSLCDataProviderUser"
Example
You use the following command to add the oslcuser user to the impactOSLCDataProviderUser role
for a Linux operating system:
Procedure
1. Add a property for each Netcool/Impact data type that you want to make available as OSLC resources
to the NCI_oslc.props file in <IMPACT_HOME>/etc/. NCI is the default name of the Impact Server.
You add the property in the following format:
oslc.data.<pathcomponent>=<datatypename>
where <pathcomponent> is the path component of the URI that you want to use, and
<datatypename> is the name of the data type you want to use.
For example, if you add the oslc.data.staff=Employees to the properties file, you can use the
following URL to access the Employees data type:
http://example.com:9080/NCICLUSTER_NCI_oslc/data/staff
where NCI is the default Impact Server name and NCICLUSTER is the Netcool/Impact cluster name.
Example
The following example shows how to create a data type for a DB2 table and how to add the information to
the NCI_oslc.props file.
In this example, the DB2 table has information for a table called People:
1. Create a Netcool/Impact data type which represents the information in the DB2 table and add the
information as fields to the data type:
a. Click Data Model, to open the Data Model tab.
b. Select the data source for which you want to create a data type, right-click the data source and click
New Data Type.
c. In the Data Type Name field, give the data type a name, for example Employees.
d. Select the Data Source Name from the list menu, in this example DB2.
e. Select the Enabled check box to activate the data type so that it is available for use in policies.
f. Select the Base Table name from the list menu.
g. Click Refresh to add the fields from the DB2 example table to the data type.
h. Select at least one Key Field. Key fields are fields whose value or combination of values can be
used to identify unique data items in a data type.
Procedure
Use a URL like the following one to retrieve the OSLC resource collections that represent the data items:
http://<server>:<port>/NCICLUSTER_NCI_oslc/data/<datatype>
Results
Netcool/Impact maps the rows in the database to OSLC resources and it maps columns to OSLC resource
properties. The URL for each data item uses the key values in the form of HTTP matrix parameters to
uniquely identify the data item. The key values are defined in the Netcool/Impact data type configuration.
For example, a data item with multiple keys would result in a URI like this one:
http://<server>:<port>/NCICLUSTER_NCI_oslc/data/people/item;
<key1=value1>;<key2=value2>
Each non-NULL value in the database is represented as an RDF triple that consists of the data item, the
value, and the property that is derived from the column name. NULL values are represented in OSLC by
the absence of the property that is derived from the column name.
Example
For example, you can use the following URL to access the employee data type that is configured to use the
people path component:
http://example.com:9080/NCICLUSTER_NCI_oslc/data/people/
The URL returns a collection of OSLC resources that are based on the rows from the database table. The
following example shows the results for two data items that belong to the employee data type:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:people="http://jazz.net/ns/ism/event/impact#data/people/"
xmlns:impact="http://jazz.net/ns/ism/event/impact#/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oslc="http://open-services.net/ns/core#">
<oslc:ResponseInfo rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/people">
<rdfs:member>
Example
You use the following URL to display the information associated with a particular resource key, in this case
1010:
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/
myGetFilter/item;ID=1010
<rdf:RDF>
<examplePolicy:myGetFilter rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/
policy/example/myGetFilter/item;ID=1010">
<myGetFilter:NAME>Brian Doe</myGetFilter:NAME>
<myGetFilter:STARTED>1980-08-11</myGetFilter:STARTED>
<myGetFilter:MANAGER>1001</myGetFilter:MANAGER>
<myGetFilter:ID>1010</myGetFilter:ID>
<myGetFilter:DEPT>Documentation</myGetFilter:DEPT>
</examplePolicy:myGetFilter>
</rdf:RDF>
Table 56. OSLC properties generated by the Netcool/Impact data type parameters
OSLC property Netcool/Impact data type
oslc:readOnly Always 'true'
Example
The following example contains the OSLC resource shape for the Employees data type that was created
for a DB2 table that is called People in the abbreviated RDF format.
The resource URI is as follows:
http://<host>:9080/NCICLUSTER_NCI_oslc/data/resouceShapes/staff
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oslc="http://open-services.net/ns/core#">
<oslc:ResourceShape rdf:about=
"http://<host>:9080/NCICLUSTER_NCI_oslc/data/resourceShapes/staff">
<dcterms:title>Employees/dcterms:title>
<oslc:property>
<oslc:Property>
<oslc:propertyDefinition rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff/LAST_NAME"/>
<oslc:occurs rdf:resource=
"http://open-services.net/ns/core#Exactly-one"/>
<oslc:name>LAST_NAME</oslc:name>
<dcterms:description>LAST_NAME</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property>
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource=
"http://www.w3.org/2001/XMLSchema#integer"/>
<dcterms:title>ID</dcterms:title>
<oslc:propertyDefinition rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff/ID"/>
<oslc:occurs rdf:resource=
"http://open-services.net/ns/core#Exactly-one"/>
<oslc:name>ID</oslc:name>
<dcterms:description>ID</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property>
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource=
"http://www.w3.org/2001/XMLSchema#string"/>
<dcterms:title>FIRST_NAME</dcterms:title>
<oslc:propertyDefinition rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff/FIRST_NAME"/>
<oslc:occurs rdf:resource=
"http://open-services.net/ns/core#Exactly-one"/>
<oslc:name>FIRST_NAME</oslc:name>
<dcterms:description>FIRST_NAME</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property>
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource=
"http://www.w3.org/2001/XMLSchema#string"/>
<dcterms:title>COMPANY</dcterms:title>
<oslc:propertyDefinition rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff/COMPANY"/>
<oslc:occurs rdf:resource=
"http://open-services.net/ns/core#Exactly-one"/>
<oslc:name>COMPANY</oslc:name>
<dcterms:description>COMPANY</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property>
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource=
"http://www.w3.org/2001/XMLSchema#dateTime"/>
<dcterms:title>BIRTHDAY</dcterms:title>
<oslc:propertyDefinition rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff/BIRTHDAY"/>
<oslc:occurs rdf:resource=
"http://open-services.net/ns/core#Exactly-one"/>
<oslc:name>BIRTHDAY</oslc:name>
<dcterms:description>BIRTHDAY</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:describes rdf:resource=
"http://jazz.net/ns/ism/event/impact#/data/staff"/>
</oslc:ResourceShape>
</rdf:RDF>
Procedure
Add the following statement to the NCI_oslc.props file to specify a particular Type URI for a data type:
oslc.data.<path>.uri=<uri>
Optionally, you can add the following statement to specify a column name:
oslc.data.<path>.<columnname>.uri=<uri>
You can also add the following statement to specify a particular prefix for a namespace:
oslc.data.<path>.namespaces.<prefix>=<uri>
If you do not specify a prefix, the RDF that is returned automatically shows the generated prefix for the
namespace.
Example
The following code example demonstrates how an employee table can be represented in a friend of a
friend (FOAF) specification by adding the following statements to the NCI_oslc.props file:
oslc.data.staff=Employees
oslc.data.staff.uri=http://xmlns.com/foaf/0.1/Person
oslc.data.staff.NAME.uri=http://xmlns.com/foaf/0.1/name
oslc.data.staff.BIRTHDAY.uri=http://xmlns.com/foaf/0.1/birthday
oslc.data.staff.PHOTO.uri=http://xmlns.com/foaf/0.1/img
oslc.data.staff.STAFFPAGE.uri=http://xmlns.com/foaf/0.1/homepage
oslc.data.staff.EMAIL.uri=http://xmlns.com/foaf/0.1/mbox
<?xml version="1.0"?>
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.0="http://xmlns.com/foaf/0.1/"
xmlns:impact="http://jazz.net/ns/ism/events/impact#/"
xmlns:oslc="http://open-services.net/ns/core#"">
<j.0:Person rdf:about=
"http://example.com:9080/NCICLUSTER_NCI_oslc/data/staff/jdoe"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<j.0:name>John Doe</foaf:name>
<j.0:homepage rdf:resource="http://example.com" />
<j.0:mbox rdf:resource="[email protected]" />
<j.0:img rdf:resource="http://example.com/images/jdoe.jpg"/>
<j.0:birthday>19770801</foaf:birthday>
The following code example demonstrates how to specify a particular prefix for a namespace. First, you
specify the prefix and the namespace:
oslc.data.staff.namespaces.foaf=http://xmlns.com/foaf/0.1/
<?xml version="1.0"?>
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:impact="http://jazz.net/ns/ism/events/impact#/"
xmlns:oslc="http://open-services.net/ns/core#"">
<foaf:Person rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/data/staff/jdoe"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<foaf:name>John Doe</foaf:name>
<foaf:homepage rdf:resource="http://example.com" />
<foaf:mbox rdf:resource="[email protected]" />
<foaf:img rdf:resource="/images/jdoe.jpg" />
<foaf:birthday>19770801</foaf:birthday>
</foaf:Person>
</rdf:RDF>
Procedure
1. To define a service provider, add the following statement to the NCI_oslc.props configuration file:
oslc.<type>.<path>.provider=<provider_name>
oslc.provider.<provider_name>.title=<title>
oslc.provider.<provider_name>.description=<description>
For example:
oslc.data.computer=RESERVATION
oslc.data.computer.provider=provider01
...
oslc.provider.provider01.title=Customer-x Product-y OSLC Service Provider
oslc.provider.provider01.description=Customer-x Product-y OSLC Service Provider
2. OSLC resources can share an OSLC service or they can use different OSLC services. This is controlled
by the specified domain name. To specify a domain and a title for a resource, add the following
statement to the NCI_oslc.props configuration file:
oslc.<type>.<path>.provider.domain=<domain_URI>
oslc.<type>.<path>.provider.title=<title>
For example:
oslc.data.computer=RESERVATION
...
oslc.data.computer.provider=provider01
oslc.data.computer.provider.domain=http://domainx/
oslc.data.computer.provider.title=Computer Title
If you specify the same service provider and domain name for two OSLC resources, both resources
share a single OSLC service. If two resources use the same service provider but have different
domains, the resources use different OSLC services. If no domain is specified, then the system uses
the default Netcool/Impact namespace URI for this path.
3. Restart the Impact Server to implement the changes.
4. Use this URL to view the service providers:
https://<server>:9081/NCICLUSTER_NCI_oslc/provider
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oslc="http://open-services.net/ns/core#">
<rdf:Description rdf:about="https://<server>:9081/NCICLUSTER_NCI_oslc/
provider">
Procedure
1. Specify the registry server, user name, and password. If the registry server does not require a user
name and password, you do not need to specify them.
impact.oslc.registry.server=<RegistryserverproviderregistryURL>
http://<registryserver>:<port>/oslc/pr
.
To specify a registry server user, add the following statement to the NCI_oslc.props file:
impact.oslc.registry.username=<OSLCproviderregistryserver
username>
To specify the registry server password, add the following statement to the NCI_oslc.props file:
impact.oslc.registry.password=<OSLCproviderregistryserver
password>
where <OSLCproviderregistryserverpassword> is the password for the OSLC provider registry server in
encrypted form.
To locate the encrypted form of the password, run the nci_crypt program in the impact/bin
directory. For example:
nci_crypt password
{aes}DE865CEE122E844A2823266AB339E91D
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:RESERVATION="http://jazz.net/ns/ism/event/impact#/data/computer/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:crtv="http://open-services.net/ns/crtv#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#">
<crtv:ComputerSystem rdf:about="http://<impact-server>:9080/NCICLUSTER_NCI_oslc/
data/computer/item;ID=4">
<crtv:serialNumber>IBM00003SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://<registry-server>:16310/oslc/
providers/6015"/>
<RESERVATION:RESERVED_DATE>2012-07-16</RESERVATION:RESERVED_DATE>
<RESERVATION:RESERVED_BY>Michael Morton</RESERVATION:RESERVED_BY>
<RESERVATION:RELEASE_DATE>2013-03-06</RESERVATION:RELEASE_DATE>
<RESERVATION:ID>4</RESERVATION:ID>
</crtv:ComputerSystem>
</rdf:RDF>
3. Register the resource with the registry server. Netcool/Impact does not automatically register
resources. See “Registering OSLC resources” on page 194.
Procedure
• To register OSLC resources, you can use one of the following two methods:
– Use the RDFRegister policy function in a policy to register the resource. For more information, see
“RDFRegister” on page 198.
– Use the GetHTTP policy function to perform a HTTP POST function on the resource or list of
resource members. You must define the Method parameter as POST. You can also use the OSLC
query syntax to limit the properties that are registered as part of the resource. For more information
on the GetHTTP policy function, see the GetHTTP function in the Policy Reference Guide.
Results
After you run the policy that contains the policy function, Netcool/Impact tries to register the resource or
list of resource members included in the policy function.
Netcool/Impact also returns the response status, location header, and body text from the registry server
to the client. The location header displays the location of the resources registration record for each
resource that was registered. The body content that is contained in the response specifies the location of
each registration record for each resource that was registered.
If a single resource is registered successfully, the system displays a 201 status code (Created)
message. If multiple resources are registered successfully, the system displays a 200 status code
(OK) message.
When you register multiple resources, Netcool/Impact also returns the following headers and the
response body text from the registry server to the client:
• NextPage: If a next page of resources exists, the header contains the location URI of the next set of
resources. If no next page exists, the response does not contain this header.
• TotalCount: The total number of resources across all pages. This header is returned when you register
multiple resource.
The successful registration of an OSLC resource results in two records. A registration record is created in
the resource registry. A resource record is also created and this record is available through the resource
URI.
To view the registration records for the resource registry that is used by the Registry Service, add /rr/
registration/collection to the URI. For example:
http://example.com:16310/oslc/rr/registration/collection
To view the registered resources for a service provider, such as the Registry Service, add /rr/
collection to the Registry Service URL. For example:
http://example.com:16310/oslc/rr/collection?oslc.select=*
http://<Impactserver>:9080/NCICLUSTER_NCI_oslc/data/
computer/item;ID=4
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:RESERVATION="http://jazz.net/ns/ism/event/impact/
data/computer/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:crtv="http://open-services.net/ns/crtv#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#">
<crtv:ComputerSystem rdf:about="http://<Impactserver>:9080/
NCICLUSTER_NCI_oslc/data/computer/item;ID=4">
<crtv:serialNumber>IBM00003SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://
<registryserver>:9080/oslc/providers/6015"/>
<RESERVATION:RESERVED_DATE>2012-07-16</RESERVATION:RESERVED_DATE>
<RESERVATION:RESERVED_BY>Michael Morton</RESERVATION:RESERVED_BY>
<RESERVATION:RELEASE_DATE>2013-03-06</RESERVATION:RELEASE_DATE>
<RESERVATION:ID>4</RESERVATION:ID>
</crtv:ComputerSystem>
</rdf:RDF>
Use the query syntax in the URL to limit the properties to crtv:serialNumber, crtv:model,
crtv:manufacturer, and oslc:serviceProvider:
http://<Impactserver>:9080/NCICLUSTER_NCI_oslc/data/computer/
item;ID=4?oslc.properties=crtv:serialNumber,oslc:serviceProvider,
crtv:manufacturer,crtv:model
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:RESERVATION="http://jazz.net/ns/ism/event/impact/data/
computer/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:crtv="http://open-services.net/ns/crtv#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#">
<crtv:ComputerSystem rdf:about="http://<impact-server>:9080/
NCICLUSTER_NCI_oslc/data/computer/item;ID=4">
<crtv:serialNumber>IBM00003SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://<registryserver>:9080/
oslc/providers/6015"/>
</crtv:ComputerSystem>
</rdf:RDF>
Use the following policy to perform a POST function on the URI of the resource. The POST function
registers the resource with the resource registry associated with the serviceProvider property that is
defined in the resource.
After the policy runs and the resource is registered, the location of the registration record on the Registry
Services server is detailed in the Location header.
Example
The following URL contains a set of resource members that are to be registered:
http://<Impactserver>:9080/NCICLUSTER_NCI_oslc/data/computer/
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:RESERVATION="http://jazz.net/ns/ism/event/impact/data/computer/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crtv="http://open-services.net/ns/crtv#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#">
<rdf:Description rdf:about="http://<impact-server>:9080/
NCICLUSTER_NCI_oslc/data/computer/">
<rdfs:member>
<crtv:ComputerSystem rdf:about="http://<Impactserver>:
9080/NCICLUSTER_NCI_oslc/data/computer/item;ID=4">
<crtv:serialNumber>IBM00003SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://<registry-server>:9080/
oslc/providers/6015"/>
<RESERVATION:RESERVED_DATE>2012-07-16</RESERVATION:RESERVED_DATE>
<RESERVATION:RESERVED_BY>Michael Morton</RESERVATION:RESERVED_BY>
<RESERVATION:RELEASE_DATE>2013-03-06</RESERVATION:RELEASE_DATE>
<RESERVATION:ID>4</RESERVATION:ID>
</crtv:ComputerSystem>
</rdfs:member>
<rdfs:member>
<crtv:ComputerSystem rdf:about="http://<Impactserver>
:9080/NCICLUSTER_NCI_oslc/data/computer/item;ID=3">
<crtv:serialNumber>IBM00002SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://
<registryserver>:9080/oslc/providers/6015"/>
<RESERVATION:RESERVED_DATE>2011-02-20</RESERVATION:RESERVED_DATE>
<RESERVATION:RESERVED_BY>Sandra Burton</RESERVATION:RESERVED_BY>
<RESERVATION:RELEASE_DATE>2013-01-30</RESERVATION:RELEASE_DATE>
<RESERVATION:ID>3</RESERVATION:ID>
As this list contains a list of resource members, you can use the oslc.select query parameter to limit
the properties of each resource member:
http://<Impactserver>:9080/NCICLUSTER_NCI_oslc/data/
computer?oslc.select=crtv:serialNumber,crtv:manufacturer,crtv:model,
oslc:serviceProvider
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:RESERVATION="http://jazz.net/ns/ism/event/impact/data/computer/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:crtv="http://open-services.net/ns/crtv#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#">
<oslc:ResponseInfo rdf:about="http://<Impactserver>:9080/
NCICLUSTER_NCI_oslc/data/computer?oslc.select=crtv:serialNumber,
crtv:manufacturer,crtv:model,oslc:serviceProvider&
oslc.paging=true&oslc.pageSize=100">
<oslc:totalCount>3</oslc:totalCount>
</oslc:ResponseInfo>
<rdf:Description rdf:about="http://<Impactserver>:9080/
NCICLUSTER_NCI_oslc/data/computer?oslc.select=crtv:serialNumber,
crtv:manufacturer,crtv:model,oslc:serviceProvider">
<rdfs:member>
<crtv:ComputerSystem rdf:about="http://<Impactserver>:
9080/NCICLUSTER_NCI_oslc/data/computer/item;ID=4">
<crtv:serialNumber>IBM00003SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://<registry-server>:
9080/oslc/providers/6015"/>
</crtv:ComputerSystem>
</rdfs:member>
<rdfs:member>
<crtv:ComputerSystem rdf:about="http://<Impactserver>:
9080/NCICLUSTER_NCI_oslc/data/computer/item;ID=3">
<crtv:serialNumber>IBM00002SN</crtv:serialNumber>
<crtv:model>IBM Model01</crtv:model>
<crtv:manufacturer>IBM Manufacturer01</crtv:manufacturer>
<oslc:serviceProvider rdf:resource="http://<registryserver>:
9080/oslc/providers/6015"/>
</crtv:ComputerSystem>
</rdfs:member>
<rdfs:member>
<crtv:ComputerSystem rdf:about="http://<Impactserver>:
Use the following policy to perform a POST function on the URI of the resources. The POST function
registers the resources with the resource registry associated with the serviceProvider property that is
defined in the resource.
If the resources are registered successfully, the system displays a message to confirm. Netcool/Impact
also returns the header, body text, and other information that is contained in the response from the
registry server to the client. The header and body text specify the location of each registration record for
each resource that was registered.
RDFRegister
You can use the RDFRegister function to help you to register service providers or OSLC resources with
the registry server.
Before you can register a service provider or resource, you must use the other RDF policy functions to
build an RDF model that meets the OSLC and Registry Services requirements.
After you build the RDF model, use the RDFRegister function to register the RDF with the resource
registry contained in the Registry Services integration service.
If the service provider or OSLC resource is registered successfully, the RDFRegister function returns
the resource location of the registration record. The following variables and their return values are also
returned to provide more information:
• ResultCode contains the result code for the response.
• HeadersReceived contains the headers received in the response.
• HeadersSent contains the headers sent in the response.
• ResponseBody contains the response body text.
If the query parameters are set in the URL and you use the RDFRegister policy function to register a
service provider, you must manually add the location of the service provider to the policy. For example:
RDFStatement(newModel, manu[0].subject,
"http://open-services.net/ns/core#serviceProvider", serviceProviderURL, true);
FormParameters=null;
Finally, you must ensure that the policy contains pagination information. For example:
Path="/NCICLUSTER_NCI_oslc/data/mysql1?oslc.paging=true&oslc.pageSize=100";
If unsuccessful, the return value of the resource location registration record is null. Error code information
is retuned in the ErrorReason and ResultCode variables.
Syntax
The RDFRegister function has the following syntax:
where Username can be a null or void string to specify that no authentication is required.
Parameters
The RDFRegister function has the following parameters:
Example
The following example manually registers a service provider and a set of resources that have been
exposed by the OSLC server provider in Netcool/Impact.
The Registry Services server information is as follows:
RegistryServerProviderCFUri="http://<registry_services_server>:
16310/oslc/pr/collection";
RegistryServerResourceCFUri="http://<registry_services_server>:
16310/oslc/rr/registration/collection";
RegistryServerUsername="system";
RegistryServerPassword="manager";
HTTPHost="<impact_server>";
HTTPPort=9080;
Protocol="http";
Path1="/NCICLUSTER_NCI_oslc/provider/provider01";
Path2="/NCICLUSTER_NCI_oslc/data/computer";
ChannelKey="";
Method="GET";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
serviceProviderModel=RDFParse(serviceProviderResponse)
serviceProviderURL = RDFRegister(RegistryServerProviderCFUri,
RegistryServerUsername, RegistryServerPassword,serviceProviderModel);
log("Provider Registry-Service Provider URL: " + serviceProviderURL);
allResourceModel=RDFParse(allResources);
Register each computer system and a set of properties with the resource registry:
statements=RDFSelect(allResourceModel, null,
"http://jazz.net/ns/ism/event/impact#data/computer/ID", null);
size=Length(statements);
count=0;
while(count<size) {
Path3=statements[count].subject;
//Get the individual computer system resource
resourceResponse=GetHTTP(HTTPHost,HTTPPort, Protocol, Path3, ChannelKey,
Method,AuthHandlerActionTreeName, null, FilesToSend, HeadersToSend,
HttpProperties);
resourceModel=RDFParse(resourceResponse);
Create a model that contains the properties and data that you want to register:
newModel=RDFModel();
manu=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#manufacturer",null);
model=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#model", null);
serial=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#serialNumber", null);
RDFModelUpdateNS(newModel, "crtv", "http://open-services.net/ns/crtv#");
RDFModelUpdateNS(newModel, "oslc","http://open-services.net/ns/core#");
RDFStatement(newModel, manu[0].subject,
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"http://open-services.net/ns/crtv#ComputerSystem", true);
RDFStatement(newModel, manu[0].subject, manu[0].predicate, manu[0].object,
RDFNodeIsResource(manu[0].object));
RDFStatement(newModel, manu[0].subject, model[0].predicate, model[0].object,
RDFNodeIsResource(manu[0].object));
RDFStatement(newModel, manu[0].subject, serial[0].predicate,
serial[0].object, RDFNodeIsResource(manu[0].object));
RDFStatement(newModel, manu[0].subject,
"http://open-services.net/ns/core#serviceProvider", serviceProviderURL, true);
count=count+1;
}
RDFUnRegister
To remove the registration record of a service provider or resource from the registry server, use the
RDFUnRegister function to supply the location of the registration record, the Registry Services server
username and password, and the registration record that you want to remove.
Before you can remove the registration record of a service provider, you must remove all the registration
records for the associated OSLC resources.
If successful, the RDFUnRegister function returns the message code 204 and the value true. The
following variables and their return values are also returned to provide additional information:
• ResultCode contains the result code for the response.
• HeadersReceived contains the headers received in the response.
• HeadersSent contains the headers sent in the response.
• ResponseBody contains the response body text.
If unsuccessful, the return value of the resource location registration record is false. Error code
information is returned in the ErrorReason and ResultCode variables.
Syntax
The RDFUnRegister function has the following parameters:
where Username can be a null or void string to specify that no authentication is required.
Parameters
Table 59. RDFUnRegister function parameters
Parameter Type Description
URI String Location that contains the
registration record for the
resource or service provider
Username String User name for the Registry
Services server
Password String Password for the Registry
Services server
http://<registryserver>:16310/oslc/providers/6577
registrationURL = "http://oslcregistryserver.com:16310/oslc/registration/1351071987349";
providerURL = "http://oslcregistryserver.com:16310/oslc/providers/
1351071987343";
RegistryServerUsername="smadmin";
RegistryServerPassword="password";
Procedure
1. To access Netcool/Impact policy results, edit the NCI_oslc.props file that is in the
IMPACT_HOME/etc directory, where NCI is the name of your Impact Server. Add the following
statement for each policy that you want to access:
oslc.policy.<pathcomponent>=<policyname>
Example
For example, you add the following statement to the NCI_oslc.props file to access the
SNMPTableTest policy:
oslc.policy.tabletest=SNMPTableTest
Use the following URL to run the policy and return the results:
http://example.com:9080/ NCICLUSTER_NCI_oslc/policy/tabletest
where NCI is the Impact Server name and NCICLUSTER is the Netcool/Impact cluster name.
When you access this URL, the policy runs and the policy output parameters are available as RDF
resources.
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/
<rdf:RDF
<examplePolicy:example rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example">
<example:myArrayStr rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myArrayStr"/>
<example:myObject rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObject"/>
<example:myObjArray rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray"/>
<example:myGetFilter rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myGetFilter"/>
<example:MyAlerts rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/MyAlerts"/>
<example:myString>Brian</example:myString>
<example:myDouble>22.5</example:myDouble>
<example:myFloat>100.55</example:myFloat>
<example:myInteger>32</example:myInteger>
<example:myBoolean>true</example:myBoolean>
</examplePolicy:example>
</rdf:RDF>
The more complex variables in this example, such as myObject, myArrayStr, myObjArray, and
myGetFilter, are displayed as resource links. The other variables are simple variables, such as
myString, myDouble, myFloat, myInteger, and myBoolean, that are displayed as literals alongside
their values.
You use the following URL to access the resource URL used for Netcool/Impact objects, represented by
the myObject variable:
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/myObject
<rdf:RDF>
<examplePolicy:myObject rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/
policy/example/myObject">
<myObject:bmi>24.5</myObject:bmi>
<myObject:lname>Doe</myObject:lname>
<myObject:fname>John</myObject:fname>
<myObject:age>25</myObject:age>
<oslc:totalCount>1</oslc:totalCount>
<rdf:type rdf:resource="http://open-services.net/ns/core#ResponseInfo"/>
</examplePolicy:myObject>
</rdf:RDF>
oslc.policy.<pathcomponent>.arrayprefix=<prefix>.
For example, add the following definition to the NCI_oslc.props file to change the prefix to pos for the
example path component:
oslc.policy.example.arrayprefix=pos
Procedure
To access the resource URL used for an array of objects, represented in this example by the myArrayStr
variable, use the following URL:
http://<server>:<port>/NCICLUSTER_NCI_oslc/policy/
example/myArrayStr
Results
This URL returns the following results:
<rdf:RDF>
<examplePolicy:myArrayStr rdf:about="http://<server>:<port>/
NCICLUSTER_NCI_oslc/policy/example/myArrayStr">
<myArrayStr:oslc_pos_2>Hi</myArrayStr:oslc_pos_2>
<myArrayStr:oslc_pos_1>Hey</myArrayStr:oslc_pos_1>
<myArrayStr:oslc_pos_0>Hello</myArrayStr:oslc_pos_0>
<oslc:totalCount>1</oslc:totalCount>
<rdf:type rdf:resource="http://open-services.net/ns/core#ResponseInfo"/>
</examplePolicy:myArrayStr>
</rdf:RDF>
If an array variable contains multiple Netcool/Impact objects, then a resource that contains a link to
multiple resources is created. Each of these resources contains a link to the actual Netcool/Impact object
in the array.
Example
Use the following URL to access the array of variables that is represented by the myObjArray variable:
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/myObjArray/
As this array contains multiple objects, the URL returns the following results:
<rdf:RDF>
<oslc:ResponseInfo rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray/">
<rdfs:member>
<examplePolicy:myObjArray rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray">
<myObjArray:oslc_pos_2 rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray/oslc_pos_2"/>
<myObjArray:oslc_pos_1 rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray/oslc_pos_1"/>
<myObjArray:oslc_pos_0 rdf:resource="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray/oslc_pos_0"/>
</examplePolicy:myObjArray>
</rdfs:member>
<oslc:totalCount>1</oslc:totalCount>
If you access the URL associated with one of the Netcool/Impact objects, the following results are
returned:
<rdf:RDF>
<myObjArray:oslc_pos_1 rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/example/myObjArray/oslc_pos_1">
<oslc_pos_1:fname>Garrett</oslc_pos_1:fname>
<oslc_pos_1:bmi>33.1</oslc_pos_1:bmi>
<oslc_pos_1:age>30</oslc_pos_1:age>
</myObjArray:oslc_pos_1>
</rdf:RDF>
Procedure
To display the resource shape for any OSLC object, add resourceShapes to the URL.
Example
For example, you use the following URL to display the resource shape definition for the specified
resource:
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/resourceShapes/
example/myGetFilter/item;ID=1010
This URL returns the following results which include the resource shape definition:
<rdf:RDF
<oslc:ResourceShape rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/resourceShapes/example/myGetFilter">
<dcterms:title>examplePolicy</dcterms:title>
<oslc:property>
<oslc:Property rdf:about="http://xmlns.com/foaf/0.1/givenName">
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<dcterms:title>NAME</dcterms:title>
<oslc:propertyDefinition rdf:resource="http://jazz.net/ns/ism/events/
impact/policy/example/myGetFilter/NAME"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<oslc:name>NAME</oslc:name>
<dcterms:description>NAME</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property rdf:about="http://jazz.net/ns/ism/event/impact#/policy/
example/myGetFilter/STARTED">
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
<dcterms:title>STARTED</dcterms:title>
<oslc:propertyDefinition rdf:resource="http://jazz.net/ns/ism/events/
impact/policy/example/myGetFilter/STARTED"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<oslc:name>STARTED</oslc:name>
<dcterms:description>STARTED</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property rdf:about="http://jazz.net/ns/ism/event/impact#/policy/
example/myGetFilter/MANAGER">
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
<dcterms:title>MANAGER</dcterms:title>
<oslc:propertyDefinition rdf:resource="http://jazz.net/ns/ism/events/
impact/policy/example/myGetFilter/MANAGER"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<oslc:name>MANAGER</oslc:name>
Procedure
1. Click the Polices tab. To open the Policy Settings Editor in the policy editor toolbar, click the
Configure Policy Settings icon. Create a JavaScript or an IPL policy.
2. To create a policy output parameter, click New Output Parameter:New. To create a policy input
parameter, click New Input Parameter:New.
Mandatory fields are denoted by an asterisk (*). You must enter a unique name in the Name field.
3. Define the custom schemas for the output parameters if required.
If you are using the DirectSQL policy function with OSLC, you must define the custom schema for it.
You need to create an output parameter for this policy to create a UI Data Provider policy-related
action.
If you are using DirectSQL, Impact Object, or Array of Impact Object with the UI data provider or the
chart widget, you must define the custom schema for these values.
For more information, see “Creating custom schema values for output parameters” on page 208
4. Click New to create a UI Data Provider policy-related action.
You can use this option to enable a policy action on a widget in the console (Dashboard the Dashboard
Application Services Hub) in Jazz for Service Management. For more information, see “Creating a
widget on a page in the console” on page 106.
a) In the Name field, add a name for the action.
The name that you add displays in the widget in the console when you right-click on an action in the
specified widget.
b) In the Policy Name menu, select the policy that you want the action to relate to.
c) In the Output Parameter menu, select the output parameter that will be associated with this
action, if you select the All output parameters option, the action becomes available for all output
parameters for the selected policy.
5. To enable a policy to run with an UI data provider, select the Enable policy for UI Data Provider
actions check box.
6. To enable a policy to run in with the Event Isolation and Correlation capabilities, select the Enable
Policy for Event Isolation and Correlation Actions check box.
7. To save the changes to the parameters and close the window, click OK.
first_name = “Mark”;
zip_code = 12345;
Log(“Hello “ + first_name + “ living at “ + zip_code);
Next, define the output parameters for this policy. In this case, there are two output parameters. You
enter the following information:
O1.city="NY"
O1.ZIP=07002
You define the following custom schemas values for this policy:
Procedure
1. In the Policy Settings Editor, select DirectSQL, Impact Object, or Array of Impact Object in the
Format field.
2. The system shows the Open the Schema Definition Editor icon beside the Schema Definition
field. To open the editor, click the icon.
3. You can edit an existing entry or you can create a new one. To define a new entry, click New. Enter a
name and select an appropriate format.
To edit an existing entry, click the Edit icon beside the entry that you want to edit
4. To mark an entry as a key field, select the check box in the Key Field column. You do not have to define
the key field for Impact objects or an array of Impact objects. The system uses the UIObjectId as the
key field instead.
5. To delete an entry, select the entry and click Delete.
Procedure
1. To open the policy user parameter editor, click the Configure Policy Settings icon in the policy editor
toolbar. You can create policy input and output parameters. To open the Create a New Policy Output
Parameter window, click New.
2. Select data type as the format.
3. Enter the name of the data item to which the output of the GetByFilter function is assigned in the
Policy Variable Name field.
4. Enter the name of the data source in the Data Source Name field.
5. Enter the name of the data type in the Data Type Name field.
Example
This example demonstrates how to make the output from the GetByFilter function available to the
Netcool/Impact OSLC provider.
You create a data type called ALERTS that belongs to the defaultobjectserver data source. This data type
belongs to Netcool/OMNIbus and it points to alerts.status. The key field is Identifier. The following
four rows of data are associated with the key field:
• Event1
• Event2
• Event3
• Event4
Next, you define the output parameters for the policy as follows:
Procedure
To access variables output by the DirectSQL policy function, create a DirectSQL output parameter and
define the DirectSQL values for this parameter. For a detailed description of these steps, see “Creating
custom schema values for output parameters” on page 208.
Example
This example demonstrates how to access variables output by the DirectSQL policy function. You define
the following policy which uses the DirectSQL function:
To create the DirectSQL format values, click the DirectSQL editor icon. Define the format values as
follows:
Use the following URI to run the policy and return the results:
http://example.com:9080/NCICLUSTER_NCI_oslc/
policy/examplePolicy/MyAlerts
<rdf:RDF
<oslc:ResponseInfo rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/
policy/examplePolicy/MyAlerts">
<rdfs:member>
<examplePolicy:MyAlerts rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/examplePolicy/MyAlerts/
item;min_serial=133;num_events=12;max_serial=521">
<MyAlerts:num_events>12</MyAlerts:num_events>
<MyAlerts:min_serial>133</MyAlerts:min_serial>
<MyAlerts:max_serial>521</MyAlerts:max_serial>
</examplePolicy:MyAlerts>
</rdfs:member>
<oslc:totalCount>1</oslc:totalCount>
</oslc:ResponseInfo>
</rdf:RDF>
<rdf:RDF
<oslc:ResourceShape rdf:about="http://example.com:9080/
NCICLUSTER_NCI_oslc/policy/resourceShapes/example/MyAlerts">
<dcterms:title>examplePolicy</dcterms:title>
<oslc:property>
<oslc:Property rdf:about="http://jazz.net/ns/ism/event/impact#/policy/
example/myDirectSQL/num_events">
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
<dcterms:title>num_events</dcterms:title>
<oslc:propertyDefinition rdf:resource="http://jazz.net/ns/ism/events/
impact/policy/example/myDirectSQL/num_events"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<oslc:name>num_events</oslc:name>
<dcterms:description>num_events</dcterms:description>
</oslc:Property>
</oslc:property>
<oslc:property>
<oslc:Property rdf:about="http://jazz.net/ns/ism/event/impact#/policy/
example/myDirectSQL/min_serial">
<oslc:readOnly>true</oslc:readOnly>
<oslc:valueType rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
Procedure
1. To add a custom URI to a policy resource, add the following definition to the NCI_oslc.prop file:
oslc.policy.<pathcomponent>.uri=<uri>
2. To add a custom URI to a variable, specify the variable and the path component. As there are multiple
layers of variables, you must specify each variable until you reach the one that you want:
oslc.policy.<pathcomponent>.<variablename>.uri=<uri>
oslc.policy.<pathcomponent>.<variablename>.<variablename>
....<variablename>.uri=uri
Example
The following example demonstrates how the example policy can be represented in a Friend of a Friend
(FOAF) specification. You start by adding statements to the NCI_oslc.props file:
oslc.policy.example=examplePolicy
oslc.policy.example.namespaces.foaf=http://xmlns.com/foaf/0.1/
oslc.policy.example.uri=http://xmlns.com/foaf/0.1/Person
oslc.policy.example.myGetFilter.NAME.uri=http://xmlns.com/foaf/0.1/givenName
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/myGetFilter
<rdf:RDF
<oslc:ResponseInfo rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/policy/
example/myGetFilter">
<rdfs:member>
The user has not defined the prefix and namespace in this example. In this case, the RDF shows the
automatically generated prefix for the namespace j.0 for http://xmlns.com/foaf/0.1/.
You specify a prefix for a namespace in this format:
oslc.policy.<path>.namespaces.<prefix>=<uri>
oslc.policy.example.namespaces.foaf=http://xmlns.com/foaf/0.1/
When you use the following URL to query the OSLC resource, the RDF is produced with the prefix specified
by you:
http://example.com:9080/NCICLUSTER_NCI_oslc/policy/example/myGetFilter
<rdf:RDF
<oslc:ResponseInfo rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/policy/
example/myGetFilter">
<rdfs:member>
<foaf:Person rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/policy/
example/myGetFilter/item;ID=1012">
<foaf:givenName>Kevin Doe</foaf:givenName>
<myGetFilter:STARTED>1976-07-06</myGetFilter:STARTED>
<myGetFilter:MANAGER>1001</myGetFilter:MANAGER>
<myGetFilter:ID>1012</myGetFilter:ID>
<myGetFilter:DEPT>Documentation</myGetFilter:DEPT>
</foaf:Person>
</rdfs:member>
<rdfs:member>
<foaf:Person rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/policy/
example/myGetFilter/item;ID=1010">
<foaf:givenName>Brian Doe</foaf:givenName>
<myGetFilter:STARTED>1980-08-11</myGetFilter:STARTED>
<myGetFilter:MANAGER>1001</myGetFilter:MANAGER>
<myGetFilter:ID>1010</myGetFilter:ID>
<myGetFilter:DEPT>Documentation</myGetFilter:DEPT>
</foaf:Person>
</rdfs:member>
<oslc:totalCount>2</oslc:totalCount>
</oslc:ResponseInfo>
</rdf:RDF>
Procedure
Use the following URL to pass argument values to a policy:
<path name> is the value defined in the NCI_oslc.props file for example
oslc.data.<path name>=<datatype_name>
http://<host>:<port>/NCI_NCICLUSTER_oslc/policy/
<path name>?arg1=<value>&arg2=<value>
Restriction: Unusually long URLs can cause issues. This depends on the browser and the Liberty Core
settings. To avoid these issues, limit the size of the values of the variables that are passed through the
query string.
Results
After you access this URL, the policy runs. If you do not define any policy output parameters, the policy
parameters are available as properties within an OSLC resource.
Example
For example, you use the following URL to pass the variable arg1 with the string value table1 to the
policy defined in the tableset path:
http://example.com:9080/NCI_NCICLUSTER_oslc/policy/tableset?arg1=table1
Procedure
To configure hover previews, add a set of properties for each OSLC resource to the NCI_oslc.props file.
You can use any combination of these properties. Some of these properties only display if the document
or icon parameter exists in the OSLC resource. For a detailed description of these properties, see “Hover
preview properties for OSLC resources” on page 216. To use hover preview (UI Preview) with Dash, you
should specify both smallPreview and largePreview properties.
$<prefixnamespace>:<propertyname>
For example:
$RESERVATION:HOSTNAME
$RESERVATION:ID
To view all the possible variables for an OSLC resource, use the OSLC resource URI to view the full XML
representation.
If a resource does not exist or an error occurs, the system displays an error code 400 and a message that
explains the issue.
If the resource does not support hover previews, for example if the resource contains rdfs:member lists,
the system displays a 406 Not Acceptable error code.
If no hover preview parameters are defined for the resource, the system displays a compact XML that
contains no parameters other than those parameters about the URI.
If you design a third party hover preview consumer like TBSM, you can add application/x-oslc-
compact+xml to the URL as an HTTP Accept header to display the hover preview compact XML
document in the response.
Example
The following example demonstrates how to configure the hover preview for an OSLC resource that is
based on a database table called RESERVATION. The following hover preview settings are defined in the
NCI_oslc.props file:
oslc.data.computer=RESERVATION
oslc.data.computer.uri=http://open-services.net/ns/crtv#ComputerSystem
oslc.data.computer.MODEL.uri=http://open-services.net/ns/crtv#model
oslc.data.computer.MANUFACTURER.uri=http://open-services.net/ns/crtv#manufacturer
oslc.data.computer.SERIALNUMBER.uri=http://open-services.net/ns/crtv#serialNumber
oslc.data.computer.namespaces.crtv=http://open-services.net/ns/crtv#
oslc.data.computer.provider=provider01
oslc.data.computer.provider.domain=http://domainx/
oslc.data.computer.preview.title=
Computer Reservation System - $RESERVATION:HOSTNAME
oslc.data.computer.preview.shortTitle=Reservation
oslc.data.computer.preview.largePreview.document=
https://<impactserver>:16311/opview/displays/NCICLUSTER-Reservations.html?
id=$RESERVATION:ID
oslc.data.computer.preview.largePreview.hintWidth=31.250em
oslc.data.computer.preview.largePreview.hintHeight=21.875em
oslc.data.computer.preview.smallPreview.document=https:
//<impactserver>:16311/opview/displays/NCICLUSTER-Reservations.html?id=
$RESERVATION:ID
oslc.data.computer.preview.smallPreview.hintWidth=31.250em
oslc.data.computer.preview.smallPreview.hintHeight=21.875em
Next, derive the hover preview content. In this example, use a Netcool/Impact operator. In this case, two
variables are generated in the compact XML:
$RESERVATION:HOSTNAME
$RESERVATION:ID
These variables are converted into the property values based on data from the OSLC resource:
$RESERVATION:HOSTNAME = mycomputer.ibm.com
$RESERVATION:ID = 4
<?xml version="1.0"?>
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc="http://open-services.net/ns/core#">
<oslc:Compact rdf:about="http://example.com:9080/NCICLUSTER_NCI_oslc/data/
computer/item;ID=4">
<dcterms:title>Computer Reservation System - mycomputer.ibm.com</dcterms:title>
<oslc:shortTitle>Reservation</oslc:shortTitle>
<oslc:largePreview>
<oslc:Preview>
<oslc:hintWidth>31.250em</oslc:hintWidth>
<oslc:hintHeight>21.875em</oslc:hintHeight>
<oslc:document rdf:resource=
"https://<impact-server>:16311/opview/displays/NCICLUSTER-Reservations.html?id=4"/>
</oslc:Preview>
</oslc:largePreview>
<oslc:smallPreview>
<oslc:Preview>
<oslc:hintWidth>31.250em</oslc:hintWidth>
<oslc:hintHeight>21.875em</oslc:hintHeight>
<oslc:document rdf:resource=
"https://<impact-server>:16311/opview/displays/NCICLUSTER-Reservations.html?id=4"/>
</oslc:Preview>
</oslc:smallPreview>
</oslc:Compact>
</rdf:RDF>
where <type> is the OSLC resource type. It can be either a data or policy.
<path> is the OSLC resource path.
Procedure
1. Create a Netcool/Impact policy that creates a service provider and registers it in the provider registry
that is part of the Registry Services component of Jazz for Service Management:
a. Define the server information for the server where the Registry Services component of Jazz for
Service Management is installed:
RegistryServerProviderCFUri="http://<registry_server>:16310/oslc/pr/collection";
RegistryServerUsername="<user>";
RegistryServerPassword="<password>";
Log(CurrentContext());
dsTitle = "Customer-x Product-y OSLC Service Provider";
dsDescription = "Customer-x Product-y OSLC Service Provider";
provider = "http://<URL>/<myProvider>";
domain = "http://<Domain>/";
For example
provider = "http://<impact-server>:9080/NCICLUSTER_NCI_oslc/provider/provider01";
domain = "http://jazz.net/ns/ism/event/impact#";
c. Use the RDFModel policy function to create the service provider RDF model:
serviceProviderModel = RDFModel();
RDFModelUpdateNS(serviceProviderModel, "oslc","http://open-services.net/ns/core#");
RDFModelUpdateNS(serviceProviderModel, "dcterms","http://purl.org/dc/terms/");
f. Use the RDFRegister policy function to register the service provider in the provider registry.
RegistryServerResourceCFUri="http://<registry_server>:16310/oslc/rr/
registration/collection";
RegistryServerUsername="<user>";
RegistryServerPassword="<password>";
computerSystem = "http://<OSLC_resource_URL>/mySystemX";
name = "mySystemX";
manufacturer = "VMware";
serialNumber = "422ABA0619B0DE94B02E40870D6462AF";
model = "VMWAREVIRTUALPLATFORM";
The service provider is located at the following URL. You can retrieve this URL after you register the
service provider:
"http://<registry_server>:16310/oslc/providers/1358241368487"
computerSystemModel = RDFModel();
RDFModelUpdateNS(computerSystemModel, "crtv", "http://open-services.net/ns/crtv#");
RDFModelUpdateNS(computerSystemModel, "oslc","http://open-services.net/ns/core#");
OSLC urls
You use the following URLs to access OSLC data.
Access data items
http://<server>:<port>/NCICLUSTER_NCI_oslc/data/<datatype>/
OSLC pagination
The Netcool/Impact OSLC provider supports pagination to make the retrieval of large amounts of data
easier and more efficient.
Pagination is enabled by default for data items and policies whose variables contain data items. To
manually configure pagination, add the following query parameters to the URL:
?oslc.paging=true&oslc.page=<pagenumber>&oslc.pageSize=<pagesize>
• oslc.paging=true enables pagination. This setting is enabled by default. To disable pagination, use
oslc_paging=false.
• oslc.page=<pagenumber> is the page number. This property is set to page 1 by default.
• oslc.pageSize=<pagesize> is the page size. This property is set to 100 by default.
Administrators can add the following statement to the NCI_server.props configuration file to set the
default limit for the page size:
impact.oslc.pagesize=<pagesize>
Response information
Two properties are added to the response information: oslc:nextPage and oslc:totalCount.
The oslc:nextPage property is not returned when there is no next page. If the page size of the result is
smaller than the specified page size property, no next page property is returned.
The oslc:totalCount property gives the total count information across all the pages.
Example
For example, the following URL represents the alert variables that belong to the GetByFilter function
events:
http://example.com:16310/NCICLUSTER_NCI_oslc/policy/events/alerts?
oslc.paging=true&oslc.page=2&oslc.pageSize=25
In the URL, pagination is enabled. The variable results are contained in page two. The page size is limited
to 25.
Example
To display properties for an individual resource URI that contains no rdfs:member list, use the
oslc.properties query parameter:
http://<server>:16310/NCICLUSTER_NCI_oslc/data/staff/item;
FNAME=%27Todd%27;LNAME=%27Bishop%27?oslc.properties=foaf:lastName,
foaf:firstName
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:EMPLOYEES="http://jazz.net/ns/ism/event/impact/data/staff/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#"
xmlns:foaf="http://xmlns.com/foaf/">
<foaf:Person rdf:about="http://<server>:16310/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Todd';LNAME='Bishop'">
<foaf:lastName>Bishop</foaf:lastName>
<foaf:firstName>Todd</foaf:firstName>
</foaf:Person>
</rdf:RDF>
http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff?oslc.select=foaf:lastName,foaf:firstName
This URL returns only the rdfs:member lists that contain the foaf:lastName and foaf:firstName
properties:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:EMPLOYEES="http://jazz.net/ns/ism/event/impact/data/staff/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#"
xmlns:foaf="http://xmlns.com/foaf/">
<oslc:ResponseInfo rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff?oslc.select=foaf:lastName,foaf:firstName&
oslc.paging=true&oslc.pageSize=100">
<oslc:totalCount>5</oslc:totalCount>
</oslc:ResponseInfo>
<rdf:Description rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff?oslc.select=foaf:lastName,foaf:firstName">
<rdfs:member>
<foaf:Person rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Mika';LNAME='Masion'">
<foaf:lastName>Masion</foaf:lastName>
<foaf:firstName>Mika</foaf:firstName>
</foaf:Person>
</rdfs:member>
<rdfs:member>
<foaf:Person rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Kevin';LNAME='Doe'">
<foaf:lastName>Doe</foaf:lastName>
<foaf:firstName>Kevin</foaf:firstName>
</foaf:Person>
</rdfs:member>
<rdfs:member>
<foaf:Person rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Todd';LNAME='Bishop'">
<foaf:lastName>Bishop</foaf:lastName>
<foaf:firstName>Todd</foaf:firstName>
</foaf:Person>
</rdfs:member>
<rdfs:member>
<foaf:Person rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Miriam';LNAME='Masters'">
<foaf:lastName>Masters</foaf:lastName>
<foaf:firstName>Miriam</foaf:firstName>
</foaf:Person>
</rdfs:member>
<rdfs:member>
<foaf:Person rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/data/
staff/item;FNAME='Brian';LNAME='Doe'">
<foaf:lastName>Doe</foaf:lastName>
<foaf:firstName>Brian</foaf:firstName>
</foaf:Person>
</rdfs:member>
</rdf:Description>
</rdf:RDF>
http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl/myDirectSQL2?
oslc.select=myDirectSQL2:num_events
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
oslc.properties=*
To display all the variables, their nested values, and the policy functions, use the following statement:
oslc.properties=*&oslc.select=*
Example
For example, you define a policy and you want to use the following URL to access it:
http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:direct="http://policy.js/xmlns/directSQL/"
xmlns:test_ipl="http://jazz.net/ns/ism/event/impact/policy/ipl/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#"
xmlns:javascript="http://policy.js/xmlns/">
<rdf:Description rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl">
<test_ipl:myTimestamp>20120818</test_ipl:myTimestamp>
<test_ipl:myString>test_ipl</test_ipl:myString>
<test_ipl:myInteger>55</test_ipl:myInteger>
<test_ipl:myImpactObjectArray rdf:resource="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray"/>
<test_ipl:myImpactObject1 rdf:resource="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObject1"/>
<test_ipl:myDouble>109.5</test_ipl:myDouble>
<rdf:type rdf:resource="http://jazz.net/ns/ism/event/impact/policy/ipl/"/>
</rdf:Description>
</rdf:RDF>
This example contains several RDF literals such as myTimestamp, myString, and myInteger. It also
contains the myImpactObjectArray RDF resource.
http://<server>:9080/NCICLUSTER_NCI_oslc/policy/
ipl?oslc.properties=*
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:myImpactObjectArray="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/"
xmlns:myImpactObject1="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObject1/"
xmlns:direct="http://policy.js/xmlns/directSQL/"
xmlns:test_ipl="http://jazz.net/ns/ism/event/impact/policy/ipl/"
xmlns:oslc_pos_2="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_2/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_pos_1="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_1/"
xmlns:oslc_pos_0="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_0/"
xmlns:impact="http://jazz.net/ns/ism/event/impact#"
xmlns:javascript="http://policy.js/xmlns/">
<rdf:Description rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl">
<test_ipl:myTimestamp>20120818</test_ipl:myTimestamp>
<test_ipl:myString>test_ipl</test_ipl:myString>
<test_ipl:myInteger>55</test_ipl:myInteger>
<test_ipl:myImpactObjectArray>
<test_ipl:myImpactObjectArray rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray">
<myImpactObjectArray:oslc_pos_2>
<myImpactObjectArray:oslc_pos_2 rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray/oslc_pos_2">
<oslc_pos_2:lname>Doe</oslc_pos_2:lname>
<oslc_pos_2:fname>Kevin</oslc_pos_2:fname>
<oslc_pos_2:email>[email protected]</oslc_pos_2:email>
<oslc_pos_2:birthday>1973-01-22</oslc_pos_2:birthday>
</myImpactObjectArray:oslc_pos_2>
</myImpactObjectArray:oslc_pos_2>
<myImpactObjectArray:oslc_pos_1>
<myImpactObjectArray:oslc_pos_1 rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray/oslc_pos_1">
<oslc_pos_1:lname>Doe</oslc_pos_1:lname>
<oslc_pos_1:fname>Danny</oslc_pos_1:fname>
<oslc_pos_1:email>[email protected]</oslc_pos_1:email>
<oslc_pos_1:birthday>1976-05-12</oslc_pos_1:birthday>
</myImpactObjectArray:oslc_pos_1>
</myImpactObjectArray:oslc_pos_1>
<myImpactObjectArray:oslc_pos_0>
<myImpactObjectArray:oslc_pos_0 rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray/oslc_pos_0">
<oslc_pos_0:lname>Doe</oslc_pos_0:lname>
<oslc_pos_0:fname>John</oslc_pos_0:fname>
<oslc_pos_0:email>[email protected]</oslc_pos_0:email>
<oslc_pos_0:birthday>1980-08-11</oslc_pos_0:birthday>
</myImpactObjectArray:oslc_pos_0>
</myImpactObjectArray:oslc_pos_0>
</test_ipl:myImpactObjectArray>
</test_ipl:myImpactObjectArray>
<test_ipl:myImpactObject1>
<test_ipl:myImpactObject1 rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObject1">
<myImpactObject1:lname>Doe</myImpactObject1:lname>
<myImpactObject1:fname>John</myImpactObject1:fname>
<myImpactObject1:email>[email protected]</myImpactObject1:email>
<myImpactObject1:birthday>1980-08-11</myImpactObject1:birthday>
</test_ipl:myImpactObject1>
</test_ipl:myImpactObject1>
<test_ipl:myDouble>109.5</test_ipl:myDouble>
<rdf:type rdf:resource="http://jazz.net/ns/ism/event/impact/policy/ipl/"/>
</rdf:Description>
</rdf:RDF>
Notice that the myImpactObjectArray array is expanded to show each ImpactObject that it contains
and the property values for each of the ImpactObjects.
http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl?oslc.
properties=test_ipl:myImpactObjectArray{myImpactObjectArray:
oslc_pos_0{oslc_pos_0:lname,oslc_pos_0:fname}}
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:myImpactObjectArray="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/"
xmlns:myImpactObject1="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObject1/"
xmlns:direct="http://policy.js/xmlns/directSQL/"
xmlns:test_ipl="http://jazz.net/ns/ism/event/impact/policy/ipl/"
xmlns:oslc_pos_2="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_2/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_pos_1="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_1/"
xmlns:oslc_pos_0="http://jazz.net/ns/ism/event/impact/policy/
ipl/myImpactObjectArray/oslc_pos_0/"
xmlns:tivoli-impact="http://jazz.net/ns/ism/event/impact#"
xmlns:javascript="http://policy.js/xmlns/">
<rdf:Description rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/
policy/ipl">
<test_ipl:myImpactObjectArray>
<test_ipl:myImpactObjectArray rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray">
<myImpactObjectArray:oslc_pos_0>
<myImpactObjectArray:oslc_pos_0 rdf:about="http://<server>:9080/
NCICLUSTER_NCI_oslc/policy/ipl/myImpactObjectArray/oslc_pos_0">
<oslc_pos_0:lname>Doe</oslc_pos_0:lname>
<oslc_pos_0:fname>John</oslc_pos_0:fname>
</myImpactObjectArray:oslc_pos_0>
</myImpactObjectArray:oslc_pos_0>
</test_ipl:myImpactObjectArray>
</test_ipl:myImpactObjectArray>
<rdf:type rdf:resource="http://jazz.net/ns/ism/event/impact/policy/
ipl/"/>
</rdf:Description>
</rdf:RDF>
To obtain resources that contain member lists, like the member lists contained in the results of the
DirectSQL and GetByFilter policy functions, use a combination of the oslc.properties and the
oslc.select query parameters. For example:
http://<server>:9080/NCICLUSTER_NCI_oslc/policy/
ipl?oslc.properties=*&oslc.select=test_ipl:myGetByFilter
{myGetByFilter:LNAME,myGetByFilter:FNAME}
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:myGetByFilter="http://jazz.net/ns/ism/event/impact/policy/
ipl/myGetByFilter/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:direct="http://policy.js/xmlns/directSQL/"
xmlns:test_ipl="http://jazz.net/ns/ism/event/impact/policy/ipl/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:impact="http://jazz.net/ns/ism/event/impact#"
xmlns:javascript="http://policy.js/xmlns/">
<rdf:Description rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/
policy/ipl">
<test_ipl:myTimestamp>20120818</test_ipl:myTimestamp>
<test_ipl:myString>test_ipl</test_ipl:myString>
<test_ipl:myInteger>55</test_ipl:myInteger>
<test_ipl:myGetByFilter>
<test_ipl:myGetByFilter
rdf:about="http://<server>:9080/NCICLUSTER_NCI_oslc/policy/ipl/myGetByFilter">
<rdfs:member>
RDF functions
You can use RDF functions to make Netcool/Impact compatible with open services for lifecycle
collaboration (OSLC).
RDFModel
You can use the RDFModel function to create an RDF model without any input parameters.
To create an empty RDF model, you call the RDFModel function without entering any input parameters.
The function returns an empty RDF model.
Syntax
The RDFModel function has the following syntax:
[Model =] RDFModel()
RDFModelToString
You can use the RDFModelToString function to export an RDF model to a string in a particular language.
When you create or write an RDF model, you can use the RDFModelToString function to export a model
to a string in a particular language. You can define a model object and a string that contains the language
that is used as input parameters. If the language string is null or an empty string, the default language
RDF/XML is used. The following language strings are supported:
• RDF/XML
• RDF/XML-ABBREV
• TURTLE
• TTL
• N3
RDFModelToString returns a string
Syntax
The RDFModelToString function has the following syntax:
Parameters
The RDFModelToString function has the following parameters:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName,FormParameters, FilesToSend, HeadersToSend,
HttpProperties);
//Create Model from RDF payload
rdf=RDFParse(x);
RDFModelUpdateNS
You can use the RDFModelUpdateNS function to insert, update, or remove a namespace from an RDF
model.
When you create an RDF model, you can use the RDFModelUpdateNS function to insert, update, or
remove a namespace from the model. You can define a model object, prefix string, and a URI string as
input parameters. If the URI is null or an empty string, the function removes the prefix string from the
model. If the URI contains a string with a non-empty value and the prefix exists, the URI is updated. If
the prefix does not exist, a new prefix and URI is added to the model. RDFModelUpdateNS returns this
model.
Syntax
The RDFModelUpdateNS function has the following syntax:
Parameters
The RDFModelUpdateNS function has the following parameters:
//Create model
model = RDFModel();
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey,
Method, AuthHandlerActionTreeName, FormParameters,
FilesToSend, HeadersToSend, HttpProperties);
RDFNodeIsResource
You can use the RDFNodeIsResource function to help other functions read and parse objects that are
also an RDF resource. You can define an RDF node as a input parameter in this function. If the object is an
RDF resource, the function returns a true value. If the object is an RDF literal, the function returns a false
value. Other functions can use the model returned by the RDFNodeIsResource function to continue
reading and parsing the RDF object.
Syntax
The RDFNodeIsResource function has the following syntax:
Parameters
The RDFNodeIsResource function has the following parameters:
The following example shows statements based on an RDF that is retrieved by the GetHTTP function:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName, FormParameters, FilesToSend, HeadersToSend,
HttpProperties);
//Output subject, predicate, and objects from all statements returned, whose
//object is a literal, to the log
Size=Length(allStatements);
log(Size);
Count=0;
While (Count < Size) {
if (!RDFNodeIsResource (allStatements [Count].object)) {
log (allStatements [Count].subject + " " + allStatements [Count].predicate + " "
+ allStatements [Count].object + ".");
}
Count = Count + 1;
}
Syntax
The RDFNodeIsAnon function has the following syntax:
Parameters
The RDFNodeIsAnon function has the following parameter:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="http";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=newobject();
FilesToSend=newobject();
HeadersToSend=newobject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName,FormParameters, FilesToSend, HeadersToSend,
HttpProperties);
Size=Length(allStatements);
Log(Size);
Count=0;
While (Count < Size) {
if (!RDFNodeIsAnon(allStatements[Count].subject)) {
log (allStatements [Count].subject + " " + allStatements [Count].predicate + " "
+ allStatements
[Count].object + ".");
}
Count = Count + 1;
}
Syntax
The RDFParse function has the following syntax:
[Model =] RDFParse(Payload)
Parameters
The RDFParse function has the following parameters:
Parameter
Payload
Type
String
Description
Payload containing the RDF
The following example provides statements based on an RDF that is retrieved by the GetHTTP function:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName, FormParameters, FilesToSend, HeadersToSend,
HttpProperties);
RDFRegister
You can use the RDFRegister function to help you to register service providers or OSLC resources with
the registry server.
Before you can register a service provider or resource, you must use the other RDF policy functions to
build an RDF model that meets the OSLC and Registry Services requirements.
After you build the RDF model, use the RDFRegister function to register the RDF with the resource
registry contained in the Registry Services integration service.
If the service provider or OSLC resource is registered successfully, the RDFRegister function returns
the resource location of the registration record. The following variables and their return values are also
returned to provide more information:
• ResultCode contains the result code for the response.
• HeadersReceived contains the headers received in the response.
• HeadersSent contains the headers sent in the response.
RDFStatement(newModel, manu[0].subject,
"http://open-services.net/ns/core#serviceProvider", serviceProviderURL, true);
If you use the query string inside the path, you must also ensure that the FormParameters parameter is
set to null. For example:
FormParameters=null;
Finally, you must ensure that the policy contains pagination information. For example:
Path="/NCICLUSTER_NCI_oslc/data/mysql1?oslc.paging=true&oslc.pageSize=100";
If unsuccessful, the return value of the resource location registration record is null. Error code information
is retuned in the ErrorReason and ResultCode variables.
Syntax
The RDFRegister function has the following syntax:
where Username can be a null or void string to specify that no authentication is required.
Parameters
The RDFRegister function has the following parameters:
Example
The following example manually registers a service provider and a set of resources that have been
exposed by the OSLC server provider in Netcool/Impact.
The Registry Services server information is as follows:
RegistryServerProviderCFUri="http://<registry_services_server>:
16310/oslc/pr/collection";
RegistryServerResourceCFUri="http://<registry_services_server>:
16310/oslc/rr/registration/collection";
RegistryServerUsername="system";
RegistryServerPassword="manager";
HTTPHost="<impact_server>";
HTTPPort=9080;
Protocol="http";
Path1="/NCICLUSTER_NCI_oslc/provider/provider01";
Path2="/NCICLUSTER_NCI_oslc/data/computer";
serviceProviderModel=RDFParse(serviceProviderResponse)
serviceProviderURL = RDFRegister(RegistryServerProviderCFUri,
RegistryServerUsername, RegistryServerPassword,serviceProviderModel);
log("Provider Registry-Service Provider URL: " + serviceProviderURL);
allResourceModel=RDFParse(allResources);
Register each computer system and a set of properties with the resource registry:
statements=RDFSelect(allResourceModel, null,
"http://jazz.net/ns/ism/event/impact#data/computer/ID", null);
size=Length(statements);
count=0;
while(count<size) {
Path3=statements[count].subject;
//Get the individual computer system resource
resourceResponse=GetHTTP(HTTPHost,HTTPPort, Protocol, Path3, ChannelKey,
Method,AuthHandlerActionTreeName, null, FilesToSend, HeadersToSend,
HttpProperties);
resourceModel=RDFParse(resourceResponse);
Create a model that contains the properties and data that you want to register:
newModel=RDFModel();
manu=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#manufacturer",null);
model=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#model", null);
serial=RDFSelect(resourceModel, null,
"http://open-services.net/ns/crtv#serialNumber", null);
RDFModelUpdateNS(newModel, "crtv", "http://open-services.net/ns/crtv#");
RDFModelUpdateNS(newModel, "oslc","http://open-services.net/ns/core#");
RDFStatement(newModel, manu[0].subject,
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
"http://open-services.net/ns/crtv#ComputerSystem", true);
RDFStatement(newModel, manu[0].subject, manu[0].predicate, manu[0].object,
RDFNodeIsResource(manu[0].object));
RDFStatement(newModel, manu[0].subject, model[0].predicate, model[0].object,
RDFNodeIsResource(manu[0].object));
RDFStatement(newModel, manu[0].subject, serial[0].predicate,
serial[0].object, RDFNodeIsResource(manu[0].object));
resourceURL = RDFRegister(RegistryServerResourceCFUri,
RegistryServerUsername, RegistryServerPassword, newModel);
log("Resource Registry-Resource URL: " +resourceURL);
count=count+1;
}
RDFUnRegister
To remove the registration record of a service provider or resource from the registry server, use the
RDFUnRegister function to supply the location of the registration record, the Registry Services server
username and password, and the registration record that you want to remove.
Before you can remove the registration record of a service provider, you must remove all the registration
records for the associated OSLC resources.
If successful, the RDFUnRegister function returns the message code 204 and the value true. The
following variables and their return values are also returned to provide additional information:
• ResultCode contains the result code for the response.
• HeadersReceived contains the headers received in the response.
• HeadersSent contains the headers sent in the response.
• ResponseBody contains the response body text.
If unsuccessful, the return value of the resource location registration record is false. Error code
information is returned in the ErrorReason and ResultCode variables.
Syntax
The RDFUnRegister function has the following parameters:
where Username can be a null or void string to specify that no authentication is required.
Parameters
Table 75. RDFUnRegister function parameters
Parameter Type Description
URI String Location that contains the
registration record for the
resource or service provider
Username String User name for the Registry
Services server
Password String Password for the Registry
Services server
http://<registryserver>:16310/oslc/providers/6577
registrationURL = "http://oslcregistryserver.com:16310/oslc/registration/1351071987349";
providerURL = "http://oslcregistryserver.com:16310/oslc/providers/
1351071987343";
RegistryServerUsername="smadmin";
RegistryServerPassword="password";
RDFSelect
You can use the RDFSelect function to assist in reading and parsing an RDF. To retrieve statements
based on an RDF model, you call the RDFSelect function and pass the RDF model that is created by the
RDFParse function. You can filter based on subject, predicate, and object.
The RDFSelect function returns an array of statements that are based on the filter, retrieving values for
the subject, predicate, and object variables. You can use it to create RDF statements or triples. You can
also use it to filter statements. If you do not want to filter your results, you specify null or empty values for
the input parameters.
Syntax
The RDFSelect function has the following syntax:
Parameters
The RDFSelect function has the following parameters:
The following example provides statements based on an RDF that is retrieved by the GetHTTP function:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
//Output subject, predicate, and objects from all statements returned to the log
Size=Length(allStatements);
log(Size);
Count=0;
While (Count < Size) {
log (allStatements [Count].subject + " " + allStatements [Count].predicate + "
" + allStatements [Count].object + ".");
Count = Count + 1;
}
The following piece of code provides all statements that contain a particular subject name:
//Retrieve the RDF from OSLC provider through the GetHTTP method
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName, FormParameters, FilesToSend,
HeadersToSend, HttpProperties);
//Output subject, predicate, and objects from all statements returned to the log
Size=Length(stmt);
log(Size);
Count=0;
While (Count < Size) {
log (stmt[Count].subject + " " + stmt[Count].predicate + " " +
stmt[Count].object + ".");
Count = Count + 1;
}
RDFStatement
You can use the RDFStatement function to create and add statements to an RDF model.
You specify the following parameters in the function:
• Model object
• Subject string or resource
• Predicate string or property
• Object string or RDF node
Syntax
The RDFStatement function has the following syntax:
Parameters
If the Object input parameter is a string, you must specify the isResource parameter. The
RDFStatement function has the following parameters:
The following example shows how to create a basic RDF with a single statement.
1. Use the RDFModel policy function to create a model:
Model = RDFModel();
RDFModelUpdateNS(model,"oslc","http://open-services.net/ns/core#");
subject = "http://ibm.com/ns/netcool-impact/data/SCR_Components#MYCLASS";
property = "http://open-services.net/ns/core#name";
value = "Brian";
isResource = false;
RDFStatement(model,subject,property,value,isResource);
The following example shows how to create a model that is based on an existing model and that uses only
the subjects that the user is interested in:
HTTPHost="example.com";
HTTPPort=9081;
Protocol="https";
Path="/NCICLUSTER_NCI_oslc/data/resourceShapes/alerts";
ChannelKey="tom";
Method="";
AuthHandlerActionTreeName="";
FormParameters=NewObject();
FilesToSend=NewObject();
HeadersToSend=NewObject();
HttpProperties = NewObject();
HttpProperties.UserId="impactadmin";
HttpProperties.Password="passw0rd";
x=GetHTTP(HTTPHost, HTTPPort, Protocol, Path, ChannelKey, Method,
AuthHandlerActionTreeName, FormParameters, FilesToSend,
HeadersToSend, HttpProperties);
rdf=RDFParse(x);
mySubject=" http://ibm.com/ns/netcool-impact/data/SCR_Components#ID";
4. Retrieve all the statements that contain mySubject from the model:
allStatements=RDFSelect(rdf,mySubject,null,null);
newModel = RDFModel()
6. Use the RDFModelUpdateNS function to add the required namespaces to the model:
RDFModelUpdateNS(newModel,"oslc","http://open-services.net/ns/core#");
RDFModelUpdateNS(newModel,"rdfs","http://www.w3.org/2000/01/rdf-schma#");
RDFModelUpdateNS(newModel,"dcterms","http://purl.org/dc/terms/");
7. Use the RDFStatement function to add the statements from the old model to the new model
Size=Length(stmt);
Count=0;
While (Count < Size) {
RDFStatement(newModel, stmt[Count].subject, stmt[Count].predicate,
stmt[Count].object,IsRDFNodeResource(stmt[Count].object));
Count = Count + 1;
}
log(RDFModelToString(model, null));
Architecture
SLO consists of 3 components:
• The SLORPRT database that you use to store the SLO definitions and outage data that is gathered for
those definitions.
• Projects in Netcool/Impact that contain functions for interacting with the SLORPRT database.
• The SLO Availability report definition for Tivoli Common Reporting.
You need to decide which of your business services that you want to report on and the metrics that need
to be associated with the services. These metrics are used in the availability report in Tivoli Common
Reporting.
First, you define the business services that are displayed in the report in the SLORPRT database.
Next you can either use the sample policies, or define your own policies, to collect, analyze, and record
outage data in the SLORPRT database.
The SLO Availability Report uses the outage data to display the availability for a specified period.
The following graphic illustrates this architecture:
Preparing to import
For the SLA project, the content of the existing project will be replaced. Before continuing, make note of
the following, as you may need this information after importing the updated project:
• Any customization to the following policies, which are part of the original deployment of the SLA
project. Any customization will have to be reapplied after importing the updated SLA project.
BusinessCalendar
createBusinessCalendarDefn
createServiceDefinition
db2GetData
getDataFromTBSMAvailability
recordSLAMetric
serviceDefinition
serviceDowntimeBasedOnTBSMStatusChange
slaDefGlobalSettings
• Any customization to the following data types, which are part of the original deployment of the SLA
project. Any customization will have to be reapplied after importing the updated SLA project.
checkPointDT
correlationDT
operationalHourCalForReport
operationalHourDefinition
operationalHourToServiceMapping
slaCalendar
sla_ResourceMetric_Map
sloResourceIdentity
sloResourceMetricValueView
slo_metric_meta
slo_metric_value
slo_OperationalHoursTotalCount
slo_operational_hour_query_for_Service
slo_resource_definition
• Any customization to the following sample activator service. This may have included changing the
startup/logging options, the policy activated, or the interval for running the policy. Any customization
will have to be reapplied after importing the updated SLA project.
GetData
• The configuration for datasource SLOReportDatasource, including the hostname, port, userid, and
password for the SLORPRT database, as well as any other changes to the properties of the datasource.
• Any datasources, data types, policies, or services you have added to the SLA project. For example, you
may have added a datasource and data type in order to use the sample policy that accesses the TBSM
Metric History database. These Impact data elements will not be changed or deleted when the updated
SLA project is imported, but they will no longer be part of the SLA project after the import. Use the
Global project when you are done to locate these data elements and restore them to the SLA project if
that is desired.
Windows:
Where <install_directory> is the directory where the SLO artifacts are stored on the Impact
Server. For example: /opt/IBM/tivoli/impact/add-ons/slo/importData.
2. From the Impact data server, import the project SLA_Utility from the sloutility directory, by using
the nci_import command.
UNIX:
Windows:
Where <install_directory> is the directory where the SLO artifacts are stored on the Impact
Server. For example: /opt/IBM/tivoli/impact/add-ons/slo/sloutility.
Restart the Impact servers after importing the projects to flush any definitions for the SLA project that
have been cached.
Refer to the previous section to decide what changes you need to recover for your SLA project. At a
minimum you will need to update the SLOReportDatasource to provide the access information for your
SLORPRT database.
In addition, the project SLA_Utility contains datasource SLOUtilityDatasource. This datasource must be
configured to access the SLORPRT database before attempting to use any of the utility functions added for
Impact 7.1.0.4
Procedure
1. Create the SLORPRT database in DB2.
For example:
If a local version of DB2 does not exist on the Tivoli Common Reporting server, install the IBM DB2
Connect Server that is available as part of the fix pack installers for DB2 Server, Enterprise and
Workstation.
2. The db directory contains an sql file. Connect to the database and add this file to the same system
where the SLORPRT database is created.
For example:
3. From the primary server in the Impact profile, import the two Impact projects that provide the SLO
function.
a. Import the SLA project from the importData directory, by using the nci_import command.
b. Import the SLA_Utility project from the sloutility directory using the nci_import command.
This Impact project provides additional utility functions to help you administer your SLO
configuration.
UNIX:
Windows:
Where <install_directory> is the directory where the SLO artifacts are stored on the Impact
Server. For example, /opt/IBM/tivoli/impact/add-ons/slo/importData.
4. The Report directory contains the model to be used in the Framework Manager in Tivoli Common
Reporting. The model is provided for your reference. Use the model if you want to extend the schema
or create more views for the report.
5. The Report package contains the package that must be imported in to the Tivoli Common Reporting
Server. The package contains the sample report and the queries that can be used to generate the
reports.
Complete the following steps to import the Netcool/Impact SLO reports package into Tivoli Common
Reporting version 3.1.
a) Navigate to the Tivoli Common Reporting bin directory. For example, /opt/IBM/JazzSM/
reporting/bin.
For example:
c) Use the trcmd command to import the Netcool/Impact SLO report package:
For example:
What to do next
The SLO reporting package is installed and enabled. Next, you need to create the service definitions files.
Procedure
1. Log in to the server where the Impact Server server was installed.
2. Create a service definition properties file. Note the file name. You need to specify the file name as a
parameter value in the policy that you use to implement the service definition properties.
3. Specify the parameters in the services definition file. For more information, see “Service definition
properties file” on page 246. Service definition names and service level agreement (SLA) names must
be unique in the SLORPRT database.
What to do next
After you define the service definition properties in the properties file, run the
createServiceDefinition policy to implement the service definition. You need to specify the
directory where you saved the file in step 2 in the Service Definition File Name parameter.
If you want to update properties of the service definitions, just update the properties file and rerun the
createServiceDefinition policy to create the service definition. The new definition will replace the
existing definition.
If you want to delete a service definition or an SLA defined in the service, refer to “SLO Utility Functions”
on page 265.
Naming conventions
Properties use the following naming conventions:
<propertyName>.num
This indicates that multiple sets of related properties are specified. For example, sla.num=2
indicates that there are two sets of related properties. The related properties are named
sla.1.<propertyName>, sla.2.<propertyName>, and so on.
To nest multiple properties, use <propertyName>.n.<relatedPropertyName>.num. For example,
sla.1.operationalHour.num=2 specifies two sets of operational hour values for the first SLA
definition.
General properties
Table 78. General properties in the service definition properties file
Property Description
serviceName The name of the service for which the service level
agreement (SLA) definitions are provided. The name
must be unique. This is a required property.
label Display name for the service. This is optional. If you
do not specify a value, the value defaults to an empty
string.
description Description for the service. This is optional. If you do
not specify a value, the serviceName value is used.
businessCalendar Defines the name of the business calendar that is used
by the SLAs defined for the service. If no calendar is
specified, the outage time for the service is defined
only as operational or non-operational. There is no
holiday outage.
For more information, see “Configuring business
calendars” on page 250.
Identity Properties
Table 80. Identity properties in the service definition properties file
Property Description
identity.num Defines the number of identities that are defined for
a service. If you specify a value for this property, you
must specify the required values for the same number
of identity types.
identity An identity represents an alternative method for
identifying a service when it gathers the outage
data for the service. An identity is defined as
identityType:::identityString. If you only
specify a service name, the default identity is
tbsmIdentity:::servicename. If no identity is
specified, the service definition cannot be created. For
TBSM services, use the instance name as the identity.
The type defaults to tbsmIdentity.
identity.num=2
identity.1=internetBanking
identity.2=MSN:::IB001
SLA Properties
Table 81. SLA properties in the service definition properties file
Property Description
sla.num Defines the number of SLA definitions. If this property
is set, you must specify a matching number of SLA
definitions.
sla.name The name of the SLA. This is also used as the metric
name that is listed as an option in the SLO Availability
report. The name is required and must be unique.
Note: If an SLA exists that uses the same name,
the existing SLA is updated with the new properties
based on the current service definition. No properties
are inherited from the definition that is saved in the
SLORPRT database.
sla.n.name The name of the nth SLA in the service definition file.
This is also used as the metric name that is listed as an
option in the SLO Availability report. This parameter
is required if the sla.num parameter is specified.
The SLA definition is not used if the sla.n.name
parameter is not defined.
The name must be unique.
Note: If an SLA exists that uses the same name,
the existing SLA is updated with the new properties
based on the current service definition. No properties
are inherited from the definition that is saved in the
SLORPRT database.
sla.displayName, sla.n.displayName The label for the metric that is associated with the SLA.
If you do not specify a value for the display name, the
default empty string is used.
Procedure
1. Specify the time zone value in the service definition properties file.
/*
* Log information for all time zones.
*/
function logAllTimeZoneInfo()
To log information about a specific time zone ID, call the following function:
/*
* Log information for a specific time zone id.
*/
function logTimeZoneInfo(<timezone_id>)
/*
* Log information for time zones with a specific offset from GMT
*/
function logTimeZoneInfoForOffset( <hours> )
For example, you can use the following policy to load the utility functions and log the timezone IDs:
Procedure
1. Create a file called <business_calendar>.props. Open the file.
2. Define a business calendar.
The following example defines a business calendar called US. This business calendar defines 2
holidays and 2 weekend days:
calendar.name = US
calendar.holidays.dateformat = MMM dd,yyyy
calendar.holidays.num = 2
calendar.holidays.1 = Jan 1,2015
calendar.holidays.2 = Jul 4,2015
calendar.weekends.num = 2
calendar.weekends.1 = 1
calendar.weekends.2 = 7
Procedure
1. Define a calendar that is called COMMON.US.
For example:
calendar.name=COMMON.US
calendar.holidays.dateformat= MMM dd,yyyy
calendar.holidays.num = 6
calendar.holidays.1 = Jan 1,2015
calendar.holidays.2 = Feb 14,2015
calendar.holidays.3 = Dec 25,2015
calendar.holidays.4 = Jan 1,2016
calendar.holidays.5 = Feb 14,2016
calendar.holidays.6 = Dec 25,2016
calendar.weekends.num = 2
2. Define a second business calendar to specify the unique holiday and weekend values. In the example,
this business calendar specifies the holidays that are unique to the United States.
For example, create a calendar that is called US that contains the following properties:
calendar.name=US
calendar.holidays.dateformat= MMM dd,yyyy
calendar.holidays.num = 2
calendar.holidays.1 = Jul 4,2015
calendar.holidays.2 = Jul 4,2016
calendar.name=COMMON.Canada
calendar.duplicateCalendarName=COMMON.US
4. To specify the values for the holidays and weekend days, create another business calendar.
For example, create a calendar that is called Canada that specifies the unique holidays for Canada:
calendar.name=Canada
calendar.holidays.dateformat= MMM dd,yyyy
calendar.holidays.num = 2
calendar.holidays.1 = Jul 1,2015
calendar.holidays.2 = Jul 1,2016
Results
When the business calendar is used by an SLO service definition, the function checks the specified
business calendar and the common version of the calendar.
For example, if the service definition includes the businessCalendar=US property, the policy function
checks both the common calendar, COMMON.US and the calendar that specifies the unique values for the
country, the US business calendar in the example. The function uses the values in both to calculate the
holidays and weekend days.
Procedure
1. Define and implement the service definition and SLA definitions for the service:
• Create the service definition properties file, including the SLA definitions.
• To implement the business service definition, run the createServiceDefinition policy, configuring the
policy to pass the service definition properties files as a parameter.
• If you require business calendars, run the createBusinessCalendarDefn policy, configuring the
business calendar properties files as a parameter.
2. Use a Netcool/Impact policy to record the metric information. Create a policy that uses the
recordSLAMetric policy function. The db2GetData sample policy provides instructions and sample
code that can help you create your policy.
The Netcool/Impact policies are written in JavaScript language. Use the Load function to load the
recordSLAMetric policy in to the data retrieval policy.
To use the SLO functions, add the following two commands to the start of your policy
Load("slaDefGlobalSettings");
Load("recordSLAMetric");
addCorrelationValue
The addCorrelationValue function records a correlation value for the SLA metric that is being
recorded. The correlated value is stored as a string. The format of the string is defined by the user.
The user is responsible for data maintenance.
The following examples show where the addCorrelationValue function can be used.
• Example 1:
If the downtime of a service must be calculated based on the correlated value of the status of an event.
When the event is generated (open state), record the Serial Number in the correlated value with the
time recorded. When the event is updated with the close state, retrieve the correlated “open time” from
the correlated table. Use the time recorded field as the “Creation time” and the current time as the
resolved time.
• Example 2:
If you want to store data to be used in the report later, the addCorrelationValue function can be
used. For example, the ticket number for which the service downtime is being recorded can be stored in
this table. Using the timeRecorded field, service name, and the metric name, the user can generate a
report of all the tickets that are associated with a SLA metric.
If you need to record the time for the SLA, always use the
recordSLAMetricWithOperationalHoursAndBusinessCalendar function.
addCheckpointValue
The addCheckpointValue function adds a check point value for the solution. This value can be used to
store check points while the retrieval of the source data is being processed.
Example:
If the service downtime is based on the amount of time a ticket is opened, you can use the
addCheckpointValue function to track the last record that is read from the source database. Store
the last resolved time that was read from the database. The next query can use the value that is stored in
the checkpoint database for the filter.
addSLAMetricWithOperationalHoursAndBusinessCalendar
The addSLAMetricWithOperationalHoursAndBusinessCalendar function inserts downtime
based on operational hours and the business calendar, if a business calendar is defined for the SLA
associated with the service. If the business calendar is specified, then business calendar is applied.
Similarly, if the operational hours time is specified the time is broken down by the operational and
non-operational hours.
Note: The start and end time values must be passed as a GMT value. This ensures that it is calculated
correctly based on the time zone property that is defined in the service's SLA definition.
Note: The values that you specify in the ctime and Rtime parameters are converted into the time zone
that is defined in the SLA. If no time zone is specified, the default value, GMT, is used. Therefore, you may
need to adjust the values that you use here, depending on the source of the data. For example, if you are
using metric history data from Tivoli Business Service Manager and you use the default time zone in the
SLA definition, you do not need to change anything because the source data is also calculated in GMT in
Tivoli Business Service Manager.
Procedure
1. In Netcool/Impact, create a data source, for example TBSM_History that connects to the TBSM
metric history database where the status changes are stored.
For more information about the TBSM metric history, see the TBSM documentation
available from the following URL: http://www-01.ibm.com/support/knowledgecenter/SSSPFK_6.1.1.3/
com.ibm.tivoli.itbsm.doc/timewa_server/twa_metrics_c_intro.html
2. In Netcool/Impact, create a data type called HISTORY_VIEW_METRIC_VALUE, and associate this
data type with the HISTORY_VIEW_RESOURCE_METRIC_VALUE view in the TBSM metric history
database.
3. In Netcool/Impact, create a policy activator service to activate the
getDataFromTBSMAvailability policy.
The SLA project that is imported when you deploy the SLO add-on function includes a sample policy
activator service called GetData. When this service is started, it activates the db2GetData sample
policy on a 300-second interval. Use this example to help you to create your own policy activator
service.
4. The getDataFromTBSMAvailability policy reads records that show changes in the TBSM status
for the services identified by your SLO service definitions. An outage is calculated in one of two ways:
a. From the time a service is marked "Bad" in TBSM until the time the status changes to anything
other than “Bad”. This is the default behavior when you deploy the SLO feature for the first time.
b. From the time a service is marked "Bad" in TBSM until the time the status changes to “Good”. This
is the behavior if you deployed the SLO feature prior to installing Fixpack 4.
Starting with Impact 7.1.0 Fixpack 3, the getDataFromTBSMAvailability policy can retrieve the
outage times for active outages. Active outages are defined as those where the status is currently
"Bad" and not yet resolved. The end time is recorded as the current time when the active outage is first
recorded. Each subsequent run of the policy updates the outage with the current time as the updated
end time, until the final outage time is recorded when the status either becomes “Good” or not “Bad”,
depending on how the policy is configured to run.
Configuring getDataFromTBSMAvailability
There are two different algorithms that can be used to decide when an outage starts and ends using the
TBSM metric history data. The default if the SLO function is deployed after installing Fixpack 4 is that an
outage is defined as only the time when the TBSM status is “Bad”.
Prior to Fixpack 4, the algorithm calculated the outage from the time that the status first changes to “Bad”
until the status becomes “Good”, regardless of other statuses that might be reported by TBSM in the
interim. This algorithm can still be used in case you already have SLO deployed and prefer this method.
Consider the following example:
The default algorithm with Fixpack 4 will record an outage time of T4 – T3, which is only the time period
when the status was “Bad”. The legacy algorithm will record the outage as T5 – T3, ignoring time when
the status changed back to “Marginal”.
Reports
The application availability report package contains a sample application availability report.
Record the service downtime for the application. The availability report is generated at the entity level for
all the applications. The report requests the service and the SLA that you want the report to run, and a
date. The report template has the following options:
• A line chart which reports the availability for up to a month for the date you selected.
• A line report which reports the availability for up to a year up to the date you selected.
• The table contains the data for each application.
Procedure
1. Create the SLORPRT reporting database.
For example:
You must define the database. If the database is on the same server as Tivoli Common Reporting, then
you do not need to install a DB2 client. If the database is remote, you need to install a DB2 client and
catalog the node and database on the local machine.
2. Copy the slo_db2schema.sql file from <IMPACT_HOME>/add-ons/slo/db to the server where
you want to create the SLORPRT database. Login with the DB2 user and run the following commands:
For example:
For example:
# Now define the slas, but do not define any operational hour periods.
sla.num=2
sla.1.name=serviceDowntimeEST
sla.1.displayName=Service Down Time
sla.1.description=Service Down Time
sla.1.timezone=EST
sla.1.operationalHourThreshold = 99.5
sla.1.nonOperationalHourThreshold = 98.5
sla.2.name=serviceDowntimePST
sla.2.displayName=Service Down Time
sla.2.description=Service Down Time
sla.2.timezone=PST
sla.2.operationalHourThreshold = 99.0
sla.2.nonOperationalHourThreshold = 98.0
sla.name=serviceDowntime
sla.displayName=Service Down Time
sla.description=Service Down Time
sla.operationalHourThreshold = 99.5
sla.nonOperationalHourThreshold = 98.5
# The first sla reflects the operational hours on the East Coast of the US.
# Normal hours are 8AM to 5PM, with an hour down for lunch at noon.
sla.1.name=serviceDowntimeEST
sla.1.displayName=Service Down Time
sla.1.description=Service Down Time
sla.1.timezone=EST
sla.1.operationalHour.num=2
sla.1.operationalHourStartTime.1 = 8:00:00
sla.1.operationalHourEndTime.1 = 12:00:00
sla.1.operationalHourStartTime.2 = 13:00:00
sla.1.operationalHourEndTime.2 = 17:00:00
sla.1.operationalHourThreshold = 99.5
sla.1.nonOperationalHourThreshold = 98.5
# The second sla reflects the operational hours on the West Coast of the US.
# Starting time is an hour later, but no down time for lunch.
# The thresholds displayed on the availability report are slightly lower.
sla.2.name=serviceDowntimePST
sla.2.displayName=Service Down Time
sla.2.description=Service Down Time
sla.2.timezone=PST
sla.2.operationalHourStartTime = 9:00:00
sla.2.operationalHourEndTime = 17:00:00
sla.2.operationalHourThreshold = 99.0
sla.2.nonOperationalHourThreshold = 98.0
# This sample service definition file consists of only the required properties
serviceName=SLOService
# The rest of this file contains the single sla being defined by this
# file for SLOService.
sla.name=serviceDowntime
sla.displayName=Service Down Time
sla.description=Service Down Time
sla.operationalHourStartTime = 8:00:00
sla.operationalHourEndTime = 17:00:00
sla.operationalHourThreshold = 99.5
sla.nonOperationalHourThreshold = 98.5
# The name must start with the prefix "COMMON.". The SLO function
# uses the calendar definitions in calendars "US" and "COMMON.US"
# if the service definition specifies businessCalendar=US as a property.
calendar.name=COMMON.US
# Defining 2 weekend days. Any numbered property that is missing will be skipped.
# Any numbered property above 2 (in this example) will be ignored.
calendar.weekends.num = 2
# The "day number" is defined by the Java Calendar class. In the calendar for the
# US locale the constant SUNDAY is defined as 1 and the constant 7 is SATURDAY.
# MONDAY is 2, TUESDAY is 3, etc.
calendar.weekends.1 = 1
calendar.weekends.2 = 7
US Calendar example
Use this example to help you to understand how to create a business calendar properties file that uses
common holidays and weekends that are defined in a common file.
This example defines holidays and weekend days that are unique to the calendar. However, the holidays
and weekends are supplemented by the properties in the COMMON.US calendar.
# This sample calendar definition file defines the holidays and weekend days unique
# to this specific calendar. This calendar will be supplemented by entries in the
# "COMMON" calendar of the same name.
# The name of this calendar. The entries in this calendar and the entries in
# calendar COMMON.US will all be used when evaluating outage time.
# The US calendar will have 2 holidays that are unique to the calendar.
# All other holidays and the weekend days are defined in the
# calendar COMMON.US.
calendar.holidays.num = 2
calendar.holidays.1 = Jul 4,2015
calendar.holidays.2 = Jul 4,2016
# The name must start with the prefix "COMMON.". The SLO function will use
# the calendar definitions in calendars "Canada" and "COMMON.Canada" if the
# service definition specifies businessCalendar=Canada as a property.
calendar.name=COMMON.Canada
# This sample calendar definition file defines the holidays and weekend days unique
# to this specific calendar. This calendar is supplemented by entries in the
# "COMMON" calendar of the same name.
# The name of this calendar. The entries in this calendar and the entries in
# calendar COMMON.Canada are used when evaluating outage time.
calendar.name=Canada
# The Canada calendar will have 2 holidays that are unique to the calendar.
# All other holidays and the weekend days are defined in the
# calendar COMMON.Canada.
calendar.holidays.num = 2
calendar.holidays.1 = Jul 1,2015
calendar.holidays.2 = Jul 1,2016
Procedure
1. Log on to Netcool/Impact.
2. Click Policies to open the Policies tab.
3. From the Cluster list, select NCICLUSTER. From the Project list, select MWM.
4. In the Policies tab, select the MWM_Properties policy, right click, and select Edit or click the Edit
policy icon to view the policy and make any required changes. For more information, see “Configure
the MWM_Properties policy” on page 271.
5. Click Services.
6. In the Services tab, select MWMActivator, right click, and select Edit or click the Edit services icon to
open the MWMActivator service properties. Make any required changes. For information about these
properties, see “Configuring MWMActivator service properties” on page 272.
7. To start the service, in the service status pane, select MWMActivator and either right click and select
Start or click the Start Service arrow in the Services toolbar.
When the service is running it puts OMNIbus events into maintenance based on schedules entered into
the MWM GUI.
See the following information in the policy for flagExistingEvents options. flagExistingEvents
= TRUE is the default option.
function getProperties(propsContext)
{
propsContext = newobject();
clearFlag = TRUE;
flagExistingEvents = TRUE;
propsContext.clearFlag = clearFlag;
propsContext.flagExistingEvents = flagExistingEvents;
Procedure
1. Click Services to open the Services tab.
2. In the Services tab, right click MWMActivator and select Edit or click the Edit services icon to open
the properties for the MWMActivator service.
3. By default, the MWMActivator Activation Interval is set to 7 seconds. The MWMActivator service
checks OMNIbus every seven seconds for events that require maintenance. Select the interval time
you want to use. If possible use prime numbers.
4. You can change the Policy value if you have created your own policy to replace the MWM_Properties
policy.
5. Select Startup to start the MWMActivator service when Netcool/Impact starts.
6. Select the Service Log to create a file of the service log.
Procedure
1. Click the Maintenance Window tab.
This page lists the instances of the different types of maintenance window.
2. Click the New Maintenance Window button to create a new window.
Procedure
1. Click the New Maintenance Window button to create a new window.
2. For Type of Maintenance Window, select One Time.
3. Check that the Time Zone you want to use is selected.
4. Add fields you wish to assign in the filter to match events. For each field you add, select the operator
from the list provided and assign a value to the field to be used for the filter.
Tip: When using the like operator, you can specify a regular expression for the field value. When the
MWM entry is saved, the field value will be automatically enclosed within a pair of wildcard characters
except when the value itself starts with or ends with a wildcard, contains a start of line anchor (^), or
an end of line anchor ($).
Procedure
1. Click the New Maintenance Window button to create a new window.
2. For Type of Maintenance Window, select the type of recurring window you wish to configure. This can
be either Day of Week, Day of Month, Weekly, or Nth Day of Week in Month.
3. Check that the Time Zone you want to use is selected.
4. Add fields you wish to assign in the filter to match events. For each field you add, select the operator
from the list provided and assign a value to the field to be used for the filter.
Tip: When using the like operator, you can specify a regular expression for the field value. When the
MWM entry is saved, the field value will be automatically enclosed within a pair of wildcard characters
except when the value itself starts with or ends with a wildcard, contains a start of line anchor (^), or
an end of line anchor ($).
Tip: Any field where a value is not provided will not be included in the filter.
5. Provide the Start Time and End Time (hour, minute, second) for the maintenance window.
6. Provide the details specific to the chosen recurring type of window:
• Recurring Day of Week These windows occur every week on the same day and at the same time of
day. For example, you can set the window to every Saturday from 5 p.m. to 12 a.m. Or you can set
the window for multiple days such as Saturday, Sunday, and Monday from 5 p.m. to 12 a.m.
• Recurring Day of Month These windows occur every month on the same date at the same time of
day. For example, you can set the window to every month on the 15th from 7 a.m. to 8 a.m. Or you
can set the window for multiple months.
• Every nth Weekday These windows occur every month on the same day of the week at the same
time. For example, you can set the window to the first and third Saturday of the month from 5 p.m. to
12 a.m.
• Recurring Weekly These windows occur between two days within a week, and recurs every week.
For example, you can set the window to start on Monday 8 a.m. to Friday 8 p.m.
7. Click the Save button to create the window.
8. Click the Back button to view the newly created window in the list of windows.
Known shortcomings
If there are overlapping time windows, there is a chance that an event could be temporarily flagged
as out of maintenance when the first window ends. If this situation occurs, the event is flagged as in
maintenance the next time the MWMActivator Service runs. The clearFlag property comes to play
here. If the clearFlag = FALSE, then the event is never marked as out of maintenance.
Maintenance Window Management does not work properly if the default cluster name, NCICLUSTER, is
not used. When the MWM main page opens, you see the following message:
Could not retrieve a client for accessing the Impact server, under cluster:
clustername
For information about how to resolve this issue, see the Troubleshooting section.
dow,impactadmin,MIT,10:59:11,22:44:55, Node="Paul",Wed|Thu|Fri|Sat
dom,impactadmin,MIT,10:59:11,22:44:55, Node="John",7|18|19
nth,impactadmin,MIT,10:59:11,22:44:55, Node="Harry",fourthSun|fourthSat|fifthSun|fifthSat
Warning: The policy does not perform validation of the CSV content or the new MWM entries. An
MWM may be created even if date, time, timezone, and filter do not conform to the expected
format. If the MWM entry is created with an incorrect value, then you should delete the MWM entry
and repeat the policy with a corrected CSV file. Invalid MWM entries can be deleted directly from
the mm_windows data type using the Data Model editor.
The date, time, and timezone values in the file are expected in the following accepted format and are not
validated:
type, username, timezone, start_date_and_time, end_date_and_time, filter,
start_time, end_time, days_of_the_week, day_of_the_month, nth_day
Note: The Event Isolation and Correlation feature is deprecated. Users should consider IBM Netcool
Operations Insight which introduces seasonality function for advanced analytics of event information. For
more information about the seasonality function, see IBM Netcool Operations Insight documentation.
Overview
Netcool/Impact has a predefined project, EventIsolationAndCorrelation that contains predefined data
sources, data types, policies, and operator views. When all the required databases and schemas are
installed and configured, you must set up the data sources. Then, you can create the event rules by using
the ObjectServer sql in the Event Isolation and Correlation configuration view from the UI. You can view
the event analysis in the operator view, EIC_Analyze. You can also view the output in the topology widget
dashboard in the Dashboard Applications Services Hub.
Complete the following steps to set up and run the Event Isolation and Correlation feature.
1. Install Netcool/Impact.
2. Install DB2 or use an existing DB2 installation.
3. Configure the DB2 database with the DB2 schema.
4. Install the Discovery Library Toolkit with the setup-dltoolkit-<platform>_64.bin installation
image that is available in the directory IMPACT_INSTALL_IMAGE/<platform>.
If you already have a Tivoli® Application Dependency Discovery Manager (TADDM) installation,
configure the Discovery Library Toolkit to consume the relationship data from TADDM. You
can also consume the data through the loading of Identity Markup Language (IdML) books.
For more information about the discovery library toolkit, see the Tivoli Business Service
Manager Administrator's Guide and the Tivoli Business Service Manager Customization Guide.
The guides are available in the Tivoli Business Service Manager 6.1.1 documentation, available
from the following URL, https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/
wiki/Tivoli%20Documentation%20Central.
You can load customized name space or your own model into SCR. This model can be used
for application topology-based event correlation. For more information see Tivoli Business Service
Manager Customization Guide, Customizing the import process of the Service Component Repository,
Service Component Repository API overview.
5. In the GUI, configure the data sources and data types in the EventIsolationAndCorrelation project to
use with the Impact Server.
6. Create the event rules in the UI to connect to the Impact Server.
7. Configure WebGUI to add a new launchpoint or configure a topology widget to visualize the results.
Tip: When you use Event Isolation and Correlation, the Event Isolation and Correlation events must
have a BSM identity value in field BSM_Identity. If the field does not have a value, you must enter
it manually or create it using the event enrichment feature by using the EIC_EventEnrichment policy
and EIC_EventEnrichment service in the EventIsolationAndCorrelation project. You might also want to
update the event reader Filter Expression in the Event Mapping tab according to your requirements.
Procedure
1. Install Netcool/Impact.
Refer to Netcool/Impact Administration Guide, Installation chapter.
2. Install DB2.
Netcool/Impact and Tivoli Business Service Manager support DB2 version 9.5 or higher. For
information about installing and by using DB2, see the information center that is listed
here for the version you are using: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.common.doc/doc/t0021844.html.
3. Configure the DB2 database with the DB2 schema.
A user who has permissions to run the DB2 command-line tools completes this step.
• For UNIX, use the user ID db2inst1.
• For Windows, use the user ID db2admin.
You can install the DB2 schema by using the installation image setup-dbconfig-<platform>.bin
that is available in the IMPACT_INSTALL_IMAGE/<platform> directory.
• If you are using Tivoli Business Service Manager and Netcool/Impact, use the information in Installing
the Discovery Library Toolkit in the Tivoli Business Service Manager Installation Guide available in the
Tivoli Business Service Manager 6.2.0 information center. Use the following url, https://www.ibm.com/
developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Documentation%20Central.
• For a Netcool/Impact implementation that does not use Tivoli Business Service Manager, install the
Discovery Library Toolkit with the setup-dltoolkit-<platform>_64.bin installation image that
is available in the directory IMPACT_INSTALL_IMAGE/<platform>. For the Tivoli Business Service
Manager related information, the data source must be configured to access the DB2 database. This
information is not required for an Netcool/Impact installation.
Important:
Netcool/Impact 7.1 bundles DBConfig 6.1.1 and XML Toolkit 6.1.1 on the installation image. The DBConfig
setup-dbconfig-<platform> is version 6.1.1. This DBConfig 6.1.1 and XML Toolkit 6.1.1 are exactly
Procedure
1. Go to the IMPACT_INSTALL_IMAGE/<platform> directory where the Impact Server is installed.
2. Run the setup-dbconfig-<platform>.bin to install the database schema.
3. To install the discovery library toolkit, run the setup-dltoolkit-<platform>_64.bin.
During the installation of the discovery library toolkit, there are options to configure the Tivoli Business
Service Manager data server. You can add any values that you want. These values are not used in
Netcool/Impact.
Procedure
1. Copy the RCA_DEPENDENCYCOMPONENTS.ddl file and the RCA_COMPONENTS.ddl from
$IMPACT_HOME/add-ons/eic/db/ to the DB2 database machine where the SCR is installed.
For example, to /tmp/RCA_ DEPENDENCYCOMPONENTS.ddl and /tmp/RCA_COMPONENTS.ddl.
2. Connect to the db2 database by using the following command.
db2 connect to TBSM
Where TBSM is the name of the database that contains the Service Component Registry.
3. Run the db2 command to run the RCA_DEPENDENCYCOMPONENTS.ddl file to update the
RCA_DEPENDENCYCOMPONENTS view.
4. Run the db2 command to run the RCA_COMPONENTS.ddl file to update the RCA_COMPONENTS view.
Procedure
1. Edit the scc_schema_views.sql file in the $XMLtoolkit_HOME/sql directory.
2. Locate the rca_components and rca_dependencycomponents CREATE VIEW statements in the
scc_schema_views.sql file.
3. Add the cdm:core.Collection class to the CREATE VIEW statements for the two views.
)
UNION
( SELECT DISTINCT m.service_id AS srcid, cdmcs.class AS srcclass,
tgtservice.service_id AS tgtid, cdmct.class AS tgtclass, r.reltype
FROM %SCR_SCHEMADOT%scc_serviceid_to_component_id m
JOIN %SCR_SCHEMADOT%sccp_components comp ON comp.id = m.service_id
JOIN %SCR_SCHEMADOT%cdm_classids cdmcs ON comp.class_id = cdmcs.id
JOIN %SCR_SCHEMADOT%scc_serviceid_to_component_id m2 ON m2.service_id = m.service_id
AND (m2.type = 0 OR m2.type = 1)
JOIN %SCR_SCHEMADOT%scc_relations r ON m2.comp_id = r.tgtid AND
4. Run the command setdbschema.bat -U dbuser -P dbpassword -f v to drop and add the
schema.
Where -U is the database user identifier, -P is the database password, -f is the function that is
identified, - v drops and rebuilds all of the views.
5. The changes are updated to the XMLtoolkit sql library for future reference.
Procedure
1. In the GUI, click Data Model.
2. From the project list, select the project EventIsolationAndCorrelation.
A list of data sources specific to the EventIsolationAndCorrelation feature is displayed.
• EIC_alertsdb
• SCR_DB
• EventrulesDB
3. For each data source, update the connection information, user ID, and password and save it.
4. Configure EIC_alertsdb to the object server where the events are to be correlated and isolated.
5. Configure SCR_DB to the Services Component Registry database. When you create the SCR schema,
the following tables are created EIC_ACTIONS and EIC_RULERESOURCE.
Note: When you configure the Services Component Registry (SCR) data sources, you must point the
data sources to what is commonly called the SCR. The SCR is a schema within the TBSM database
that is created when you run the DB2 schema configuration step. The schema is called TBSMSCR. The
database has a default name of TBSM.
6. You must manually add the tables EIC_ACTIONS and EIC_RULERESOURCE to the Services
Component Registry.
a) Use the following SQL commands create the tables in your DB2 Services Component Registry
database.
--EIC_RULERESOURCE
7. Configure the EventRulesDB data source to connect to the Services Component Registry database.
Procedure
1. To configure the EIC_alertquery data type, right-click on the data type and select Edit.
2. The Data Type Name and Data Source Name are prepopulated.
3. The State check box is automatically selected as Enabled to activate the data type so that it is
available for use in policies.
4. Base Table:
Specifies the underlying database and table where the data in the data type is stored.
5. Click Refresh to populate the table.
EIC_utils.getRuleResourcesAsImpactObjects(RuleName,PrimaryEventSerial,impactObjects)
For JavaScript:
Load("EIC_UtilsJS");
impactObjects=getRuleResourcesAsImpactObjects(MatchingRuleName,PrimaryEventSerial);
When the policy runs, all the resources information and related ObjectServer events are available to the
policy context in a variable called impactObjects.
Procedure
1. In the policy editor toolbar, click the Configure Policy Settings icon to open the policy settings editor.
You can create policy input and output parameters and also configure actions on the policy that relate
to the UI Data Provider and Event Isolation and Correlation options.
2. To enable a policy to run with the Event Isolation and Correlation capabilities, select the Enable Policy
for Event Isolation and Correlation Actions check box.
3. Click OK to save the changes to the parameters and close the window.
Procedure
1. Select Event Isolation and Correlation to open the Event Isolation and Correlation tab.
2. Click the Create New Rule icon to create an Event Rule. While creating this item the configure page
has empty values for various properties.
3. Click the Edit the Selected Rule icon to edit the existing event rules.
4. Click the Delete the Selected Rule icon to delete an event rule from the system and the list.
Procedure
1. Event Rule Name: Specify the event rule name. The event rule name must be unique across this
system.
When you select Edit or New if you specify an existing event rule name, the existing event rule is
updated. When you edit an event rule and change the event rule name, a new event rule is created
with the new name.
2. Primary Event: Enter the SQL to be run against the ObjectServer that is configured in the data source
EIC_alerts db.
The primary event is the event that is selected for analysis.
The primary event filter is used to identify if the event that was selected for analysis has a rule
associated with it. The primary event filter is also used to identify the object in the Services
Component Registry database that has the event that is associated with it.
The object may or may not have dependent entities. During analysis, the event isolation and
correlation feature finds all the dependent entities and their associated events.
For example, the primary event has 3 dependent or child entities and each of these entities has three
events that are associated with it. In total, there are nine dependent events. Any of these secondary
events could be the cause of the primary event. This list of events is what is termed the list of
secondary events. The secondary event filter is used to isolate one or more of these events to be the
root cause of the issue.
3. Test SQL: Click Test SQL to test the SQL syntax that is specified in the primary event.
Modify the query so that only one row is returned. If there are multiple rows, you can still configure
the rule. However, during analysis only the first row from the query is used to do the analysis.
4. Secondary Events: The text area is for the SQL to identify the dependent events. When you specify
the dependent events, you can specify variables or parameters that can be substituted from the
primary event information. The variables are specified with the @ sign.
For example, if the variable name is dbname, it must be specified as @dbname@. An example is
Identifier = 'BusSys Level 1.2.4.4' and Serial = @ser@. The variables are replaced
during the analysis step. The information is retrieved from the primary event that is based on the
configuration in the parameters table and shows in the Variables Assignment section of the page.
5. Extract parameters: Click Extract Parameters to extract the variable name between @ and populate
the parameter table.
When the variable information is extracted into the table, you can edit each column.
a) Select the field against the regular expression you want to run, and a substitution value is
extracted.
b) Enter the regular expression in the regular expression column. The regular expression follows the
IPL Syntax and is run by using the RExtract function.
c) When the regular expression is specified, click Refresh to validate the regular expression and
check that the correct value is extracted.
The table contains the parameters.
6. Click the Create a new Action icon to add an event-related policy to the event.
A list of policies that are associated with the event that are enabled for Event Isolation and
Correlation are displayed.
7. Select the Auto Execute Action check box to run the policy during the analysis.
When the analysis is complete, you can also run the action by selecting it.
8. Limit Analysis results to related configuration items in the Service Component Registry: Select
this check box if the analysis is to be limited to related configuration items only.
Procedure
Open a browser on Netcool/Impact. Use one of the following options:
• Point to <Impact_Home>:<Impact_Port>/opview/displays/NCICLUSTER-
EIC_Analyze.html?serialNum=<EventSerialNumber>. Where <Impact_Home> and
<Impact_Port> are the Netcool/Impact GUI Server and port and EventSerialNumber is the serial
number of the event you want to analyze. To launch the analysis page outside of the AEL (Action Event
List), you can add serialNum=<Serial Number> as the parameter.
• The Event Isolation and Correlation analysis page can be configured to launch from the Active Event
List (AEL) or LEL (Lightweight Event List) within WebGUI. For more information see, “Configuring
WebGUI to add a new launch point” on page 286. When you create the tool you have to specify only
Procedure
Select the event from the AEL or LEL and launch the Analyze page. The EIC_Analyze page contains three
sections:
• Primary Event Information: shows the information on the selected event. This is the event on which
the event isolation and correlation analysis takes place.
• Correlated Events: shows information about the dependent events identified by the tool. Dependant
events are identified as the events that are associated with the dependant child resources of the
device or object that is associated with the primary event. These events are displayed in the context of
dependent resources that were identified from the Services Component Registry.
• Event Rule Processed: shows the rule which was identified and processed when this primary event was
analyzed.
Results
When you click an item in the EVENTRULES table widget, it populates the EICPrimaryEvents table with
the primary events from the objects. When you click an item in the EICPrimaryEvents table widget,
it populates the Topology widget when the Event Isolation and Correlation operation is completed.
Optionally, you can create a table widget instead of the topology widget to view the related events only.
The table widget is configured for the EICAffectedEvents output parameter.
SCRRegister
The SCRRegister function creates the unique transaction ID (UUID) and also ensures that the
transaction information is persisted to the registration table. The unique transaction ID returned from
this function, is required for all other functions so that the components and relationships referenced can
be correctly associated with this source.
Syntax
SCRRegister (dataSource,transientId, cdmIdentity, productName, sourceControlInfo,
transtype,);
Parameters
This function has the following parameters.
Example
The following example returns the transaction ID and allows for components and relationships to be
deleted as well as created.
DataSource=”SCR_DB”;
TransientID=”Service_0001”;
CDMIdentity=”Service”;
ProductName=”ServiceApp”;
SourceControlInfo=NULL;
Transtype=”Delta”;
transactionID=SCRRegister(DataSource, TransientID, CDMIdentity,
ProductName, SourceControlInfo, Transtype);
SCRCreateComponentInfo
The SCRCreateComponentInfo function creates and adds component information values to the
appropriate database table. It returns the unique transaction ID, or where an exception occurs, it returns
a null value.
Syntax
transactionID =SCRCreateComponentInfo (dataSource, transactionId, transientId,
classType, label, sourceToken, keywords, values, modifyOnly);
Parameters
This function has the following parameters.
Example
The following example uses the transactionID created by the SCRRegister function and creates a
resource in the SCR called Comp0001.
ComponentTransientID=”Comp0001”;
ClassType= "myinc:ComputerSystem";
Label=”NO_LABEL”;
SourceToken=NULL”;
Keywords = {"tbsm:identity"};
Values = {"Comp0001-uniquestring"};
transactionID=SCRCreateComponentInfo(DataSource, transactionID,
ComponentTransientID, ClassType, Label, SourceToken, Keywords,
Values);
Syntax
transactionID =SCRCreateRelationship (dataSource, transactionId, relationshipType,
sourceId, targetId);
Parameters
This function has the following parameters.
Example
The following example utilizes the transactionID created by the SCRRegister function. It creates a
relationship between the two components created using the SCRCreateComponentInfo function.
RelationshipType=”tbsm:contains”;
SourceID=”Comp0001”;
TargetID=”Comp0002”;
transactionID=SCRCreateRelationship(DataSource, transactionID,
RelationshipType, SourceID, TargetID);
SCRDeleteComponentInfo
Where required, the SCRDeleteComponentInfo function deletes a component from the SCR. It returns
the unique transaction ID, or where an exception occurs, it returns a null value.
Syntax
transactionID =SCRDeleteComponentInfo (dataSource, transactionId, transientId,
classType, label, sourceToken, keywords, values);
Parameters
This function has the following parameters.
Example
The following example utilizes the transactionID created by the SCRRegister function.
// DataSource declared
// transactionID created by the SCRRegister function
ComponentTransientID=”Comp0001”;
ClassType=”ServiceComponent”;
Label=”NO_LABEL”;
SourceToken=NULL”;
Keywords={};
Values={};
SCRDeleteRelationship
Where required, the SCRDeleteRelationship function deletes the relationship between two
components. It returns the unique transaction ID, or where an exception occurs, it returns a null value.
Syntax
transactionID =SCRDeleteRelationship (dataSource, transactionId, relationshipType,
sourceId, targetId);
Parameters
This function has the following parameters.
Example
The following example utilizes the transactionID created by the SCRRegister function. It deletes the
relationship between the two components deleted by the SCRDeleteComponentInfo function:
RelationshipType=”tbsm:contains”;
SourceID=”Comp0001”;
TargetID=”Comp0002”;
transactionID=SCRDeleteRelationship(DataSource, transactionID,
RelationshipType, SourceID, TargetID);
SCRComplete
The SCRComplete function commits all the component info and relationship values for the transaction ID
to the database. This function returns 0 when successful and returns an exception when it fails.
Syntax
SCRComplete (dataSource, transactionId);
Parameters
This function has the following parameters.
Example
The following example uses the transactionID created by the SCRRegister function. It returns 0 if it
completes correctly, otherwise an exception is thrown.
SCRReadRelationships
The SCRReadRelationships function returns a list of all relationships.
Syntax
DataItems = SCRReadRelationships(dataSource, dependencyDirection, relationshipType,
sourceLabel, sourceClass, targetLabel, targetClass);
Example
The example provided returns the relationships within the DataSource, using the parameters as filters:
DataSource = "SCR_DB";
SCRReadManagedElements
The SCRReadManagedElements function returns all managed elements, filtered by class type if the
value is not null.
Syntax
DataItems = SCRReadManagedElements (dataSource,classType);
Parameters
This function has the following parameters.
Example
This example return all the managed elements, filtered by the class type a:Organization:
DataSource = "SCR_DB";
TransactionID = SCRRegister
("SCR_DB", "Service_0001", "Service", "ServiceApp", null, "Delta");
Log("TransactionID is " + TransactionID);
TransactionID = SCRCreateComponentInfo
("SCR_DB", TransactionID, "Comp0001", "tbsm:resource", "NO_LABEL",
null, ["tbsm:identity"], ["comp0001-uniquestring"] );
TransactionID = SCRCreateComponentInfo
("SCR_DB", TransactionID, "Comp0002", "tbsm:resource", "NO_LABEL",
null, ["tbsm:identity"], ["comp0002-uniquestring"] );
TransactionID = SCRCreateRelationship
("SCR_DB", TransactionID, "tbsm:contains", "Comp0001", "Comp0002");
SCRComplete("SCR_DB", TransactionID);
Note: The Simple Email Notification solution has been deprecated. New notification features such as
ChatOps are available from IBM Cloud Pak for Watson AIOps. Email notifications are also available with
the SendEmail policy function which can send emails when a preset set of conditions or events occur.
This solution is based on IBM Tivoli Netcool/Impact, and IBM Dashboard Application Services Hub, which
comes as part of IBM Jazz for Service Management. To make this solution work, you need the IBM
Dashboard Application Services Hub component.
The solution provides a GUI to add configuration and control the rules to send emails. The solution is
packaged in a compressed file in the $IMPACT_HOME/add-ons/notifications/ directory.
• For UNIX systems, use the Notifications.jar file.
• For Windows, use the Notifications.zip file
Each compressed file consists of the following parts:
• A db directory that contains sql files that can be used to create the database tables in Apache Derby or
DB2.
• An importData directory that contains an Impact project that contains the artifacts like, policies, data
source, and data type configurations for this solution to work.
• A data.zip directory that contains a sample Dashboard page that must be customized for your
environment.
Installation
You must complete the following steps before you can use the solution.
1. In your database, create the database table that you want to use to store the configuration in.
2. For UNIX systems, expand the IMPACT_HOME\add-ons\notifications\Notifications.jar.
Import the Netcool/Impact artifacts in the importData directory into the Notifications.jar
package in the Impact Server by using the IMPACT_HOME/bin/nci_import script.
3. Update the EmailSender service with a working SMTP server.
4. Install the Impact_SSD_Dashlet.war file in the IBM Dashboard Application Services Hub. Then,
import the exported page in the data.zip file into the IBM Dashboard Application Services Hub.
• For Windows, use the same process to install the Notifications.zip file.
Procedure
1. To create the table in the Derby database, edit the notifications_derby.sql file in the db
directory of the compressed Notifications file.
• For UNIX systems use the Notifications.jar file.
• For Windows, use the Notifications.zip file.
2. Replace derbypass with your Derby password.
Procedure
Use the nci_import command to import the Netcool/Impact artifacts into the Impact Server.
Procedure
1. Log in to Netcool/Impact. Go to the Services tab.
2. Edit the EmailSender service.
3. Enter a valid SMTP host and port.
Importing the exported page into the IBM Dashboard Application Services
Hub
How to install the war file and import the dashboard into the IBM Dashboard Application Services Hub.
Procedure
1. Before you import the data.zip file, the Impact_SSD_Dashlet.war file must be installed in the
IBM Dashboard Application Services Hub.
2. The following link shows how to install the war file in to the IBM Dashboard Application Services Hub.
“Installing the Netcool/Impact Self Service Dashboard widgets” on page 157
3. The data.zip file contains the sample dashboard that accesses the data from the Remote Provider
Connection name and Provider ID and can point to any cluster.
4. To import the dashboard, copy the data.zip file into the DASH_HOME/ui/input directory. If the
input directory does not exist, create the directory.
5. Run the following command:
DASH_HOME/ui/bin/consolecli.sh Import
--username <console_admin_user_ID>
--password <console_admin_password>
--excludePlugins TCRImportPlugins
Results
The Impact Notification dashboard page is now available in the Default folder.
Procedure
1. Log in to the IBM Dashboard Application Services Hub.
2. From the settings in the navigation bar, open the Connections tab.
3. In the connections page, enter the host name where your Netcool/Impact GUI Server is installed.
4. Enter the admin user ID and password. Click Search.
5. The list of providers is displayed in the table. Select Impact_NCICLUSTER or similar depending on
your cluster name.
6. Modify the name and the provider ID as follows:
IMPACT_EMAIL_NOTIFICATION_ADDON
7. Click OK to implement the changes.
Procedure
1. Log in to Netcool/Impact.
2. In the Projects list, switch to the Notifications project.
3. Select Data Model.
4. Edit the ImpactNotificationsOS data source, update the Username, password, hostname, and port
for the ObjectServer. The ObjectServer is used for event filtering.
Procedure
1. Add the event in the Event Filter field. The event filter must be a valid ObjectServer SQL.
2. Enter the subject for the email in the Email Subject field.
For example, @Node@ @Severity@ event has occurred.
3. Enter the body of the email in the Email Body field.
For example, the Email Subject and Email Body can substitute values from the event. If a
column in Netcool/OMNIbus is added to the email, the variable substitution must be of the format
@COLUMNAME@. For example, if the value column Node is added to subject or body of the email, specify
@Node@ in the string. The value is substituted when the email is generated.
4. To, CC, and BCC email addresses can be entered in the appropriate text boxes.
5. Select the Activate Filter check box, if you want to activate this filter while you are adding or updating
this configuration.
6. Click the Save Email Notification button.
Procedure
1. To activate email notifications, login to Netcool/Impact.
2. Click Services to open the Services tab.
3. Switch to the Notifications project.
4. Edit the ImpactEmailNotificationPolicyActivator service, update the Activation Interval interval to a
value that suits your environment. The default is every 30 seconds.
5. Start the ImpactEmailNotificationPolicyActivator service.
Procedure
1. If you want to use the DB2 database in your DB2 environment, create a database that is called
NOTIFCTN.
2. Copy the notifications_db2.sql file to your DB2 environment.
3. Connect to the new database by running db2 connect to NOTIFCTN.
4. Run the db2 -tvf notifications_db2.sql command to create the table.
5. Remove the database connection by running db2 connect reset.
Procedure
1. In Netcool/Impact, click Data Model to open the Data Model tab.
2. Select the Notifications Project.
3. Edit the ImpactNotificationsDB2 data source.
4. Update the user ID, password, port, and the host for this configuration.
Procedure
1. Click Policies to open the Policies tab.
2. Select the Notifications project.
3. For DB2 and for Derby databases, you must update the impact_sender_address variable to ensure that
the email that is sent has a valid sender address.
For example:
var impact_sender_address="[email protected]";
4. For a DB2 database, you must update the emailConfigDTName and the emailConfigDSName variable
a) Edit the notificationConstants policy. Update the emailConfigDTName variable to
EmailConfigurationDB2.
b) In the same policy update emailConfigDSName variable to ImpactNotificationsDB2.
Index 305
event gateway 2 L
Event Isolation and Correlation 277, 278, 282–285
Event Isolation and Correlation operator views 282 large data model support 163
Event Isolation and Correlation polices 281 Large data model support 161
Event Isolation and Correlation Services 282 large data models 162
event notification 2 Launching the Event Isolation and Correlation analysis page
event querying 286
reading state file 26 LDAP data sources
event reader creating 11
actions 27 LDAP filters 65
event locking 27 links
event matching 27 overview 70
event order 27
mapping 26
event readers
M
architecture 25 manuals
process 25 see publications ix
event sources Mediator DSA
Architecture 21 data sources 11
non-ObjectServer 20 Mediator filters 66
ObjectServer 19 multiple key expressions 69
events MWM 271, 275
adding journal entries to 60, 61
deleting 62
sending new 61 N
Exporting and Importing ForImpactMigration 92
Netcool/Impact data types as OSLC resources 184
notation
F environment variables xiii
path names xiii
Filter data output 147 typeface xiii
Filtering data in the console 113
filters
LDAP filters 65 O
Mediator filters 66
ObjectServer event source
SQL filters 63
setting up 21
fixes
omnibus event listener
obtaining x
triggers 55
using ReturnEvent 56
G omnibus event reader
event querying 26
GetByFilter 139 event queueing 26
OMNIbus triggers 57
I OMNIbusEventListener 56
OMNIbusEventReader prevent reread 30
Installing Discovery Library Toolkit 278 OMNIbusEventReader re-reading events 33
Installing Self Service Dashboard widgets 157 OMNIbusEventReader retrying connection on error 32
Installing the DB2 data base 278 OMNIbusEventReader with an ObjectServer pair 28
internal data repository 11 online publications
accessing ix
operator view EIC_Analyze 287
J ordering publications x
JavaScript and the UI Data Provider 173 OSLC 181
JDBC Gateway OSLC and data types 183
changing default name 32 OSLC and variables from policy results 203
JMS OSLC introduction 181
data source 11 OSLC resource shapes for data types 186
OSLC resources and identifiers 183
Overview 91, 277
K
key expressions 68 P
keys
multiple key expressions 69 Passing argument values to a policy 214
Passing parameter values from a table to a gauge 149
S U
SCR UI data provider 163
API UI data provider and GetByFilter function 109
SCRComplete 295 UI data provider customization 166
SCRCreateComponentInfo 291 Uninstalling the Self Service Dashboard widgets 158
SCRCreateRelationship 293 updating data 72
SCRDeleteComponentInfo 293 Updating the RCA components view 279
SCRDeleteRelationship 294 User parameters 107, 207
SCRReadManagedElements 296 using Spid 57
SCRReadRelationships 295
SCRRegister 290
functions
V
SCRComplete 295 variables
SCRCreateComponentInfo 291 notation for xiii
SCRCreateRelationship 293 Viewing Event Isolation and Correlation results 286, 287
SCRDeleteComponentInfo 293 viewing field values and the UI Data Provider 172
SCRDeleteRelationship 294 Visualizing a data mashup from two IBM Tivoli Monitoring
SCRReadManagedElements 296 sources 152
SCRReadRelationships 295 Visualizing a policy action in a widget 132
SCRRegister 290 Visualizing data mashups with an array of Impact objects
Self service dashboard widgets 157 138
Serial rollover 33 Visualizing data output 139
service Visualizing data with the tree and topology widgets 142
database event listener 36, 40 Visualizing Event Isolation and Correlation 155, 287
omnibus event listener 54
OMNIbus event listener 54
OMNIbus event reader 24 W
service model
Web hosting model
enterprise 8
elements 9
services
WebGUI 286
overview 23
working with data models 5
predefined 23
setting up 3
user-defined 24 X
working with 1, 23
Simple Email Notification 300 x events in y time 2
Slack Integration project 77
Software Support
contacting xi
Index 307
308 Netcool/Impact: Solutions Guide
IBM®