PDF Reference
PDF Reference
PDF Reference
4.2
Reference
IBM
2024-4219-01
Note
Before using this information and the product it supports, read the information in “Notices” on page
1025.
This edition applies to version 4.2 of IBM Tivoli Network Manager IP Edition (product number 5724-S45) and to all
subsequent releases and modifications until otherwise indicated in new editions.
© Copyright International Business Machines Corporation 2006, 2024.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
Contents
Part 1. Languages.................................................................................................. 1
iii
Chapter 2. Stitchers and stitcher language...............................................................................................35
Stitcher formats....................................................................................................................................35
Stitcher structure................................................................................................................................. 36
Stitcher triggers ..............................................................................................................................36
Stitcher rules...................................................................................................................................36
Stitcher language..................................................................................................................................36
Stitcher text file structure...............................................................................................................36
Stitcher trigger conditions.............................................................................................................. 37
Stitcher rules...................................................................................................................................41
Stitcher language building blocks................................................................................................ 103
Stitcher language comments....................................................................................................... 104
Precedence and association of operators....................................................................................104
OQL quotes in the stitcher language............................................................................................ 105
Domain-specific stitchers.................................................................................................................. 105
iv
Network entity discovery agent example.................................................................................... 141
IP routing discovery agent example.............................................................................................141
Prototype agent def file template......................................................................................................145
Threads in discovery agents.............................................................................................................. 147
Threads example.......................................................................................................................... 147
Default number of threads........................................................................................................... 148
v
RIV::GetResult.............................................................................................................................. 178
RIV::GetResultSet................................................................................................................. 180
RIV::InputFilter.............................................................................................................................180
RIV::InputQueueLength............................................................................................................... 181
RIV::IsIpNotLoopBackOrMulticast.............................................................................................. 182
RIV::IsIpValid................................................................................................................................183
RIV::IsIpv4Valid........................................................................................................................... 183
RIV::IsIpv6Valid........................................................................................................................... 184
RIV::ReadDir................................................................................................................................. 185
RIV::RivDebug...............................................................................................................................185
RIV::RivError................................................................................................................................. 186
RIV::RivMessage........................................................................................................................... 187
RIV::Agent module reference............................................................................................................ 187
RIV::Agent module synopsis........................................................................................................ 188
RIV::Agent Constructor................................................................................................................ 188
ExtGetTelnet................................................................................................................................. 189
GetDNSAllIpAddrs........................................................................................................................190
GetDNSAllNames..........................................................................................................................191
GetDNSFirstIpAddr.......................................................................................................................192
GetDNSFirstName........................................................................................................................ 192
GetIpArp....................................................................................................................................... 193
GetMacArp.................................................................................................................................... 194
GetMultTelnet............................................................................................................................... 194
GetPingIP......................................................................................................................................195
GetPingList....................................................................................................................................196
GetPingSubnet..............................................................................................................................197
GetTelnet.......................................................................................................................................197
GetTelnetCols............................................................................................................................... 198
GetTraceRoute.............................................................................................................................. 199
GetXMLRPCData........................................................................................................................... 200
GetXMLRPCEntityData..................................................................................................................200
LockThreads..................................................................................................................................201
PingIP............................................................................................................................................202
PingList..........................................................................................................................................202
PingSubnet....................................................................................................................................203
SendNEToDisco............................................................................................................................ 204
SendNEToNextPhase....................................................................................................................204
SnmpGet....................................................................................................................................... 208
SnmpGetBulk................................................................................................................................208
SnmpGetNext............................................................................................................................... 210
UnLockThreads............................................................................................................................. 210
RIV::App module reference............................................................................................................... 211
RIV::App module synopsis........................................................................................................... 211
RIV::App Constructor....................................................................................................................212
RIV::OQL module reference...............................................................................................................212
RIV::OQL module synopsis...........................................................................................................213
RIV::OQL Constructor................................................................................................................... 214
Close............................................................................................................................................215
CreateDB.......................................................................................................................................215
CreateTable................................................................................................................................... 216
Delete............................................................................................................................................217
Insert.............................................................................................................................................218
Print...............................................................................................................................................219
Query............................................................................................................................................219
QueryGetResult........................................................................................................................220
QueryGetResults......................................................................................................................221
Select............................................................................................................................................ 221
Send.............................................................................................................................................. 223
vi
Update...........................................................................................................................................223
RIV::Param module reference........................................................................................................... 224
RIV::Param module synopsis....................................................................................................... 225
RIV::Param Constructor............................................................................................................... 225
CommandName............................................................................................................................229
DomainName................................................................................................................................ 229
Usage............................................................................................................................................ 230
RIV::Record module reference.......................................................................................................... 231
RIV::Record module synopsis...................................................................................................... 231
RIV::Record Constructor.............................................................................................................. 232
AddLocalNeighbour...................................................................................................................... 232
AddLocalNeighbourTag................................................................................................................ 233
AddRemoteNeighbour.................................................................................................................. 234
AddRemoteNeighbourTag............................................................................................................ 234
GetLocalNeighbours..................................................................................................................... 235
GetRemoteNeighbours................................................................................................................. 235
Print...............................................................................................................................................236
RIV::RecordCache module reference................................................................................................ 236
RIV::RecordCache module synopsis............................................................................................ 237
RIV::RecordCache Constructor.................................................................................................... 237
CacheRecord.................................................................................................................................238
GetRecord..................................................................................................................................... 238
GetRecords................................................................................................................................... 239
RIV::SnmpAccess module reference.................................................................................................240
RIV::SnmpAccess module synopsis.............................................................................................240
RIV::SnmpAccess Constructor..................................................................................................... 241
ASN1ToOid....................................................................................................................................241
AsyncSnmpGet............................................................................................................................. 242
AsyncSnmpGetBulk...................................................................................................................... 243
AsyncSnmpGetNext......................................................................................................................245
GetMibHash.................................................................................................................................. 246
MaxAsyncConcurrent................................................................................................................... 246
OidToASN1....................................................................................................................................247
SnmpGet....................................................................................................................................... 247
SnmpGetBulk................................................................................................................................248
SnmpGetNext............................................................................................................................... 249
SnmpWalk..................................................................................................................................... 250
SplitOidAndIndex......................................................................................................................... 251
vii
NCP::Domain module synopsis.................................................................................................... 276
NCP::Domain Constructor............................................................................................................ 277
clone..............................................................................................................................................278
create............................................................................................................................................ 279
drop............................................................................................................................................... 281
id....................................................................................................................................................282
name............................................................................................................................................. 283
setLogHandle................................................................................................................................ 284
setLogLevel................................................................................................................................... 285
summary....................................................................................................................................... 287
viii
Tracking discovery databases............................................................................................................374
translations database................................................................................................................... 374
instrumentation database schema.............................................................................................. 378
workingEntities database............................................................................................................. 381
dbModel database..............................................................................................................................384
dbModel.access table...................................................................................................................384
dbModel.entityDetails table......................................................................................................... 386
dbModel.entityMap table............................................................................................................. 386
Working topology databases............................................................................................................. 387
fullTopology database schema.....................................................................................................387
dNCIM schema............................................................................................................................. 388
rediscoveryStore database................................................................................................................ 388
rediscoveryStore.dataLibrary table..............................................................................................389
rediscoveryStore.rediscoveredEntities table...............................................................................389
Topology manager databases............................................................................................................389
ncimCache database.................................................................................................................... 389
model database schema.............................................................................................................. 406
Failover database............................................................................................................................... 410
Ignored cached data.....................................................................................................................410
The failover database schema .................................................................................................... 410
Example failover database configuration.................................................................................... 412
Agent Template database.................................................................................................................. 413
Discovery agent despatch table................................................................................................... 413
Discovery agent returns table...................................................................................................... 414
ix
trapMux.config table.......................................................................................................................... 465
trapMux.sinkHosts table.................................................................................................................... 465
x
Show interfaces utilized by TE tunnels........................................................................................ 532
Show Traffic Engineered tunnel configuration.............................................................................532
List supporting routers for a TE tunnel........................................................................................ 533
Show performance data for a TE tunnel...................................................................................... 534
Queries for RAN information..............................................................................................................534
Find specific RAN entity types..................................................................................................... 534
Retrieve RAN connectivity............................................................................................................ 536
Find RAN containment..................................................................................................................542
Find RAN dependencies............................................................................................................... 544
Queries for hosted services............................................................................................................... 546
Find all chassis devices hosting OSPF services........................................................................... 546
Queries for collection information..................................................................................................... 547
Show all PIM adjacencies.............................................................................................................547
Show PIM adjacencies for a device..............................................................................................547
Find PIM enabled routers.............................................................................................................547
Find all devices in each subnet.................................................................................................... 548
Find all devices in a given VPN..................................................................................................... 549
Queries for mapping and enumeration information..........................................................................550
Identify all the device hardware manufacturers listed in the database..................................... 550
Show all the entity types defined in the database.......................................................................552
xi
entityDetails..................................................................................................................................607
entityNameCache......................................................................................................................... 608
entityType..................................................................................................................................... 608
enumerations................................................................................................................................609
hostedService............................................................................................................................... 612
manager........................................................................................................................................ 613
mappings...................................................................................................................................... 613
networkPipe..................................................................................................................................614
notes............................................................................................................................................. 615
pipeComposition...........................................................................................................................615
probeTooltip.................................................................................................................................. 616
protocolEndPoint.......................................................................................................................... 618
topologyLinks................................................................................................................................619
Core views.......................................................................................................................................... 620
discoveryOverview........................................................................................................................620
entity............................................................................................................................................. 621
interfaceDomain........................................................................................................................... 622
interfaces...................................................................................................................................... 623
mainNodeDetails.......................................................................................................................... 626
interfaceDomain........................................................................................................................... 629
Entity attribute tables........................................................................................................................ 630
aggregationGroup......................................................................................................................... 630
antennaFunction...........................................................................................................................631
atmEndPoint................................................................................................................................. 632
bgpAutonomousSystem............................................................................................................... 633
bgpCluster.....................................................................................................................................634
bgpEndPoint..................................................................................................................................634
bgpNetwork.................................................................................................................................. 637
bgpRouteAttribute........................................................................................................................ 637
bgpService.................................................................................................................................... 639
computerSystem.......................................................................................................................... 640
controlPlaneViewCollection......................................................................................................... 647
cpu.................................................................................................................................................647
discoveryAttributes...................................................................................................................... 648
domainSummary.......................................................................................................................... 648
eirFunction.................................................................................................................................... 649
emsSystem................................................................................................................................... 650
enbFunction.................................................................................................................................. 651
eUtranCell..................................................................................................................................... 653
eUtranSector.................................................................................................................................655
frameRelayEndPoint..................................................................................................................... 656
genericCollection.......................................................................................................................... 656
genericRange................................................................................................................................ 657
geographicLocation...................................................................................................................... 657
geographicRegion......................................................................................................................... 659
globalVlan..................................................................................................................................... 659
gnbFunction.................................................................................................................................. 659
hsrpGroup..................................................................................................................................... 662
hssFunction...................................................................................................................................662
igmpEndPoint................................................................................................................................664
igmpGroup.................................................................................................................................... 665
igmpService.................................................................................................................................. 666
ipConnection.................................................................................................................................666
ipEndPoint.....................................................................................................................................666
ipMRouteDownstream..................................................................................................................668
ipMRouteEndPoint........................................................................................................................ 669
ipMRouteGroup.............................................................................................................................670
ipMRouteMdt................................................................................................................................ 671
xii
ipMRouteService...........................................................................................................................671
ipMRouteSource........................................................................................................................... 671
ipMRouteUpstream.......................................................................................................................672
ipPath............................................................................................................................................ 674
itnmService................................................................................................................................... 674
lagEndPoint...................................................................................................................................675
lingerTime..................................................................................................................................... 676
localVlan....................................................................................................................................... 676
lteInterface................................................................................................................................... 677
ltePool........................................................................................................................................... 679
managedStatus.............................................................................................................................680
mmeFunction................................................................................................................................681
mplsTEService.............................................................................................................................. 683
mplsTETunnel............................................................................................................................... 683
mplsTETunnelEndPoint................................................................................................................ 685
mplsTETunnelResource................................................................................................................685
mplsLSP........................................................................................................................................ 686
multiplexer....................................................................................................................................686
netcoolAsmsRunning....................................................................................................................686
networkInterface..........................................................................................................................687
networkServiceEntityEndPoint.....................................................................................................690
networkVpn...................................................................................................................................691
nrCellCU........................................................................................................................................ 691
nrCellDU........................................................................................................................................ 693
operatingSystem...........................................................................................................................695
ospfArea........................................................................................................................................699
ospfEndPoint.................................................................................................................................700
ospfNetworkLSA........................................................................................................................... 701
ospfRoutingDomain...................................................................................................................... 701
ospfService................................................................................................................................... 701
pcrfFunction..................................................................................................................................702
pgwFunction................................................................................................................................. 704
physicalBackplane........................................................................................................................705
physicalCard................................................................................................................................. 706
physicalChassis............................................................................................................................ 710
physicalConnector........................................................................................................................ 714
physicalFan................................................................................................................................... 716
physicalOther................................................................................................................................718
physicalPowerSupply................................................................................................................... 719
physicalSensor..............................................................................................................................721
physicalSlot...................................................................................................................................724
pimEndpoint................................................................................................................................. 726
pimNetwork.................................................................................................................................. 727
pimService.................................................................................................................................... 727
plmn.............................................................................................................................................. 728
portEndPoint................................................................................................................................. 728
probe............................................................................................................................................. 729
probeCollection............................................................................................................................ 731
probeEndPoint.............................................................................................................................. 731
probeService.................................................................................................................................732
ranBaseStation............................................................................................................................. 732
ranBaseStationController............................................................................................................. 733
ranCircuitSwitchedCore................................................................................................................734
ranGGSN....................................................................................................................................... 734
ranGSMCell................................................................................................................................... 735
ranLocationArea............................................................................................................................736
ranMediaGateway.........................................................................................................................736
ranMobileSwitchingCentre........................................................................................................... 737
xiii
ranMSS.......................................................................................................................................... 737
ranNodeB...................................................................................................................................... 738
ranNodeBLocalCell....................................................................................................................... 738
ranPacketControlUnit................................................................................................................... 739
ranPacketSwitchedCore............................................................................................................... 739
ranRadioCore................................................................................................................................ 740
ranRadioNetworkController......................................................................................................... 740
ranRoutingArea.............................................................................................................................741
ranSector.......................................................................................................................................742
ranSGSN........................................................................................................................................742
ranTransceiver.............................................................................................................................. 743
ranUtranCell..................................................................................................................................743
rtExportList................................................................................................................................... 744
rtImportList...................................................................................................................................744
sgwFunction..................................................................................................................................744
snmpSystem................................................................................................................................. 746
subnet........................................................................................................................................... 746
trackingArea..................................................................................................................................747
transmissionTp..............................................................................................................................747
userPlaneViewCollection..............................................................................................................748
vlanTrunkEndPoint........................................................................................................................748
vpnRouteForwarding.................................................................................................................... 749
vpwsEndPoint............................................................................................................................... 749
vtpDomain.....................................................................................................................................750
wlan...............................................................................................................................................750
wlanAccessPoint...........................................................................................................................751
wlanChannel................................................................................................................................. 752
wlanDot11Interface..................................................................................................................... 752
wlanService...................................................................................................................................753
wlanSpec.......................................................................................................................................754
Entity attribute views......................................................................................................................... 754
backplane......................................................................................................................................754
chassis.......................................................................................................................................... 755
fan................................................................................................................................................. 759
interface........................................................................................................................................ 761
module.......................................................................................................................................... 764
other..............................................................................................................................................766
psu.................................................................................................................................................768
sensor............................................................................................................................................769
slot................................................................................................................................................ 772
sourceEms.................................................................................................................................... 773
Common Data Model views............................................................................................................... 775
xiv
Retrieving location data..................................................................................................................... 792
For locations................................................................................................................................. 793
For devices bounded by latitude and longitude...........................................................................796
For specific devices...................................................................................................................... 797
For specific devices within bounds.............................................................................................. 801
For devices in a network view...................................................................................................... 802
For connections between collections.......................................................................................... 803
For connections between devices................................................................................................806
xv
Discovery agents for IPv6.............................................................................................................862
Service Level Agreement agents.................................................................................................. 863
Guidance for selecting agents........................................................................................................... 863
Which IP layer agents to use........................................................................................................ 863
Which standard agents to use...................................................................................................... 864
Which specialized agents to run...................................................................................................864
Suggested agents for a layer 3 discovery.................................................................................... 865
Suggested agents for a layer 2 discovery.................................................................................... 865
xvi
itnmMetaDiscoAudit.pl.................................................................................................................940
itnm_disco.pl................................................................................................................................ 943
listEntities.pl................................................................................................................................. 944
ncp_domain_discovery_start.pl................................................................................................... 945
restart_disco_process.pl.............................................................................................................. 945
scheduleDiscovery.pl....................................................................................................................946
Example scripts..................................................................................................................................947
oql_example.pl............................................................................................................................. 947
snmp_example.pl..........................................................................................................................947
Network Manager process management scripts...............................................................................948
create_all_control.........................................................................................................................948
register_all_agents....................................................................................................................... 949
setup_run_as* scripts...................................................................................................................949
setup_run_storm_as_non_root.sh...............................................................................................954
Polling scripts..................................................................................................................................... 955
get_policies.pl.............................................................................................................................. 955
itnm_poller.pl................................................................................................................................957
monitoredEntities.py.................................................................................................................... 960
ncp_ping_poller_snapshot.pl.......................................................................................................961
ncp_polling_exceptions.pl........................................................................................................... 962
ncp_upload_expected_ips.pl....................................................................................................... 963
SQL scripts..........................................................................................................................................964
create_itnm_triggers.sql.............................................................................................................. 964
create_sae_automation.sql.......................................................................................................... 964
drop_itnm_triggers.sql................................................................................................................. 965
drop_sae_automation.sql.............................................................................................................965
Troubleshooting scripts..................................................................................................................... 966
GetDiscoCache.pl......................................................................................................................... 966
GetEndDeviceConnections.pl.......................................................................................................967
itnm_data.pl..................................................................................................................................968
ncp_db_access.pl..........................................................................................................................969
ncp_storm_validate.sh................................................................................................................. 970
ncp_validate_ncim_tables.pl........................................................................................................975
PrintCacheFile.pl...........................................................................................................................976
snmp_walk.pl................................................................................................................................976
Upgrade and backup scripts.............................................................................................................. 979
ITNMDataExport.pl.......................................................................................................................979
ITNMDataImport.pl...................................................................................................................... 979
ITNMExportNetworkViews.pl.......................................................................................................980
ncp_ncim_diff.pl........................................................................................................................... 982
nmExport...................................................................................................................................... 983
nmGuiExport................................................................................................................................. 984
nmGuiImport ............................................................................................................................... 985
nmImport ..................................................................................................................................... 986
xvii
Path Views URL parameters......................................................................................................... 998
Cisco and Juniper WebTools commands........................................................................................... 999
Cisco information tools.................................................................................................................999
Cisco diagnostic tools.................................................................................................................1001
Juniper information tools........................................................................................................... 1002
Juniper diagnostic tools............................................................................................................. 1003
xviii
Discovered Nodes and Interfaces Flat File List......................................................................... 1020
Notices............................................................................................................1025
Trademarks............................................................................................................................................1026
xix
xx
About this publication
The IBM Tivoli Network Manager Reference contains reference information including the system
languages, databases, and Perl API used by Network Manager. This publication is for advanced users
who need to customize the operation of Network Manager.
Publications
This section lists publications in the Network Manager library and related documents. The section also
describes how to access IBM publications online and how to order publications.
Prerequisite publications
To use the information in this publication effectively, you must have some prerequisite knowledge, which
you can obtain from the following publications:
• IBM Tivoli Netcool/OMNIbus Installation and Deployment Guide
Includes installation and upgrade procedures and describes how to configure security and component
communications. The publication also includes examples of Tivoli Netcool/OMNIbus architectures and
describes how to implement them.
• IBM Tivoli Netcool/OMNIbus User's Guide
Provides an overview of the desktop tools and describes the operator tasks related to event
management using these tools.
• IBM Tivoli Netcool/OMNIbus Administration Guide
Describes how to perform administrative tasks using the Tivoli Netcool/OMNIbus Administrator GUI,
command-line tools, and process control. The publication also contains descriptions and examples of
ObjectServer SQL syntax and automations.
• IBM Tivoli Netcool/OMNIbus Probe and Gateway Guide
Contains introductory and reference information about probes and gateways, including probe rules file
syntax and gateway commands.
• IBM Tivoli Netcool/OMNIbus Web GUI Administration and User's Guide
Describes how to perform administrative and event visualization tasks using the Tivoli Netcool/
OMNIbus Web GUI.
Ordering publications
You can order many IBM publications online at the following Web site:
http://www.ibm.com/e-business/linkweb/publications/servlet/pbi.wss
You can also order by telephone by calling one of these numbers:
• In the United States: 800-879-2755
• In Canada: 800-426-4968
In other countries, contact your software account representative to order IBM publications. To locate the
telephone number of your local representative, perform the following steps:
1. Go to the following Web site:
http://www.ibm.com/e-business/linkweb/publications/servlet/pbi.wss
2. Select your country from the list and click Go. The Welcome to the IBM Publications Center page is
displayed for your country.
3. On the left side of the page, click About this site to see an information page that includes the
telephone number of your local representative.
Accessibility
Accessibility features help users with a physical disability, such as restricted mobility or limited vision, to
use software products successfully.
Accessibility features
Network Manager includes the following major accessibility features:
• Operations that use a screen reader.
Network Manager uses IBM Installation Manager to install the product. You can read about the
accessibility features for IBM Installation Manager at https://www.ibm.com/support/knowledgecenter/
SSDV2W/im_family_welcome.html.
Network Manager uses the latest W3C Standard, http://www.w3.org/TR/wai-aria/, to ensure
compliance to http://www.access-board.gov/guidelines-and-standards/communications-and-it/about-
the-section-508-standards/section-508-standards), and http://www.w3.org/TR/WCAG20/. To take
advantage of accessibility features, use the latest release of your screen reader in combination with
the latest web browser that is supported by this product.
Interface information
Network Manager provides the following features suitable for low vision users:
• All non-text content used in the GUI has associated alternative text.
• Low-vision users can adjust the system display settings, including high contrast mode, and can control
the font sizes using the browser settings.
• Color is not used as the only visual means of conveying information, indicating an action, prompting a
response, or distinguishing a visual element.
Network Manager provides the following features suitable for photosensitive epileptic users:
• The Network Manager user interfaces do not have content that flashes more than two times in any one
second period.
The Network Manager web user interface includes WAI-ARIA navigational landmarks that you can use to
quickly navigate to functional areas in the application.
IBM Support
If you have a problem with your IBM software, you want to resolve it quickly. IBM provides the following
ways for you to obtain the support you need:
Online
Go to the IBM Software Support site at https://www.ibm.com/support/home/ and follow the
instructions.
IBM Support Assistant
The IBM Support Assistant (ISA) is a free local software serviceability workbench that helps you
resolve questions and problems with IBM software products. The ISA provides quick access to
support-related information and serviceability tools for problem determination. To install the ISA
software, go to https://www.ibm.com/support/knowledgecenter/SSLLVC/welcome/isa_welcome.html
Conventions
The following conventions have been used to explain the OQL syntax:
• OQL keywords and their required punctuation are shown in bold in examples.
• Parameters are shown in italics.
• Optional parameters are shown enclosed by square brackets [].
• OQL commands are terminated with a semicolon.
• An ellipsis (...) following a list of parameters indicates that you can continue the list if necessary.
• OQL Service Provider command lines are shown with the example command line prompt |
phoenix:1.> followed by relevant sample output.
• The system name within the prompt appears as phoenix within this manual. This is replaced by an
appropriate value for your system, such as the host name.
Sample databases
The following tables contain data in the staff databases.
1 Matt Development M 28
3 Ernie Sales M 23
4 Paul Marketing M 26
5 Jim Support M 27
7 Carl Perl M 32
Features of OQL
The following topics describe the features of Object Query Language (OQL).
Related reference
Stitcher language comments
Comments are introduced by -- or //. If a comment requires a carriage return, the characters on the next
line must also be commented out.
Related reference
Stitcher language building blocks
To construct statements in the stitcher language, use the programming constructs, relational operators,
and datatypes.
OQL punctuation
OQL has a set of punctuation marks that you use to structure OQL statements.
The following table describes the punctuation used in the OQL syntax.
You can issue the create command to create a table. When you create a table, you must define all
the columns of the table as well as a datatype, such as text or integer, and if applicable, the column
constraints and any default values.
The entries within the brackets are separated by commas, although the last entry is not terminated by a
comma.
The following topics describe how to use the create command.
Datatypes
All columns must have an associated datatype that indicates the acceptable input for that column.
The following table describes the datatypes that are used in OQL:
External datatypes
It is possible to define additional datatypes that map integers to the possible values of a column; these
datatypes are called external datatypes, because they are defined externally to the present schema.
Syntax
In order to use a datatype that has been defined in a previously loaded schema, the current schema must
contain a statement of the following structure.
Examples
The following examples show the datatype declaration.
After you have made these declarations you can use the datatypes boolean and entityTypes in the
current schema, provided that they have also been defined in a previously loaded schema.
Column constraints
Column constraints are restrictions on the data that can be inserted into a given column.
The following table describes the column constraints. Any of these constraints can be applied to any
column.
If multiple constraints are specified for a single column, NOT NULL must be specified before PRIMARY
KEY.
Default values
A default value can be applied to a column when it is created with the default keyword. If an explicit value
is not provided for that column when data is inserted, the specified default value is used.
Unique
The optional unique column constraint ensures that all entries in the specified column are unique.
The unique column is internally indexed and so provides faster query times, but slower insert and delete
times.
List and object fields cannot be indexed, thus they cannot be set as unique fields, nor as part of an index
definition.
Counter
The optional counter column constraint delegates the responsibility of counting duplicate records to the
specified column.
If you attempt to insert a duplicate record into the table, the insertion of the duplicate entry is suppressed
and the value of the specified column is incremented in the record that already exists.
Timestamp
The optional timestamp column constraint stores the date and time information for the creation of the
record in the specified column of the database table.
The timestamp properties are:
• Format: YYYY-MM-DD HH:MM:SS.nnnnn....
• Range: 0001-01-01 00:00:00.......to 9999-12-31 23:59:59.999999.......
Example 2
The following insert creates the staff.employees table.
Example 3
The following insert creates the staff.contractors table.
Example
The following example shows how to use the insert keyword:
Each data value is inserted into the corresponding column name, so the number of data values (and the
data types) must correspond with the number of column names specified. Although it is not good practice,
it is acceptable to omit the list of column names. If you choose to omit the column names, the first value
specified after the values keyword is inserted into the first column of the database, the second value
into the second column, and so on. Additionally, if you omit the column names, the number of values
must correspond to the number of columns in the database, so you must either insert a value into each
database column or explicitly specify NULL for columns into which you do not wish to insert a value.
The following topics provide further examples of the insert keyword.
The following example does not specify column names, but is still a valid insert because a value has been
specified for each column of the database.
The following example specifies no value for the Department column, which is populated with the
default value instead:
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
The following example is an insert into the staff.contractors table, where the ExtraInfo column
has been defined as object type vblist:
Related reference
Conventions and sample databases
“Syntax” on page 14
“Example 1” on page 14
“Example 2” on page 14
“Example 3” on page 15
“Example 4” on page 15
Syntax
The following syntax shows how to use the select keyword to retrieve data from a table.
select comma_separated_column_list_or_wildcard
from database_name.table_name
[ where conditional_test ]
[ order by field_name [asc|desc] ];
The * symbol can be used as a wildcard in a select statement to return all the columns of the table.
Alternatively a comma-separated list of columns can be specified.
If you specify an order by clause, then results are returned in ascending order by default. NULL values
are returned first when the results are in ascending order. Ordering of results in descending order is the
exact opposite of the ordering of results in ascending order.
Example 1
The following example shows how to use the select statement within the OQL Service Provider to query
the staff.managers table (the following example output is abbreviated).
Example 2
The following example shows a select statement that retrieves only specific fields from the
staff.managers table.
Example 3
The following example uses a where clause to restrict the results.
Example 4
The following example shows how to use a select DISTINCT keyword to retrieve a single row for each
type of data; for example a single row for each department.
Syntax
The following syntax shows how to use the select keyword to count the number of rows in a table.
select count(*)
from database_name.table_name
[ where conditional_test ]
Example 1
The following example shows how to use the select statement within the OQL Service Provider to count
the number of rows in the staff.managers table.
is null Tests whether the specified column is null (that is, has not been
assigned a value).
is not null Tests whether the specified column is not null (that is, has been
assigned a value).
Example 1
The following example query identifies the records in the employees table that contain the lowercase
letter r in the Name column.
Example 3
The following example query would return the complete records of all employees listed in the
contractors table whose name begins with an uppercase letter J.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Related reference
Conventions and sample databases
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Example 1
The following example retrieves the Name and Age columns from any record in the staff.employees
table whose Name also exists in the Name column of the staff.managers table.
Example 2
The following example retrieves the Name and Age columns of the managers table where the value of
the staff.managers.Age column matches one of the staff.employees.Age columns and is greater
than 25.
The query returns only one record. Although two records from the managers table have ages that match
the employees table, only one of the matches is also over 25.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Related reference
Conventions and sample databases
Example 1
The following example retrieves all the records that contain "C++" anywhere in the list of Skills.
Example 2
The following example returns the records that contain only "Perl" in the list of Skills.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Examples of using any, *, and all to perform table joins
Use these examples to learn how to use the operators to perform table joins.
Syntax
The following syntax shows how to use the select into statement.
The columns selected from the source table are inserted into the destination table in order, regardless of
the column names and structure of the destination table. Omitting the optional where condition selects all
the records from the source table.
If you use a wildcard, all the columns from the source table are selected and inserted in order into the
destination table. Any null columns in the source table are skipped in both the source and destination
tables, for example, if the fourth column of the source table is null, the fourth column in the destination
table is skipped.
If you specify a list of columns to select from the source table, they are inserted into the destination table
in the order in which they are specified (even if the order in which they are specified is not the order in
which they exist in the source table).
Example 1
The following example selects the values of the Age and Gender columns of the staff.managers table
and inserts the values into the first two columns of the staff.employees table.
Example 2
The following example selects EmployeeID and Name from any record in the staff.employees table
for which Name="Carl" and inserts the values into the first two columns of the staff.managers table.
Matching any entries in one list with all the entries in the second list
The following example returns any record where any of the entries in db.table1.m_List match all of
the entries in db.table2.m_OtherList. For example, if m_List = [ 1, 2, 3 ] and m_OtherList
= [ 2, 2 ] they match because one of the entries in m_List matches all the entries in m_OtherList.
However, if m_List = [ 1, 2, 3 ] and m_OtherList = [ 1, 2, 3 ] they do not match, because
there is no entry in m_List that is equal to every entry in m_OtherList.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Syntax
The following syntax shows how to use the update keyword.
update database_name.table_name
set column = value
[ , column = value ... ]
[ where conditional_test ] ;
If the update statement is used without a where condition, all records are updated.
Example
The following example updates the Age column of the staff.managers table for any records where
Name="John".
Example 1
The following example updates the Age and Skills columns of the staff.employees table where
Name="Lisa". The following example updates a column of datatype LIST by updating the entire list.
Example 2
The following example updates the Skills column, modifying any existing list where "C" is the third
item and changing that item in the list to "C++".
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
ContractLength is updated to 2 in any records where the ContractLength within the ExtraInfo
field was set to 1.
Related reference
Conventions and sample databases
Syntax
The following syntax shows how to use the show keyword.
show databases ;
show tables from database_name ;
show table database_name.table_name ;
Example 1
The following example shows all the databases of the current service.
Example 2
The following example shows all the tables from the staff database.
Example 3
The following example shows the full schema of the staff.managers table.
Related reference
Conventions and sample databases
Syntax
The following syntax shows how to use the delete command.
Attention: Although the where condition is optional, omitting it deletes all the records in the table.
Basic example
The following example deletes all records from the staff.contractors table where Name="James".
The following example removes records based on part of the contents of a list.
The following example removes records based on the entire contents of a list.
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Syntax
The following syntax shows how to use the drop command
Related reference
Conventions and sample databases
To illustrate the OQL keywords in use, a sample database has been used, the staff database, which
contains three tables: managers, employees, and contractors.
Syntax
The evaluation declaration evaluates a given variable or database record and extracts it to a specified data
type.
Where
• The first argument supplied to the eval statement is the data type into which the second argument is
converted. The data type can be any of the OQL data types, such as text, int, list type text, or object type
vblist. You can also use the multibyte data type to indicate data that might contain multibyte data.
The multibyte data type is only available for use in eval statements and is not an OQL data type.
• The second argument is the expression that is to be evaluated, which can include:
– Variable references, that are preceded by a dollar sign. You can reference global variables like
$HOSTNAME, product-specific-defined variables such as $BaseEntity, and all the environment
variables of the shell within which the Network Manager processes are running, for example, the
installation directory.
– References to database columns known to the current scope or outside the current scope that are
preceded by the appropriate number of ampersands. If the database column refers to an object, an
entry within the object can be extracted using the target identifier ->.
– A manipulative statement that can be used to modify complex data types (such as lists or objects),
concatenate two items together, delete items from a list, and perform other functions.
– A special expression using the THIS keyword to move in and out of the data containment model.
– Combinations of multiple evaluation expressions.
Example
The following example shows three nested scopes:
{
Start of the first scope (SCOPE1)
..............
{
Start of the second scope (SCOPE2)
..............
{
Start of third scope (SCOPE3)
..............
..............
End of third scope (SCOPE3)
}
..............
End of the second scope (SCOPE2)
}
...........
End of the first scope (SCOPE1)
}
Where:
• An eval statement within scope3 that refers to the EntityName column in a local database record
would refer to it as &EntityName.
• An eval statement within scope3 that refers to the EntityName column in a record held in scope2
would refer to it as &&EntityName.
• An eval statement within scope3 that refers to the EntityName column in a record held in scope1
would refer to it as &&&EntityName.
• It would not be possible to refer to any record held in scope3 from scope2, but scope3 could refer to
any record held in scope1 or scope2 using the appropriate number of ampersands.
Related reference
Use of the CAT keyword to concatenate lists
Use the CAT keyword to concatenate data in an eval statement.
Example 1
The following example evaluates the contents of the m_Creator database column (held one level of
scope away from the current scope) and inserts the value into myVariable, a previously declared
variable of type text.
Example 2
The following example declares an integer variable called portNum and assigns to it the value extracted
from m_LocalNbrPort held within an object called m_LocalNbr that is known two levels away from the
present scope. m_LocalNbrPort is extracted from the object using the target identifier.
Example 3
The following example shows an eval statement in the stitcher language within two foreach loops.
foreach( connected )
{
foreach( uniqueConnector )
{
ExecuteOQL
(
"update tempFull.connected
set m_RelatedTo = eval(text, '&m_NbrName')
where m_Name = eval(text, '&&m_RelatedTo')
);"
);
}
}
Where:
• Each of the foreach loops in the above example specifies a variable of type RecordList that
has already been assigned the results of an OQL query. The first loop repeats everything within
its curly braces for each record in the RecordList variable connected. Nested within the
foreach( connected ){ } loop is a second loop, that repeats everything within its curly braces
for each record in the RecordList variable uniqueConnector.
• The ExecuteOQL statement that is nested inside both loops updates the tempFull.connected
database using an eval statement to extract columns from the records held in the two variables:
eval(multibyte, '&m-ExtraInfo->m_SysLocation')
The following topics describe how to use the eval statement keywords.
Syntax
The following syntax shows how to use the CAT keyword.
Example 1
The following example shows how to format the list of items to be concatenated:
Example 2
In the following example, the target identifier extracts the value of a varbind within an object.
If the value specified for m_Name is 172.16.1.239 and the value specified for m_IfIndex is 63, the
result is the following string.
172.16.1.239[ 63 ]
Syntax
The following syntax shows how to use the DELETE statement.
Example
In the following example, the output would be the result of removing all items in the MyEmployees list
from the AllEmployees list. The MyEmployees list is a subset of the AllEmployees list.
Syntax
The following syntax shows how to use the FIRSTVALID keyword.
Example
The following example shows how to process a list of possible answers and retrieve the first non-null
value as an answer.
Note: You can nest the LOOKUP eval keyword within the FIRSTVALID keyword, as shown in the following
example.
model = eval( text, ''FIRSTVALID(&m_ExtraInfo->physicalChassis-
>model ,&m_ExtraInfo->m_ModelName, &m_ExtraInfo->m_EntPhysModelName,
LOOKUP( &m_ExtraInfo->m_EntVendorType, &&entPhysicalVendorType) )')
Assign a value for the model field within the DNCIM physicalChassis table by looking for the first non-null
value from the following items in the record. Process these in order and use the first non null value that is
encountered:
• m_ExtraInfo->physicalChassis->model
• m_ExtraInfo->m_ModelName
• m_ExtraInfo->m_EntPhysModelName
• m_ExtraInfo->m_EntVendorType, using the ncim enumerations to find the vendor mapped to.
Example 1
The following example describes a lookup operation on the ifAdminStatus MIB variable, in which
ifAdminStatus strings are mapped to their enumerated values.
{
ifAdminStatus =
{
up = 1,
down = 2,
testing = 3
}
}
Example 2
The following eval clause performs a lookup of the enumerated value of the string up within this record
and returns a value of 1. The default return value in the event of a lookup failure is NULL.
Example 3
In this clause, no default human-readable return value in the event of a lookup failure has been provided.
This is therefore equivalent to the eval clause shown below:
Example 4
The following eval clause performs a lookup of the enumerated value of the string dummy within this
record and provides the option of a default human-readable return value. The string dummy does not exist
in the record and therefore this clause returns the defined human-readable return value of unknown.
Example
The following example converts the 1.2.3.4 IP Address into number 16909060.
To convert in the opposite direction, you need the LONGTOIP keyword. The LONGTOIP keyword provides a
mechanism to convert a 32 bit integer into an IPv4 address.
The following example would convert the number 16909060 into IP Address 1.2.3.4.
Example
The following example converts the number 16909060 into IP Address 1.2.3.4.
Example
The following example retrieves an interface entry value from the variable &LocalPriObj.
If the variable &LocalPriObj contains the value ifEntry99, then the above REGEXPMATCH operation
returns the value 99.
Example
The following example would display the current time in the format YYYY-MM-DD HH:MM:SS (for
example, 2007-05-24 15:45:19).
This timestamp is the result of the example: Thursday, May 24 15:45:19 2007
Stitcher formats
Stitchers have two formats, text-based or precompiled.
Text-based stitchers
Text-based stitchers are defined in a plain text file using the stitcher language. The text file defines
the processing that the stitcher performs and the reasons why the stitcher is triggered. A text-based
stitcher can invoke any other stitcher regardless of whether it is precompiled or text-based
Stitcher structure
Each stitcher consists of two main sections, the stitcher triggers and stitcher rules.
The following topics describe each of the sections of a stitcher.
Stitcher triggers
A stitcher trigger specifies the actions or conditions that cause the stitcher to run.
Stitchers can be triggered by any of the following conditions:
• The completion of other processes (for example, finders, agents, and other stitchers).
• The insertion of data into a specified database table.
• The end of a specified discovery cycle phase.
Stitchers can also act:
• According to a preconfigured time frequency.
• When asked to do so, that is, on-demand.
You can retrieve stitcher trigger information for the discovery stitchers by performing an OQL query on
the stitchers.triggers table in DISCO. This table is created and updated by a periodic scan that DISCO
performs on the stitcher files in the $NCHOME/precision/disco/stitchers directory.
You can run a specific stitcher by entering the stitcher name in the only field of the stitchers.actions
table, whereupon DISCO will attempt to execute the specified stitcher. For example, if you update the
stitchers.actions table value with 'Restitcher', then DISCO will attempt to restitch the topology. You
can use this functionality to propagate any modifications throughout the topology.
Stitcher rules
Stitcher rules, written in the stitcher language, define the processing that the stitcher conducts. Stitcher
language commands allow the stitchers to make OQL statements to retrieve information from a database
and manipulate it. The end result is the distribution of processed information into the appropriate final
destination table.
Stitcher language
The stitcher language is used to write the stitcher rules. The rules of a stitcher are written in a stitcher text
file; each stitcher has a text file. The stitcher text file also contains the stitcher trigger conditions.
The following topics describe the stitcher language.
!CompiledStitcher
{
StitcherTrigger
{
List of stitcher trigger conditions
}
}
UserDefinedStitcher
{
StitcherTrigger
{
List of stitcher trigger conditions
}
StitcherRules
{
List of stitcher rules
}
}
ActOnDemand();
Use the ActOnDemand(); stitcher trigger condition to have the stitcher start when it is invoked by the
user, or by another stitcher.
No input is required. The following syntax shows how to use the ActOnDemand(); stitcher trigger
condition.
StitcherTrigger
{
ActOnDemand();
}
ActOnEvent()
Use the ActOnEvent(); stitcher trigger condition to start the stitcher when an event any of the specified
event states is received from Tivoli Netcool/OMNIbus.
Syntax
The following syntax shows how to use the ActOnEvent(); stitcher trigger condition.
StitcherTrigger
{
ActOnEvent( ( "event_state", "event_state" );
}
Example of event states include Deleted, Occurred, and Reawakened. For a complete list of event states,
see the IBM Tivoli Network Manager IP Edition Administration Guide.
ActOnTableDelete()
Use the ActOnTableDelete( ); stitcher trigger condition to specify that the stitcher starts every time a
row is deleted from the specified database table.
The following syntax shows how to use the ActOnTableDelete( ); stitcher trigger condition.
StitcherTrigger
{
ActOnTableDelete( "database_name", "table_name" );
}
ActOnTableInsert( );
Use the ActOnTableInsert( ); stitcher trigger condition to specify that the stitcher starts every time
data is inserted into the specified database table.
The following syntax shows how to use the ActOnTableInsert( ); stitcher trigger condition.
StitcherTrigger
{
ActOnTableInsert( "database_name", "table_name" );
}
StitcherTrigger
{
ActOnTableUpdate( "database_name", "table_name" );
}
ActOnTimedTrigger();
Use the ActOnTimedTrigger(); stitcher trigger condition to start the stitcher based on a frequency,
which is evaluated relative to the time DISCO started.
Syntax
The following syntax shows how to use the ActOnTimedTrigger(); stitcher trigger condition.
StitcherTrigger
{
ActOnTimedTrigger( ( frequency_attribute ) values ( value ); );
}
Frequency attributes
The following table lists the frequency attributes of the ActOnTimedTrigger(); stitcher trigger
condition.
It is possible to combine either the weekly (m_DayOfWeek) or monthly (m_DayOfMonth) time interval
options with the time of day (m_TimeOfDay) option to specify exactly when you want the stitcher to
DiscoRequiresAgents();
Use the DiscoRequiresAgents(); stitcher trigger condition if you want the stitcher to start only when
operations for the specified discovery agents are completed.
The following syntax shows how to use the DiscoRequiresAgents(); stitcher trigger condition. The
name of each agent must be enclosed in double quotes. If multiple agents are specified the list must be
separated by commas.
StitcherTrigger
{
DiscoRequiresAgents( "Discovery_agent" );
}
DiscoRequiresLastPhase();
Use the DiscoRequiresLastPhase(); stitcher trigger condition to have the stitcher start only on
completion of the last discovery cycle phase.
The following syntax shows how to use the DiscoRequiresLastPhase(); stitcher trigger condition. No
input is required.
StitcherTrigger
{
DiscoRequiresLastPhase();
}
DiscoRequiresPhase();
Use the DiscoRequiresPhase(); stitcher trigger condition to have the stitcher start only on
completion of a specified discovery phase.
The following syntax shows how to use the DiscoRequiresPhase(); stitcher trigger condition.
StitcherTrigger
{
DiscoRequiresPhase( Integer_indicating_discovery_phase );
}
RequiresStitchers( );
Use the RequiresStitchers( ); stitcher trigger condition to have the stitcher start when a specified
stitcher or stitchers have completed their operation.
The following syntax shows how to use the RequiresStitchers( ); stitcher trigger condition. The
name of each stitcher must be enclosed in double quotes. If multiple stitchers are specified the list must
be separated by commas.
StitcherTrigger
{
RequiresStitcher( "Stitcher" );
}
Example 1
In the following example, the stitcher is configured to run every 60 hours.
StitcherTrigger
{
ActOnTimedTrigger
(
( m_Interval ) values ( 60 );
);
}
Example 2
In the following example, the stitcher is configured to execute every Monday at 3:15 pm.
StitcherTrigger
{
ActOnTimedTrigger
(
( m_DayOfWeek, m_TimeOfDay ) values ( 1, 1515 );
);
}
Stitcher rules
The stitcher rules are specified within the StitcherRules{} section of a stitcher. Stitcher rules
determine how a stitcher functions.
The following topics describe the processing that takes place within the curly braces of the
StitcherRules{} section of the text-based stitchers. The stitcher rules are separated by spaces.
Related reference
Stitcher text file structure
All discovery stitchers have a text file associated with them. The stitcher text files consist of a series of
structural statements that enclose the stitcher rules (the actual processing) and the trigger conditions.
Stitcher language building blocks
To construct statements in the stitcher language, use the programming constructs, relational operators,
and datatypes.
You can declare variables anywhere within the StitcherRules{}. Although variables must be assigned
an initial value, it can be NULL. After a variable has been declared it can be used throughout the current
stitcher, but can only accept values of the appropriate datatype. Some examples of variable declaration
are shown below.
The following example declares an integer variable called router and assigns to it an initial value of 0.
int router = 0;
After a variable has been created, its value can be updated at any time. It is also possible to assign the
result of an eval statement or a calculation to a variable.
Related reference
Precedence and association of operators
The rules for precedence and association of operators determine the grouping of operators with
operands, and indicate the order in which the operators in an expression are executed.
Example of RecordList
The following example declares a variable called discoRes, specifies the datatype for the variable as
RecordList, and assigns the results of a query on the disco.status database table to discoRes.
Example of Record
The Record datatype is used in the same way, but variables of the Record datatype only hold one record.
The following example shows the Record datatype in use.
Related reference
RetrieveOQL()
The RetrieveOQL(); stitcher rule executes an OQL query that is expected to return data, against the
current process. An optional record can be passed in to be added to the scope of the OQL query.
GetRecordFromScope()
The GetRecordFromScope(); rule retrieves a record from the specified scope (for example, for use
when nested within a foreach loop).
Retrieving a field
int i = @inScopeCopy.integerMemberField;
Record newRec;
@newRec.intField = i;
@newRec.anotherIntField = eval(int, '$i');
@newRec.textField = "constant string";
The following example extracts the field name from another variable and then writes the data to a record:
Record newRec;
@newRec.m_ExtraInfo->m_NestedObject = eval(text, '$internetNodeIP');
@newRec.m_ExtraInfo->m_NestedList(2) = eval(text, '$internetNodeIP');
@newRec.m_ExtraInfo->m_DeeperNest->m_VeryNestedList(0) =
eval(text, '$internetNodeIP');
m_ExtraInfo={
m_NestedObject='99.99.99.99';
m_NestedList=['','','99.99.99.99'];
m_DeeperNest={
m_VeryNestedList=['99.99.99.99']
}
}
Example
The following example shows a for loop. This loop repeats until variable1 is no longer less than
variable2 (variable1 is increased by 1 on each complete loop).
Related reference
Stitcher language building blocks
To construct statements in the stitcher language, use the programming constructs, relational operators,
and datatypes.
while( conditional_test )
{
List of stitcher rules to execute
}
The while loop repeats as long as the conditional test evaluates to true.
The conditional_test can contain boolean expressions containing AND and OR.
An example while loop is shown below.
The above loop repeats as long as the value of the count variable is less than the value of
numberOfLayers.
The if statement
The if statement performs an action if a particular condition is satisfied.
The if statement takes the following format.
if( conditional_test )
{
List of stitcher rules to execute if the condition is TRUE
}
The list of stitcher rules are executed if the conditional test is satisfied. It is also possible to specify a list
of stitcher rules to execute if the condition is not satisfied, as shown below.
if( conditional_test )
{
List of stitcher rules to execute if the condition is TRUE
}
else
{
List of stitcher rules to execute if the condition is FALSE
}
Example
The following example shows the if statement in use. If myVariable is equal to 1, the first OQL
statement is executed, otherwise the second OQL statement is executed.
if( myvariable == 1 )
{
ExecuteOQL
(
"insert into database.table
( m_Name,
m_BaseName )
values
( "Agent",
( "BaseName" );"
);
}
else
{
ExecuteOQL
(
"insert into another.table
( m_Name,
m_BaseName )
values
( "Agent", "BaseName" );"
);
}
Related reference
Stitcher language building blocks
Example
The following example shows how the foreach loop repeats the list of stitcher rules for every record in
the list.
foreach( remoteNames )
{
ExecuteOQL
(
"insert into CDPLayer.entityByNeighbor
(
m_Name, m_NbrName, m_NbrType
)
values
(
eval(text, '&m_LocalName'),
eval(text, '&m_Name'),
eval(int, '$RemoteNeighbor')
);"
);
}
The example assumes that a variable called remoteNames has already been defined and a list of OQL
records has been assigned to it. The foreach loop executes the specified OQL insert for every record in
the list, extracting the values to insert from the records using eval statements.
Related reference
Stitcher language building blocks
To construct statements in the stitcher language, use the programming constructs, relational operators,
and datatypes.
CommitSQLTransaction()
The CommitSQLTransaction(); rule commits a transaction in a specified database.
Syntax
The CommitSQLTransaction(); statement uses following syntax.
Example
The following example shows how the rule is used.
StartSQLTransaction( "DNCIM" );
text entityName = NULL;
foreach(entityNames)
{
entityName = eval(text,'&m_Name');
ExecuteStitcher('PopulateDNCIMObject', entityName, domainId,
dynamicDiscoNode);
}
delete(entityNames);
CommitSQLTransaction( "DNCIM" );
Related reference
StartSQLTransaction()
The CommitSQLTransaction(); rule starts a commit transaction in a specified database.
RollbackSQLTransaction()
The RollbackSQLTransaction(); rule rolls back a transaction in a specified database.
delete()
The delete rule removes lists and records that have been created and are no longer needed.
Syntax
The following syntax shows how to use the delete rule.
Tip: Delete lists after they are no longer needed to release memory.
Example
Some examples are shown below.
delete( notIpSwitchNbrs );
delete( ethernetSwitches );
Related reference
Stitcher language building blocks
To construct statements in the stitcher language, use the programming constructs, relational operators,
and datatypes.
ExecEvalOnRecord()
The ExecEvalOnRecord(); rule executes the supplied eval statement on the named record.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how a text variable called name is assigned the evaluation of the
EntityName field of the currentRec variable.
ExecuteOQL()
The ExecuteOQL(); rule tells the stitcher to execute an OQL statement on the databases of the current
service. For example, if this rule is run from a discovery stitcher, then the current service is the Discovery
engine, ncp_disco.
Syntax
The ExecuteOQL(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
In the following example, the optional record is added to the symbol table used for the OQL statement,
and can be accessed within the OQL statement using a single ampersand. Here the record myRecord
contains the field m_TableName.
ExecuteSQL()
The ExecuteSQL(); rule executes a prepared SQL query.
Syntax
The ExecuteSQL(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the ExecuteSQL() rule is used to execute an SQL statement that was
prepared earlier.
ExecuteSQL ( myData );
ExecuteStitcher()
The ExecuteStitcher(); function runs the specified stitcher.
Syntax
After the invoked stitcher has completed, control is passed back to the original stitcher and the remaining
stitcher rules are run in sequence. The following syntax shows how to use the ExecuteStitcher()
function.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
No arguments passed
The following example runs the ProcessAffectedRemoteSwitches.stch stitcher without passing
any arguments.
ExecuteStitcher( 'ProcessAffectedRemoteSwitches' );
Returning an argument
The following example shows how the ExecuteStitcher() call can return an argument. The called
stitcher must use the SetReturnValue() rule to return the argument.
...
toBeDetected = ExecuteStitcher('DetectionFilter', protocol);
...
SetReturnValue(toBeDetected);
ExecuteStitcherOnTimer
The ExecuteStitcherOnTimer(); function runs the specified stitcher after a delay.
Syntax
When a stitcher calls the another stitcher using the ExecuteStitcherOnTimer(); function, the first
stitcher continues to run. The ncp_disco process starts the second stitcher after the specified delay. The
second stitcher only uses the arguments that you explicitly pass to it in the function.
The ExecuteStitcherOnTimer(); function uses the same syntax as the ExecuteStitcher();
function.
The following syntax shows how to use the ExecuteStitcherOnTimer() function.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
FetchLastInsertedIdForSQL()
The FetchLastInsertedIdForSQL(); rule retrieves the last inserted unique key caused by an SQL
data object. This is useful when you are inserting into a table with automatically incrementing IDs, such
as the entityNameCache table. When an insert is made the FetchLastInsertedIdForSQL(); rule
can be used to retrieve the automatically incremented id that was applied to that insert. This rule is used
together with the PrepareSQLAutoColumn(); rule.
Syntax
The SQL data object is enclosed in brackets, as shown in the following syntax.
Example
The following example shows how the FetchLastInsertedIdForSQL() rule is used to retrieve the last
inserted unique key caused by an SQL data object.
ExecuteSQL(myData);
entityId = FetchLastInsertedIdForSQL( myData );
delete(myData);
GetInScopeRecord()
The GetInScopeRecord(); rule retrieves the record currently in scope. Using this rule is equivalent to
running the rule GetRecordFromScope () with a depth argument of 0, that is, GetRecordFromScope
(0).
The rule requires no input. The results are to be assigned to a variable of type Record. The following
syntax shows how to use GetInScopeRecord();.
GetInScopeRecord();
Related reference
GetRecordFromScope()
GetRecordFromScope()
The GetRecordFromScope(); rule retrieves a record from the specified scope (for example, for use
when nested within a foreach loop).
Syntax
The GetRecordFromScope(); statement uses following syntax.
GetRecordFromScope ( depth );
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
Records that are in scope can be accessed using ampersands, as shown in this example.
The entire record can be retrieved from the same scope using the GetRecordFromScope() stitcher rule,
as shown in this example.
Related reference
The RecordList and Record datatypes
Variables of the RecordList and Record datatypes are used to store retrieved OQL records in a variable.
GetInScopeRecord()
IsInSubnet()
The IsInSubnet(); rule determines whether a specified IP address is in a given subnet, based on the
subnet mask.
Syntax
The IsInSubnet(); statement uses following syntax.
The rule returns an integer where 0 indicates that the IP address is not in the subnet and 1 indicates that
the IP address is in the subnet.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the ExecuteSQL() rule is used to test whether an IPv4 address
passed as an argument is within the scope of a specified Class C subnet.
int inScope = 0;
text ip = eval(text, '$ARG_2');
inScope = IsInSubnet( ip, "10.10.10.0", 24 )
IsRecordInFilter()
The IsRecordInFilter() rule applies the specified filter string to the specified record and returns the
following value: 1 if the record passes the filter, 0 if the record does not pass the filter. This technique can
be used whenever you need to determine if a record passes a given set of criteria. The technique is used
in the discovery process to test whether specific network entities match a given filter entities at various
points in the discovery.
Syntax
The IsRecordInFilter(); statement uses the following syntax.
Example
The following example shows how the IsRecordInFilter() rule is used in the discovery process to
check whether the Object ID of a specified Cisco entity adheres to a specified format and whether the
entity contains an experimental Cisco IOS.
Log()
The Log(); rule prints a message to the .log log file at the given message level if appropriate to the
current message level. This rule also prints to the .trace file if running at debug level 4.
Syntax
The Log(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following examples shows how the rule is used.
Log("debug", "Subnet Name : ", subnetName);
Log("warn", "The topology entity for the topology type you are trying to insert
into doesn't exist. Connection rejected for topology type: ", topologyType
Related reference
Print()
The Print() rule sends information to the standard output, but differs from PrintRecord() in that the
information to be printed must be specified.
MatchPattern()
The MatchPattern() rule performs string extraction based on regular expressions. The rule determines
how many times a regular expression pattern was found in a target string. The rule also enables you to
create variables based on subpatterns found in the target string.
Syntax
The MatchPattern(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example 1
The following example shows a use of the MatchPattern() rule when both the target string and the
pattern string are defined strings: The following example returns the value 3 as the pattern was matched
three times.
Example 3
The following example shows an eval statement used to match a pattern against an m_Description field in
the in scope record.
text pattern='[[:space:]]+OS([^[:space:]]+)[[:space:]]+';
int count=MatchPattern( eval(text,'&m_Description'),pattern);
Example 4
The following example shows how to extract an interface index from an input string.
# The input must start with "ifEntry", followed by a single '.' followed
# by one or more numbers. The numbers are extracted and saved by virtue
# of being within round brackets
text pattern = "^ifEntry\.(\d+)";
# return the number of times the pattern was found in the input string
int patternMatchCount = MatchPattern( input, pattern );
# In this example, we only recognise a match if we matched once on the entire field
# REGEX0 conatins the section of the input that was matched to the whole pattern
if (patternMatchCount == 1 AND REGEX0 == input )
{
# REGEX1 contains the first match from within round brackets. If multiple
# parts of the pattern were extracted with multiple pairs of round brackets,
# they would be stored in symbols REGEX2, REGEX3,... etc
int ifIndex = eval(int, '$REGEX1');
}
String extraction
The MatchPattern() rule can also extract text from the target string by creating variables based on
sub-patterns found in the target string.
These variables take the name REGEXN, where N is a number which identifies the variable.
Example
The following example shows how variables are assigned.
The round brackets in the pattern string defined in line 2 identify a subpattern to be extracted and placed
within a REGEX variable. In this example there is one match only; hence there is one variable (REGEX0),
which matches the full pattern, and five sub-matches, (REGEX1 to REGEX5), set as shown in the following
table.
If more than one match is found, more REGEX variables are created.
For example, if there were three matches, then 18 REGEX variables would be created. In this case, the
variables REGEX0, REGEX6, and REGEX12 would correspond to the full matching pattern, while variables
REGEX1-5, REGEX7-11, and REGEX13-18 would correspond to the subpatterns within each full match.
Note: If you run the MatchPattern() rule a second time, then it overwrites previous values held
in the REGEX variables. It is recommended that you store any extracted data prior to running the
MatchPattern() rule a second time.
Example of pseudowire
Use this realistic example based on data received from an MPLS agent for a real-life example of a
pseudowire data string.
Assume that the following pseudowire data string is retrieved from the agent.
Instance: vpls1
[1]text pattern=
"Instance:[[:space:]]+([^[:space:]]+)[[:space:]]*[\n\r][[:space:]]
*[\n\r][[:space:]]*Localinterface:[[:space:]]+([^,]+),[[:space:]]
+Index:[[:space:]]+([[:digit:]]+)[[:space:]]*[\n\r][[:space:]]*
Multicast packets[[:space:]]*:[[:space:]]+[[:digit:]]+[[:space:]]*
[\n\r][[:space:]]*Multicast bytes[[:space:]]*:[[:space:]]+[[:digit:]]
+[[:space:]]*[\n\r][[:space:]]*Flooded packets[[:space:]]*:[[:space:]]
+[[:digit:]]+[[:space:]]*[\n\r][[:space:]]*Flooded bytes[[:space:]]*:
[[:space:]]+[[:digit:]]+[[:space:]]*[\n\r][[:space:]]*[\n\r]
[[:space:]]*Local interface:[[:space:]]+([^,]+),[[:space:]]+Index:
[[:space:]]+([[:digit:]]+)[[:space:]]*[\n\r][[:space:]]*Remote PE:
[[:space:]]+([^ \t\n\r]+)[[:space:]]*[\n\r].*";
[2]int count = MatchPattern( eval ( text,$target ), pattern);
[3]while(count > 0)
[4] {
[5] Print("Count ", count);
[6] Print("Match ", REGEX0);
[7] Print("SubMatch 1 ", REGEX1);
[8] Print("SubMatch 2 ", REGEX2);
[9] Print("SubMatch 3 ", REGEX3);
[10] Print("SubMatch 4 ", REGEX4);
[11] Print("SubMatch 5 ", REGEX5);
[12] Print("SubMatch 6 ", REGEX6);
[13]
[14] count = count - 1;
[15] }
In line 2 of this example, $target is the pseudowire data string received from the MPLS stitcher.
MergeEntities()
The MergeEntities(); rule merges two variables of type Record into a single record, leaving the
original records unchanged. If the same field exists in both records, then the precedence flag
indicates which will be used.
Syntax
The MergeEntities(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
This examples merges two entity records, giving precedence to the right-hand side (rhs) entity.
int oldIsMaster = 0;
Record oldEntity = value1;
Record newEntity = value2;
Record mergedRecord = MergeEntities( newEntity, oldEntity, oldIsMaster );
Syntax
The PrepareSQL(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the PrepareSQL() rule is used to prepare an SQL statement for
execution.
ExecuteSQL ( myData );
PrepareSQLAutoColumn()
The PrepareSQLAutoColumn(); rule prepares an SQL statement for execution and notifies the system
of a column which will be automatically incremented as a result of this operation. This enables the
Syntax
The PrepareSQLAutoColumn(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
auto- Name of the field in the table that Yes Yes Yes
incrementing is set to automatically increment
column name upon insert.
database id The database ID, as specified Yes Yes Yes
in the DbLogins.cfg file, used
to identify the database schema
that contains the required table.
optional An optional comma-separated Yes Yes Yes
variable list of variables to be used
list if placeholders (marked by a
question mark symbol, ?) are
used in the sql data argument.
Example
The following example shows how the PrepareSQLAutoColumn() rule is used to prepare an SQL
statement for execution. An insert is performed into the entityNameCache table. This insert automatically
increments the field entityId, which is then retrieved using the FetchLastInsertedIdForSQL(); rule.
ExecuteSQL ( myData );
entityId = FetchLastInsertedIdForSQL(myData);
delete(myData);
Print()
The Print() rule sends information to the standard output, but differs from PrintRecord() in that the
information to be printed must be specified.
Syntax
The Print(); statement uses following syntax.
At least two comma-separated arguments must be specified within the parentheses of Print(). The
arguments can be any of the following: a list of strings enclosed in quotation marks (which may be empty),
a string that is not enclosed in quotation marks (which may be a symbol definition name or may be NULL),
an integer, or an eval statement.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
An example of the Print() rule that prints the current time to the standard output is shown below.
Related reference
Log()
The Log(); rule prints a message to the .log log file at the given message level if appropriate to the
current message level. This rule also prints to the .trace file if running at debug level 4.
PrintRecord()
The PrintRecord(); stitcher rule prints the entire record currently in scope to standard output. This
can be used for debugging purposes.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
In the following example, PrintRecord() is used to print the records within a variable of datatype
RecordList called snmpResults.
foreach( snmpResults )
{
PrintRecord(snmpResults);
}
Example
In the following example, PrintRecord() is used to print a record with preappended text.
RaiseEvent()
The RaiseEvent(); rule uses the standard Network Manager alerts library to raise an event and
send it to the Tivoli Netcool/OMNIbus Object Server using the Probe for Tivoli Netcool/OMNIbus,
nco_p_ncpmonitor.
Syntax
The RaiseEvent(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the RaiseEvent() rule is used to raise an event.
int eventSeverity = 1;
int eventType = 13; // Information
Record extraInfo;
@extraInfo.ALERTGROUP = "ITNM Status";
RaiseEvent( eventName,
eventSeverity,
eventType,
entityName,
RetrieveOQL()
The RetrieveOQL(); stitcher rule executes an OQL query that is expected to return data, against the
current process. An optional record can be passed in to be added to the scope of the OQL query.
Syntax
The RetrieveOQL(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows the results of a query on the finders.returns table being assigned to a
previously declared variable of datatype RecordList called devicesFound.
Example
The following example shows the results of a query on the disco.agents table and displays each record
retrieved using a foreach loop.
foreach (results)
{
Record current = GetInScopeRecord();
}
Related reference
The RecordList and Record datatypes
RetrieveOQLFromService()
The RetrieveOQLFromService(); rule issues an OQL query on the databases of the specified service.
An optional record can be passed in to be added to the scope of the OQL query. The results can be
assigned to a variable of the type RecordList.
Syntax
RetrieveOQLFromService( oql string, service name [,optional record] );
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows the results of a query on the model.config table from the service Model
being assigned to a previously declared variable of datatype RecordList called configData.
configData = RetrieveOQLFromService(
"select * from model.config;",
"Model"
);
Example
The following example shows the results of a query on the services.unManaged table from the service
Ctrl.
for (results)
{
Record current = GetInScopeRecord();
}
Syntax
The RetrieveSingleOQL(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the RetrieveSingleOQL() rule is used to return only the first result
of the OQL query.
RollbackSQLTransaction()
The RollbackSQLTransaction(); rule rolls back a transaction in a specified database.
Syntax
The RollbackSQLTransaction(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
StartSQLTransaction( "DNCIM" );
text entityName = NULL;
foreach(entityNames)
{
entityName = eval(text,'&m_Name');
ExecuteStitcher('PopulateDNCIMObject', entityName, domainId,
dynamicDiscoNode);
}
delete(entityNames);
RollbackSQLTransaction( "DNCIM" );
Related reference
CommitSQLTransaction()
The CommitSQLTransaction(); rule commits a transaction in a specified database.
StartSQLTransaction()
The CommitSQLTransaction(); rule starts a commit transaction in a specified database.
SendOQLtoService()
The SendOQLToService(); rule executes an OQL query, which is not expected to return data, against
another process.
Syntax
The SendOQLToService(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the rule is used to perform an insert into the ncp_ctrl
services.unmanaged table.
SendOQLToService(
"Ctrl",
"insert into services.unManaged( serviceName, servicePath, argList)
values
("ping", "/usr/sbin/", ['1,2,3,4']);");
);
SendOQLToService( "Model",
"update model.config set DiscoveryUpdateMode = eval(int '$isRediscovery');" );
SendAllOQLToService()
The SendAllOQLToService(); stitcher rule sends all the records in a variable of type RecordList to
another service. Use this rule to more efficiently send a batch of OQL instructions over the network rather
than several individual OQL requests.
Example
The SendAllOQLToService(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
In the following example, SomeScript.pl is a script that you want to run against multiple entities.
ScriptDataFilter is a stitcher that verifies that the arguments are correct.
SendAllOQLToService(
"Ctrl", // Send OQL to this service
scriptTargets, // Send the records from this variable
Syntax
The SetReturnValue(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the SetReturnValue() rule is used to return a value.
StandardiseIPv6()
The StandardiseIPv6(); stitcher rule converts a textual (colon-notation) IPv6 address into standard
notation. This includes, for example, stripping the longest string of zeroes down to '::'.
Syntax
The StandardiseIPv6(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the StandardiseIPv6() rule is used to convert a textual (colon-
notation) IPv6 address into standard notation.
Syntax
The StartSQLTransaction(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the rule is used.
StartSQLTransaction( "DNCIM" );
text entityName = NULL;
foreach(entityNames)
{
entityName = eval(text,'&m_Name');
ExecuteStitcher('PopulateDNCIMObject', entityName, domainId,
dynamicDiscoNode);
}
delete(entityNames);
CommitSQLTransaction( "DNCIM" );
Related reference
CommitSQLTransaction()
The CommitSQLTransaction(); rule commits a transaction in a specified database.
RollbackSQLTransaction()
The RollbackSQLTransaction(); rule rolls back a transaction in a specified database.
StitcherTimeCheck()
The StitcherTimeCheck(); stitcher rule prints a message to stdout. From version 3.8 onwards, this
message appears in the .trace log file.
Syntax
The StitcherTimeCheck(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example shows how the StitcherTimeCheck() rule is used to indicate that the working
entities database table has been populated, containment is being built, and the overall process is 20%
complete.
# .
StitcherTimeCheck( 'Working Entities Table Population', 'Containment Building', 20 )
AnalyzeSQLStats()
The AnalyzeSQLStats(); stitcher rule analyzes an SQLite database or a single specified table in that
database and ensures that SQLite has up-to-date statistics on its database tables from which it can make
efficient SQL query plans. This ensures that any subsequent SQL select queries made using the data in
the tables are efficient.
In version 4.2 the only database that uses the SQLite database platform is the embedded relational
database, known as Discovery NCIM (DNCIM). The AnalyzeSQLStats(); rule is called from within the
DNCIM stitchers, once most of the DNCIM data has been inserted, but before discovery postprocessing
takes place. Note that if the database platform is something other than SQLite then this stitcher rule does
nothing.
Syntax
The AnalyzeSQLStats(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
DiscoReadConfig()
The DiscoReadConfig rule tells the Discovery Engine, ncp_disco, to reread its configuration files.
Syntax
By default this rule is used in the FullDiscovery stitcher, although it can be defined in any stitcher. This
rule instructs the Discovery Engine, ncp_disco, to reread its configuration files whenever you launch a full
discovery. The rule determines which configuration files to update by reading the records in the Discovery
engine database table disco.dynamicConfigFiles. For more information on the disco.dynamicConfigFiles
database table, see the IBM Tivoli Network Manager IP Edition Administration Guide.
The following syntax shows how to use the DiscoReadConfig rule.
DiscoReadConfig();
Related reference
disco.dynamicConfigFiles table
The dynamicConfigFiles table stores the names of configuration files that must be reread each time a full
discovery is launched.
DncimRecordsDone()
The DncimRecordsDone(); rule notifies the discovery that a RecordToDNCIMDb() rule session has
completed and instructs the discovery to commit any outstanding SQL actions.
Syntax
The DncimRecordsDone(); statement uses following syntax.
DncimRecordsDone( );
Arguments
This stitcher rule takes no arguments.
Example
The following example shows how the rule is used to perform an insert into the ncp_ctrl
services.unmanaged table.
DiscoRefresh()
The DiscoRefresh(); stitcher rule sends a refresh message to the Helper server, finders, or agents
connected to the discovery process. The effect of the refresh message will vary depending on the process
and the arguments.
Syntax
The DiscoRefresh(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Applications
This section provides examples showing how to refresh the following applications:
• Helper server
• Finders
• Agents
DiscoRefresh('Helper','SnmpHelper');
DiscoRefresh('Helper','TelnetHelper');
DiscoRefresh('Helper','DNSHelper');
DiscoRefresh('Helper','ARPHelper');
DiscoRefresh('Helper','PingHelper');
DiscoRefresh('Helper','XmlRpcHelper');
Example: removing stored Helper server data for a specific device with a specific helper
The following example shows how the DiscoRefresh(); rule can be used to specify a specific
filter to use to remove stored Helper server data for a specific device with a specific helper. This
action is usually based on the m_HostIp field. For more information, see $NCHOME/etc/precision/
DiscoHelperServerSchema.cfg configuration file.
DiscoRefresh('Helper','SnmpHelper','m_HostIp', '1.2.3.4' );
Finders
The following examples show how the DiscoRefresh(); rule can be used with finders.
DiscoRefresh('PingFinder');
DiscoRefresh('FileFinder');
DiscoRefresh('CollectorFinder');
DiscoRefresh('PingFinder','scope');
DiscoRefresh('PingFinder','1.2.3.0','255.255.255.0');
DiscoRefresh('CollectorFinder', '1.2.3.4');
UserDefinedStitcher
{
StitcherTrigger
{
// Activate every minute
ActOnTimedTrigger(( m_IntervalSeconds ) values ( 60 ) ; );
}
StitcherRules
{
RecordList discoStatus = RetrieveOQL(
"select * from disco.status;"
);
foreach(discoStatus)
{
phase = eval(int, '&m_Phase');
}
delete(discoStatus);
Agents
The following example shows how the DiscoRefresh(); rule can be used with finders.
DiscoRetrieveClass()
The DiscoRetrieveClass(); stitcher rule is used to retrieve the class of a discovered device during
the discovery process, so that users can determine device type while the discovery is still running.
This rule is used at the following points in the discovery process:
• During the data collection stage the rule is used by the AssocAddressRetProcessing.stch stitcher. This
stitcher uses the output from this rule to update the AssocAddress returns table with class information.
This provides the information needed to display device type while discovery is still running.
• During the data processing stage the rule is used by the AddClass stitcher to set the class of the chassis
objects.
Syntax
The DiscoRetrieveClass(); statement uses the following syntax.
The information in the output class record is class ID, class name, and the name of the visual icon used to
represent the class.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Syntax
The DiscoSendOQLToFinder(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
oql string The OQL string to send to the Yes Yes Yes
finder.
Example
The following example shows how the DiscoSendOQLToFinder(); rule is used to seed the ping finder
with a newly discovered subnet on which to perform a ping sweep.
# Seed the ping finder with a newly discovered subnet to ping sweep
DiscoSendOQLToFinder
(
"PingFinder",
"insert into pingFinder.pingRules
(
m_Address,
m_RequestType,
m_NetMask,
m_Protocol
)
values
(
eval(text, '&m_LocalNbr->m_Subnet'),
eval(int, '$PingSubnet'),
eval(text, '&m_LocalNbr->m_SubnetMask'),
eval(int, '$protocol')
);"
);
DncimUpdate()
The DncimUpdate(); rule updates a record in a specified table in the dNCIM database and sets a
flag so that the updated row will be broadcast in the next call to the BroadcastToModel(); rule. The
DncimUpdate(); rule can also be called omitting the optional record to force a broadcast of the row
even if no other changes are made. This is useful when a row has been removed as part of a cascaded
delete.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example updates the displayLabel field of the entityData table.
Record serviceLabelUpdate;
@serviceLabelUpdate.displayLabel = serviceLabel;
Example
The following example performs no update, but forces the collection to be broadcast in the next call to the
BroadcastToModel(); rule.
Returns
This rule does not return any values.
EnumerationLookup()
The EnumerationLookup(); rule retrieves a value from the DNCIM enumeration table. The data in
the enumeration table is downloaded when the Discovery engine, ncp_disco, is first started and then
accessed directly by the rule, thereby enabling fast data retrieval.
The enumerations available for lookup are determined by the entry in the dbModel.access table within the
ModelNcimDb.cfg configuration file; for example:
Syntax
The EnumerationLookup(); statement uses the following syntax.
EnumerationLookup ( evalClause ] );
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Where:
• key is the value to use to perform the enumeration string lookup operation.
• enum _group is the name of enumeration group to look in.
• optional_default is the value to use if the lookup operation returns null.
Example
The following examples show how to use this rule.
Note: This rule does not use the standard record stack. Normally the ampersand sign & accesses the
record at the top of the stack, double ampersand && the second from top, triple ampersand &&& the
third, and so on. With this rule the record stack used only contains two records; therefore, the ampersand
& refers to the record on the top of the normal stack as before, but double ampersand && refers to the
record containing the static enumeration data downloaded when discovery was first started.
Returns
This rule returns the text string relating to the desired enumeration.
Syntax
The RecordToDncimDb(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Related reference
DncimRecordsDone()
The DncimRecordsDone(); rule notifies the discovery that a RecordToDNCIMDb() rule session has
completed and instructs the discovery to commit any outstanding SQL actions.
StitcherProfiling()
The StitcherProfiling(); stitcher rule sets the discovery process to log the time each stitcher takes
to complete and the number of executions for each stitcher during a discovery cycle. The logging results
help diagnose discovery issues. This rule is set in the FinalPhase stitcher.
Syntax
The StitcherProfiling(); statement uses the following syntax:
The information in the output provides the name of the stitcher, the number of times it ran, and the total
run time in seconds.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
The following examples show how to set the StitcherProfiling(); rule in different ways.
To use the rule to trigger the logging of profiling data on all stitchers:
StitcherProfiling('LOG');
To use the rule to reset the profiling data on all stitchers to zero, ready to log data only for the next
discovery:
StitcherProfiling('RESET');
StitcherProfiling('LOG', 'RecreateAndSendTopology');
StitcherProfiling('SIZE');
To use the rule to log the current size of the process, and include an additional tag to add to the end of the
log message:
GwCollects()
The GwCollects(); rule retrieves a list of entities directly collected by a specified entity. This data is
retrieved from the NCIM cache table, ncimCache.collects.
Syntax
The GwCollects(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example finds all entities collected by the specified entity and then prints out the results.
Returns
This rule returns a list of records. Each record contains information about a single collected entity, as
contained in the ncimCache.collects table.
The following snippet shows an example of the results returned by this rule.
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
GwConnects()
The GwConnects(); rule retrieves a list of entities directly connected to a specified entity. This data
is retrieved from the NCIM cache table, ncimCache.connects. A limitation on this rule is that it does
not retrieve connections to contained entities. For example, if the entity passed to the rule represents a
chassis, connections to interfaces within that chassis will not be returned.
Syntax
The GwConnects(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example finds all connections to a specified entity and then prints out all of the results.
Returns
This rule returns a list of records. Each record contains information about a single connected entity, as
contained in the ncimCache.connects table.
The following snippet shows an example of the results returned by this rule.
{
TOPOENTITYNAME='RouterLinksTopology';
UNIDIRECTIONAL=0;
ENTITYNAME='freddy[ 0 [ 1 ] ]';
},
{
TOPOENTITYNAME='RelatedToTopology';
UNIDIRECTIONAL=0;
ENTITYNAME='bob[ 0 [ 1 ] ]';
}
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
GwContains()
The GwContains(); rule retrieves a list of entities directly contained by a specified entity. This data is
retrieved from the NCIM cache table, ncimCache.contains. No recursion is performed. For example, if
a chassis contains some cards, and those cards contain interfaces, the result of running this rule against
the chassis will be a list of cards.
Syntax
The GwContains(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example retrieves a list of entities directly contained by a specified entity and then prints
out all of the results.
Returns
This rule returns a list of records. Each record contains information about a single contained entity, as
contained in the ncimCache.contains table.
The following snippet shows an example of the results returned by this rule.
{
ENTITYNAME='ny-p2-cr28.na.test.lab[ Fa1/7 ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='ny-p2-cr28.na.test.lab[ Fa1/8 ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='ny-p2-cr28.na.test.lab[ Fa1/12 ]';
UPWARDCONNECTION=1;
}
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
GwDependency()
The GwDependency(); rule retrieves a list of dependencies upon a specified entity. This data is retrieved
from the NCIM cache table, ncimCache.dependency.
Syntax
The GwDependency(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example finds all dependent entities of a specific type.
Returns
This rule returns a list of records. Each record contains information about a single dependent entity, as
contained in the ncimCache.dependency table.
The following snippet shows an example of the results returned by this rule.
{
DEPENDENCYTYPE=1;
ENTITYNAME='IPMRoute_UpstreamRoute_core2-cs35.core.eu6.test.lab_
(0.0.0.0,239.255.255.255)';
},
{
DEPENDENCYTYPE=1;
ENTITYNAME='IPMRoute_UpstreamRoute_istanbul-asbr-cr26.tk.eu.test.lab
[ Fa0/1 ]_(0.0.0.0,239.255.255.255)';
},
{
DEPENDENCYTYPE=1;
ENTITYNAME='IPMRoute_DownstreamRoute_istanbul-asbr-cr26.tk.eu.test.lab
[ Fa0/0 ]_(0.0.0.0,239.255.255.255)_239.255.255.255';
}
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
GwEnrichEvent()
The GwEnrichEvent(); updates fields in an event. Any data can be added to an event using this rule;
however, the only fields which are permitted to update the ObjectServer alerts.status table are those
fields that are listed in the outgoing field filter, as defined in the in the FieldFilter section of the nco2ncp
table within the EventGatewaySchema.cfg configuration file.
Syntax
The GwEnrichEvent(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Returns
This stitcher does not return any values.
GwEnrichEvent( enrichment );
GwEntityData()
The GwEntityData(); rule provides a simplified way of looking up topology data in NCIM cache. This
rule performs topology lookups in the ncimCache.entityData table.
Syntax
The GwEntityData(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
For more information on the ncimCache tables, see section NCIM cache in the IBM Tivoli Network Manager
Reference.
Returns
The GwEntityData(); statement returns a row from the ncimCache.entityData table if a result was
found.
Syntax
The GwHostedService(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example services hosted by a specified entity and then prints out the results.
Returns
This rule returns a list of records. Each record contains information about a single hosted service, as
contained in the ncimCache.hostedService table.
The following snippet shows an example of the results returned by this rule.
{
ENTITYNAME='PIM_SERVICE_salida-abr-cr36.na.test.lab';
},
{
ENTITYNAME='IPMRoute_Service_salida-abr-cr36.na.test.lab';
}
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
GwIpLookup()
The GwIpLookup(); rule allows rapid and efficient topology lookups for the entity that implements a
given IP address or DNS name. This entity is often an interface, but, if no SNMP access is available to a
device, it could be the related chassis.
Syntax
The GwIpLookup(); statement uses the following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
For more information on the ncimCache tables, see section NCIM cache in the IBM Tivoli Network Manager
Reference.
Returns
The GwIpLookup(); statement returns a row from the ncimCache.entityData table if a result was found.
Syntax
The GwIpLookupUsing(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example looks up an entity based on a supplied event field name.
GwMainNodeLookup()
The GwMainNodeLookup(); rule performs topology lookups for main nodes, based on a limited number
of fields.
This rule performs topology lookups for main nodes, based on the following fields:
• IP address (as listed in the ipEndPoint table)
• entityName (as given in the entityData table)
• DNS name (as given in the ipEndPoint table)
• sysName (as given in the chassis table)
• entityId (as given in the entityData table)
The rule returns the row from the ncimCache.entityData table if a result was found.
Syntax
The GwMainNodeLookup(); statement uses following syntax.
GwMainNodeLookup ( identifier);
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example looks up a main node based on an integer value.
Example
The following example looks up a main node based on a specified IP address.
Example
The following example looks up a main node based on a system name.
GwMainNodeLookupUsing()
The GwMainNodeLookupUsing(); rule performs the same operation as the GwMainNodeLookup()
rule, except that a field within the current top-level in-scope event is used to perform the lookup.
Syntax
The GwMainNodeLookupUsing(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following examples look up a main node based on a field within the current top-level in-scope event.
Example
The following examples look up a main node based on a field within the current top-level in-scope event.
Example
The following examples look up a main node based on a field within the current top-level in-scope event.
GwManagedStatus()
Retrieves the managed status of a specified entity. This rule checks for managed status by containment,
and returns the actual managed status of the entity. For example, if the entity ID represents an entity
contained in an unmanaged main node, then the contained entity is implicitly unmanaged and this rule
returns the status as unmanaged, regardless of the status given in the ncimCache.managedStatus table.
Syntax
The GwManagedStatus(); statement uses the following syntax.
GwManagedStatus ( entity ID );
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Returns
This stitcher returns the managed status value for the specified entity.
GwPipeComposition()
The GwPipeComposition(); rule retrieves a list of pipe compositions for a specified entity. This data is
retrieved from the NCIM cache table, ncimCache.pipeComposition.
Syntax
The GwPipeComposition(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example finds pipe compositions for a specified entity and then prints out all of the results.
Returns
This rule returns a list of records. Each record contains information about a single pipe composition, as
contained in the ncimCache.pipeComposition table.
The following snippet shows an example of the results returned by this rule.
{
ENTITYNAME='pe6-cr38.core.eu.test.lab[ Gi0/1 ]_
p4-cr28.core.eu.test.lab[ 0 [ 2 ] ]';
AGGREGATIONSEQUENCE=1;
},
{
ENTITYNAME='p4-cr28.core.eu.test.lab[ Se0/0/1:0.202 ]_
pe7-cr38.core.eu.test.lab[ Se0/0/0:0.202 ]';
AGGREGATIONSEQUENCE=2;
}
GwProtocolEndPoint()
The GwProtocolEndPoint(); rule retrieves a list of entities directly connected to a specified entity.
This data is retrieved from the NCIM cache table, ncimCache.protocolEndPoint.
Syntax
The GwProtocolEndPoint(); statement uses following syntax.
Arguments
The following table lists the properties of the arguments of this stitcher rule.
Example
The following example retrieve a list of end points on a specified entity and then prints out all of the
results.
Returns
This rule returns a list of records. Each record contains information about a single end point, as contained
in the ncimCache.protocolEndPoint table.
The following snippet shows an example of the results returned by this rule.
{
ENTITYNAME='Area_0.0.0.2_OSPF_ProtocolEndPoint_172.20.98.51_RD_[1]';
},
{
ENTITYNAME='PIM_ENDPOINT_glasgow-gw-cr26.uk.eu.test.lab[ Fa0/0.1 ]';
},
{
ENTITYNAME='IPMRoute_ProtocolEndPoint_(0.0.0.0, 224.0.1.39)_
glasgow-gw-cr26.uk.eu.test.lab[ Fa0/0.1 ](downstream)';
},
{
ENTITYNAME='IGMP_ENDPOINT_glasgow-gw-cr26.uk.eu.test.lab[ Fa0/0.1 ]';
},
{
ENTITYNAME='glasgow-gw-cr26.uk.eu.test.lab[ Fa0/0.1 ] IP: 172.20.98.51';
For more information on the NCIM cache tables see the IBM Tivoli Network Manager Reference.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
AmosDeleteEvent()
The AmosDeleteEvent(); rule removes the trigger event from mojo.events.
Syntax
The AmosDeleteEvent(); statement uses following syntax.
AmosDeleteEvent ();
Arguments
This stitcher rule takes no arguments.
Example
The following example shows how this rule is used in the ProcessResolutionEvent.stch stitcher.
int retval = 0
retval = AmosDeleteEvent();
AmosReprocessSuppressees()
The AmosReprocessSuppressees(); rule reprocesses all suppressed events of the cleared or deleted
trigger events.
Syntax
The AmosReprocessSuppressees(); statement uses following syntax.
AmosReprocessSuppressees ( );
Example
The following example reprocesses all suppressed events.
int numberOfSuppressees = 0;
numberOfSuppressees = AmosReprocessSuppressees();
AmosSetCause()
The AmosSetCause(); rule makes the trigger event a root cause or unknown cause event. In either
case, the event is not suppressed.
Syntax
The AmosSetCause(); statement uses following syntax.
AmosSetCause ( causeType );
Example
The following example sets the cause type of an event.
AmosSuppressByPeer()
The AmosSuppressByPeer(); rule suppresses the trigger event with an existing event from
mojo.events that is on a remote peer or remote neighbour. This is relevant for certain BGP and OSPF
events.
Syntax
The AmosSuppressByPeer(); statement uses following syntax.
AmosSuppressByPeer ( remoteNodeEntityId );
Example
The following example retrieves a remote node entity ID for the trigger event and then attempts to
suppress the trigger event.
if (remoteNodeEntityId > 0)
{
suppressionType = AmosSuppressByPeer(remoteNodeEntityId);
}
Syntax
The AmosSuppressEvents(); statement uses following syntax.
AmosSuppressEvents ( suppressionType );
Example
The following example performs event suppression.
AmosSuppressTrigger()
The AmosSuppressTrigger(); rule suppresses the trigger event with an existing event from the
mojo.events table.
Syntax
The AmosSuppressTrigger(); statement uses following syntax.
AmosSuppressTrigger ( );
Example
The following example shows how this rule is used to return the suppression type if the trigger event was
suppressed. The value 0 means that the trigger event was not suppressed.
AmosTimedEventSuppression()
The AmosTimedEventSuppression(); rule processes all events in the mojo.event table that have the
TimedEscalation field set to 1 and that were created at least a specified number of seconds ago. The
rule returns the number of events that were processed.
Syntax
The AmosTimedEventSuppression(); statement uses following syntax.
AmosTimedEventSuppression ( age );
Example
The following example processes all events in the mojo.event table that have the TimedEscalation
field set to 1 and that were created at least 30 seconds ago. The rule returns the number of events that
were processed.
// Specify that the event's CreateTime value must be at least 30 seconds ago
int age = 30; // Specifies time in seconds
int numEventsProcessed = 0;
numEventsProcessed = AmosTimedEventSuppression(age);
AmosGetConnectedEntities()
The AmosGetConnectedEntities(); rule retrieves all entities connected to an entity with a specified
entityId and entityType.
Syntax
The AmosGetConnectedEntities(); statement uses following syntax.
Example
The following example shows how to use the AmosGetConnectedEntities(); rule.
int entityId=0;
entityId = eval(int,'&NmosEntityId');
int entityType=0;
entityType = eval(int,'&EntityType');
AmosGetContainedEntities()
The AmosGetContainedEntities(); rule retrieves all entities contained by the entity with a specified
entityId.
Syntax
The AmosGetContainedEntities(); statement uses following syntax.
AmosGetContainedEntities ( entityId );
Example
The following example shows how to use the AmosGetContainedEntities(); rule.
int entityId=0;
entityId = eval(int,'&NmosEntityId');
AmosGetContainerEntities()
The AmosGetContainerEntities(); rule recursively retrieves all entities containing an entity with a
specified entityId.
Syntax
The AmosGetContainedEntities(); statement uses following syntax.
AmosGetContainerEntities ( entityId );
int entityId=0;
entityId = eval(int,'&NmosEntityId');
AmosGetEvents()
The AmosGetEvents(); rule retrieves all events on a specified entityId.
Syntax
The AmosGetEvents(); statement uses following syntax.
AmosGetEvents ( entityId );
Example
The following example shows how to use the AmosGetEvents(); rule.
AmosGetIsolatedEntities()
The AmosGetIsolatedEntities(); rule retrieves all entities isolated by the entity with the specified
entityId value with respect to the specified poller entity.
Syntax
The AmosGetIsolatedEntities(); statement uses following syntax.
Example
The following example shows how to use the AmosGetIsolatedEntities(); rule.
int entityId=0;
entityId = eval(int,'&NmosEntityId');
int pollerEntityId=0;
pollerEntityId = eval(int,'&PollerEntityId');
AmosRetrieveEntities()
The AmosRetrieveEntities(); rule retrieves entities relative to the trigger entity; for example, it can
retrieve all entities contained by the trigger entity.
Syntax
The AmosRetrieveEntities(); statement uses following syntax.
AmosRetrieveEntities ( suppressionType );
AmosUpdateEvent()
The AmosUpdateEvent(); rule updates the event in the table, mojo.events. The rule uses the Serial
number of the in-scope event to do this. The rule does not update the in-scope record itself. The in-scope
records simply goes out of scope at the end of the operation.
Syntax
The AmosUpdateEvent(); statement uses following syntax.
Example
The following example shows how to use the AmosUpdateEvent(); rule to update an integer field.
int success = 0;
success = AmosUpdateEvent("NmosCauseType", 1);
Example
The following example shows how to use the AmosUpdateEvent(); rule to update text string fields.
Example
The following is a further example of how to use the AmosUpdateEvent(); rule to update an integer
field.
int success = 0
text myname = "NmosCauseType";
int myvalue = 2;
success = AmosUpdateEvent(myname, myvalue);
AmosUpdateSuppressees()
The AmosUpdateSuppressees(); rule assigns a value to one field in all of the suppressed events and
then sets this flag to a specified value.
Syntax
The AmosUpdateSuppressees(); statement uses following syntax.
int numberOfSuppressees = 0;
numberOfSuppressees = AmosUpdateSuppressees("Orphaned", 1);
Programming constructs
The following table lists the stitcher language programming constructs.
Datatypes
The following table describes the stitcher language datatypes.
Relational operators
The following table lists the relational operators.
Related reference
Stitcher rules
The stitcher rules are specified within the StitcherRules{} section of a stitcher. Stitcher rules
determine how a stitcher functions.
Quotes in OQL
In OQL the TEXT datatype must be enclosed by matching quotation marks (either single or double
quotes).
delete()
The delete rule removes lists and records that have been created and are no longer needed.
The for loop
The for loop is used to repeat a set of rules a given number of times.
The while Loop
The while loop is used to execute a series of instructions while a specified condition remains true.
The if statement
The if statement performs an action if a particular condition is satisfied.
The foreach Loop
The foreach loop performs an action on every record stored in a variable of type RecordList.
Related reference
Features of OQL
The following topics describe the features of Object Query Language (OQL).
ExecuteOQL(
"select m_Name from finders.returns where m_Creator = 'PingFinder';"
);
Elsewhere in the stitcher language, single quotes are generally used, as shown in the following example:
ExecuteStitcher( 'CreateAndSendTopology' );
Domain-specific stitchers
If you want to make custom stitching easier to debug, or you want to keep the original stitcher files
unaltered, you can create domain-specific stitchers.
eval(text, '&SNMP.VALUE.sysName')
eval(text, '&SNMP.INDEX.ipRouteNextHop')
eval(text, '&SNMP.VALUE.OLD.sysName')
eval(text,'&POLLDATA.RESULT')
eval(text, '&SNMP.INDEX.OLD.ipRouteNextHop')
Sample: Evaluation of the value of poll policy name and related domain ID
The following example can be used in a threshold expression or threshold description, and shows how to
evaluate the value of name of the poll policy and the ID of the domain in which this poll policy is found.
The management policies specified in the class hierarchy describe how to handle instances of devices
and how to handle events related to them. The class hierarchy is available for polling operations. You can
specify which classes to include in each polling operation through the poll policy settings.
Network Manager does not permit multiple inheritance, which is the ability of a new class to inherit the
characteristics from more than one class.
The following topics describe the classes contained in the hierarchy.
InferredDevice class
The InferredDevice class contains devices that Network Manager could not discover directly, although
they are considered to exist on the network.
You might infer the existence of CE routers for your customer, for example, by specifying the CE routers in
the advanced discovery configuration options.
NetworkDevice class
The NetworkDevice class contains all device types grouped into subclasses according to their
manufacturer.
All Cisco devices, for example, are contained within the Cisco subclass. The default poll policies are
usually defined for network devices and their derived classes.
AOC syntax
Use this information to understand the structure of AOC files.
In addition to the information in this topic, you should also read the OQL language syntax information, in
particular, the eval statement.
The syntax and naming conventions described in the following table are used throughout the AOCs.
[] Square brackets Typically defines a list of items. There can be zero or more items
within the brackets and each item must be separated by a single
comma.
"" Double quotes Typically used to enclose assignments to various attributes (of
datatype text) within an AOC. As a general rule all assignments
use double quotes.
'' Single quotes Typically used to enclose evaluations of column names or system
variables within an eval statement. Single quotes can be used
within double quotes, but double quotes cannot be used within
single quotes.
AOC components
The major components of the AOC and descriptions of the components are provided below.
• Name of the active object class (active object)
• Super class (super_class)
• Instantiate rule (instantiate_rule)
• Icon used in GUI to represent the device class
Name
In the active object attribute, you declare the name of the current class.
You can specify any unique text string between the double quotes. The entire AOC file is contained within
the first pair of curly brackets. A semicolon follows the final bracket to terminate the AOC.
visual_icon = 'EndNode';
};
Super class
You can configure the Super class to define the name of the AOC from which the current class inherits.
The name between the double quotes must be the name of an already-defined AOC. In the AOC hierarchy,
Core is the only class that has an unassigned super_class. When editing any other class, the super_class
must never be left empty.
super_class = "Core";
Instantiate rule
You code the instantiate rule as a logical test against the attributes of the entity. The most specific class
that matches the test defines the class the object belongs to. The test is done by first testing the Core.aoc
class and then its subclasses in turn.
If an object meets the instantiation criteria for more than one class, it automatically instantiates to
the lowest leftmost class in the hierarchy. The following example shows a specification of the rule that
instantiates everything by default.
Visual icon
You can assign icons to device classes. These icons represent devices of that class in the network
visuulization GUIs, including the Network Views and the Network Hop View.
For information on how to assign icons to device classes, see the IBM Tivoli Network Manager IP Edition
Installation and Configuration Guide.
RIV::Param Provides an interface for parsing standard and Network Manager application-
specific command line arguments.
RIV::Record Provides a data structure to store the network entity. Typically, you use this data
structure in conjunction with the RIV::Agent module to write discovery agents.
Types of applications
There are two types of applications that you can write using the Perl API:
• Discovery agents — Use the RIV::Agent constructor and the ncp_disco_perl_agent binary to create
discovery agent applications.
• Other client/server applications — Use the RIV::App constructor and the ncp_perl binary to other
client/server applications. Examples of these other client/server applications include those that access
Network Manager databases.
These application objects are required for interaction with Network Manager components (through the
virtual methods exported through the RIV module) and for instantiation of the other RIV modules.
RIV::InputFilter Binds the specified input function to input tags that match
the specified regular expression.
See “RIV module reference” on page 165 for the reference (man) pages associated with these functions.
DebugLevel Provides access to the global Network Manager debug setting through the
RIV::DebugLevel variable.
RetryLimit Sets the retry limit for queries or returns the maximum number of retries
for queries.
See “RIV module reference” on page 165 for the reference (man) pages associated with these functions.
RIV::Agent constructor
The RIV::Agent module provides a constructor that creates a discovery agent application object. Use
this application object to:
• Interact with Network Manager core components libraries using the virtual methods exported from the
RIV module.
• Instantiate objects for and interact with the other Perl modules: RIV::Param, RIV::Record, and
RIV::RecordCache.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
See “RIV::Agent module reference” on page 187 for the reference (man) pages associated with these
methods.
RIV::APP constructor
The RIV::App module provides two constructors that create a client/server application object. You use
this client/server application object to:
• Interact with Network Manager core components libraries using the virtual methods exported from the
RIV module.
• Instantiate objects for and interact with the other Perl modules: RIV::OQL, RIV::Param,
RIV::Record, and RIV::RecordCache.
A client/server application can create one or more RIV::App application objects as required. For
example, two instances of RIV::App application objects would be needed in order to implement some
special purpose cross-domain behavior.
RIV::OQL constructor
The RIV::OQL module provides a constructor that creates and initializes a new RIV::OQL object. The
RIV::OQL constructor takes a blessed reference to either a discovery agent application object or a client/
server application object. These application objects were returned in a previous call to the RIV::Agent
or RIV::App constructor. The RIV::OQL constructor also takes the name of a service that indicates the
Network Manager internal database to use.
See “RIV::OQL module reference” on page 212 for the reference (man) pages associated with these
methods.
Standard arguments
Standard arguments are used to specify information about the Network Manager execution environment
and to select debug output and application help. All Network Manager applications must support these
arguments.
The standard arguments that the RIV::Param module provides are summarized in the following table:
Argument Description
-domain domain name Specifies the command line argument used to identify the domain in which a
user wants to perform some task, for example, starting the Network Manager
core components.
The domain name argument specifies the name of the domain.
-debug debug level Specifies the command line argument used to identify the level of debugging
output that a user prefers.
The debug level argument specifies a value from 1-4, where 4 represents the
most detailed output.
-latency query Specifies the command line argument used to specify the maximum time that
latency CLASS waits to connect to another Network Manager process by means of the
messaging bus. This option is useful for large and busy networks where the
default settings can cause processes to assume that there is a problem when
in fact the communication delay is a result of network traffic.
The query latency argument specifies the maximum time in milliseconds (ms)
that CLASS waits.
-messagelevel Specifies the command line argument used to identify the level of message
message level output that a user prefers.
The message level argument specifies the level of message to be logged (the
default is warn):
• debug
• info
• warn
• error
• fatal
-help Specifies the command line argument used to display command line options.
RIV::Param constructor
The RIV::Param module provides a constructor that creates and initializes a new RIV::Param object.
The RIV::Param constructor takes three optional parameters used to specify:
• Application-specific parameters
• Usage information or nonstandard command line argument scenarios
• Help information written to standard output
Constant Description
RivParamNoArg Specifies that the command line takes no arguments.
RivParamSingleArg Specifies that the command line takes one argument.
RivParamMandatory Specifies that the command line takes a mandatory argument.
See “RIV::Param module reference” on page 224 for the reference (man) pages associated with these
methods.
Network entities
The RIV::Record module is used in conjunction with the RIV::Agent module to write discovery
agents. The RIV::Record data structure stores records associated with the network entities sent by
DISCO to the Perl Discovery Agent. You can then add local neighbors and remote neighbors to this record
by calling the appropriate local and remote neighbor operation methods.
RIV::Record constructor
Before accessing the methods that the RIV::Record module provides, you must call the RIV::Record
constructor to create and initialize a new RIV::Record data structure. This data structure stores
network entity records retrieved from DISCO.
$refLocalNeighbours = $record->{m_LocalNbr};
@LocalNeighbours = @$refLocalNeighbours;
$refRemoteNeighbours = $LocalNeighbours[$i]->{m_RemoteNbr};
@RemoteNeighbours = @$refRemoteNeighbours;
$refRemoteNeighbour = $RemoteNeighbours[$j];
%remoteNeighbour = %$refRemoteNeighbour;
The value for the key m_LocalNbr is a pointer to an array, which is a list of hashes, where each
hash represents a local neighbor. If there are any remote neighbors, the local neighbor has a key
(m_RemoteNbr) whose value points to the reference of an array, which is a list of hashes, each
representing a remote neighbor. You will need this data structure if you intend to manipulate it directly. In
most cases, however, your task is limited to creating hash lists that define the local and remote neighbors.
The AddLocalNeighbour and AddRemoteNeighbour methods can be used to add neighbors, and the
GetLocalNeighbours and GetRemoteNeighbours methods can be used to retrieve information about
neighbors.
See “RIV::Record module reference” on page 231 for the reference (man) pages associated with these
methods.
RIV::RecordCache constructor
Before accessing the methods that the RIV::RecordCache module provides, you must call the
RIV::RecordCache constructor to create and initialize a new record cache file object. The
RIV::RecordCache constructor takes a blessed reference to either a discovery agent application object
or a client/server application object. These application objects were returned in a previous call to the
RIV::Agent or RIV::App constructor.
See “RIV::RecordCache module reference” on page 236 for the reference (man) pages associated with
these methods.
RIV::SnmpAccess constructor
Before accessing the methods that the RIV::SnmpAccess module provides, you must call the
RIV::SnmpAccess constructor to create and initialize a new RIV::SnmpAccess object. The
RIV::SnmpAccess constructor takes a blessed reference to either a discovery agent application object
or a client/server application object. These application objects were returned in a previous call to the
RIV::Agent or RIV::App constructor.
GetMibHash Gets the entire MIB tree by browsing the files that exist in the $NCHOME/
mibs directory.
SnmpGet Performs a synchronous SNMP get operation on the specified MIB variable.
SnmpGetBulk Performs a synchronous SNMP get-bulk operation on all MIB objects in the
specified MIB table.
SnmpWalk Performs an SNMP walk operation on a given device, starting at a given MIB
variable.
SplitOidAndIndex Converts the full ASN.1 value into its index and the base OID.
See “RIV::SnmpAccess module reference” on page 240 for the reference (man) pages associated with
these methods.
NCP::DBI_Factory Provides an interface to make it easier to use the standard Perl DBI module to
perform operations on the Network Connectivity and Inventory Model (NCIM)
topology database.
DBI handle
The NCP::DBI_Factory module provides a method that creates and initializes a new DBI handle. You
pass this handle in subsequent calls to the methods that perform operations on the specified NCIM
topology database. This DBI handle contains the information needed to connect to the requested NCIM
topology database.
createDbHandle Creates a standard DBI handle to be used in subsequent calls to the other
NCP::DBI_Factory methods.
describeTable Returns a sorted array of upper case field names for the specified table or
view.
extractCmdLineOptions Allows database login options for the DBI handles to be provided in a
common format.
insert_auto_inc_row Inserts a row into a named table, where the table has an auto incremented
column.
schema Returns the schema name associated with the NCIM topology database
being used.
setLogHandle Passes in a log handle associated with an opened file used for logging
messages.
setLogLevel Sets the log level for error and message reporting.
tables Returns a sorted array of table and view names for the current schema.
timeStamp Returns the current timestamp in a format suitable for addition to the
NCIM topology database.
toUpper Returns a copy of a hash (a single row retrieved from an NCIM database
table ) with all field names converted to upper case.
See “NCP::DBI_Factory module reference” on page 253 for the reference (man) pages associated with
these methods.
NCP::Domain constructor
Before accessing the methods that the NCP::Domain module provides, you must call the NCP::Domain
constructor to create a new NCP::Domain object. The NCP::Domain constructor requires the domain
name and options for the database connection. The newly created NCP::Domain object encapsulates the
attributes associated with the specified domain and database connection.
create Creates an entry in the domainMgr table for this domain if one does not
already exist.
drop Removes all references to the specified domain from the domainMgr table.
setLogHandle Passes in a log handle associated with an opened file used for logging
messages.
setLogLevel Sets the log level for error and message reporting.
See “NCP::Domain Reference” on page 276 for the reference (man) pages associated with these methods.
Perl builds
Network Manager provides two customized Perl executables as it is necessary to use static linkage
against the Network Manager core components libraries.
The first executable is the ncp_disco_perl_agent binary. This binary is used by Discovery agents and it is
executed automatically by ncp_disco. You would not expect to run this binary directly.
The second executable is the ncp_perl binary. You use this binary to develop Perl scripts to customize
ITNM or to integrate with other products.
use RIV;
use RIV::Param;
use RIV::Record;
use RIV::Agent;
The example shows that the RIV::Agent constructor consists of two parameters:
• $param — Specifies a RIV::Param object. As the example shows, this object is returned in a call to the
RIV::Param constructor.
• $agentName — Specifies a string that identifies the name of this discovery agent. In this example, the
name of the agent is foo.
The RIV::Agent constructor returns a discovery agent application object to the $agent variable. You
reference all RIV::Agent module methods through this object. For example: $agent->SnmpGet(...),
$agent->SnmpGetNext(...), and so forth.
if ($TestNE->{m_TerminateAgent})
{
log_msg("Exit Main Loop\n");
exit(0);
}
my %localNbr;
$localNbr{'m_IpAddress'} = '1.2.3.4';
$localNbr{'m_IfIndex'} = 2;
$TestNE->AddLocalNeighbour(\%localNbr);
The AddLocalNeighbour method takes a $refNbr parameter that specifies a reference to a hash list.
This hash list defines the local neighbor as a set of key value pairs (varBinds).
Step 6: Decide if the agent must process the device (pre-mediation layer)
In the pre-mediation layer you must write Perl code to decide if the device needs to be processed by this
discovery agent. The Agent Definition File should be used to filter out devices based on the OIDs.
Note: The list of devices supported by the DISCO process is defined in the Agent Definition File.
Typically, this Perl code checks the device's IP address using the RIV::IsIpValid method, as shown in
the following example:
If the device's IP address is valid, then the discovery agent processes the device. Otherwise, the discovery
agent does not process the device. In the example an appropriate message would display to standard
output if the device has an invalid IP address.
Step 7: Retrieve device information from the Helper Server (meditation layer)
Next, you must retrieve device information from the Helper Server. This can be achieved using SNMP Get,
Telnet, or DNS. For example:
The above example uses the RIV::Agent method SNMPGetNext. The SNMPGetNext method takes two
parameters:
• $ne — Specifies the network entity, which is typically a RIV::Record object.
• $oid — Specifies a MIB variable, for example, ipAdEntIfIndex in the above example.
The above example performs SNMP GET operations on the network entity (NE) in question and retrieves
the specified MIB variables. If you prefer, you could substitute the SnmpGetNext method with the
appropriate methods to allow Telnet or DNS access.
sub Processing
{
print "Processing the local neighbours\n";
foreach $entry (@$refLifindex)
{
if (RIV::IsIpValid($entry->{ASN1}))
{
my %localNbr;
$localNbr{’m_IpAddress’} = $entry->{ASN1};
$localNbr{’m_IfIndex’} = $entry->{VALUE};
$TestNE->AddLocalNeighbour(\%localNbr);
}
}
}
$NCHOME/precision/disco/agents/CustomPerlAgent.agnt
$NCHOME/precision/disco/agents/perlAgents/CustomPerlAgent.pl
$NCHOME/precision/bin/ncp_agent_registrar -register
CustomPerlAgent
Once the agent has been registered, you should be able to see it and any other registered discovery
agents in the Discovery Configuation GUI. Use the Discovery Agent GUI to enable the discovery agent for
the next discovery.
For information on the Discovery Configuation GUI, see IBM Tivoli Network Manager IP Edition
Administration Guide.
use RIV;
use RIV::Param;
use RIV::Record;
use RIV::Agent; 1
# Create a new discovery agent
print "Creating a new agent\n"; 2
sub Init{
my $param=new RIV::Param();
$agent=new RIV::Agent($param, "PerlDetails"); 3
# Wait for input from the DISCO process
print "Entering infinite loop wait for devices for Disco\n"; 4
if ($TestNE->{m_TerminateAgent})
if (!RIV::IsIpValid($host)){ 7
print "Device has invalid IP address ignoring the record!\n";
next DEVICE;
}
# Retrieve device information from the Helper Server (mediation layer)
...
print "Entering Mediation layer\n"; 8
Mediation();
sub Mediation{ 11
. . .
. . .
# Retrieve the relevant information from the Helper Server using SNMP,
Telnet or DNS.
. . .
. . .
}
sub Processing{ 12
. . .
. . .
# Determine local and remote neighbors (processing layer) based
# on the information retrieved in the Mediation Layer.
# The neighbours are then added to the RIV::Record representing
# the network entity.
. . .
. . .
}
Init();
The following list explains specific numbered items in the previously listed skeleton outline of a discovery
agent:
1. Declare the Perl API modules to use in the discovery agent. The RIV::Agent and RIV::Record
modules are required. The optional RIV::Param module is useful for parsing standard and
application-specific command line arguments.
2. Calls the print operator to display a message to the standard output indicating the creation of a new
discovery agent.
3. This is the create or initiate discovery agent section. Creates a new discovery agent with the specified
name. The skeleton outline specifies a discovery agent with the name of PerlDetails.
4. The discovery agent is ready to receive records from DISCO.
5. Checks that the data records received from DISCO have been tagged with the string NE.
6. Handles a request from ncp_disco to terminate the Perl discovery agent if the test evaluates to true.
7. Checks that the device has a valid IP address.
8. This is the mediation layer section. Gets the relevant SNMP information.
9. This is the processing layer section. Interprets the information to find the local and remote neighbors.
10. Sends the record and filled-out network entity to DISCO.
11. Implements the Mediation method.
12. Implements the Processing method.
use RIV; 1
use RIV::Param;
use RIV::Agent;
use RIV::Record;
$param = RIV::Param::new();
$agent = RIV::Agent::new($param, "PerlAgent");
while (1)
{
my ($tag, $data) = $agent->RIV::GetResult(-1);
next unless ($tag eq "NE"); 2
The following list explains specific numbered items in the previously listed discovery agent example:
1. Declare the Perl API modules to use in the discovery agent. The RIV::Agent and RIV::Record
modules are required. The optional RIV::Param module is useful for parsing standard and
application-specific command line arguments.
2. Checks that the data received from DISCO has been tagged with the string NE.
3. Returns the data to DISCO.
use RIV;
use RIV::Param;
use RIV::Record;
use RIV::Agent; 1
The following list explains specific numbered items in the previously listed IP routing discovery agent Perl
program:
1. Declare the Perl API modules to use in this discovery agent. The RIV::Agent and RIV::Record
modules are required. The optional RIV::Param module is useful for parsing standard and
application-specific command line arguments.
2. Calls the print operator to display a message to the standard output indicating the creation of a new
discovery agent.
3. Calls the print operator to display a message to the standard output indicating the program is ready
to receive records from the DISCO process.
4. Sets up an infinite loop waiting to receive data from DISCO.
5. Calls the RIV::GetResult function to return a data record from DISCO. In this call, the value -1 is
passed signifying that RIV::GetResult should "wait forever" to received data records from DISCO
before returning.
6. Checks the data record that RIV::GetResult returns to the $tag variable. If the returned data
record has not been tagged with the string NE, then use the print operator to display a message
to the standard output indicating this data record is not a network entity and thus should not be
processed.
7. Continues through the loop to get the next data record from DISCO.
8. Creates a RIV::Record object by calling the RIV::Record constructor. In this call, the data
returned by RIV::GetResult to the $data variable is passed. This data is actually a reference
to a hash list, which is the mechanism used to store network entity records from DISCO.
The RIV::Record constructor returns the newly created RIV::Record object to the $TestNE
variable.
This code also handles a request from ncp_disco to terminate the Perl discovery agent if the test
evaluates to true.
9. Assigns the value 1 to the m_LastRecord key in the hash.
10. Assigns the string PerlDetails to the m_UpdAgent key in the hash.
11. Assigns the value associated with the m_IpAddress key in the hash to the $host variable.
sub Init{
my $param=new RIV::Param();
$agent=new RIV::Agent($param, "PerlDetails");
} 8
sub Mediation{ 1
$refLifindex=$agent->SnmpGetNext($TestNE,'ipAdEntIfIndex'); 2
$refLnetmask=$agent->SnmpGetNext($TestNE,'ipAdEntNetMask'); 2
$refLphysaddress=$agent->SnmpGetNext($TestNE,'ifPhysAddress'); 2
$refRifindex=$agent->SnmpGetNext($TestNE,'ipRouteIfIndex'); 3
$refRtype=$agent->SnmpGetNext($TestNE,'ipRouteType'); 3
$refRnexthop=$agent->SnmpGetNext($TestNE,'ipRouteNextHop'); 3
sub Processing{ 4
print "Processing the local neighbours\n";
for ($j=0;$j<=$#$refLifindex;$j++){
if (RIV::IsIpValid($refLifindex->[$j]->{ASN1}))
{
print $j, "\n";
my %localNbr
$localNbr{'m_IpAddress'} = $refLifindex->[$j]->{ASN1}; 5
$localNbr{'m_IfIndex'} = $refLifindex->[$j]->{VALUE}; 5
$localNbr{'m_NetMask'} = GetValueForKey($refLnetmask, 5
$refLifindex->[$j]->{ASN1});
$m_1 = $localNbr{'m_IpAddress'};
$m_2 = $localNbr{'m_NetMask'};
$localNbr{'m_SubNet'} = inet_ntoa(pack("N", (unpack ("N",
inet_aton($m_1)) & unpack("N",
inet_aton($m_2))) ));
The following list explains specific numbered items in the previously listed IP routing discovery agent Perl
program:
1. This section of code implements the Mediation Layer. You should perform all SNMP GET operations in
this layer.
2. Get information required for determining local neighbors.
3. Get information required for determining remote neighbors.
4. This section of code implements the Processing Layer. To get the local neighbors, loop through
ipAdEntIfIndex values. If the ASN1 value is a valid IP address, set the local neighbor tags for
local neighbor IP address and ifIndex. Set tags for the netMask and physaddress based on the
corresponding values in ipAdEntIfIndex and ifAdEntNetMask.
To get the remote neighbors, start looping through the ipRouteType. The progam processes only if
the route type is not 2 and the ASN1 value is a valid IP address. Then get the corresponding value
of the next hop. Make it a remote neighbor if it is not a local neighbor IP address and the remote IP
address does not already exist. Use the ipRouteIfIndex values to find the local neighbor to attach
this remote neighbor to.
5. Add local neighbors to device record m_IpAddress, m_IfIndex, and m_NetMask.
6. This section of code determines and adds remote neighbors.
sub GetValueForKey 1
{
my $refArray = shift;
my $key = shift;
sub NotLocalNbr 2
{
my $ip_in = shift;
@lN = $TestNE->GetLocalNeighbours();
foreach $l_nbr (@lN)
{
print "RMAA $l_nbr->{m_IpAddress}, $ip_in, \n";
if ($l_nbr->{'m_IpAddress'} eq $ip_in)
{
print "remote neighbour IP same as local neighbour IP \n";
return 0;
}
my @remoteN = $TestNE->GetRemoteNeighbours($l_nbr);
print @remoteN, "\n";
foreach my $remoteNbr (@remoteN)
{
print "$remoteNbr->{'m_IpAddress'}, $ip_in, \n";
if ($remoteNbr->{'m_IpAddress'} eq $ip_in)
{
print "remote neighbour IP already exists \n";
return 0;
}
}
}
return 1;
}
sub AttachLocalNbr 1
{
my $refR = shift;
my $index = shift;
foreach $lnbr (@localN)
{
if ($lnbr->{'m_IfIndex'} eq $index)
{
print $lnbr->{'m_IfIndex'}, $index, "\n";
print "$lnbr->{'m_IpAddress'}connected to $refR->{m_IpAddress}\n";
$TestNE->AddRemoteNeighbour($lnbr, $refR);
}
}
}
The following list explains specific numbered items in the previously listed IP routing discovery agent Perl
program:
1. This section of code finds the appropriate local neighbor to connect the remote neighbor to.
--
-- The following fields are used to initialize the config GUI
-- and update DiscoAgents.cfg when the agent is first installed
-- The DiscoAgentDescription keyword provides a way to describe
-- the discovery agent. The CustomPerlAgent is used as an example.
DiscoAgentDescription("Agent description goes here.");
DiscoAgentGUILocked( 0 );
DiscoAgentClass( 0 );
DiscoAgentIsIndirect( 0 );
DiscoAgentPrecedence( 2 );
DiscoAgentEnabledByDefaultOnPartial( 0 );
DiscoAgentEnabledByDefault( 0 );
DiscoAgentDefaultThreads( 1 );
DiscoAgentMediationFilter
{
// Optional section containing filters for the mediation layer.
}
}
The following list explains specific items in the Agent Definition File template:
• Discovery agent type section
Specifies the agent type. The template specifies the keyword DiscoCompiledAgent that denotes
a compiled discovery agent. This compiled agent has a corresponding shared library in the
$NCHOME/precision/lib directory. Possible other values include DiscoDefinedAgent and
DiscoCombinedAgent.
This section is required.
• Optional "ncp_ctrl" information section
Specifies ncp_ctrl information. This control information defines when and from what server or
computer the discovery agent is to be run. If this line is omitted, the discovery agent will be run on
the same server or computer as the DISCO process. Replace Machine Name with the name of the server
or computer on which the discovery agent is to be run.
This section is optional.
• Devices that should be sent to this agent section
Specifies the devices that should be sent to the discovery agent. Replace "Filter Expression" with valid
values that include a range or list of IP addresses to include or exclude, along with a range or list of
OIDs to include or exclude. The default is ALL.
This section is required.
The following is an example:
DiscoAgentSupportedDevices
(
"(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.5\.'
)
OR
(
(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.1\.'
)
AND
(
m_Description NOT LIKE
'IOS \(tm\) C2900XL Software \(C2900XL-C3H2S-M\),
Version 12.0\(5.3\)WC\(1\), MAINTENANCE INTERIM SOFTWARE'
AND
m_ObjectId <> '1.3.6.1.4.1.9.1.576'
AND
m_ObjectId <> '1.3.6.1.4.1.9.1.577'
AND
m_ObjectId <> '1.3.6.1.4.1.9.1.577'
AND
m_ObjectId <> '1.3.6.1.4.1.9.1.619'
)
)"
);
--
-- During which of the n discovery phases should this agent complete?
--
DiscoAgentCompletionPhase( 3 );
#
# Begin a serialised section of execution within the Perl agent
#
$agent->LockThreads();
#
# It is important not to have any fatal errors that could prevent the
# threads getting unlocked again so wrap the following in an eval block.
#
eval
{
… only one agent thread executing here at any given time ..
}
if ($@)
{
warn "Error: $@\nWhen executing serialised block\n";
}
#
# Unlock to allow other threads a chance to execute the above section
#
$agent->UnLockThreads();
Note: It may be possible to use a non-thread safe Perl module within such a serialized section of the
discovery agent. However, no guarantees can be made and results may vary with different modules. So if
the results are not successful then the discovery agent may still need to be restricted to a single thread.
DiscoAgentDefaultThreads( 10 );
Note: In order for a Perl discovery agent to use multiple threads, a DiscoAgentDefaultThreads
entry must be defined in its agent definition file. If such an entry does not exist, then the value of the
m_NumThreads attribute in the DiscoAgents.cfg configuration file will be ignored.
#!/opt/netcool/precision/Solaris2/bin/ncp_perl
use strict;
use RIV;
use RIV::Param;
use RIV::App;
use RIV::OQL; 1
The following list explains specific numbered items in the previously listed Perl script example:
1. Declare the Perl API modules to use in the oql_example.pl script. This script makes use of the
RIV, RIV::Param, RIV::App, and RIV::OQL modules. The oql_example.pl script also makes
use of the use strict pragma. The use strict pragma enforces good programming practices,
including enforcing the declarations of any new variables with my.
2. Creates and initializes a new Param object. If the Param object cannot be created the script stops.
In this call to the RIV::Param constructor, no arguments are specified. This means that there are no
application-specific command line arguments. However, the standard command line arguments that
the RIV::Param module provides are available once the Param object is created.
3. Creates a new client/server application object using the RIV::App constructor. This call to the
RIV::App constructor takes two parameters:
• RIV::Param — Specifies a RIV::Param object reference. This object was returned to $param by
the RIV::Param constructor.
• $progname — Specifies a string that uniquely identifies this application. By convention, the
application name should start with ncp_. In the example, the specified application name is
ncp_test:oql.
If the client/server application object cannot be created, the script stops.
4. Creates a new OQL object on the service type Disco. If the OQL object fails to create, the script stops.
5. Opens and reads the file /etc/hosts using the name INPUT as a file handle.
6. Initializes variables.
7. Ignores lines beginning with # or -- characters.
8. Browse each line and get the IP address and name, filtering out any spaces in between.
9. Checks the validity of the IP address.
10. If the IP address is valid, the value pairs m_Creator, m_Name, and m_IpAddress are put in the
%record hash.
11. Inserts the record in the despatch table of the finders database.
12. After the loop completes, prints to standard output the number of records input into the
finders.despatch table. The finders database is defined in the DiscoSchema.cfg file.
See the IBM Tivoli Network Manager IP Edition Administration Guide for information about the finders
database.
# $PRECISION_HOME/bin/ncp_perl
use RIV;
use RIV::Param;
use RIV::App;
use RIV::OQL; 1
my %insert_rec; 10
$insert_rec{EntityName} = "'foo'";
$insert_rec{Description} = "'This is a router'";
$oql->CreateDB("PerlDB"); 12
The following list explains specific numbered items in the previously listed Perl script example:
1. Declare the Perl API modules to use in the OQL example script. This script makes use of the RIV,
RIV::Param, RIV::App, and RIV::OQL modules.
2. Reads and parses the command line. The standard arguments are hidden.
3. Creates a new RIV application object. If the creation of this object fails, the script stops.
4. Creates an OQL object with service Model. If the creation of this object fails, the script stops.
5. Inserts a record into MODEL using the Send method.
6. Determines what records there are in the MODEL database using the Send method.
7. Gets and prints the records.
8. Determines what records there are in the MODEL database using the Select method.
9. Deletes the record using the Delete method.
10. Inserts a new record.
11. Checks if the records were deleted or inserted.
12. Creates a database called PerlDB.
13. Creates a table in the PerlDB with columns m_IpAddress and m_Name.
14. Inserts a record into the PerlDB database.
15. Selects the entries in the user defined database to verify that the database table has been created
and the record inserted.
SnmpGetNext and The caller specifies a valid IP address These methods retrieve an
AsyncSnmpGetNext for the particular device and a MIB table entire MIB table that contains
of interest. These methods return the multiple variables (for example,
specified MIB table for the specified ifTable).
device.
SnmpGetBulk and The caller specifies a valid IP address These methods retrieve
AsyncSnmpGetBulk for the particular device and the MIB multiple MIB variables (for
variables of interest. These methods example, ifDescr, ifType, and
return the specified MIB variables for ifSpeed).
the specified device.
#!$NCHOME/bin/ncp_perl
use strict; 1
use RIV;
use RIV::Param;
use RIV::App;
use RIV::SnmpAccess; # qw (RivSnmpResultOk); 2
$RIV::SnmpAccess::MaxAsyncConcurrent = 40; 3
my $Ttype = "TEST"; 4
my $Verbose;
my @_Usage = ("node" [async]);
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Declares the strict pragma with the use directive. The strict pragma enforces good programming
practices, including enforcing the declarations of any new variables with my.
2. Specify the use directive to declare the Perl API modules to be used. In this case, use the RIV,
RIV::Param, RIV::App, and RIV::SnmpAccess modules.
3. Sets the MaxAsyncConcurrent RIV::SnmpAccess module variable to the value 40. This module
variable sets the maximum number of concurrent asynchronous SNMP get requests.
4. Declare the following my variables:
• $Ttype — Stores a string that identifies whether the SNMP GET access is synchronous or
asynchronous. Later sections of the SNMP GET access example script use this variable in calls to
the print operator. The variable gets set initially to the string TEST.
• $Verbose — Specifies how the script progress details are to be displayed. The -v option displays
verbose progress details. This variable is defined with the RIV::Param module, specifically with the
Usage method.
• @_Usage — Specifies the usage string suffixes node and async.
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Creates and initializes a new RIV::Param object by calling the RIV::Param constructor.
Note: The standard arguments (for example, -domain, -debug, and so forth) are hidden.
2. If the constructor fails to create and initialize the new RIV::Param object, consider this a fatal error
and call the die function. The die function prints out an appropriate message (in this case, that the
RIV::Param constructor failed) to the standard error stream.
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Creates and initializes a new RIV::App object by calling the RIV::App constructor. This call to the
RIV::App constructor takes the following parameters:
• RIV::Param — Specifies a reference to a RIV::Param object. In this example, the newly created
RIV::Param object is returned to the my $param variable in a previous call to the RIV::Param
constructor.
• $progname — Specifies a string that uniquely identifies an application. In this example, the
application name is identified by the string ncp_test:snmp.
2. If the constructor fails to create and initialize the new RIV::App object, consider this a fatal error
and call the die function. The die function prints out an appropriate message (in this case, that the
RIV::App constructor failed) to the standard error stream.
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Creates and initializes a new RIV::SnmpAccess object by calling the RIV::SnmpAccess constructor.
Upon successful completion, the RIV::SnmpAccess constructor returns a RIV::SnmpAccess object
to the my $snmp variable.
This call to the RIV::SnmpAccess constructor takes the following parameter:
• $rivSession — Specifies a reference to RIV::App object returned in a previous call to the
RIV::App constructor. In this example, the newly created RIV::App object is returned to the my
$app variable in a previous call to the RIV::App constructor.
2. If the constructor fails to create and initialize the new RIV::SnmpAccess object, consider this a fatal
error and call the die function. The die function prints out an appropriate message (in this case, that
the RIV::Snmp constructor failed) to the standard error stream.
my $nodeIP = $node; 1
if ($node !~ /^\d+\.\d+\.\d+\.\d+$/) { 2
$nodeIP = gethostbyname($node); 3
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Assigns the value stored in the my $node variable to the my $nodeIP variable. The my $node
variable was set after the call to the RIV::Param constructor.
See “RIV::Param Constructor” on page 225 for more information.
2. Determines if an IP address or node (host) name was specified.
3. Gets the IP address from the node name by calling the gethostbyname and inet_ntoa functions.
4. If the defined function verifies that the value in $nodeIP is undef, consider this a fatal error and call
the die function. The die function prints out an appropriate message (in this case, that the IP address
for this device cannot be found) to the standard error stream.
if ($what =~ /async/) { 1
$Ttype = "ASYNCTEST";
AsyncTests();
exit 0;
SyncTests(); 2
exit 0;
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Checks the input parameter to determine if the asynchronous tests (using the asynchronous SNMP
GET requests) should be run.
2. By default, the synchronous tests (using the synchronous SNMP GET requests) should be run.
sub AsyncTests {
my $sTag = "GETNEXT_$node"; 1
print "$Ttype: call AsyncSnmpGetNext($sTag, $nodeIP, \"\", \"ifDescr\")\n";
$sTag = "GET_$node"; 3
sub SyncTests {
PrintVarOp($vap);
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Performs an SNMP GETNEXT synchronous request (by calling the SnmpGetNext method).
2. Performs an SNMP GET synchronous request (by calling the SnmpGet method).
3. Performs an SNMP GETBULK synchronous request (by calling the SnmpGetBulk method).
sub PrintVarOp { 1
my ($vp) = @_;
my $asn1 = $vp->{ASN1};
my $value = $vp->{VALUE};
my ($oid, $index, $name) = $snmp-> SplitOidAndIndex ($asn1);
print "$Ttype: $name.$index = $value\n";
}
The following list explains specific numbered items in the previously listed section of the SNMP GET
access Perl script example:
1. Prints the SNMP varops.
Listener applications
A Listener is an application written for a specific Network Manager database. The purpose of a Listener is
to "listen" and respond to record events that occur in the associated database.
Record events in the database include updates to existing records, additions of new records, and
deletions of existing records. A Listener application can process these record events in order to:
• Update an external database
• Send email to an appropriate administrator or end user based on the event type
• Integrate with a variety of third-party products or applications
Users of the Perl API can also make use of the mail modules (for example, Mail::Mailer) to email
database record events. Listener applications, through the RIV::OQL module, can send a stream of data
into HTML, CGI scripts, and XML data.
Note: Communication with external databases — such as, Oracle® or Sybase® — can be done using the Perl
DBI module.
In the record received from the Listener there is a tag for Action Type that defines the action
performed. For example, a record returned with an action type of 2 indicates that the listener had picked
up a record deletion. The actions are summarized in the table below.
Note: The listener must be associated with a subject. For example, to listen to events the subject must be
ITNM/EVENT/NOTIFY.
use RIV;
The following list explains specific numbered items in the previously listed section of the Listener Perl
script example:
1. Declare the Perl API modules to be used with the use directive, specifically, RIV, RIV::Param, and
RIV::App.
$param = RIV::Param::new(); 1
The following list explains the specific numbered item in the previously listed section of the Listener Perl
script example:
1. Creates and initializes a new RIV::Param object by calling the RIV::Param constructor. Upon
successful completion, the RIV::Param constructor returns a RIV::Param object to the $param
variable. This RIV::Param object is then passed as a parameter to the RIV::App constructor.
The following list explains the specific numbered item in the previously listed section of the Listener Perl
script example:
1. Creates and initializes a new RIV::App object by calling the RIV::App constructor. This call to the
RIV::App constructor takes the following parameters:
• RIV::Param — Specifies a reference to a RIV::Param object. In this example, the newly created
RIV::Param object is returned to the $param variable in a previous call to the RIV::Param
constructor.
• $progname — Specifies a string that uniquely identifies an application. In this example, the
application name is identified by the string model_listener.
Bind the RIV::App object to the message broker subject for Listener
Network Manager uses the message broker publish and subscribe messaging system to enable processes
to communicate with each other. This section of the Listener example script binds the newly created
RIV::App object to message broker. Use this part of the example script as a guide to binding RIV::App
objects to message broker.
The Listener example script binds the newly created RIV::App object to message broker as follows.
See the IBM Tivoli Network Manager IP Edition Administration Guide for more information on message
broker.
$ok = $app->RIV::AddSubject('ITNM/MODEL/NOTIFY','model'); 1
print $ok, "\n"; 2
open(LOGFILE, ">>model.log)"; 1
while(1){ 2
my ($tag, $data) = $snmp->GetResult(-1);
foreach $key (@$data){
foreach $rec (keys %$key){
{
print LOGFILE "$rec : $key->{$rec}","\n"; 3
}
}
}
The following list explains the specific numbered items in the previously listed section of the Listener Perl
script example:
1. Calls the open operator to open the file handle LOGFILE for output (or appending) to the new (or
existing) file model.log.
2. Sets up a while loop that executes until all inserted, deleted, and updated database records are
processed and written to the model.log file.
3. Writes the desired information to the model.log file. However, if you want to send the information
to a third-party database management application, such as Sybase or Oracle, or a trouble-ticketing
system, such as ClearQuest®, use the Perl DBI module. To accomplish this, replace this line of code
with the DBI connect method and then send the information.
Chapter 9. Writing and integrating Perl applications with third-party products 163
use DBI; 1
.
.
.
$dbname = 'modelEntities'; $user = 'foo'; 2
$password = 'foobar'; $dbd = 'Oracle';
$dbh = DBI->connect($dbname, $user, $password, $dbd);
. . .
. . .
$dbh->do($statement);
The following list explains the specific numbered items in the previously listed section of the Listener Perl
script example:
1. Declares use of the Perl DBI module. See the Perl DBI documentation for more information.
2. Sets up the appropriate code to send database information to the Oracle database. Note the use of the
DBI connect method.
Synopsis
# Add an IO handle
$ok = $rivSession->AddIoHandle($fileHandle, $tag);
# Call the two versions of the PublishMessage virtual methods. Note that
# $rivSession stores the application object returned in a previous call
# to the RIV::Agent or RIV::App constructor.
$ok = $rivSession->PublishMessage($subject, $message);
$ok = $rivSession->PublishMessage($subject, $refHash);
# Fetch a row
my $dat = $app->RIV::FetchRow($rsKey)
# Remove an IO Handle
$ok = $rivSession->RemoveIoHandle($fileHandle, $tag);
# Remove a subject
$ok = $rivSession->RemoveSubject($subject, $isRaw);
AddIoHandle
The AddIoHandle virtual method adds the file or socket handle to the I/O list.
Parameters
$fileHandle
Specifies the file or socket handle.
$tag
Specifies the tag to be appended to "USER_" and to be associated with the messages.
Description
The AddIoHandle virtual method adds the file or socket handle specified in the $fileHandle parameter to
the I/O list. When the file descriptor is available for reading, the tag "USER_$tag" is returned to the Perl
application through a call to the RIV::GetResult() function.
Example Usage
$app->AddIoHandle(STDOUT, "test");
Returns
Upon completion, the AddIoHandle virtual method returns:
• 0 (zero) — The attempt to add the file or socket handle to the I/O list was unsuccessful.
• 1 — The attempt to add the file or socket handle to the I/O list was successful.
See Also
• “RIV::Agent module reference” on page 187
AddSubject
The AddSubject virtual method binds the application to the specified message broker subject.
Parameters
$subject
Specifies the message broker subject to which AddSubject binds the application.
$tag
Specifies the tag to be appended to "USER_".
Description
The AddSubject virtual method:
• Binds the application to the message broker subject specified in the $subject parameter.
• Appends the tag specified in the $tag parameter to "USER_". The "USER_$tag" messages are returned
in a call to the RIV::GetResult() function.
The subject is automatically appended with the domain in order to limit messages to purely those for the
current domain.
Example Usage
The following example assumes a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
Returns
Upon completion, the AddSubject virtual method returns:
• 0 (zero) — The attempt to bind the application to the message broker subject was unsuccessful.
• 1 — The attempt to bind the application to the message broker subject was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::RivDebug” on page 185
• “RIV::GetResult” on page 178
Parameters
$timerVal
Specifies the time interval, in milliseconds, between timer events.
$tag
Specifies the tag to be appended to "USER_".
$isRepeat
Specifies the type of timer to create. The value 0 (zero) creates a single-shot timer and the value 1
creates a repeating timer.
Description
The AddIimer virtual method:
• Creates a single-shot or repeating timer, depending on the value passed to the $isRepeat parameter.
The value of the $timerVal parameter specifies the interval, in milliseconds, between the timer events.
• Appends the tag specified in the $tag parameter to "USER_". The timer events are returned to the Perl
application as "USER_$tag" messages through a call to the RIV::GetResult function.
Example Usage
The following example assumes a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
Returns
Upon completion, the AddTimer virtual method returns:
• 0 (zero) — The attempt to create a single-shot or repeating timer was unsuccessful.
• 1 — The attempt to create a single-shot or repeating timer was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::RivDebug” on page 185
• “RIV::GetResult” on page 178
Variable Synopsis
$RIV::DebugLevel
Description
The RIV module provides access to the global Network Manager debugging level setting through the
$RIV::DebugLevel variable. Changing the value of this variable will affect all debugging output. The
default value is 0 (zero).
Typically, you use this variable with the following RIV module function:
• RIV::RivDebug
See Also
• “RIV::RivDebug” on page 185
DecryptPassword
The DecryptPassword virtual method decrypts the specified encrypted password.
Synopsis
DecryptPassword($encPwd)
Parameters
$encPwd
Specifies the encrypted password to be decrypted.
Description
The DecryptPassword virtual method decrypts the encrypted password specified in the $encPwd
parameter. You previously encrypted this password in a call to the EncryptPassword virtual method.
Note that the encryption key must be the same as that used to encrypt the original password.
Example Usage
$txtPwd = RIV::DecryptPassword($encPwd);
Returns
Upon completion, the DecryptPassword virtual method returns the plain text password or undef if an
error occurred.
See Also
• “EncryptPassword” on page 170
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
Synopsis
EncryptPassword($txtPwd)
Parameters
$txtPwd
Specifies the plain text password to be encrypted.
Description
The EncryptPassword virtual method encrypts the plain text password specified in the $txtPwd
parameter.
Example Usage
$encPwd = RIV::EncryptPassword($txtPwd);
Returns
Upon completion, the EncryptPassword virtual method returns an encrypted and ASCII encoded
representation of the specified plain text password or undef if an error occurred.
See Also
• “DecryptPassword” on page 169
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
Latency
The Latency virtual method sets or retrieves the timeout for queries.
Parameters
$timeoutMilliseconds
Specifies the timeout, in milliseconds, for the queries. This is an optional parameter and if omitted
(that is, no timeout is specified) it returns the value of the timeout.
Description
The Latency virtual method:
• Sets a timeout, in milliseconds, for queries if a timeout value is passed to the $timeoutMilliseconds
parameter. The value passed to $timeoutMilliseconds cannot be the undef value.
• Returns the timeout, in milliseconds, for queries if the $timeoutMilliseconds parameter is omitted (that
is, no timeout is specified). If an acknowledgement is not received within this time, further requests are
Example Usage
The following examples assume a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
The following example shows a call with no $timeoutMilliseconds parameter specified:
$latency = $app->Latency();
The following example shows a call with the $timeoutMilliseconds parameter specified:
$app->Latency(1000);
Returns
Upon completion, the Latency virtual method returns the timeout, in milliseconds, if the
$timeoutMilliseconds parameter is omitted.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RetryLimit” on page 175
• “RIV::RivDebug” on page 185
MessageLevel
The RIV module provides access to the global Network Manager logging level setting through the
$RIV::MessageLevel variable.
Variable Synopsis
$RIV::MessageLevel
Description
The RIV module provides access to the global Network Manager logging setting through the
$RIV::MessageLevel variable. Changing the value of this variable will affect all logging output.
Typically, you use this variable with the following RIV module function:
• RIV::RivMessage
See Also
• “RIV::RivMessage” on page 187
Parameters
$tag
Specifies the tag to be associated with the input message.
$data
Specifies the data in the message.
Description
The PostInput virtual method adds the input message specified in the $data parameter to the queue
along with the associated tag specified in the $tag parameter.
Example Usage
The following example assumes a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
$app = RIV::App::new(.......);
$app->PostInput("myTag", "test data");
Returns
Upon completion, the PostInput virtual method returns:
• 0 (zero) — The attempt to add the input message to the queue was unsuccessful.
• 1 — The attempt to add the input message to the queue was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::RivDebug” on page 185
PublishMessage
The PublishMessage virtual method publishes the specified message string.
Parameters
$subject
Specifies the unqualified Network Manager subject used for message broker messaging.
$message
Specifies a valid ASCII message string.
Example Usage
The following example assumes a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
Returns
Upon completion, the PublishMessage virtual method returns:
• 0 (zero) — The attempt to publish the specified message was unsuccessful.
• 1 — The attempt to publish the specified message was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::RivDebug” on page 185
• “PublishMessage” on page 173
PublishMessage
The PublishMessage virtual method encodes the hash reference into a message broker message.
Parameters
$subject
Specifies the unqualified Network Manager subject used for message broker messaging.
$refHash
Specifies a reference to a hash that contains the message to be sent.
Description
The PublishMessage virtual method encodes the hash specified in the $refHash parameter into a
message broker message and publishes it on the subject specified in the $subject parameter. The hash
passed to $refHash may be nested. The value passed to the $subject parameter must be unqualified,
that is, it must be without the .DOMAIN suffix.
Note: The message type and contents must be what the consumer is expecting. There is a chance that the
core processes will SIGSEGV if they receive unexpected data (for example, publishing a string message to
a NOTIFY subject).
Returns
Upon completion, the PublishMessage virtual method returns:
• 0 (zero) — The attempt to encode the hash and publish the specified message was unsuccessful.
• 1 — The attempt to encode the hash and publish the specified message was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::RivDebug” on page 185
• “PublishMessage” on page 172
RemoveIoHandle
The RemoveIoHandle virtual method removes the file handle $fielHandle from the I/O list.
Parameters
$fileHandle
Specifies the file or socket handle to be removed from the I/O list.
$tag
Specifies the tag to be associated with the messages.
Description
The RemoveIoHandle virtual method removes the file or socket handle that is specified in the
$fileHandle parameter from the I/O list.
Example Usage
$app->RemoveIoHandle(STDOUT "test");
Returns
Upon completion, the RemoveIoHandle virtual method returns:
• 0 (zero) — The attempt to remove the file or socket handle from the I/O list was unsuccessful.
• 1 — The attempt to remove the file or socket handle from the I/O list was successful.
RemoveSubject
The RemoveSubject virtual method removes the listener on the application to the Message Broker
subject $subject.
Parameters
$subject
Specifies the Message Broker subject from which to remove the listener.
$isRaw
Specifies whether the domain is appended to subject, or not.
• 0 — Add the domain to the subject.
• 1 — Do not add the domain to the subject.
Description
The RemoveSubject virtual method removes the listener on the application to the Message Broker
subject $subject. If $isRaw = 0 then the domain is appended to the subject to be removed.
Example Usage
$ok =$app->RIV::RemoveSubject('ITNM/MODEL/NOTIFY', 0);
Returns
Upon completion, the RemoveSubject virtual method returns:
• 0 (zero) — The attempt to remove the application from the subject was unsuccessful.
• 1 — The attempt to remove the application from the subject was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
RetryLimit
The RetryLimit virtual method sets the retry limit for queries or returns the maximum number of retries
for queries.
Description
The RetryLimit virtual method:
• Sets a retry limit for queries if a value is passed to the $retryLimit parameter.
• Returns the maximum number of retries for a specified query if the $retryLimit parameter is omitted
(that is, no retry limit is specified).
Example Usage
The following examples assume a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
The following usage example shows a call with no $retryLimit parameter specified:
$retry = $app->RetryLimit();
The following usage example shows a call with the $retryLimit parameter specified:
$app->RetryLimit(5);
Returns
Upon completion, the RetryLimit virtual method returns the maximum number of retries for a specified
query if the $retryLimit parameter is omitted.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::RivDebug” on page 185
RIV::FetchRow
The RIV::FetchRow method is used to fetch the next row from a results set retrieved by
RIV::GetResultSet() and returns undef if there are no more rows to return.
Synopsis
RIV::FetchRow([$rsKey])
Parameters
$rsKey
The results set key that was returned by the RIV::GetResultSet() method.
Description
The RIV::FetchRow method is used to fetch the next row from a results set retrieved by
RIV::GetResultSet() and returns undef if there are no more rows to return. Care must be taken
to iterate over all rows in the results set (even if the data is not required) otherwise the memory that is
allocated to hold remainder of the results set is not freed.
if ($rsKey)
{
while (my $dat = $app->RIV::FetchRow($rsKey))
{
# process data
}
}
Returns
Upon completion, the RIV::FetchRow method returns a Perl hash that represents the next row of the
results set, or undef if there is no more data.
See Also
• “RIV::Agent module reference” on page 187
• “RIV::App module reference” on page 211
• “RIV::GetResultSet” on page 180
RIV::GetInput
The RIV::GetInput function has been deprecated by RIV::GetResult. The documentation exists for
historical purposes only.
Synopsis
RIV::GetInput($waitTime [,$pattern])
Parameters
$waitTime
Specifies the time, in seconds, to wait before returning. If $waitTime is negative, RIV::GetInput
waits forever for the response.
$pattern
Specifies the pattern of tags that the user is interested in. Only messages with a matching tag will be
returned. All other messages will be left in the queue for retrieval at a later time. This parameter is
optional.
Description
The RIV::GetInput function provides a mechanism for synchronizing a single-threaded Perl application
with the multithreaded Network Manager platform. There is currently no support for direct interface with
Perl threads.
The normal usage of RIV::GetInput takes a single parameter to specify the number of seconds to wait
for input before returning. A value of 0 (zero) means "do not wait", and a negative value means "wait
forever".
Because Network Manager platform receives input either directly or indirectly through message broker,
the input data is placed on a FIFO together with its identifying tag. One input item is returned for each call
to RIV::GetInput. Items are returned as an array of size 3 containing the item tag, item tag value, and
the application domain (that is, the domain string specified in the call to RIV::App::new). For example:
Example Usage
($tag, $data, $domain) = RIV::GetInput(-1);
Returns
Upon successful completion, the RIV::GetInput function returns:
• $tag — The tag associated with the message.
• $data — The data associated with the tag. The $data value could be a string or a reference to any data
structure and will be interpreted based on the $tag value.
• $domain — The domain name. This return will only be of interest if multiple domains are running.
See Also
• “RIV::GetResult” on page 178
RIV::GetResult
The RIV::GetResult function provides the "standard" mechanism for synchronizing a single-threaded
Perl application with the multi-threaded Network Manager platform. There is currently no support for a
direct interface with Perl threads.
Synopsis
RIV::GetResult([$waitTime])
Parameters
$waitTime
Specifies the time, in seconds, to wait for input before returning. If $waitTime is negative,
RIV::GetResult waits forever for the response. This is an optional parameter that defaults to the
latency of the application.
Description
The typical call to the RIV::GetResult function takes a single parameter to specify the number of
seconds to wait for input before returning. A value of 0 (zero) means "do not wait" and a value of minus
If there is only one active RIV::App, the domain value may be ignored. However, if multiple RIV::App
objects have been created, the value of $domain must be used to determine the source of the input.
Value types depend on the item returned and must be interpreted in the context of the value of $tag. Tag
values are either specified in a call to create the input stream or are from a set of standard tags. User
specified tags are returned from RIV::GetResult() with the prefix "USER_". The following example
identifies the standard tags:
Example Usage
The following example assumes a previous call to the RIV::App constructor, which returns a client/
server application object to $app. A call could also be made to the RIV::Agent constructor, which
returns a discovery agent application object (typically, to $agent).
Returns
Upon successful completion, the RIV::GetResult function returns:
• $tag — The tag associated with the message.
• $data — The data associated with the tag. The $data value could be a string or a reference to any data
structure and will be interpreted based on the $tag value.
• $domain — The domain name. This return will only be of interest if multiple domains are running.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::GetInput” on page 177
• “RIV::RivDebug” on page 185
Synopsis
RIV::GetResultSet([$waitTime])
Parameters
$waitTime
Specifies the time, in seconds, to wait for input before it returns information. If $waitTime is
negative, RIV::GetResult waits forever for the response. This parameter is an optional parameter
that defaults to the latency of the application.
Description
Use the RIV::GetResultSet method to retrieve data from tables with large numbers of rows as the
RIV::GetResultSet method uses less memory than the RIV::GetResult() alternative. The results
set is cached and can be accessed by using only the key that is returned by this method. Therefore, care
must be taken to iterate over every row of the results set, even if the value is not required. Otherwise, the
memory that is used by the results set cannot be reclaimed by the script.
Example Usage
my $isSelect = 1;
$oql->Send($request, $isSelect);
my $rsKey = $app->RIV::GetResultSet();
if ($rsKey)
{
while (my $dat = $app->RIV::FetchRow($rsKey))
{
# process data
}
}
Returns
Upon completion, the RIV::GetResultSet method returns a scalar results set key that is passed to
RIV::FetchRow() to access the data within the results set.
See Also
• “RIV::Agent module reference” on page 187
• “RIV::App module reference” on page 211
• “RIV::GetResult” on page 178
RIV::InputFilter
The RIV::InputFilter function binds the function referenced by $function to input tags matching the
regular expression $pattern.
Synopsis
RIV::InputFilter($pattern [,$function]
[,$arg])
Description
The RIV::InputFilter function binds the function referenced by $function to input tags matching
the regular expression $pattern. Whenever the application program calls the RIV::GetResult function
and data with a matching tag is returned, the corresponding function is called instead of a return from
RIV::GetResult. If all input tags match one of the patterns passed to RIV::InputFilter, the
effect is as if the original call to RIV::GetResult never returned. The called function must not call
RIV::GetResult. Calling the RIV::InputFilter function with a value of undef for $function removes
the filter.
Example Usage
$ok = RIV::InputFilter("NE", $method1);
Returns
Upon completion, the RIV::InputFilter function returns:
• 0 (zero) — The attempt to bind the function referenced by $function was unsuccessful.
• 1 — The attempt to bind the function referenced by $function was successful.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::GetResult” on page 178
• “RIV::RivDebug” on page 185
RIV::InputQueueLength
The RIV::InputQueueLength function returns the number of items waiting in the application's input
queue.
Synopsis
RIV::InputQueueLength()
Parameters
None
Example Usage
$queue_length = RIV::InputQueueLength();
Returns
Upon successful completion, the RIV::InputQueueLength function returns the number of items
waiting in the application's input queue.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::GetResult” on page 178
• “RIV::RivDebug” on page 185
RIV::IsIpNotLoopBackOrMulticast
The RIV::IsIpNotLoopBackOrMulticast function returns true if the address parameter is a valid IP
address, and not a loop back or multicast address.
Synopsis
RIV::IsIpNotLoopBackOrMulticast($ipAddress)
Parameters
$ipAddress
Specifies the IP address that must be checked for validity.
Description
The RIV::IsIpNotLoopBackOrMulticast function returns true if the address passed to the
$ipAddress parameter is a valid IP address, and not a loop back or multicast address.
Example Usage
$result = RIV::IsIpNotLoopBackOrMulticast($ipAddress);
Returns
Upon completion, the RIV::IsIpNotLoopBackOrMulticast function returns:
• 0 (zero) — The IP address is not valid or the IP address is a loop back or multicast address.
• 1 — The IP address is valid.
See Also
• “RIV::Agent Constructor” on page 188
RIV::IsIpValid
The RIV::IsIpValid function returns true if the address parameter is a valid IP address.
Synopsis
RIV::IsIpValid($ipAddress)
Parameters
$ipAddress
Specifies the IP address that must be checked for validity.
Description
The RIV::IsIpValid function returns true if the address passed to the $ipAddress parameter is a valid
IP address. More specifically, the function checks if $ipAddress is a valid IPv4 or IPv6 address using the
functions specific to those address families.
Example Usage
$result = RIV::IsIpValid($ipAddress);
Returns
Upon completion, the RIV::IsIpValid function returns:
• 0 (zero) — The IP address is not valid.
• 1 — The IP address is valid.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::IsIpv4Valid” on page 183
• “RIV::IsIpv6Valid” on page 184
• “RIV::RivDebug” on page 185
RIV::IsIpv4Valid
The RIV::IsIpv4Valid function returns true if the address parameter is a valid IPv4 address.
Synopsis
RIV::IsIpv4Valid($ipAddress)
Parameters
$ipAddress
Specifies the IP address that must be checked for validity.
Example Usage
$result = RIV::IsIpv4Valid($ipAddress);
Returns
Upon completion, the RIV::IsIpv4Valid function returns:
• 0 (zero) — The IP address is not valid.
• 1 — The IP address is valid.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::IsIpValid” on page 183
• “RIV::IsIpv6Valid” on page 184
• “RIV::RivDebug” on page 185
RIV::IsIpv6Valid
The RIV::IsIpv6Valid function returns true if the address parameter is a valid IPv6 address.
Synopsis
RIV::IsIpv6Valid($ipAddress)
Parameters
$ipAddress
Specifies the IP address that must be checked for validity.
Description
The RIV::IsIpv6Valid function returns true if the address passed to the $ipAddress parameter is a
valid IPv6 address. More specifically, the function checks that the IP address is of the standard forms as
defined in RFC429.
Example Usage
$result = RIV::IsIpv6Valid($ipAddress);
Returns
Upon completion, the RIV::IsIpv6Valid function returns:
• 0 (zero) — The IP address is not valid.
• 1 — The IP address is valid.
RIV::ReadDir
The RIV::ReadDir function returns a reference to an array of filenames that reside in the specified
directory.
Synopsis
RIV::ReadDir($dirName)
Parameters
$dirName
Specifies the name of the directory to read.
Description
The RIV::ReadDir function returns a reference to an array of filenames that reside in the directory
specified in the $dirName parameter. The RIV::ReadDir function provides the same functionality as the
standard Perl readdir function. The RIV::ReadDir function is supplied to accommodate known issues
when trying to use readdir with ncp_perl on some Linux® platforms.
Example Usage
$fileListArrayRef = RIV::ReadDir($dirName);
Returns
Upon completion, the RIV::ReadDir function returns a reference to an array of filenames that reside in
the directory specified in the $dirName parameter.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
RIV::RivDebug
The RIV::RivDebug function prints a list of debug message strings to the standard output.
Synopsis
RIV::RivDebug($lvl,@debugMessageStrings)
Parameters
$lvl
Specifies the debug level. Specify a value of 1-4, where 4 represents the most detailed output.
Description
The RIV::RivDebug function prints the space-concatenated list of strings from the
@debugMessageStrings parameter to the standard output if the value of the $RIV::DebugLevel global
variable is equal to, or greater than, the value specified in the $lvl parameter.
Example Usage
RIV::RivDebug(4, "my debug message here");
Returns
Upon completion, the RIV::RivDebug function returns no records or values.
See Also
• “DebugLevel” on page 169
RIV::RivError
The RIV::RivError function provides a convenient way to display error messages.
Synopsis
RIV::RivError($class, @errorMessageStrings)
Parameters
$class
Specifies the name of the calling Perl API module (for example, RIV::App).
@errorMessageStrings
Specifies the error message string to be printed when an error occurs.
Description
The RIV::RivError function prints the error messages tagged with the name of the calling class
(RIV::*) and will integrate with the forthcoming trace package.
Example Usage
RIV::RivError("RIV::App", "An error has occurred");
Returns
Upon completion, the RIV::RivError function returns no records or values.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
• “RIV::RivDebug” on page 185
Synopsis
RIV::RivMessage($msglvl,@messageLevelStrings)
Parameters
$msglvl
Specifies the level of messages to be logged (the default is warn):
• debug
• info
• warn
• error
• fatal
@messageLevelStrings
Specifies the strings to be printed when the logging level is set.
Description
The RIV::RivMessage function prints the space-concatenated list of strings from the
@messageLevelStrings parameter to the standard output if the value of the $RIV::MessageLevel global
variable is equal to, or greater than, the value specified in the $msglvl parameter.
Example Usage
RIV::RivMessage("warn", "my messagelevel message here");
Returns
Upon completion, the RIV::RivMessage function returns no records or values.
See Also
• “MessageLevel” on page 171
RIV::Agent Constructor
The RIV::Agent constructor creates a Network Manager discovery agent with the specified name.
Constructor
new($param, $agentName)
Parameters
$param
Specifies a RIV::Param object that was returned in a previous call to the RIV::Param constructor.
Description
The RIV::Agent constructor creates a Network Manager discovery agent with an agent name as
specified in the $agentName parameter. This agent name resides in the domain as specified by the
$param parameter (that is, a RIV::Param object).
The RIV::Agent constructor uses the Transmission Control Protocol (TCP) to establish the necessary
connections to the Discovery Server and Helper Server. To ensure that the databases for the discovery
agent are created inside the Discovery Server, the $agentName.agnt file must be defined in the
$NCHOME/disco/agents directory before the Discovery Engine executable, ncp_disco, is started.
Example Usage
The following example:
• Calls the RIV::Param constructor and stores the return value (a RIV::Param object) in the $param
variable.
• Calls the RIV::Agent constructor and specifies a discovery agent name of foo_perl_disco_agent.
• Stores the return value (a RIV::Agent object) in the $agent variable.
Returns
Upon completion, the RIV::Agent constructor returns a RIV::Agent object. This object is associated
with the discovery agent specified in the $agentName parameter.
ExtGetTelnet
The ExtGetTelnet method is used to gather device data via telnet, rather than SNMP.
Method Synopsis
ExtGetTelnet($ne, $commandList, $accessCredentials)
Parameters
$ne
The device to issue the command on.
$commandList
An array of hashes that contain the extended commands.
$accessCredentials
An optional hash that contains the access credentials.
Description
The ExtGetTelnet method is used to gather device data via telnet, rather than SNMP.
Notes
The GetTelnet method issues the appropriate Telnet request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate Telnet request.
print Dumper($result);
Returns
Upon completion of the ExtGetTelnet method, an array of hashes from each telnet response is
returned.
GetDNSAllIpAddrs
The GetDNSAllIpAddrs method returns all IP addresses corresponding to a particular node name.
Method Synopsis
GetDNSAllIpAddrs($name)
Parameters
$name
Specifies the name of the node whose corresponding IP addresses are of interest.
Description
The GetDNSAllIpAddrs method returns all IP addresses corresponding to the node name specified in
the $name parameter.
Notes
The GetDNSAllIpAddrs method issues the appropriate DNS request to the Helper Server, which
performs the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method
can make the appropriate DNS request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
$refAllIpAddrs = $agent->GetDNSAllIpAddrs("foo");
print @$refAllIpAddrs;
Returns
Upon completion, the GetDNSAllIpAddrs method returns a reference to an array of IP addresses
corresponding to the specified node name.
GetDNSAllNames
The GetDNSAllNames method returns all node names corresponding to a specific IP address.
Method Synopsis
GetDNSAllNames($ipAddress)
Parameters
$ipAddress
Specifies the IP address whose corresponding node names are of interest.
Description
The GetDNSAllNames method returns all node names corresponding to the IP address specified in the
$ipAddress parameter. by issuing a DNS request to the Helper Server.
Notes
The GetDNSAllNames method issues the appropriate DNS request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate DNS request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
• Returns to the $refAllNames variable a reference to an array that contains all node names corresponding
to the IP address 1.2.3.4.
• Calls the print operator to send each node name in the list to standard output.
$refAllNames = $agent->GetDNSAllNames("1.2.3.4");
print @$refAllNames;
Returns
Upon completion, the GetDNSAllNames method returns a reference to an array of names corresponding
to a specific IP address.
Method Synopsis
GetDNSFirstIpAddr($name)
Parameters
$name
Specifies the name of the node whose first IP address in the corresponding list of IP addresses is of
interest.
Description
The GetDNSFirstIpAddr method returns the first IP address in the list of IP addresses corresponding
to the node specified in the $name parameter.
Notes
The GetDNSFirstIpAddr method issues the appropriate DNS request to the Helper Server, which
performs the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can
make the appropriate DNS request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
• Returns to the $ip variable the first IP address in the list of IP addresses corresponding to the node
called foo.
$ip = $agent->GetDNSFirstIpAddr("foo");
Returns
Upon completion, the GetDNSFirstIpAddr method returns the first IP address in the list of IP
addresses for the specified node. This IP address is a scalar value.
GetDNSFirstName
The GetDNSFirstName method returns the first node name in the list of node names for the specified IP
address.
Method Synopsis
GetDNSFirstName($ipAddress)
Parameters
$ipAddress
Specifies the IP address whose first node name in the corresponding list of node names is of interest.
Notes
The GetDNSFirstName method issues the appropriate DNS request to the Helper Server, which
performs the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method
can make the appropriate DNS request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
• Returns to the $name variable the first node name in the list of node names corresponding to the IP
address 1.2.3.1.
$name = $agent->GetDNSFirstName("1.2.3.1");
Returns
Upon completion, the GetDNSFirstName method returns the first node name in the list of node names
for the specified IP address. This node name is a scalar value.
GetIpArp
The GetIpArp method converts the specified MAC address to its corresponding IP address.
Method Synopsis
GetIpArp($macAddress)
Parameters
$macAddress
Specifies the MAC address to be converted to its corresponding IP address.
Description
The GetIpArp method converts the MAC address specified in the macAddress parameter to its
corresponding IP address.
Notes
The GetIpArp method issues the appropriate ARP request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ARP request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
• Returns to the $ip variable the IP address corresponding to the MAC address 00-0C-F1-56-98-AD.
Returns
Upon completion, the GetIpArp method returns the IP address corresponding to the specified MAC
address.
GetMacArp
The GetMacArp method converts the specified IP address to a MAC address.
Method Synopsis
GetMacArp($ipAddress)
Parameters
$ipAddress
Specifies the IP address to be converted to an associated MAC address.
Description
The GetMacArp method converts the IP address specified in the ipAddress parameter to an associated
MAC address.
Notes
The GetMacArp method issues the appropriate ARP request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ARP request.
Example Usage
The following example:
• Assumes a previous call to the RIV::Agent constructor, which returns a RIV::Agent object
(represented by $agent->).
• Returns to the $macAddress variable the MAC address corresponding to the IP address 1.2.3.1.
$macAddress = $agent->GetMacArp("1.2.3.1");
Returns
Upon completion, the GetMacArp method returns the MAC address corresponding to the specified IP
address.
GetMultTelnet
The GetMultTelnet method initiates a Telnet session on the specified network device and then
executes the specified Telnet commands on that network device.
Method Synopsis
GetMultTelnet($ne, $commandList)
Description
The GetMultTelnet method initiates a Telnet session on the network device specified in the $ne
parameter. It then executes the Telnet commands specified in the $commandList parameter on that
network device.
Notes
The GetMultTelnet method issues the appropriate Telnet request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate Telnet request.
Returns
Upon completion, the GetMultTelnet method returns an array of data corresponding to each Telnet
command executed during the Telnet session.
GetPingIP
The GetPingIP method issues a ping at the specified IP address to determine if a network device exists
at that address.
Method Synopsis
GetPingIP($ipAddress [, $protocol])
Parameters
$ipAddress
Specifies the IP address to be pinged.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The GetPingIP method pings the IP address specified in the ipAddress parameter. A network device that
exists at the specified IP address will respond to this ping request.
Notes
The GetPingIP method issues the appropriate ping request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
$device_exists = $agent->GetPingIP("1.2.3.1");
Returns
Upon completion, the GetPingIP method returns one of the following values:
• 0 (zero) — There is no network device at the specified IP.
• 1 — There is a network device at the specified IP address.
GetPingList
The GetPingList method issues a ping at the specified list of IP addresses to determine if network
devices exist at those addresses.
Method Synopsis
GetPingList($ipAddressList [, $protocol])
Parameters
$ipAddressList
Specifies the list of IP addresses to be pinged.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The GetPingList method pings the list of IP addresses specified in the ipAddressList parameter.
Network devices that exist at the specified IP addresses will respond to this ping request.
Notes
The GetPingList method issues the appropriate ping request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the GetPingList method returns a list that identifies whether the network devices
exist at the specified IP addresses. The following values are specified in the list:
• 0 (zero) — There is no network device at the specified IP.
• 1 — There is a network device at the specified IP address.
Method Synopsis
GetPingSubnet($subnet, $netMask [, $protocol])
Parameters
$subnet
Specifies the IP address of the subnet to be pinged. Typically, subnets are defined as all devices
whose IP addresses have the same prefix. Thus, all devices with IP addresses that start with 1.1.1
would be part of the same subnet.
$netmask
Specifies the mask used to determine the subnet to which an IP address belongs.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The GetPingSubnet method pings the subnet specified in the subnet parameter Network devices that
exist at the specified subnet will respond to this ping request.
Notes
The GetPingSubnet method issues the appropriate ping request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the GetPingSubnet method returns a list that identifies whether the network devices
exist at the specified subnet. The following values are specified in the list:
• 0 (zero) — There is no network device at the specified IP.
• 1 — There is a network device at the specified IP address.
GetTelnet
The GetTelnet method initiates a Telnet session on the specified network device and executes the
specified Telnet command on that network device.
Method Synopsis
GetTelnet($ne, $command, $regExp)
Description
The GetTelnet method initiates a Telnet session on the network device specified in the $ne parameter.
The GetTelnet method then executes the Telnet command specified in the $command parameter on
that network device.
Notes
The GetTelnet method issues the appropriate Telnet request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate Telnet request.
Returns
Upon completion, the GetTelnet method returns the data corresponding to the Telnet command
executed during the Telnet session. This data must meet the regular expression supplied in the $regExp
parameter.
GetTelnetCols
The GetTelnetCols method initiates a Telnet session on the specified network device and executes the
specified Telnet command on that network device.
Method Synopsis
GetTelnetCols($ne, $command, $regExpList, $colNameList)
Parameters
$ne
Specifies a reference to the network entity, in this case the network device on which to execute the
Telnet command specified in the $command parameter.
$command
Specifies the Telnet command to execute on the network device specified in the $ne parameter.
$regExpList
Specifies an array of regular expressions to apply to the response of the Telnet command specified in
the $command parameter.
$colNameList
Specifies an array of table columns.
Description
The GetTelnetCols method:
Notes
The GetTelnetCols method issues the appropriate Telnet request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate Telnet request.
Returns
Upon completion, the GetTelnetCols method returns the data corresponding to the Telnet command
executed during the Telnet session. This data must meet the regular expression supplied in the $regExp
parameter.
GetTraceRoute
The GetTraceRoute method traces a route to the specified destination IP address and returns the
network devices that reside on that route.
Method Synopsis
GetTraceRoute($ipAddress [, $protocol])
Parameters
$ipAddress
Specifies the destination IP address whose route is to be traced.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The GetTraceRoute method traces a route to the destination IP address specified in the ipAddress
parameter. Network devices that exist at the IP addresses on the route will respond to ping requests.
Notes
The GetTraceRoute method issues the appropriate ping request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the GetTraceRoute method returns a list of the devices that reside at IP addresses on
the route ending with the destination address specified in the $ipAddress parameter.
Method Synopsis
GetXMLRPCData($host, $port, $method, $methodArgArray)
Parameters
$host
Specifies the host address of the target device supporting XML-RPC calls.
$port
Specifies the port of the target device to which XML-RPC calls should be made.
$method
Specifies the XML-RPC method to call on the target device.
$methodArgArray
Holds the relevant arguments to the selected XML-RPC method call specified in the $method
parameter.
Description
The GetXMLRPCData method uses the XML-RPC Helper to perform the XML-RPC call specified in the
$method parameter on the target device specified in the $host and $port parameters. The call can be a
custom call or one of the calls defined in the published Network Manager Collector XML Schema.
Notes
The GetXMLRPCData method issues the request to the Helper Server, which performs the actual work.
Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the appropriate
XML-RPC request.
Returns
Upon completion, the GetXMLRPCData method returns the XML data with which the target device
responded. It is the responsibility of the caller to interpret this XML data.
GetXMLRPCEntityData
The GetXMLRPCEntityData method issues an XML-RPC call, through the XML-RPC Helper, on the
specified method. The Collector contacted will be that referenced in the supplied standard entity record
(that is, the .despatch record).
Method Synopsis
GetXMLRPCEntityData($ne, $method, $methodArgArray)
Parameters
$ne
Specifies a reference to the network entity record as received in the .despatch table of the
Collector supporting Agents. The target device’s host address and port will be extracted from the
data m_CollectorInfo within this record.
Description
The GetXMLRPCEntityData method uses the XML-RPC Helper to perform the XML-RPC call specified in
the $method parameter on the target device specified in the $ne parameter. The call can be a custom call
or one of the calls defined in the published Network Manager Collector XML Schema.
Notes
The GetXMLRPCEntityData method issues the request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate XML-RPC request.
Returns
Upon completion, the GetXMLRPCEntityData method returns the XML data with which the target device
responded. It is the responsibility of the caller to interpret this XML data.
LockThreads
The LockThreads method acquires a lock that only a single agent thread may hold at any given time.
Method Synopsis
LockThreads()
Parameters
None
Description
The LockThreads method provides a way for a discovery agent to acquire a lock that only a single agent
thread may hold at any given time. This means that the code within the locked section is serialized. You
should release the lock by calling the UnLockThreads method.
Example Usage
The following example shows a call to the LockThreads method followed by a call to the
UnLockThreads method to release the lock. The example assumes a previous call to the RIV::Agent
constructor, which returns a RIV::Agent object (represented by $agent->).
$agent->LockThreads();
#
# Serialised code goes here
#
$agent->UnLockThreads();
Returns
Upon completion, the LockThreads method does not return any values.
Method Synopsis
PingIP($ipAddress [, $protocol])
Parameters
$ipAddress
Specifies the IP address to be pinged.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The PingIP method pings the IP address specified in the ipAddress parameter. The method returns
without waiting for a response from the network device at that address.
Notes
The PingIP method issues the appropriate ping request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the PingIP method returns the value 1 to indicate that it successfully pinged the
device at the specified address. Otherwise, it returns the value 0 (zero).
PingList
The PingList method pings the specified list of IP addresses.
Method Synopsis
PingList($ipAddressList [, $protocol])
Parameters
$ipAddressList
Specifies the list of IP addresses to be pinged.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Notes
The PingList method issues the appropriate ping request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the PingList method returns the value 1 to indicate that it successfully pinged the
devices at the specified addresses. Otherwise, it returns the value 0 (zero).
PingSubnet
The PingSubnet method pings the specified subnet.
Method Synopsis
PingSubnet($subnet, $netMask [, $protocol])
Parameters
$subnet
Specifies the IP address of the subnet to be pinged. Typically, subnets are defined as all devices
whose IP addresses have the same prefix. Thus, all devices with IP addresses that start with 1.1.1
would be part of the same subnet.
$netmask
Specifies the mask used to determine the subnet to which an IP address belongs.
$protocol
Specifies an optional parameter that identifies the IP protocol. You can specify one of the following
values:
• 1 — Specifies Internet Protocol version 4 (IPv4).
• 3 — Specifies Internet Protocol version 6 (IPv6).
Description
The PingSubnet method pings the subnet specified in the subnet parameter. The method returns
without waiting for responses from the network devices that reside on the specified subnet.
Notes
The PingSubnet method issues the appropriate ping request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate ping request.
Returns
Upon completion, the PingSubnet method returns the value 1 to indicate that it successfully pinged the
devices at the specified subnet. Otherwise, it returns the value 0 (zero).
Method Synopsis
SendNEToDisco($entity, $lastRecTag)
Parameters
$entity
Specifies a reference to a hash list that contains the definition of the record to be sent to DISCO.
For convenience, the RIV::Record module is such a hash list that provides nested structures for
representing local and remote neighbors.
$lastRecTag
Specifies the record for the network entity according to the following values:
• 0 (zero) — Indicates that more records for this network entity are to follow.
• 1 — Indicates the last record for this network.
Note: If you use RIV::Record module objects, this parameter is ignored.
Description
The SendNEToDISCO method sends a processed $entity record object to the returns table of the
particular Agent database in DISCO. Typically, the $entity parameter is a RIV::Record module object
that contains information about local and remote neighbors.
Example Usage
$TestNE=new RIV::Record($data);
..
..
..
$agent->SendNEToDisco($TestNE,0);
Returns
None
SendNEToNextPhase
The SendNEToNextPhase method is called by discovery agents that accept data during multiple phases
of a network discovery operation. These "multi-phased" discovery agents call SendNEToNextPhase
when any data processing for a given phase (for example, phase 1) has been completed.
Method Synopsis
RIV::Agent::SendNEToNextPhase($entity)
Parameters
$entity
Specifies the network entity to be processed and then marked as having been processed for a specific
discovery phase.
Notes
You invoke the SendNEToNextPhase method on the RIV::Agent object returned in a previous call to
the RIV::Agent constructor. For example:
.
.
.
my $agent;
my $agentName = "CiscoSwitchInPerl";
.
.
.
$agent=new RIV::Agent($param, $agentName);
$agent->SendNEToNextPhase($TestNE);
.
.
.
.
.
.
my $agent;
my $agentName = "CiscoSwitchInPerl";
sub Init{
my $param=new RIV::Param();
$agent=new RIV::Agent($param, $agentName);
}
.
.
.
sub ProcessPhase($){
my $phaseNumber = shift;
if($RIV::DebugLevel >= 1)
{
print "Phase number is $phaseNumber\n";
}
}
sub ProcessPhase1($){
my $TestNE = shift;
.
.
.
BuildVlanData($TestNE);
my $refVlanIfIndex=$agent->SnmpGetNext($TestNE,'vlanIfIndex');
my $refLphysAddress=$agent->SnmpGetNext($TestNE,'ifPhysAddress');
.
.
.
$agent->SendNEToNextPhase($TestNE);
}
sub ProcessPhase2($){
my $TestNE = shift;
.
.
.
$agent->SendNEToNextPhase($TestNE);
}
sub ProcessPhase3($){
my $TestNE = shift;
.
.
.
$TestNE->{'m_LastRecord'}=1;
.
.
.
$agent->SendNEToDisco($TestNE,0);
}
The CiscoSwitchInPerl discovery agent sends back the data associated with this network entity.
Because there is no further processing required for this network entity, the CiscoSwitchInPerl
discovery agent:
• Sets the m_LastRecord to the value 1 to indicate the final token and to let the DISCO process know
that processing is complete for this network entity.
• Passes the value 0 (zero) as the second parameter in the call to SendNEToDisco. A multi-phased agent
receives a single network entity, but it may return to the DISCO process several records (one for each
local neighbor entry and one for each remote neighbor entry). The DISCO process determines that the
multi-phased discovery agent has finished processing a network entity when the value 0 is specified in
the call to SendNEToDisco to indicate the last record token.
Returns
Upon completion, the SendNEToNextPhase method returns no value.
See also
• “RIV::Agent Constructor” on page 188
• “SendNEToDisco” on page 204
Method Synopsis
SnmpGet($ne, $oid [,$instance, $communitySuffix] )
Parameters
$ne
Specifies a reference to the network entity. Typically, this network entity is a RIV::Record object.
$oid
Specifies a MIB variable (for example, ifIndex).
$instance
Specifies the instance of the MIB variable. This is an optional parameter.
$communitySuffix
Specifies the suffix to the community string. This is an optional parameter.
Description
The SnmpGet method retrieves the specified SNMP information for the network entity specified in the $ne
parameter.
Notes
The SnmpGet method issues the appropriate SNMP request to the Helper Server, which performs the
actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate SNMP request.
Example Usage
$varOp = $agent->SnmpGet($NE, 'sysDescr');
print "$varop->{ASN1}", "$varop->{VALUE}", "\n";
Returns
Upon completion, the SnmpGet method returns a varop that contains two key value pairs. The keys are
ASN1 and value. The ASN1 value is the index value after the OID corresponding to the MIB variable
is removed. It is a single number for MIB variables indexed on a single key and a dot notation for MIB
variables indexed by multiple keys.
Note: The ASN1 value obtained using the RIV::SnmpAccess module is the complete OID that needs to
be split, whereas the ASN1 value returned by the Helper Server is only the index part.
SnmpGetBulk
The SnmpGetBulk method retrieves SNMP GETBULK information from the Helper Server.
Method Synopsis
SnmpGetBulk($ne, $oidList, $nonRepeaters,maxRepeaters [,$communitySuffix] )
@oids=('sysDescr','sysContact','sysUpTime','ipInReceives',
'ipOutRequests','ipOutDiscards','ipForwDatagrams',
'tcpCurrEstab', 'ifDescr');
$oidList = \@oids;
$noRepeaters
Specifies the number of MIB values at the start of the array of MIB variables that return a single value.
For example, the 'sysDescr' MIB variable from the @oids array returns a single value.
$maxRepeaters
This parameter is for any MIB variable (for example, ifIndex) in the array of MIB variables that
returns a table. This parameter specifies the number of values in the table that are to be returned.
For example, the value 2 returns only the first two entries. If all the entries are to be returned,
$maxRepeaters is set to a large number.
$communitySuffix
Specifies the suffix to the community string.
Description
The SnmpGetBulk method retrieves SNMP GETBULK information for the network entity specified in the
$ne parameter.
Notes
The SnmpGetBulk method issues the appropriate SNMP request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate SNMP request.
Example Usage
@oids=('sysDescr','sysContact','sysUpTime','ipInReceives',
'ipOutRequests','ipOutDiscards','ipForwDatagrams','tcpCurrEstab',
'ifDescr');
($vap) = $agent->SnmpGetBulk($nodeIP, \@oids, 3, 100);
foreach my $varop (@{ $vap})
{
print "$varop->{ASN1}", "$varop->{VALUE}", "\n";
}
Returns
Upon completion, the SnmpGetBulk method returns a reference to a varop array. Each varop array
contains two key value pairs. The keys are ASN1 and VALUE. The ASN1 value is the index value after the
OID corresponding to the MIB variable is removed. It is a single number for MIB variables indexed on a
single key and a dot notation for MIB variables indexed by multiple keys.
Note: The ASN1 value obtained using the RIV::SnmpAccess module is the complete OID that needs to
be split, whereas the ASN1 value returned by the Helper Server is only the index part.
Method Synopsis
SnmpGetNext($ne, $oid [,$instance, $communitySuffix] )
Parameters
$ne
Specifies a reference to the network entity. Typically, this network entity is a RIV::Record object.
$oid
Specifies a MIB variable (for example, ifIndex).
$instance
Specifies the instance of the MIB variable. This is an optional parameter.
$communitySuffix
Specifies the suffix to the community string. This is an optional parameter.
Description
The SnmpGetNext method retrieves the specified SNMP information for the network entity specified
in the $ne parameter. If $instance is defined, the MIB sub-tree starting at that particular instance is
retrieved. The $instance parameter must be specified as an ASN1 string (for example, "5.3.15").
Notes
The SnmpGetNext method issues the appropriate SNMP request to the Helper Server, which performs
the actual work. Thus, the Helper Server (and ncp_ctrl) must be running so that this method can make the
appropriate SNMP request.
Example Usage
$varOpArray = $agent->SnmpGetNext($NE, 'ifDescr');
foreach my $varop (@{ $varOpArray})
{
print "$varop->{ASN1}", "$varop->{VALUE}", "\n";
}
Returns
Upon completion, the SnmpGetNext method returns a reference to a varop array. Each varop array
contains two key value pairs. The keys are ASN1 and VALUE. The ASN1 value is the index value after the
OID corresponding to the MIB variable is removed. It is a single number for MIB variables indexed on a
single key and a dot notation for MIB variables indexed by multiple keys.
Note: The ASN1 value obtained using the RIV::SnmpAccess module is the complete OID that needs to
be split, whereas the ASN1 value returned by the Helper Server is only the index part.
UnLockThreads
The UnLockThreads method releases the lock previously acquired in a call to the LockThreads
method.
Method Synopsis
UnLockThreads()
Description
The UnLockThreads method releases the lock previously acquired in a call to the LockThreads
method.
Example Usage
The following example shows a call to the LockThreads method followed by a call to the
UnLockThreads method to release the lock. The example assumes a previous call to the RIV::Agent
constructor, which returns a RIV::Agent object (represented by $agent->).
$agent->LockThreads();
#
# Serialised code goes here
#
$agent->UnLockThreads();
Returns
Upon completion, the UnLockThreads method does not return any values.
Constructor
new($domain, $progname [, $doHeartBeat])
Parameters
$domain
Specifies a Network Manager domain name.
Note: A default domain name is not supported.
RIV::Param
Specifies a RIV::Param object that was returned in a previous call to the RIV::Param constructor.
The RIV::Param object contains a parsed form of the command line arguments.
$progname
Specifies a parameter used when building fault-tolerant server groups. It must contain a string that
uniquely identifies the application. By convention, the application name should start with ncp_.
$doHeartBeat
Specifies an optional parameter that indicates whether the application generates a heartbeat signal. If
the application generates a heartbeat signal, set this parameter to a nonzero value.
Description
The RIV::App constructors create and initialize a new application session. The constructors differ in that
one takes a $domain parameter and the other takes a RIV::Param parameter.
Example Usage
#!$NCHOME/bin/ncp_perl
use RIV;
use RIV::App;
my $app = RIV::App::new("MYDOMAIN", "ncp_test");
...
undef $app;
Returns
Upon completion, the RIV::App constructors return a RIV::App object that encapsulates the new
application session.
See Also
• “RIV::Param Constructor” on page 225
# Call the Send method to send an OQL query to the specified database.
#
$oql->Send($oqlStatement, $returnResults);
#
# Call the CreateDb method to create a database in the Network Manager
# service specified in a previous call to the RIV::OQL constructor.
#
$oql->CreateDB($databaseName);
#
# Call the CreateTable method to create a table in the database.
#
$oql->CreateTable($databaseName, $tableName, \%columnNamesandTypes);
#
# Call the Insert method to insert records into a database table.
Constructor
new($rivSession, $rivService)
Parameters
$rivSession
Specifies a blessed reference to either a RIV::App or RIV::Agent object.
$rivService
Specifies the name of a service to indicate the internal database to which this OQL session interacts.
The following table identifies the available services to which to connect along with their corresponding
executable. For example, the service name Disco indicates that the OQL session will interact with the
DISCO databases that the ncp_disco executable creates.
Description
The RIV::OQL constructor creates and initializes a new RIV::OQL session object.
Example Usage
$app = new RIV::App();
$oql = new RIV::OQL($app, 'Disco');
Returns
Upon completion, the RIV::OQL constructor returns a RIV::OQL session object.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
Method Synopsis
Close()
Parameters
None.
Description
The Close method closes an OQL Client. If successful, the OQL client is undefined.
Example Usage
$oql->Close();
Returns
Upon completion, the Close method does not return any values.
See Also
• “RIV::OQL Constructor” on page 214
CreateDB
The CreateDB method creates a database.
Method Synopsis
CreateDB($databaseName)
Parameters
$databaseName
Specifies the name of the database to be created.
Description
The CreateDB method creates a database with the name $databaseName in the specified service. You
specified this service in the $rivService parameter in a previous call to the RIV::OQL constructor.
Example Usage
The following example shows how to create a new database, with the name foo, in the Disco service for
which an OQL session was created using the RIV::OQL constructor.
Returns
Upon completion, the CreateDB method does not return any records.
CreateTable
The CreateTable method creates a database table.
Method Synopsis
CreateTable($databaseName, $tableName, \%columnNames)
Parameters
$databaseName
Specifies the name of the database in which the table is to be created.
$tableName
Specifies the name of the table to be created.
\%columnNames
Specifies a hash list of the columns in the table. The keys in the hash list refer to the column name and
the values are one of the types supported by the OQL syntax.
Description
The CreateTable method creates a database table with the name specified in the $tableName
parameter in the database specified in the $databaseName parameter.
You created this database in previous calls to the:
• RIV::OQL constructor — You specified the name of a service (in the $rivService parameter) to indicate
the internal database to which this RIV::OQL session object interacts.
• CreateDB method — You specified the name of the database (in the $databaseName parameter) to be
created in the service specified in the call to the RIV::OQL constructor.
Example Usage
The following example shows how to create:
• A new database, with the name foo, in the Disco service for which a RIV::OQL session object was
created in a call to the RIV::OQL constructor.
• Column names (m_IpAddress and m_Name) and associated values to appear in the table.
• A table called bar.
Returns
Upon completion, the CreateTable method does not return any records.
See Also
• “RIV::OQL Constructor” on page 214
• “CreateDB” on page 215
Method Synopsis
Delete($databaseName, $tableName, $clause)
Parameters
$databaseName
Specifies the name of the database from which records are to be deleted.
$tableName
Specifies the name of the table in the specified database ($databaseName) from which records are to
be deleted.
$clause
Specifies any valid OQL comparative statement used as a condition for deleting records. If a record
matches $clause, the Delete method will delete it.
Description
The Delete method deletes records from the table specified in the $tableName parameter that resides
in the database specified in $databaseName parameter and that satisfy the criteria defined by the OQL
comparative statement specified in the $clause parameter.
You created this database and database table in previous calls to the:
• RIV::OQL constructor — You specified the name of a service (in the $rivService parameter) to indicate
the internal database to which this RIV::OQL session object interacts.
• CreateDB method — You specified the name of the database (in the $databaseName parameter) to be
created in the service specified in the call to the RIV::OQL constructor.
• CreateTable method — You specified the name of the database table (in the $tableName parameter)
to be created in the database specified in the call to the CreateDB method.
Example Usage
The following example shows how to delete records from:
• A database called ncimCache.
• A table called entityData.
The records to be deleted are those with a description equal to the value foo.
Returns
Upon completion, the Delete method does not return any records.
See Also
• “RIV::OQL Constructor” on page 214
• “CreateDB” on page 215
• “CreateTable” on page 216
Method Synopsis
Insert($databaseName, $tableName, \%record)
Parameters
$databaseName
Specifies the name of the database in which the record is to be inserted.
$tableName
Specifies the name of the table in the specified database ($databaseName) in which the record is to
be inserted.
\%record
Specifies a hash list that defines the record to be inserted.
Description
The Insert method creates an OQL statement that inserts the record defined by the hash list specified in
the \%record parameter into the database table specified in the $tableName parameter that resides in the
database specified in the $databaseName parameter.
You created this database and database table in previous calls to the:
• RIV::OQL constructor — You specified the name of a service (in the $rivService parameter) to indicate
the internal database to which this RIV::OQL session object interacts.
• CreateDB method — You specified the name of the database (in the $databaseName parameter) to be
created in the service specified in the call to the RIV::OQL constructor.
• CreateTable method — You specified the name of the database table (in the $tableName parameter)
to be created in the database specified in the call to the CreateDB method.
Example Usage
The following example shows how to insert the record specified in the \%record parameter in:
• A database called finders.
• A table called despatch.
Note:
The service used to create the RIV::OQL object ($oql->) in a previous call to the RIV::OQL constructor
has to be Disco.
Returns
Upon completion, the Insert method does not return any records.
See Also
• “RIV::OQL Constructor” on page 214
• “CreateDB” on page 215
Print
The Print method prints records obtained as a result of a database query.
Method Synopsis
Print($data)
Parameters
$data
Specifies a reference to an array of hash lists that represent the records obtained from the SELECT
statement.
Description
The Print method prints the records obtained as a result of a query.
Example Usage
The following example shows how to:
• Use the Select method to execute a SELECT statement.
• Use the RIV::GetResult method to specify the number of seconds to wait (in the example, 10
seconds) for input before returning.
• Print the data specified in $data.
$oql->Select('class','activeClasses', 'ALL');
my ($type, $data) = $oql->RIV::GetResult(10);
$oql->Print($data);
Returns
Upon completion, the Print method does not return any records.
See Also
• “RIV::GetResult” on page 178
Query
The Query method runs a query.
Method Synopsis
Query($queryString)
Parameters
$queryString
Is a string that contains the details of the query.
Description
The Query method is used to run a query by using the OQL client subject. Running a query clears any
results from a previous query.
Returns
Upon completion, the Query method does not return any values.
See Also
• “RIV::OQL Constructor” on page 214
• “QueryGetResult” on page 220
• “QueryGetResults” on page 221
QueryGetResult
The QueryGetResult method gets a single result from the Query command.
Method Synopsis
QueryGetResult()
Parameters
None.
Description
The QueryGetResult method gets a single result from the Query method. The QueryGetResult
method is commonly used when you don't want to process every result of the query into a Perl reference,
to prevent use of much memory. The QueryGetResult method can also be used where only a single
result is expected. Each time a result is retrieved it is removed from the result stack within the OQL client.
Example Usage
my $data = $oql->QueryGetResult();
if($data)
{
print "Got result.\n";
print Dumper($data);
}
else
{
print "Query $query returned nothing.\n";
}
Returns
Upon completion, the QueryGetResult method returns a hash reference that contains the details of the
returned record.
See Also
• “RIV::OQL Constructor” on page 214
• “Query” on page 219
• “QueryGetResults” on page 221
Method Synopsis
QueryGetResults()
Parameters
None.
Description
The QueryGetResults method gets all the results from a previously run Query method. This
QueryGetResults method is commonly used when you expect the query to return a limited number
of records. As each record is turned into a hash reference, it can use much memory. When the results are
retrieved, the results are no longer available within the OQL client.
Example Usage
my $queryData = $oql->QueryGetResults();
if($queryData)
{
$recCount = scalar(@$queryData);
Returns
Upon completion, the QueryGetResults method returns a reference to a hash list, which contains the
results of the query.
See Also
“RIV::OQL Constructor” on page 214
“Query” on page 219
“QueryGetResult” on page 220
Select
The Select method executes a specific OQL statement.
Method Synopsis
Select($databaseName, $tableName, $columnName)
Description
The Select method executes the following OQL statement:
When the $columnName parameter is set to ALL, the Select method executes the following OQL
statement:
You created this database and database table in previous calls to the:
• RIV::OQL constructor — You specified the name of a service (in the $rivService parameter) to indicate
the internal database to which this RIV::OQL session object interacts.
• CreateDB method — You specified the name of the database (in the $databaseName parameter) to be
created in the service specified in the call to the RIV::OQL constructor.
• CreateTable method — You specified the name of the database table (in the $tableName parameter)
to be created in the database specified in the call to the CreateDB method.
Example Usage
$oql->Select('class', 'activeClasses', 'ALL');
The results are obtained by using the RIV::GetResult method. For example:
Returns
The results are obtained by using the RIV::GetResult method.
See Also
• “RIV::GetResult” on page 178
• “RIV::OQL Constructor” on page 214
• “CreateDB” on page 215
• “CreateTable” on page 216
Method Synopsis
Send($statement, $returnResults)
Parameters
$statement
Specifies any valid OQL statement.
$returnResults
Specifies whether to return results. This parameter takes one of the following values:
• 1 – Specify the value 1 for database queries (for example, OQL statements such as select and
show) that return results.
• 0 – Specify the value 0 (zero) for database queries (for example, OQL statements such as insert,
update, and delete) that do not return results.
Description
The Send method provides a way to communicate with the databases. The $statement parameter
specifies any valid OQL statement that the Send method executes. The $returnResults parameter
indicates whether you are interested in the results of the OQL statement. For example, when an OQL
select statement is executed and you are interested in the results, the $returnResults parameter must
be set to the value 1. The RIV::GetResult method is used to receive the results.
Example Usage
$statement = "select * from ncimCache.entityData;";
$oql->Send($statement, 1);
my ($type, $data) = $oql->RIV::GetResult(10);
Returns
Upon completion, the Send method returns the results of the OQL statement. If you set $returnResults to
0 (zero), the Send method does not return any records.
See Also
• “RIV::GetResult” on page 178
• “Select” on page 221
Update
The Update method updates records that currently reside in the database.
Method Synopsis
Update($databaseName, $tableName, $setClause, $whereClause)
Parameters
$databaseName
Specifies the name of the database in which the record is to be updated.
Description
The Update method updates records that already reside in the database and database table specified in
the $databaseName and $tableName parameters, respectively. Calling the Update method is equivalent
to executing the following OQL statement:
You created this database and database table in previous calls to the:
• RIV::OQL constructor — You specified the name of a service (in the $rivService parameter) to indicate
the internal database to which this RIV::OQL session object interacts.
• CreateDB method — You specified the name of the database (in the $databaseName parameter) to be
created in the service specified in the call to the RIV::OQL constructor.
• CreateTable method — You specified the name of the database table (in the $tableName parameter)
to be created in the database specified in the call to the CreateDB method.
Example Usage
The following example does the following:
• Updates specific records in the table called entityData that resides in the database called
ncimCache.
• The specific records updated are those that have EntityName foo with a description foo.
Returns
Upon completion, the Update method does not return any records.
See Also
• “RIV::OQL Constructor” on page 214
• “CreateDB” on page 215
• “CreateTable” on page 216
RIV::Param Constructor
The RIV::Param constructor creates and initializes a new RIV::Param object.
Constructor
$param = RIV::Param::new([\%paramHash,\@usageStrings, \$helpMessage])
Parameters
\%paramHash
Specifies a reference to a hash used to specify application-specific command line arguments. Each
hash key (index) represents a command line switch and its associated hash value is an array with the
following elements:
• element 0 — Is a flags element that specifies a bitwise OR that indicates:
– Whether the command line switch takes an argument.
– Whether the switch is mandatory
The flags element makes use of the package constants described in “Package Constants” on page
226.
• element 1 — Is a scalar variable reference or undef value. You initialize the scalar variable
reference with the appropriate value (a parameter from the command line or 1).
The \%paramHash parameter is optional.
Package Constants
The RIV::Param constructor's \%paramHash parameter makes use of the following package constants:
• RivParamNoArg — Specifies that the command line parameter takes no arguments.
• RivParamSingleArg — Specifies that the command line parameter takes one argument.
• RivParamMandatory — Specifies that the command line parameter is mandatory, and that it is a fatal
error for the parameter to be missing.
• RivParamListArg — Specifies that the command-line parameters accepts a list of zero or more
values.
These constants are bit masks that can be ORed together where appropriate.
For example, RivParamMandatory | RivParamSingleArg specifies a mandatory parameter that
requires a single argument.
Description
The RIV::Param constructor creates and initializes a new RIV::Param object from the application-
specific command line arguments specified in the \%paramHash parameter. Each new RIV::Param
object also encapsulates the supported standard command line arguments. Thus, Network Manager
client/server and Agent applications can make use of these standard command line arguments in addition
to the application-specific command line arguments.
If you call the RIV::Param constructor without specifying any of the optional parameters, the new
RIV::Param object provides access to the standard command line arguments.
.
.
.
sub Init{
.
.
.
my $subject;
my $process = 'Model';
my $messageClass = 'NOTIFY';
my $verbose;
my %CmdLineArgs = (
"-subject" => [ RivParamSingleArg , \$subject ],
"-process" => [ RivParamSingleArg , \$process ],
"-messageClass" => [ RivParamSingleArg , \$messageClass ],
"-verbose" => [ RivParamNoArg, \$verbose ]
);
.
.
.
The following list provides brief descriptions of the application-specific command line arguments defined
in the %CmdLineArgs hash.
• -subject — Specifies a command line argument that takes one argument (as indicated by the
RivParamSingleArg package constant). This command line argument also specifies a reference to
a scalar value, \$subject. It is expected that a user would supply a specific subject on the command
line.
• -process — Specifies a command line argument that takes one argument (as indicated by the
RivParamSingleArg package constant). This command line argument also specifies a reference to
a scalar value, \$process. It is expected that a user would supply the specific process that is of
interest (for example, Class, Config, Event, and so forth) on the command line. The default process
is Model.
• -messageClass — Specifies a command line argument that takes one argument (as indicated by the
RivParamSingleArg package constant). This command line argument also specifies a reference to a
scalar value, \$messageClass. It is expected that a user would supply the class of messages that are
of interest (for example, QUERY, STATUS, and so forth) on the command line. The default message class
is NOTIFY.
• -verbose — Specifies a command line argument that takes no arguments (as indicated by the
RivParamNoArg package constant). This command line argument also specifies a reference to a scalar
value, \$verbose. It is expected that a user would specify this command line argument to explicitly
print out details of nested fields.
The following code defines a usage string called @Usage that provides information on how to use
the command line for this application. The @Usage array is passed as the second parameter to the
RIV::Param constructor:
.
.
.
my @Usage = (
"[-subject <subject> -process [Model|Disco|Ctrl|...]
-messageClass [NOTIFY|QUERY|...] "
);
The following code defines a string reference called $helpData that contains explanatory information
about the application-specific command line arguments and other pertinent information. The explanatory
information also includes descriptions of the standard command line arguments (-domain, -debug,
and -help). The $helpData string reference is passed as the third parameter to the RIV::Param
constructor:
my $helpData = "\n
The ITListener perl script is intended to listen on the supplied subject
and print out the messages received.
The process is capable of listening on any subject on the message broker bus
but will not decode the output beyond printing out the contents of the message.
/<subject>/<sub-subject>/<sub-sub-subject>/....
All ITNM IP subjects begin \'ITNM/\' and have the domain appended so the
model notify subject for domain TESTDOMAIN is
/ITNM/MODEL/NOTIFY/TESTDOMAIN
\n";
The following code shows the call to the RIV::Param constructor using the three previously defined
parameters: \%CmdLineArgs, \@Usage, and \$helpData. Note the call to the die function to exit the
script if the RIV::Param constructor fails to create a new RIV::Param object.
.
.
.
my $param = RIV::Param::new(\%CmdLineArgs, \@Usage, \$helpData);
die "Can't create RIV::Param" unless (defined $param);
.
.
.
Returns
Upon completion, the RIV::Param constructor returns a new RIV::Param object.
See Also
• “RIV::Agent Constructor” on page 188
CommandName
The CommandName method returns the name of the specified command.
Method Synopsis
RIV::Param::CommandName()
Parameters
None
Description
The CommandName method returns the name of the command specified on the command line.
Use the RIV::Param object returned in a previous call to the RIV::Param constructor to invoke the
CommandName method. For example: $param->CommandName.
Example Usage
The following code shows a call to the CommandName method. Note that the CommandName method is
invoked through the newly created RIV::Param object returned to the $param variable.
.
.
.
my $param = RIV::Param::new(\%cmdLineArgs, \@Usage, \$helpData);
die "Can't create RIV::Param" unless (defined $param);
.
.
.
my $command = $param->CommandName();
.
.
.
Returns
Upon completion, the CommandName method returns the name of the command specified on the
command line.
See Also
• “RIV::Param Constructor” on page 225
DomainName
The DomainName method returns the name of the specified domain.
Method Synopsis
RIV::Param::DomainName()
Description
The DomainName method returns the name of the domain specified on the command line for the
-domain standard command line argument.
Use the RIV::Param object returned in a previous call to the RIV::Param constructor to invoke the
DomainName method. For example: $param->DomainName.
Example Usage
The following code shows a call to the DomainName method. Note that the DomainName method is
invoked through the newly created RIV::Param object returned to the $param variable.
.
.
.
my $param = RIV::Param::new(\%cmdLineArgs, \@Usage, \$helpData);
die "Can't create RIV::Param" unless (defined $param);
.
.
.
die "ncp_disco must be running under domain ",
$param->DomainName(),
" - unable to query the disco.config table"
unless $dbData;
Returns
Upon completion, the DomainName method returns the name of the domain specified on the command
line for the -domain standard command line argument.
See Also
• “RIV::Param Constructor” on page 225
Usage
The Usage method writes a brief usage explanation to standard output.
Method Synopsis
RIV::Param::Usage($errorCode)
Parameters
$errorCode
Specifies either a status or the undef value. The status gets written to standard output.
Description
The Usage method writes a brief usage explanation to standard output and then exits with the status
specified in the $errorCode parameter, if defined. If you specified the undef value in the $errorCode
parameter, the Usage method returns to the caller.
Example Usage
The following code shows a call to the Usage method. In this example, an error code of 1 is passed. Note
that the Usage method is invoked through the newly created RIV::Param object returned to the $param
variable.
#
# Read and parse the command line, standard args are hidden
#
my $param = RIV::Param::new({
"-v" => [ $RIV::Param::NoArg, \$Verbose ],
}, \@_Usage);
die "RIV::Param::new failed" unless defined $param;
$param->Usage(1)
unless (defined $node && $node ne "");
Returns
Upon completion, the Usage method writes a brief usage message to standard output and the status
specified in the $errorCode parameter and simply exits. If the $errorCode parameter is set to the undef
value, the Usage method returns to the caller.
See Also
• “RIV::Param Constructor” on page 225
use RIV::Agent;
use RIV::Record;
my($tag, $data) = $agent->RIV::GetResult(-1);
if($tag eq 'NE'){
foreach $key (@$data){
$NE = RIV::Record::new($key);
RIV::Record Constructor
The RIV::Record constructor creates and initializes a new RIV::Record object.
Constructor
new($refNE)
Parameters
$refNE
Specifies a reference to a hash list. The hash list is the mechanism used to store network entity
records retrieved from the discovery engine, DISCO.
Description
The RIV::Record constructor creates and initializes a new RIV::Record object. This object stores
network entity records retrieved from DISCO.
Example Usage
The following code fragment illustrates a typical loop for receiving records from DISCO:
while (1){
my($tag, $data) = $agent->RIV::GetResult(-1);
# Get the network entities
print "TAG :", $tag, "\n";
if($tag eq 'NE'){
foreach $key (@$data){
$ne = new RIV::Record($key);
}
}
}
Returns
Upon completion, the RIV::Record constructor returns a RIV::Record object.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::GetResult” on page 178
AddLocalNeighbour
The AddLocalNeighbour method adds a local neighbor.
Method Synopsis
AddLocalNeighbour($refNbr)
Description
The AddLocalNeighbour method adds a local neighbor whose hash list reference is $refNbr.
Example Usage
$localNbr{'m_IpAddress'} = '1.2.3.4';
$localNbr{'m_IfIndex'} = 2;
$NE->AddLocalNeighbour(\%localNbr);
Returns
Upon completion, the AddLocalNeighbour method does not return any records.
AddLocalNeighbourTag
The AddLocalNeighbourTag method adds a tag (varBind) to a local neighbor.
Method Synopsis
AddLocalNeighbourTag($tag, $refVarOp)
Parameters
$tag
Specifies the key value for the varBind.
$refVarOp
Specifies a reference to an array of varops.
Description
The AddLocalNeighbourTag method adds to local neighbors a varBind whose key is defined by the
$tag parameter and the value defined by the $refVarOp parameter (a reference to an array of varops). The
key and value are added sequentially, that is, the values in the @$refVarOp array are assumed to be in
the same order as the local neighbor array. If local neighbors do not exist, then AddLocalNeighbourTag
creates them.
Example Usage
$refLifindex=$agent->SnmpGetNext($TestNE, 'ipAdEntIfIndex');
$TestNE->AddLocalNeighbourTag("m_IfIndex", $refLifIndex);
Returns
Upon completion, the AddLocalNeighbourTag method does not return any records.
See Also
• “RIV::Agent Constructor” on page 188
• “SnmpGetNext” on page 210
Method Synopsis
AddRemoteNeighbour($refLocalNbr, $refRemoteNbr)
Parameters
$refLocalNbr
Specifies a reference to the hash list that defines a local neighbor and to which list the remote
neighbor is to be added.
$refRemoteNbr
Specifies a reference to a hash list that defines the remote neighbor using a set of key value pairs
(varBinds).
Description
The AddRemoteNeighbour method adds a remote neighbor whose hash list reference is $refRemoteNbr
to the local neighbor whose hash list reference is $refLocalNbr.
Example Usage
$remoteNbr{'m_IpAddress'} = '1.2.5.6';
$NE->AddRemoteNeighbour($localNbr, \%remoteNbr);
Returns
Upon completion, the AddRemoteNeighbour method does not return any records.
AddRemoteNeighbourTag
The AddRemoteNeighbourTag method adds a tag (varBind) to a remote neighbor.
Method Synopsis
AddRemoteNeighbourTag($refLocalNbr, $tag, $refVarOp)
Parameters
$refLocalNbr
Specifies a reference to the local neighbor to which the remote neighbors are to be added.
$tag
Specifies the key value for the varBind.
$refVarOp
Specifies a reference to an array of varops.
Description
The AddRemoteNeighbourTag method adds to remote neighbors a varBind whose key is defined
by the $tag parameter and the value defined by the $refVarOp parameter (a reference to an array of
varops). The key and value are added sequentially, that is, the values in the @$refVarOp array are
assumed to be in the same order as the remote neighbor array. If remote neighbors do not exist, then
AddRemoteNeighbourTag creates them.
Example Usage
$refRifIndex = $agent->SnmpGetNext($TestNE,...);
$TestNE->AddRemoteNeighbourTag($refLocal, "m_IfIndex", $refRifIndex);
Returns
Upon completion, the AddRemoteNeighbourTag method does not return any records.
See Also
• “RIV::Agent Constructor” on page 188
• “SnmpGetNext” on page 210
GetLocalNeighbours
The GetLocalNeighbours method returns an array of local neighbors.
Method Synopsis
GetLocalNeighbours()
Parameters
None
Description
The GetLocalNeighbours method returns an array of local neighbors.
Example Usage
@localNeighbours = $NE->GetLocalNeighbours();
Returns
Upon completion, the GetLocalNeighbours method returns an array of local neighbors (as a reference
to a hash list).
GetRemoteNeighbours
The GetRemoteNeighbours method returns an array of remote neighbors.
Method Synopsis
GetRemoteNeighbours($refLocalNeighbour)
Parameters
$refLocalNeighbour
Specifies a reference to the hash list that defines a local neighbor and for which list the remote
neighbor is to be returned.
Example Usage
@remoteNeighbours = $NE->GetRemoteNeighbours($refLocalNeighbour);
Returns
Upon completion, the GetRemoteNeighbours method returns an array of remote neighbors (as a
reference to a hash list).
Print
The Print method prints the current record.
Method Synopsis
Print()
Parameters
None
Description
The Print method prints the current record.
Example Usage
$NE->Print();
Returns
Upon completion, the Print method does not return any records.
use RIV::RecordCache;
$recordCache = new RIV::RecordCache($rivSession, $cacheName [ ,$cacheLocation ] );
my $recKey = $recordCache->CacheRecord($record);
$recordCache->GetRecords();
$recordCache->GetRecord($recKey);
RIV::RecordCache Constructor
The RIV::RecordCache constructor creates and initializes a new RIV::RecordCache file object.
Constructor
new($rivSession, $cacheName [,$cacheLocation])
Parameters
$rivSession
Specifies a blessed reference to either a RIV::App or RIV::Agent object. More specifically, this
is a RIV::App or RIV::Agent application object returned in a previous call to the RIV::App or
RIV::Agent constructor.
$cacheName
Specifies the name of the RIV::RecordCache file object to be created or read from.
$cacheLocation
Specifies the path to the RIV::RecordCache file object.
This parameter is optional. If you do not pass a value to this parameter, the path to the
RIV::RecordCache file object is assumed to be the $NCHOME/var/precision directory.
Description
The RIV::RecordCache constructor creates and initializes a new RIV::RecordCache file object with
the name as specified in the $cacheName parameter and the location as specified in the $cacheLocation
parameter.
Example Usage
The following code fragment illustrates a typical call to the RIV::RecordCache constructor:
$app = RIV::App::new();
$cache = RIV::RecordCache::new($app, "Disco.Cache.Details.returns.MYDOMAIN",
"/opt/netcool/var/precision/");
}
Returns
Upon completion, the RIV::RecordCache constructor returns a RIV::RecordCache file object. This is
the object upon which you can perform add and retrieve record operations.
See Also
• “RIV module reference” on page 165
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
CacheRecord
The CacheRecord method attempts to add the specified record to the specified cache.
Method Synopsis
CacheRecord($record)
Parameters
$record
Specifies the record that is to be added to the cache. This record is expressed as a hash.
Description
The CacheRecord method adds the record specified in the $record parameter to the specified cache. You
specified the name of the cache in a previous call to the RIV::RecordCache constructor.
Example Usage
The following example illustrates a typical call to the CacheRecord method, where the method caches
the record (hash) called $myRec:
$cache->CacheRecord($myRec);
Returns
Upon completion, the CacheRecord method returns:
• The value -1 to indicate that the attempt to add the record to the cache was unsuccessful. The method
displays an appropriate error message requesting that you check to ensure that the cache is valid.
• The key that the record was added under if the attempt to add the record to the cache was successful.
See Also
• “RIV::RecordCache Constructor” on page 237
GetRecord
The GetRecord method retrieves from the cache a record associated with the specified key.
Method Synopsis
GetRecord($recordKey)
Parameters
$recordKey
Specifies the key associated with the record to be retrieved from the cache. This key was returned in a
previous call to the CacheRecord method after it successfully inserted the record into the cache.
Example Usage
The following example illustrates a typical call to the GetRecord method, where the method returns to
$record a hash from a previously specified cache that contains several records:
my $record = $cache->GetRecord();
Returns
Upon completion, the GetRecord method returns:
• %record — Specifies a hash that represents one of the records residing in the cache.
See Also
• “RIV::RecordCache Constructor” on page 237
• “CacheRecord” on page 238
• “GetRecords” on page 239
GetRecords
The GetRecords method retrieves from the cache a list of all the records currently residing in it.
Method Synopsis
GetRecords()
Parameters
None
Description
The GetRecords method retrieves from the cache a list of all the records currently residing in it. Each
record is returned as a hash within a list.
Example Usage
The following example illustrates a typical call to the GetRecords method, where the method returns to
recordList an array of hashes from a previously specified cache that contains several records:
my @recordList = $cache->GetRecords();
Returns
Upon completion, the GetRecords method returns:
• $recordList— Specifies an array of hashes, where each hash represents one of the records in the cache.
See Also
• “RIV::RecordCache Constructor” on page 237
Synopsis
use RIV::SnmpAccess;
$RIV::SnmpAccess::MaxAsyncConcurrent;
where:
$asn1 = $varop{ASN1};
$value = $varop{VALUE};
$asn1 = $snmp->OidToASN1($oid);
RIV::SnmpAccess Constructor
The RIV::SnmpAccess constructor creates and initializes a new RIV::SnmpAccess object.
Constructor
new($rivSession)
Parameters
$rivSession
Specifies a blessed reference to either a RIV::App or RIV::Agent object. More specifically, this
is a RIV::App or RIV::Agent application object returned in a previous call to the RIV::App or
RIV::Agent constructor.
Description
The RIV::SnmpAccess constructor creates and initializes a new RIV::SnmpAccess session object that
must be a blessed reference to either a RIV::App or RIV::Agent object.
You can create only one RIV::SnmpAccess session object in any Perl application. If multiple domains
are being supported (that is, multiple RIV::App objects) one of the application sessions must be used as
the base for the RIV::SnmpAccess session.
Example Usage
$app = new RIV::App();
$snmp = new RIV::SnmpAccess('TEST', 'ncp_test');
Returns
Upon completion, the RIV::SnmpAccess constructor returns a RIV::SnmpAccess session object.
See Also
• “RIV::Agent Constructor” on page 188
• “RIV::App Constructor” on page 212
ASN1ToOid
The ASN1ToOid method converts the specified ASN.1 value to its corresponding OID.
Method Synopsis
ASN1ToOid($asn1)
Parameters
$asn1
Specifies the ASN.1 (Abstract Syntax Notation One) value to be converted to its corresponding object
identifier (OID).
Example Usage
The following example returns $oid as 'ifIndex':
Returns
Upon completion, the ASN1ToOid method returns an OID that corresponds to the specified ASN.1 value
($asn1) .
See Also
• “RIV::SnmpAccess Constructor” on page 241
AsyncSnmpGet
The AsyncSnmpGet method performs an asynchronous SNMP get operation on the specified MIB
variable.
Method Synopsis
AsyncSnmpGet($tag, $host, $addOn,
$oid [,$instance [,$splitOutput]])
Parameters
$tag
Specifies a string that the AsyncSnmpGet method appends to SNMP_$tag. This tag is associated
with the results of an SNMP get operation. For example, if you specify the string GET to the $tag
parameter, the AsyncSnmpGet method associates the tag SNMP_GET with the results for this SNMP
get operation.
$host
Specifies a valid host IP address.
$addOn
Specifies the suffix to the community string.
$oid
Specifies the MIB variable for which you want to perform an asynchronous SNMP get operation.
$instance
Specifies the start of the MIB subtree to retrieve. You must specify $instance as an ASN1 string (for
example, 5.3.15).
This parameter is optional.
$splitOutput
Specifies a value of true or false. If set to true (1) returns three extra keys — OID, INDEX, and
NAMEMIB. The default is false (0), that is, does not return the three extra keys.
This parameter is optional.
Example Usage
$snmp->AsyncSnmpGet('GET', "1.2.3.4", "", "ifDescr", "2", 1);
($tag, $data) = $snmp->RIV::GetInput(-1);
Returns
Upon successful completion, the AsyncSnmpGet method returns the value /%varop and the tag
SNMP_$tag. If the request failed, AsyncSnmpGet returns undef. The return value, along with the tag
SNMP_$tag, are returned in a call to RIV::GetInput.
See Also
• “RIV::GetInput” on page 177
• “RIV::SnmpAccess Constructor” on page 241
• “MaxAsyncConcurrent” on page 246
AsyncSnmpGetBulk
The AsyncSnmpGetBulk method performs an asynchronous SNMP get-bulk operation on all MIB
objects in the specified MIB table.
Method Synopsis
AsyncSnmpGetBulk($tag, $host, $addOn,
$oidBindList, $nonRepeaters, $maxRepetitions
[,$instance [,$splitOutput]])
Parameters
$tag
Specifies a string that the AsyncSnmpGetBulk method appends to SNMP_$tag. This tag is associated
with the results of an SNMP get-bulk operation. For example, if you specify the string GETBULK
to the $tag parameter, the AsyncSnmpGetBulk method associates the tag SNMP_GETBULK with the
results for this SNMP get-bulk operation.
$host
Specifies a valid a host IP address.
$addOn
Specifies the suffix to the community string.
$oidBindList
Specifies a reference to an array that contains the MIB variables for which you want to perform an
asynchronous SNMP get-bulk operation. The following is an example of an array that contains two
MIB variables:
$oidBindList = \@oids;
where,
@oids = ('sysDescr', 'ifIndex');
$nonRepeaters
Specifies the number of MIB variables at the start of the list of @oids that return a single value. In
the previous example, the @oids list contains two MIB variables: sysDescr and ifIndex. Only the
Description
The AsyncSnmpGetBulk method performs an asynchronous SNMP get-bulk operation on all MIB
objects specified in $oidBindList. The SnmpGetBulk method returns the three extra keys — OID, INDEX,
and NAMEMIB — only if the $splitOutput parameter is set to true (1).
Notes
The parameters $nonRepeaters and $maxRepetitions must be defined. No default values are specified for
these parameters.
Example Usage
my @oids=
('sysDescr', 'sysContact', 'sysUpTime', 'ipInReceives',
'ipOutRequests', 'ipOutDiscards', 'ipForwDatagrams', 'tcpCurrEstab',
'ifDescr');
Returns
Upon completion, the AsyncSnmpGetBulk method returns a reference to an array of varops and the tag
SNMP_$tag. If the request failed, AsyncSnmpGetBulk returns undef. The return value, along with the
tag SNMP_$tag, are returned in a call to RIV::GetInput.
See Also
• “RIV::GetInput” on page 177
• “RIV::SnmpAccess Constructor” on page 241
• “MaxAsyncConcurrent” on page 246
Method Synopsis
AsyncSnmpGetNext($tag, $host, $addOn,
$oid [,$instance [,$splitOutput]])
Parameters
$tag
Specifies a string that the AsyncSnmpGetNext method appends to SNMP_$tag. This tag is associated
with the results of an SNMP get-next operation. For example, if you specify the string GETNEXT
to the $tag parameter, the AsyncSnmpGetNext method associates the tag SNMP_GETNEXT with the
results for this SNMP get-next operation.
$host
Specifies a valid host IP address.
$addOn
Specifies the suffix to the community string.
$oid
Specifies the MIB variable for which you want to perform an asynchronous SNMP get-next
operation.
$instance
Specifies the start of the MIB subtree to retrieve. You must specify $instance as an ASN1 string (for
example, 5.3.15).
This parameter is optional.
$splitOutput
Specifies a value of true or false. If set to true (1) returns three extra keys — OID, INDEX, and
NAMEMIB. The default is false (0), that is, does not return the three extra keys.
This parameter is optional.
Description
The AsyncSnmpGetNext method performs an asynchronous SNMP get-next operation on the specified
MIB variable ($oid). The AsyncSnmpGetNext method returns the three extra keys — OID, INDEX, and
NAMEMIB — only if the $splitOutput parameter is set to true (1).
Example Usage
$snmp->AsyncSnmpGetNext('GETNEXT', "1.2.3.4", "", "ifDescr");
Returns
Upon successful completion, the AsyncSnmpGetNext method returns a reference to an array of varops
and the tag SNMP_$tag. If the request failed, AsyncSnmpGetNext returns undef. The return value, along
with the tag SNMP_$tag, are returned in a call to RIV::GetInput.
See Also
• “RIV::GetInput” on page 177
GetMibHash
The GetMibHash method gets the entire MIB tree.
Method Synopsis
GetMibHash()
Parameters
None
Description
The GetMibHash method gets the entire MIB tree by browsing the files that exist in the $NCHOME/mibs
directory.
Example Usage
my %tree=$snmp->GetMibHash();
The hash list has keys associated with the MIB variables and values that correspond to the ASN.1 values.
Returns
Upon completion, the GetMibHash method returns the complete MIB tree constructed as a result of
browsing the files that reside in the $NCHOME/mibs directory.
See Also
• “RIV::SnmpAccess Constructor” on page 241
MaxAsyncConcurrent
The MaxAsyncConcurrent package variable sets the maximum number of concurrent asynchronous
requests.
Variable Synopsis
$RIV::SnmpAccess::MaxAsyncConcurrent
Description
The MaxAsyncConcurrent package variable sets the maximum number of concurrent asynchronous
requests. The default is ten concurrent asynchronous requests. The value of this variable is used when the
first asynchronous request is executed. Thereafter, any changes to this package variable are ignored.
You use this package variable with the following asynchronous methods:
• AsyncSnmpGet
• AsyncSnmpGetNext
• AsyncSnmpGetBulk
OidToASN1
The OidToASN1 method converts the specified OID to its corresponding ASN.1 value.
Method Synopsis
OidToASN1($oid)
Parameters
$oid
Specifies the object identifier (OID) to be converted to its corresponding ASN.1 (Abstract Syntax
Notation One) value.
Description
The OidToASN1 method converts the specified OID ($oid) to its corresponding ASN.1 value.
Example Usage
$asn1 = $snmp->OidToASN1('ifDescr');
Returns
Upon completion, the OidToASN1 method returns an ASN.1 value that corresponds to the specified OID
($oid).
See Also
• “RIV::SnmpAccess Constructor” on page 241
SnmpGet
The SnmpGet method performs an SNMP get operation on the specified MIB variable.
Method Synopsis
SnmpGet($host, $addOn, $oid
[,$instance [,$splitOutput]])
Parameters
$host
Specifies a valid host IP address.
$addOn
Specifies the suffix to the community string.
$oid
Specifies the MIB variable for which you want to perform an SNMP get operation.
Description
The SnmpGet method performs an SNMP get operation on the specified MIB variable ($oid). The
SnmpGet method returns the three extra keys — OID, INDEX, and NAMEMIB — only if the $splitOutput
parameter is set to true (1).
Example Usage
$vap = $snmp->SnmpGet("1.2.3.4", "", "ifDescr", 1);
print "$vap->{ASN1}, $vap->{VALUE}", "\n";
Returns
Upon completion, the SnmpGet method returns /%varop, where the %varop keys are ASN1 and VALUE.
See Also
• “RIV::SnmpAccess Constructor” on page 241
SnmpGetBulk
The SnmpGetBulk method performs an SNMP get-bulk operation on all MIB objects in the specified
MIB table.
Method Synopsis
SnmpGetBulk($host, $addOn, $oidBindList,
$nonRepeaters, $maxRepetitions
[,$instance [,$splitOutput]])
Parameters
$host
Specifies a valid host IP address.
$addOn
Specifies the suffix to the community string.
$oidBindList
Specifies a reference to an array that contains the MIB variables for which you want to perform an
SNMP get-bulk operation. The following is an example of an array that contains two MIB variables:
$oidBindList = \@oids;
where,
@oids = ('sysDescr', 'ifIndex');
$nonRepeaters
Specifies the number of MIB variables at the start of the list of @oids that return a single value. In
the previous example, the @oids list contains two MIB variables: sysDescr and ifIndex. Only the
Description
The SnmpGetBulk method performs an SNMP get-bulk operation on all MIB objects specified in
$oidBindList. The SnmpGetBulk method returns the three extra keys — OID, INDEX, and NAMEMIB — only
if the $splitOutput parameter is set to true (1).
Notes
The parameters $nonRepeaters and $maxRepetitions must be defined. No default values are specified for
these parameters.
Example Usage
my @oids=('sysDescr','sysContact','sysUpTime','ipInReceives',
'ipOutRequests','ipOutDiscards','ipForwDatagrams','tcpCurrEstab',
'ifDescr');
Returns
Upon completion, the SnmpGetBulk method returns a reference to a result array. Each element of the
result array is a %varop hash.
See Also
• “RIV::SnmpAccess Constructor” on page 241
SnmpGetNext
The SnmpGetNext method performs an SNMP get-next operation on the specified MIB variable.
Method Synopsis
SnmpGetNext($host, $addOn, $oid
[, $instance [,$splitOutput]])
Description
The SnmpGetNext method performs iterative SNMP get-next operations on the specified host
($nodeIP) for the MIB table starting at the specified MIB variable ($oid). The SnmpGetNext method
returns the three extra keys — OID, INDEX, and NAMEMIB — only if the $splitOutput parameter is set to
true (1).
Example Usage
my ($vap) = $snmp->SnmpGetNext("1.2.3.4", "", "ifDescr");
Returns
Upon completion, the SnmpGetNext method returns a reference to a result array. Each element of the
result array is a %varop hash.
See Also
• “RIV::SnmpAccess Constructor” on page 241
SnmpWalk
The SnmpWalk method performs an SNMP walk operation on the specified device, starting at the
specified MIB variable.
Method Synopsis
SnmpWalk($host, $addOn, $oid,
$ignoreInstanceFilters)
Parameters
$host
Specifies a valid IP address.
$addOn
Specifies the suffix to the community string (usually an empty string).
Description
The SnmpWalk method performs an SNMP walk operation on a given device, starting at the specified MIB
variable ($oid). The SnmpWalk method returns either only filtered instances or all data, depending on the
value passed to the $ignoreInstanceFilters parameter.
Example Usage
my ($results, $status) = $snmp->SnmpWalk("1.2.3.4", "", "ifTable", 1);
Returns
Upon successful completion, the SnmpWalk method returns a 2-element array. The first element is a
reference to an array of returned SNMP data. Each element has the same format as returned by the
SnmpGetNext method. The second element is a hash of additional data. This hash can include the
following fields:
• m_InstanceFiltered -- If present, this field indicates that instance filtering was applied to the returned
results.
• m_ErrorStatus -- If present, this field indicates any error status detected by the SNMP helper while
trying to process the query.
See Also
• “SnmpGetNext” on page 249
• “RIV::SnmpAccess Constructor” on page 241
SplitOidAndIndex
The SplitOidAndIndex method converts the full ASN.1 value into its index and the base OID.
Method Synopsis
SplitOidAndIndex($fullASN1)
Parameters
$fullASN1
Specifies the complete ASN.1 (Abstract Syntax Notation One) value to be split.
Description
The SplitOidAndIndex method splits the specified ASN.1 value ($fullASN1) into its index and the base
OID (object identifier).
Returns
Upon completion, the SplitOidAndIndex method returns an array with three elements:
• The base OID.
• The index.
• The name of the base OID.
See Also
• “RIV::SnmpAccess Constructor” on page 241
# Call the createDbHandle method to obtain the DBI handle. In this call,
# pass the %typicalParameters hash parameter.
my $dbh = NCP::DBI_Factory::createDbHandle(%typicalParameters);
my %explicitParams = (
dbname => "ncim",
server => "db2",
schema => "ncim",
host => "192.168.1.1",
username => "dbuser",
password => "dbpassword",
port => 50000 # optional
);
# Call the createDbHandle method to obtain a second DBI handle. In this call,
# pass the %explicitParameters hash parameter.
my $otherDbh = NCP::DBI_Factory::createDbHandle(%explicitParams);
my $autoIncColumnName = "entityId";
my $newId2 = NCP::DBI_Factory::execute_insert_auto_inc(
$dbh, $sth, @values)
or print "Insert failed ", $dbh->errstr "\n";
$sth->finish();
Method Synopsis
NCP::DBI_Factory::createDbHandle(%typicalParameters)
NCP::DBI_Factory::createDbHandle(%explicitParameters)
Parameters
%typicalParameters
Specifies a hash that contains the key/value pairs necessary for createDbHandle to access
information from one of the following files in order to create a DBI handle:
• DbLogins.cfg — Specifies the standard database log-ins configuration file.
• DbLogins.domain.cfg — Specifies a domain-specific database log-ins configuration file where
domain identifies a domain (for example, DbLogins.NCOMS.cfg).
• Custom file — Specifies an optional custom database log-ins configuration file. This file is expected
to have the same format as DbLogins.cfg and DbLogins.domain.cfg.
The following table identifies the key/value pairs in this hash:
domain Specifies the name of the domain used to identify whether a DbLogins.domain.cfg file
exists in the $NCHOME/etc/precision directory.
The following example shows a possible value for this key:
domain => "NCOMS"
In this example, the createDbHandle method would look for a file called
DbLogins.NCOMS.cfg in the $NCHOME/etc/precision directory.
If a DbLogins.domain.cfg file does not exist, createDbHandle looks for the
DbLogins.cfg file.
This is a required key/value pair.
dbid Specifies the logical name for the NCIM topology database to which you want to
connect. Each NCIM topology database has a unique logical name specified in the
DbLogins.cfg, DbLogins.domain.cfg, or custom database log-ins configuration file.
The following example shows a possible value for this key:
dbid => "ncim"
In this example, the value ncim specifies the logical name for this connection to the
NCIM topology database.
The createDbHandle method uses dbid to locate the appropriate section of the
database log-ins configuration file.
This is a required key/value pair.
Note: The dbid key/value pair maps to the m_DbId field in the database log-ins
configuration file.
dbfile Specifies the name of the custom database log-ins configuration file. If you specify
the optional dbfile key/value pair, the createDbHandle method would look for the
specified custom file in the $NCHOME/etc/precision directory.
%explicitParameters
Specifies a hash that contains the key/value pairs necessary to create a DBI handle. In this
case, createDbHandle does not obtain the necessary values from a file as is the case for the
%typicalParameters hash parameter. Instead, all of the necessary values are explicitly specified.
(Typically, an application would obtain these values from the command line.) The following table
identifies the key/value pairs in this hash. All key/value pairs listed in the table are required, except for
port, which is optional.
dbname Specifies the name of the NCIM topology database to which you want to connect.
The following example shows a possible value for this key:
dbname => "ncim"
In this example, the value ncim specifies that you want to connect to the NCIM topology
database.
server Specifies a string that identifies the type of database associated with the database
name specified in the dbname key.
The following list identifies the possible values for this key:
• oracle — Specifies the Oracle database.
• db2 — Specifies the Db2 database.
The following example shows a database type of Db2:
server => "db2"
schema Specifies the name of the schema to access in the database specified in the dbname
key.
The following example shows a possible value for this key:
schema => "ncim"
host Specifies the address of the host computer on which the specified NCIM topology
database resides.
The following example shows a possible value for this key:
host => "192.168.1.1"
username Specifies the name of the user who has access to the specified NCIM topology database.
The following example shows a possible value for this key:
username => "dbuser"
password Specifies the password of the user who has access to the specified NCIM topology
database.
The following example shows a possible value for this key:
password => "dbpassword"
port Specifies an optional key that identifies the port associated with the address specified in
host.
The following example shows a possible value for this key:
port => "3406"
Description
The createDbHandle method creates a standard DBI (Database Interface) handle to be used in
subsequent calls to some of the other NCP::DBI_Factory methods. This DBI handle contains the
information needed to connect to the requested NCIM topology database.
The createDbHandle method accepts the following hash parameters:
• %typicalParameters — This hash provides the domain and dbid key/value pairs. Optionally, this hash
can provide a dbfile key/value pair. Given this information, the createDbHandle method:
– Reads and parses one of these files that resides in the $NCHOME/etc/precision directory:
DbLogins.cfg (the default), DbLogins.domain.cfg, or an optional custom database login-ins
configuration file.
– Uses the dbid key/value pair to locate the database entry of interest in the specified database
log-ins configuration file.
– Connects to the specified NCIM topology database.
– Sets the context to the schema associated with the specified NCIM topology database.
• %explicitParameters — This hash provides all of the required information from the command line. Given
this information, the createDbHandle method:
– Connects to the specified NCIM topology database.
– Sets the context to the schema associated with the specified NCIM topology database.
When reading from a database log-ins configuration file, createDbHandle can override any values from
the file if you explicitly pass them in from the command line. The following table provides the available
override options and their mappings to the fields in the database log-ins configuration file:
Override Description
option
dbname Specifies the name of the database. If specified on the command line, this option
overrides the value specified for the m_DbName field in the database log-ins
configuration file.
server Specifies a string that identifies the type of database associated with the database
name specified in the dbname option.
The following list identifies the possible values for the server option:
• oracle — Specifies the Oracle database.
• db2 — Specifies the Db2 database.
This option overrides the value specified for the m_Server field in the database log-ins
configuration file.
schema Specifies the name of the schema to access in the specified database. This
option overrides the value specified for the m_Schema field in the database log-ins
configuration file.
host Specifies the address of the host computer on which the specified NCIM topology
database resides. This option overrides the value specified for the m_Hostname field in
the database log-ins configuration file.
username Specifies the name of the user who has access to the specified NCIM topology
database. This option overrides the value specified for the m_Username field in the
database log-ins configuration file.
password Specifies the password of the user who has access to the specified NCIM topology
database. This option overrides the value specified for the m_Password field in the
database log-ins configuration file.
port Specifies the port associated with the address specified in host. This option overrides
the value specified for the m_PortNum field in the database log-ins configuration file.
Notes
To ensure that the createDbHandle method can print appropriate messages to a log file, you must
have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the method sends these messages to STDOUT.
Example Usage
The following code example illustrates a typical call to the createDbHandle method using the
%typicalParameters hash parameter:
my %typicalParameters = (
domain => "NCOMS",
dbid => "NCIM"
);
my $dbh = NCP::DBI_Factory::createDbHandle(%typicalParameters);
The following code example illustrates a typical call to the createDbHandle method using the
explicitParams parameter:
my %explicitParams = (
dbname => "ncim",
server => "db2",
schema => "ncim",
host => "9.180.209.24",
username => "batman",
password => "robin",
port => 3406 # This is an optional element.
);
Returns
Upon completion, the createDbHandle method returns a standard DBI handle associated with the
requested NCIM topology database.
See Also
• “schema” on page 269
describeTable
The describeTable method returns a sorted array of uppercase field names for the specified table or
view.
Method Synopsis
NCP::DBI_Factory::describeTable($tableName, %dbhschema)
NCP::DBI_Factory::describeTable($tableName, %typicalParameters)
Parameters
$tableName
Specifies the name of the database table that is of interest. Because the different databases that
the DBI_Factory module supports use different cases for table names, supply the table name in
mixed case. For example, if the table name is entitynamecache, then the mixed case equivalent is
entityNameCache.
In either case, the describeTable method internally converts the specified database table name to
upper or lower case as required.
%dbhschema
Specifies a hash that contains the following keys:
• dbh — Specifies an existing DBI handle returned in a previous call to the createDbHandle method.
This handle supplies the context for connecting to the specified NCIM topology database.
• schema — Specifies the schema that contains the database table name specified in the $tableName
parameter. Typically, this schema name is obtained in a call to the schema method.
%typicalParameters
Specifies the same hash parameter accepted by the createDbHandle method.
Description
The describeTable method returns a sorted array of uppercase field names for the database table or
view specified in the $tableName parameter. For full portability, pass this table name in mixed case to the
tableName parameter. The describeTable method:
• Converts the table name to upper case for Oracle and Db2 databases, since these databases require
upper case table names. For example, the table name entityNameCache would be converted to
ENTITYNAMECACHE.
If you specify the %typicalParameters hash instead of the %dbhschema hash, describeTable calls
createDbHandle to create a new DBI handle. The schema associated with this newly created handle is
Notes
The NCP::DBI_Factory module supports Db2 and Oracle databases. In both these databases, tables
and field names are case insensitive with regard to SQL statements. However, Db2 and Oracle return field
names in table rows in uppercase.
Example Usage
The following code example illustrates a typical call to the describeTable method using the
%dbhschema hash parameter. The code example also shows a call to the tables method:
# List the tables in schema $schema without creating a new DBI handle.
my @tableList = NCP::DBI_Factory::tables(dbh => $dbh,
schema => $schema);
foreach my $table (@tableList)
{
my @fields = NCP::DBI_Factory::describeTable(
$table,
dbh => $dbh,
schema => $schema);
}
Returns
Upon completion, the describeTable method returns a sorted array of uppercase field names for the
specified database table or view.
See Also
• “createDbHandle” on page 255
• “schema” on page 269
• “tables” on page 272
execute_insert_auto_inc
The execute_insert_auto_inc method executes an auto-incremented column statement handle
prepared by the prepare_insert_auto_inc method.
Method Synopsis
NCP::DBI_Factory::execute_insert_auto_inc($dbHandle,$statementHandle,
$values)
Parameters
$dbHandle
Specifies the DBI handle returned in a previous call to the createDbHandle method. This handle
supplies the context for connecting to the specified NCIM topology database.
$statementHandel
Specifies the statement handle returned in a previous call to the prepare_insert_auto_inc
method.
$values
Specifies the values to be executed.
Notes
To ensure that the execute_insert_auto_inc method can print appropriate messages to a log file,
you must have previously specified a log handle (that is, a reference to a file object) by calling the
setLogHandle method. Otherwise, the method sends these messages to STDOUT.
Example Usage
The following code example illustrates a typical call to the execute_insert_auto_inc method:
Returns
Upon completion, the execute_insert_auto_inc method returns the new auto-incremented value.
See Also
• “createDbHandle” on page 255
• “prepare_insert_auto_inc” on page 268
extractCmdLineOptions
The extractCmdLineOptions method allows database login options specified on the command line to
be provided in a common format.
Method Synopsis
NCP::DBI_Factory::extractCmdLineOptions([$prefix])
Parameters
$prefix
An optional parameter that specifies a prefix used to allow other similar database login options to be
supplied for multiple database connections. Examples of such prefixes include ncim_, ncmonitor_,
and ncpoller_.
Description
The extractCmdLineOptions method allows database login options specified on the command line
to be provided in a common format. This method accepts the same database login options as the
createDbHandle method:
• dbfile
• server
• dbname
• schema
• host
• username
• password
Notes
The extractCmdLineOptions method removes the database login options that it processes and
returns in the hash from the @ARGV array. However, any options that do not get processed and returned in
the hash remain in the @ARGV array.
Use the extractCmdLineOptions method to process database login options from the command line.
Use the extractHashRefOptions method to process database login options from a hash reference.
Example Usage
You can call the extractCmdLineOptions method with or without the $prefix parameter.
Calling extractCmdLineOption without the $prefix parameter
The following code example illustrates a call to the extractCmdLineOptions method without the use
of the $prefix optional parameter. The example declares a variable called $optionsHashRef to store the
reference to the hash returned by extractCmdLineOptions:
my $optionsHashRef = NCP::DBI_Factory::extractCmdLineOptions();
Assume that the previous code example is contained in a Perl script called dboptions.pl. Consider this
script executed with the password , host, and whatever database login options:
The database login option — ( '-whatever', 'harry' ) — remains in the @ARGV array because the
extractCmdLineOptions method could not process it without the $prefix optional parameter.
Calling extractCmdLineOption with the $prefix parameter
The following code example illustrates multiple calls to the extractCmdLineOptions method with the
use of the $prefix optional parameter:
my $generic =
NCP::DBI_Factory::extractCmdLineOptions();
my $ncimSpecific =
NCP::DBI_Factory::extractCmdLineOptions("ncim_")|| $generic;
my $ncmonitorSpecific =
NCP::DBI_Factory::extractCmdLineOptions("ncmonitor_") || $generic;
my $ncpollerSpecific =
NCP::DBI_Factory::extractCmdLineOptions("ncpoller_") || $generic;
Assume that the previous code example is contained in a Perl script called dboptionsuseprefix.pl.
Consider this script executed with the password and ncpoller_password database login options:
Returns
Upon completion, the extractCmdLineOptions method returns a reference to a hash that contains
the extracted database login options and values in key/value format. If no database login options were
specified, the extractCmdLineOptions method returns undef.
See Also
• “createDbHandle” on page 255
• “extractHashRefOptions” on page 263
extractHashRefOptions
The extractHashRefOptions method extracts the database login options from the specified hash
reference.
Method Synopsis
NCP::DBI_Factory::extractHashRefOptions($originalHashRef [,$prefix])
Parameters
$originalHashRef
Specifies a reference to the original hash that contains the database login options.
$prefix
An optional parameter that specifies a prefix used to allow other similar database login options to be
supplied for multiple database connections. Examples of such prefixes include ncim_, ncmonitor_,
and ncpoller_.
Description
The extractHashRefOptions method extracts the database login options from the hash reference
specified in the $originalHashRef parameter. This method accepts the same database login options as the
createDbHandle method:
• dbfile
• server
• dbname
Notes
The extractHashRefOptions method does not remove the key/value pairs from the hash reference
specified in the $originalHashRef parameter.
Use the extractHashRefOptions method to process database login options from a hash reference.
Use the extractCmdLineOptions method to process database login options from the command line or
DbLogins.cfg file.
Example Usage
The following code example sets up a hash reference and then makes two calls to the
extractHashRefOptions method:
my %original =
{ password => "topsecret", ncpoller_password => "classified, foo => "bar" };
my $generic = NCP::DBI_Factory::extractHashRefOptions(\%original);
my $ncpoller = NCP::DBI_Factory::extractHashRefOptions(\%original, "ncpoller_");
Returns
Upon completion, the extractHashRefOptions method returns a reference to a hash that contains
the extracted database login options and values in key/value format. If no database login options were
specified, the extractHashRefOptions method returns undef.
See Also
• “createDbHandle” on page 255
• “extractCmdLineOptions” on page 261
Method Synopsis
NCP::DBI_Factory::finish( $dbHandle );
Parameters
$dbHandle
Specifies the DBI handle returned in a previous call to the createDbHandle method. This handle
supplies the context for finishing the connection for the specified NCIM topology database.
Description
The finish method disconnects and cleans the specified database handle.
Example usage
NCP::DBI_Factory::finish( $dbHandle );
Returns
Upon completion, the finish method returns no value.
See Also
• “createDbHandle” on page 255
insert_auto_inc_row
The insert_auto_inc_row method inserts a row into the specified table that has an auto-increment
column.
Method Synopsis
NCP::DBI_Factory::insert_auto_inc_row($dbHandle,$tableName,
$tableRow, $autoIncColumnName)
Parameters
$dbHandle
Specifies the DBI handle returned in a previous call to the createDbHandle method. This handle
supplies the context for connecting to the specified NCIM topology database.
$tableName
Specifies the name of the table into which the insert_auto_inc_row method inserts the row
specified in the $tableRow parameter.
$tableRow
Specifies a hash of scalars keyed on the column name.
$autoIncColumnName
Specifies the name of the auto-increment column in the specified table.
Notes
To ensure that the insert_auto_inc_row method can print appropriate messages to a log file,
you must have previously specified a log handle (that is, a reference to a file object) by calling the
setLogHandle method. Otherwise, the method sends these messages to STDOUT.
Use the insert_auto_inc_row method to insert rows in tables that have an auto- increment column.
Use the insert_row method to insert rows in tables that have do not have an auto- increment column.
Example Usage
The following code example illustrates a typical call to the insert_auto_inc_row method:
my $tableName = "entityNameCache";
my $name = "fred";
my $autoIncColumnName = "entityId";
my $newId = NCP::DBI_Factory::insert_auto_inc_row(
$dbh, $tableName, \%row, $autoIncColumnName)
or print "Insert failed ", $dbh->errstr "\n";
Returns
Upon completion, the insert_auto_inc_row method returns the new auto-increment value, provided
that the row could be uniquely identified by the fields that the insert_auto_inc_row method just
inserted into the specified table.
See Also
• “createDbHandle” on page 255
• “insert_row” on page 266
insert_row
The insert_row method inserts a row into the specified table.
Method Synopsis
NCP::DBI_Factory::insert_row($dbHandle,$tableName, $tableRow)
Description
The insert_row method inserts the row specified in the $tableRow parameter into the table specified in
the $tableName parameter. The insert_row method automatically interpolates any strings in $tableRow
into double-quoted strings.
Note: You can also call the DBI rollback interface to undo the most recent insert row change.
Notes
To ensure that the insert_row method can print appropriate messages to a log file, you must have
previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the method sends these messages to STDOUT.
Use the insert_row method to insert rows in tables that have do not have an auto- increment column.
Use the insert_auto_inc_row method to insert rows in tables that have an auto- increment column.
Example Usage
The following code example illustrates a typical call to the insert_row method:
my $tableName = "entityNameCache";
my $name = "fred";
Returns
Upon completion, the insert_row method returns whatever the standard DBI statement handle execute
method returns.
See Also
• “createDbHandle” on page 255
• “insert_auto_inc_row” on page 265
Method Synopsis
NCP::DBI_Factory::prepare_insert_auto_inc($dbHandle,$tableName,
$autoIncColumnName, $columnNames)
Parameters
$dbHandle
Specifies the DBI handle returned in a previous call to the createDbHandle method. This handle
supplies the context for connecting to the specified NCIM topology database.
$tableName
Specifies the name of the table into which the prepare_insert_auto_inc method prepares the
SQL statement to be inserted into multiple rows in the specified columns.
$autoIncColumnName
Specifies the name of the auto-increment column in the specified table.
$columnNames
Specifies a hash of column names.
Description
The prepare_insert_auto_inc method prepares the SQL statement once so that it can be used
multiple times when inserting many rows into an auto-increment column of the specified database table.
Use this method when inserting many rows into an auto-incremented column.
The returned SQL statement handle should be used with the execute_insert_auto_inc method.
Notes
To ensure that the prepare_insert_auto_inc method can print appropriate messages to a log file,
you must have previously specified a log handle (that is, a reference to a file object) by calling the
setLogHandle method. Otherwise, the method sends these messages to STDOUT.
Example Usage
The following code example illustrates a typical call to the prepare_insert_auto_inc method:
my $sth =
NCP::DBI_Factory::prepare_insert_auto_inc($dbh,
$tableName,
$autoIncColumnName, @columnNames)
or print "Prepared failed ", $dbh->errstr, "\n";
Returns
Upon completion, the prepare_insert_auto_inc method returns the prepared SQL statement handle.
See Also
• “createDbHandle” on page 255
• “insert_row” on page 266
Method Synopsis
NCP::DBI_Factory::schema(%typicalParameters)
NCP::DBI_Factory::schema(%explicitParameters)
Parameters
$typicalParameters
Specifies the same hash parameter accepted by the createDbHandle method. If you supply this
hash parameter, schema obtains the value from the database log-ins configuration file.
%explicitParameters
Specifies the same hash parameter accepted by the createDbHandle method. If you supply this
hash parameter, schema obtains the value from the command line.
Description
The schema method returns the name of the schema being used as follows:
• If the %typicalParameters hash was specified — The schema method obtains the name of the schema
being used from one of these files: DbLogins.cfg, DbLogins.DOMAIN.cfg, or an optional custom
database log-ins configuration file. If schema finds a domain-specific file, it uses that file to obtain
the name of the schema. If the schema variable was passed to the createDbHandle method, then the
schema method uses this variable to obtain the name of the schema. The schema variable overrides the
schema information contained in any of the configuration files.
• If the %explicitParameters hash was specified — The schema method obtains the name of the schema
from the command line. (The schema name is the value associated with the schema key in the
%explicitParameters hash.)
Notes
To ensure that the schema method can print appropriate messages to a log file, you must have previously
specified a log handle (that is, a reference to a file object) by calling the setLogHandle method.
Otherwise, the method sends these messages to STDOUT.
Example Usage
The following code fragment illustrates a typical call to the schema method using the %typicalParams
hash parameter:
# Set up the hash list to contain the domain and database ID.
my %typicalParameters = (
domain => "NCOMS",
dbid => "NCIM"
);
# Call the schema method passing to it the previously set up hash list.
# In this case, the schema method knows that the name of the schema
# resides in a database log-ins configuration file. The schema method
# returns the name of the schema being used to the $schema variable.
#
my $schema = NCP::DBI_Factory::schema(%typicalParameters);
Consider the following entry in a DbLogins.cfg file. The previous call to the schema method would
return a schema name of ncim (m_schema), which is associated with the database whose logical name is
identified by the string NCIM (m_DbId).
Returns
Upon completion, the schema method returns the name of the schema associated with the specified
NCIM topology database.
See Also
• “createDbHandle” on page 255
setLogHandle
The setLogHandle method passes in the specified log handle associated with an opened file to which
the NCP::DBI_Factory module methods can write messages.
Method Synopsis
NCP::DBI_Factory::setLogHandle($filehandle)
Parameters
$filehandle
Specifies a reference to a file handle (for example, IO::File) that points to an opened file to which
messages can be written.
Description
The setLogHandle method passes in the log handle specified in the $filehandle parameter to an internal
utility method called by the NCP::DBI_Factory module methods. This handle is associated with an
opened file to which this internal utility method writes messages. In effect, this opened file serves as a
log file that can contain debug, critical, informational, and warning type messages associated with the
execution of the NCP::DBI_Factory module methods.
If you do not call the setLogHandle method, the internal utility method writes these messages to
STDOUT.
To control the level of message reporting, call the setLogLevel method and specify the desired log
level.
.
.
.
my $logName = "$logdir/checkPing.$domainName.log";
NCP::DBI_Factory::setLogLevel("warn");
Returns
Upon completion, the setLogHandle method returns no data.
See Also
• “setLogLevel” on page 271
setLogLevel
The setLogLevel method sets the log level for error and message reporting.
Method Synopsis
NCP::DBI_Factory::setLogLevel($loglevel)
Parameters
$loglevel
Specifies the log level to set. The following are the valid options described in ascending order:
• debug — Specifies a log level in which all messages are logged.
• info — Specifies a log level in which informational, warning, and critical messages are logged.
• warn — Specifies a log level in which warning and critical messages are logged.
• critical — Specifies a log level in which only critical messages are logged.
Description
The setLogLevel method sets the log level to the option specified in the $loglevel parameter. The
default is debug level. If set to a higher level, only messages with an equal or higher level will be logged.
For example, at level warn, messages of level info and level debug will not be logged.
By default, the NCP::DBI_Factory module methods log messages to STDOUT. If you specify a log
handle to the setLogHandle method, the NCP::DBI_Factory module methods log messages to the
opened file associated with this log handle.
The setLogLevel method logs an appropriate message (either to STDOUT or to an opened file) if you
specify an invalid log level.
.
.
.
my $logName = "$logdir/checkPing.$domainName.log";
Returns
Upon completion, the setLogLevel method returns no data.
See Also
• “setLogHandle” on page 270
tables
The tables method returns a sorted array of table and view names for the current schema.
Method Synopsis
NCP::DBI_Factory::tables(%dbhschema)
NCP::DBI_Factory::tables(%typicalParameters)
Parameters
%dbhschema
Specifies a hash that contains the following keys:
• dbh — Specifies an existing DBI handle returned in a previous call to the createDbHandle method.
• schema — Specifies the schema that contains the tables of interest. Typically, this schema name is
obtained in a call to the schema method.
%typicalParameters
Specifies the same hash parameter accepted by the createDbHandle method.
Description
The tables method returns a sorted array of table and view names for the current schema.
If you specify the %dbhschema hash, the tables method:
• Uses the dbh key/value pair to identify the existing DBI handle returned in a previous call to the
createDbHandle method. This DBI handle provides the context for connecting to the specified NCIM
topology database.
• Uses the current schema specified in the schema key/value pair to obtain the tables of interest.
• Returns a sorted array of the table and view names for all tables associated with the current schema.
If you specify the %typicalParameters hash, the tables method:
Example Usage
The following code example illustrates a typical call to the tables method using the %dbhschema hash
parameter:
# List the tables in schema $schema without creating a new DBI handle.
my @tableList = NCP::DBI_Factory::tables(dbh => $dbh,
schema => $schema);
Returns
Upon completion, the tables method returns a sorted array of table and view names for the current
schema.
See Also
• “createDbHandle” on page 255
• “describeTable” on page 259
• “schema” on page 269
timeStamp
The timeStamp method returns a timestamp in a format suitable for addition to the NCIM topology
database.
Method Synopsis
NCP::DBI_Factory::timeStamp([$unixtimestamp])
Parameters
$unixtimestamp
Specifies a UNIX timestamp. This is an optional parameter. If you do not specify this parameter, the
timeStamp method uses the current timestamp on the local host.
Description
The timeStamp method converts the current timestamp on the local host (or the UNIX timestamp if
specified in the unixtimestamp parameter) to the following format that is suitable for addition to the
requested NCIM topology database:
YYYY-MM-DD HH:MM:SS
where:
• YYYY — Specifies the year.
• MM — Specifies the month.
• DD — Specifies the day.
• HH — Specifies the hour.
Example Usage
The following code example illustrates a call to the timeStamp method, specifying the current timestamp
on the local host:
.
.
.
my $currenttime
$currenttime = timestamp();
.
.
.
If the current timestamp on the local host is June 6, 2010 5:39:45 EST, the timeStamp method
converts it to the following format that is suitable for addition to the requested NCIM topology database:
2010-06-04-18:39:45
The following code example illustrates a call to the timeStamp method, specifying a UNIX timestamp:
my $currenttime
$currenttime = timestamp(1275694785);
The timeStamp method converts this UNIX timestamp to the following format that is suitable for addition
to the requested database:
2010-06-04-18:39:45
Returns
Upon completion, the currentTimeStamp method returns the current timestamp on the local host (or
the UNIX timestamp) in the following format:
YYYY-MM-DD HH:MM:SS
toUpper
The toUpper method returns a copy of a hash (a single row retrieved from an NCIM database table) with
all field names converted to uppercase.
Method Synopsis
NCP::DBI_Factory::toUpper(%rowHashRef)
Parameters
%rowHashRef
Specifies a hash that is a single row retrieved from an NCIM database table. The field names in this
row can be specified in mixed case, lowercase, or uppercase.
Description
The toUpper method takes the hash (a single row retrieved from an NCIM database table) specified in
the %rowHashRef parameter and returns a copy of this hash with all field names converted to uppercase.
Notes
The NCP::DBI_Factory module supports Db2 and Oracle databases. In both these databases, tables
and field names are case insensitive with regard to SQL statements. However, Db2 and Oracle return field
names in table rows in uppercase.
Example Usage
The following code example makes calls to methods defined in the Perl DBI module to prepare, execute,
and fetch a select statement:
The following list provides a line-by-line explanation of the previous code example:
• The first line calls the prepare method to prepare the select statement specified in $selectQuery for
later execution by the database engine. The prepare method returns a reference to a statement handle
object in $statement.
• The second line uses the statement handle object returned in $statement to get attributes of the select
statement and then invokes the execute method to process the prepared statement.
• The third line calls the fetchall_arrayref method to fetch all the data returned from the previously
prepared and executed select statement. The fetchall_arrayref method returns to $results a
reference to an array that contains one reference per row.
The following code example calls the toUpper method to convert all field names to upper case:
The following list provides a line-by-line explanation of the previous code example:
• The first line sets up a foreach loop that iterates through the @$results array.
• For each field name in the table row, call the toUpper method to covert the name to uppercase.
The following code example shows that fields can be safely extracted using uppercase field names:
Returns
Upon completion, the toUpper method returns a copy of a hash (a single row retrieved from a database
table) with all field names converted to upper case.
• Create an entry in the domainMgr table for this domain if one does not already exist
• Create a new domain that is a copy of an existing domain
• Remove all references to the specified domain from the domainMgr table
• Retrieve the domainMgrId from the domainMgr table in the NCIM topology database that resides in the
specified domain
• Return the domain name for the current domain
• Pass in a log handle associated with an opened file used for logging messages
• Set the log level for error and message reporting
Use of the methods that the NCP::Domain module provides assumes that you understand concepts
related to the NCIM topology database.
See IBM Tivoli Network Manager Reference for information on NCIM topology databases.
The constructor and methods are described in reference (man) page format.
use NCP::Domain;
$domain->create();
$copy->clone("NEWDOMAIN");
$obsolete->drop();
$domain->id();
$domain->name();
%summary = $domain->summary();
See Also
• “NCP::Domain Constructor” on page 277
• “clone” on page 278
• “create” on page 279
• “drop” on page 281
• “id” on page 282
• “name” on page 283
• “setLogHandle” on page 284
• “setLogLevel” on page 285
NCP::Domain Constructor
The NCP::Domain constructor creates a blessed NCP::Domain object for the specified Network
Manager domain.
Constructor
new NCP::Domain($domainName)
new NCP::Domain(%dbOptionsHash)
Parameters
$domainName
Specifies the name of the Network Manager domain for which you want to create a blessed domain
instance object. In this case, the domain name is specified with plain text or plain text assigned to a
variable. You can also specify the domain name using the explicit hash key "domain".
%dbOptionsHash
Specifies the hash that contains the database login options. One of these database login options
is the domain name. More specifically, this hash takes the same database login options as the
DBI_Factory::createDbHandle method.
Notes
Connection to the NCIM topology database that resides in this domain will be attempted only when
required.
To ensure that the NCP::Domain constructor can print appropriate messages to a log file, you must
have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the constructor sends these messages to STDOUT.
Example Usage
The following code fragment illustrates a typical call to the NCP::Domain constructor:
Returns
Upon completion, the NCP::Domain constructor returns a new NCP::Domain object.
See Also
• “createDbHandle” on page 255
• “extractCmdLineOptions” on page 261
• “setLogHandle” on page 284
clone
The clone method creates a new domain that is a copy of an existing domain.
Method Synopsis
clone($domain)
Parameters
$domain
Specifies the name of an existing Network Manager domain for which you want to create a copy. You
created an instance of this domain by calling the NCP::Domain constructor.
Description
The clone method creates a new domain that is a copy of an existing domain.
Example Usage
The following code example illustrates a typical call to the clone method:
$copy->clone("NEWDOMAIN"); 2
1. This call to the NCP::Domain constructor does not specify any database connection options.
2. Uses the NCP::Domain object ($copy->) to directly invoke the clone method to create a new
domain (NEWDOMAIN) that is a copy of the existing domain.
Returns
Upon completion, the clone method does not return any data.
See Also
• “NCP::Domain Constructor” on page 277
• “setLogHandle” on page 284
create
The create method creates an entry in the domainMgr table for the specified domain if one does not
already exist.
Method Synopsis
create()
Parameters
None
Description
The create method creates an entry in the domainMgr table for the specified domain if one does not
already exist. In addition, the create method creates an entry in the domainSummary table for the
specified domain if one does not already exist. The domain name was specified in a previous call to the
NCP::Domain constructor.
The domainMgr table stores data on network domains. For the specified domain, the create method
inserts a row in the domainMgr table with values for the following table columns:
• domainName
• creationTime
• lastUpdated
• managerName
• webtopDataSource
Notes
To ensure that the create method can print appropriate error and other messages to a log file, you must
have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the method sends these messages to STDOUT.
Network Manager applications often use the NCP::Domain module methods in conjunction with the
methods that the NCP::DBI_Factory module provides.
Example Usage
The following code shows a call to the NCP::Domain constructor, which returns the newly created
NCP::Domain object to the $domain variable. The name of the domain is specified in $domainName
in the call to the NCP::Domain constructor. The %$ncimArgs hash reference contains the command
line arguments (database login options and values) in key/value format returned in a previous call to the
NCP::DBI_Factory::extractcmdLineOptions method.
.
.
.
my $domain = new NCP::Domain($domainName, %$ncimArgs);
.
.
.
The following code shows that the create method is invoked on the NCP::Domain object ($domain-
>). The create method creates entries in the domainMgr and domainSummary tables for the domain
specified in $domainName:
.
.
.
$domain->create();
.
.
.
Returns
Upon completion, the create method does not return any data.
drop
The drop method removes all references to the specified domain from the domainMgr table.
Method Synopsis
drop($domain)
Parameters
$domain
Specifies the name of an existing Network Manager domain for which you want to delete its
associated entry from the domainMgr table. You created an instance of this domain by calling the
NCP::Domain constructor.
Description
The drop method removes all references to the specified domain from the domainMgr table. This action
effectively deletes any entities in the NCIM topology database for the specified domain. The drop method
does not remove any configuration files associated with the specified domain.
Notes
To ensure that the drop method can print appropriate error and other messages to a log file, you must
have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the method sends these messages to STDOUT.
Network Manager applications often use the NCP::Domain module methods in conjunction with the
methods that the NCP::DBI_Factory module provides.
Example Usage
The example that illustrates a call to the drop method is divided into the following sections:
• Create a new NCP::Domain object
• Call drop to remove all references to the specified domain
Create a new NCP::Domain object
The following code shows a call to the NCP::Domain constructor, which returns a new NCP::Domain
object to the $domain variable. The name of the domain is specified in $domainName in the call to the
NCP::Domain constructor:
.
.
.
my $domain = new NCP::Domain($domainName, %$ncimArgs);
.
.
.
The following code shows an invocation of the drop method on the NCP::Domain object ($domain->):
Returns
Upon completion, the drop method does not return any data.
See Also
• “NCP::Domain Constructor” on page 277
• “setLogHandle” on page 284
• “NCP::DBI_Factory module reference” on page 253
id
The id method retrieves the domainMgrId from the domainMgr table in the NCIM topology database that
resides in the specified domain.
Method Synopsis
id()
Parameters
None
Description
The id method retrieves the domainMgrId from the domainMgr table in the NCIM topology database that
resides in this domain.
Notes
To ensure that the id method can print appropriate error and other messages to a log file, you must
have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle
method. Otherwise, the method sends these messages to STDOUT.
Example Usage
The example that illustrates a call to the id method is divided into the following sections:
• Create a new NCP::Domain object
• Call id to return the domainMgrId
Create a new NCP::Domain object
The following code shows a call to the NCP::Domain constructor, which returns a new NCP::Domain
object to the $domain variable. The name of the domain is specified in $domainName in the call to the
NCP::Domain constructor:
.
.
.
my $domain = new NCP::Domain($domainName, %$ncimArgs);
.
The following code shows an invocation of the id method on the NCP::Domain object ($domain->). The
id method returns the domainMgrId to the $domainMgrId variable. Note that $domainMgrId is used in
the call to the dropPollPolicies method.
.
.
.
my $domainMgrId = $domain->id();
.
.
.
dropPollPolicies($ncmonitor, $domainMgrId);
.
.
.
Returns
Upon completion, the id method returns the domainMgrId.
See Also
• “NCP::Domain Constructor” on page 277
• “setLogHandle” on page 284
name
The name method returns the name of the domain.
Method Synopsis
name()
Parameters
None
Description
The name method returns the name of the domain.
Example Usage
The example that illustrates a call to the name method is divided into the following sections:
• Create a new NCP::Domain object
• Call name to return the name of the domain
Create a new NCP::Domain object
The following code shows a call to the NCP::Domain constructor, which returns a new NCP::Domain
object to the $domain variable. The name of the domain is specified in $domainName in the call to the
NCP::Domain constructor:
.
.
.
The following code shows an invocation of the name method on the NCP::Domain object ($domain-
>). The name method returns the name of the domain to the $domainName variable. Note that
$domainName is used in the call to the createDbHandle method.
.
.
.
my $domainName = $domain->name();
.
.
.
Returns
Upon completion, the name method returns the name of the domain.
See Also
• “NCP::Domain Constructor” on page 277
• “createDbHandle” on page 255
setLogHandle
The setLogHandle method passes in a log handle associated with an opened file to the NCP::Domain
module methods. These methods can then write messages to this opened file.
Method Synopsis
setLogHandle($filehandle)
Parameters
$filehandle
Specifies a reference to a file handle (for example, IO::File) that points to an opened file to which
messages can be written.
Description
The setLogHandle method passes in the log handle specified in the $filehandle parameter to an internal
utility method called by the NCP::Domain module methods. This handle is associated with an opened
file to which this internal utility method writes messages. In effect, this opened file serves as a log file
that contains critical, informational, and warning type messages associated with the execution of the
NCP::Domain module methods.
If you do not call the setLogHandle method, the internal utility method writes these messages to
STDOUT.
.
.
.
my $domain = new NCP::Domain($domainName, %$ncimArgs);
.
.
.
.
.
.
my $logName = "$logdir/checkDomain.$domainName.log";
Returns
Upon completion, the setLogHandle method returns no data.
See Also
• “NCP::Domain Constructor” on page 277
setLogLevel
The setLogLevel method sets the log level for error and message reporting.
Method Synopsis
setLogLevel($loglevel)
Parameters
$loglevel
Specifies the log level to set. The following are the valid options described in ascending order:
• debug — Specifies a log level in which all messages are logged.
• info — Specifies a log level in which informational, warning, and critical messages are logged.
• warn — Specifies a log level in which warning and critical messages are logged.
• critical — Specifies a log level in which only critical messages are logged.
Example Usage
The example that illustrates a call to the setLogLevel method is divided into the following sections:
• Create a new NCP::Domain object
• Call setLogHandle to log messages to a specified open file
• Call setLogLevel to set the log level
Create a new NCP::Domain object
The following code shows a call to the NCP::Domain constructor, which returns a new NCP::Domain
object to the $domain variable. The name of the domain is specified in $domainName in the call to the
NCP::Domain constructor:
.
.
.
my $domain = new NCP::Domain($domainName, %$ncimArgs);
.
.
.
.
.
.
my $logName = "$logdir/checkDomain.$domainName.log";
.
.
.
$domain->setLogLevel("warn");
.
.
.
See Also
• “NCP::Domain Constructor” on page 277
• “setLogHandle” on page 284
summary
The summary method provides a summary of the current domain.
Method Synopsis
%summary = $domain->summary();
Parameters
None.
Description
The summary method provides a summary of the contents of the current domain.
Example Usage
my %summary = $domain->summary();
Returns
Upon completion, the summary method returns a hash containing the keys and values.
See Also
• “NCP::Domain Constructor” on page 277
disco.agents table
The agents table specifies the discovery agents that ncp_disco uses for the discovery. Every agent
that you want to run must have an insertion into the disco.agents table within the DiscoAgents.cfg
configuration file that enables that agent (set m_Valid=1). If m_Valid=0, the agent is not run.
m_AgentName • PRIMARY KEY Text The unique name of the discovery agent.
• NOT NULL
The disco.agents table also indicates agent precedence, which can be used when merging device
information to produce the workingEntities.finalEntity table. Precedence determines which records are
used when duplicate or conflicting records are reported by different discovery agents.
disco.config table
The config table configures the general operation of the discovery process.
m_CheckFileFinderReturns Externally Boolean Flag indicating whether to use the Ping finder
defined Integer to check the devices specified in the flat file
Boolean data supplied to the File finder.
type
• 1: This setting tells the Ping finder to
default = 0 check the devices specified in the flat file
supplied to the File finder. This setting is
recommended if you have reason to doubt
that some of the devices specified in the
flat file are still connected to the network.
• 0: This setting indicates that you do not
want to perform any checking of the
devices specified in the flat file supplied to
the File finder.
m_DisplayMode Integer Specifies how the display label used for GUI
network and network hop views should be
populated for main nodes.
• 0 - Use Entity Name (default)
• 1 - Use SysName. This option is useful
when it is not desirable to name
entities by sysName in the database (see
m_UseSysName) but it is desirable to have
the entities displayed in the GUI views with
a sysName.
baseName[<card>[<port>]
disco.convergedTopologies table
The convergedTopologies table stores information on how layers must be merged by the discovery
process.
disco.events table
The events table constrains discovery events generated to a standard format. An event is generated by
inserting a record into this table.
disco.ipCustomTags table
The ipCustomTags table stores custom tags, which can be associated with unique discovered entities
during the discovery and used to perform custom visualization and polling tasks.
disco.NATStatus table
The NATStatus table is used to configure the discovery system to use NAT.
m_UsingNAT • UNIQUE Boolean integer Indicates whether the discovery uses multiple
address spaces. If the discovery uses multiple
• NOT NULL address spaces, set the value to 1. If not, set
the value to 0.
disco.status table
Use the disco.status table to monitor the progress of the ncp_disco process during the discovery
process.
Attention: The disco.status table is used and updated internally, and you must not make inserts
into this table.
(
m_AgentName, m_Valid, m_AgentClass, m_IsIndirect, m_Precedence
)
values
(
'BayEthernetHub', 0, 2, 1, 3
);
scope.detectionFilter table
If you specify a filter in the detectionFilter table, only devices matching it are discovered.
Although you can configure the filter condition to test any of the columns in the Details.returns table,
when filtering IP devices you might need to use the IP address as the basis for the filter if you need to
restrict the detection of a particular device. If the device does not grant SNMP access to the Details agent,
the Details agent might not be able to retrieve MIB variables such as the Object ID. However, you are
guaranteed the return of at least the IP address when the device is detected.
scope.inferMPLSPEs table
Use the scope.inferMPLSPEs table when enabling inference of inaccessible provider-edge (PE) devices by
using the BGP data on the customer-edge (CE) devices. This table enables you to optionally specify which
zones to process to determine which of the inferred PE devices are valid devices.
To specify which zones to process to determine which of the inferred PE devices are valid devices
populate the scope.inferMPLSPEs table, using standard format scope entries, as in the scope.zones table.
scope.instantiateFilter table
When you specify a filter in the instantiateFilter table, only devices that pass the criteria are instantiated,
that is, sent to the DNCIM database. If no filter is specified, all discovered devices are instantiated.
Note that because the m_Protocol column must be unique, there must be only one insert into this table
for any given protocol. Multiple filters must be defined within a single insert.
scope.mplsTe table
The scope.mplsTe table defines the scope of MPLS Traffic Engineered (TE) tunnel discovery, and defines
what information is retrieved.
The following table shows the schema of the scope.mplsTe table.
m_Zones NOT NULL List of type zone Defines the scope in which the tunnel
heads will be discovered
m_AddressSpace Text Optional address space
scope.multicastGroup table
The scope.multicastGroup table defines which multicast groups to discover and which details to retrieve
from these groups.
The following table shows the schema of the scope.multicastGroup table.
scope.multicastSource table
The scope.multicastSource table defines which IPM routes to discover. This is particularly useful if you
have multiple IPM route sources, since you can scope multicast discovery by IPM route source to focus on
the sources of interest.
The following table shows the schema of the scope.multicastSource table.
m_Source NOT NULL list type zone The multicast source to be included or
excluded
scope.special table
The special table defines management IP addresses. A management address is an IP address on a device
whose only role is to manage the device. Management addresses do not handle network traffic.
scope.zones table
Use the zones table to define areas of the network to be either included or excluded from the discovery
process. A zone is typically defined as a list of varbinds. Varbinds are name = value pairs.
You can define multiple zones, and you can combine inclusion and exclusion zones. However, if you define
a combination of inclusion and exclusion zones, the exclusion zones must be within the scope of the
inclusion zones.
The above example filter ensures that only the following are further interrogated by the discovery:
• Devices that do not have the IP address 10.10.63.234.
• Devices that do not have the Object ID 1.3.6.1.4.1.*.
In the above example, the backslash (\) is used in conjunction with the not like comparison to escape
the . character, which would otherwise be treated as a wildcard.
snmpStack database
The snmpStack database defines the operation of the SNMP helper.
Description
The snmpStack database in defined in the SnmpStackSchema.cfg file.
Description
Any values inserted into this table override the values for m_GetNextBoundary and
m_GetNextSlowDown that have been specified in the snmpHelper.configuration table.
Schema
The snmpStack.accessParameters database table schema is described in the following table:
snmpStack.multibyteObjects table
The snmpStack.multibyteObjects table defines MIB objects that are checked to see if they are multibyte
strings.
Description
Sending a raw ASCII string back to the helper server can cause problems if the string contains characters
with special meaning in ASCII. If the MIB objects contain multibyte strings, the SNMP helper encodes
them.
Schema
The snmpStack.multibyteObjects database table schema is described in the following table:
Related reference
snmpStack.conversionCfg database table
The snmpStack.conversionCfg database table configures the SNMP Helper to replace characters that are
not allowed in the locale of the NCIM database with the question mark character: '?'.
Description
The SNMP Helper substitutes characters on only those objects that are configured in the
snmpStack.multibyteObjects table.
Inserts into this database table are configured in the SnmpStackSchema.cfg file.
Related reference
snmpStack.multibyteObjects table
The snmpStack.multibyteObjects table defines MIB objects that are checked to see if they are multibyte
strings.
Description
The security parameters must be configured, as specified by the SNMP version, in order to gain SNMP
access to network devices. An example of this is the use of community strings for SNMP versions 1 and 2,
as well as the specification of the different security levels offered by SNMP V3.
Schema
The snmpStack.verSecurityTable database table schema is described in the following table:
telnetStack database
The telnetStack database defines the Telnet access parameters for devices.
Description
The telnetStack database is defined in the TelnetStackSchema.cfg file.
Schema
The telnetStack.passwords database table schema is described in the following table:
m_Password NOT NULL Text The password to try for this subnet or IP address.
Default = "\n" (carriage return).
m_TimeOut Integer The time to wait for a response from the device, in
milliseconds.
m_Username Text The username to try for this subnet or IP address.
Default = "".
agents.definitions table
The agents.definitions table contains scheduling information for every discovery agent, extracted from the
information in the discovery agent file.
m_Phase Default = 1 Integer The discovery phase by the end of which the
agent is expected to complete.
agents.sourceInfo table
The agents.sourceInfo table holds information on the types of data source used by an agent.
m_DiscoveryProtocol NOT NULL Text The protocol used by the agent to get data from
this source. Possible values are:
• Unknown
• Other
• Manual
• FlatFile
• SNMP
• Telnet
• XML-RPC
• VSphere
• OtherJavaAPI
• TL1
• CORBA
m_RequiredField List type text Lists a field that must exist in the main node
record in order for the entity to be considered
of this source.
agents.status table
The agents.status table contains information about the present status of the agent.
m_NumConnects Default = 0 Integer The number of times that DISCO has connected
to the agent.
stitchers.triggers table
The stitchers.triggers table contains an extraction of the criteria that determine the trigger for the stitcher.
stitchers.actions table
If a stitcher is inserted into the stitchers.actions table, DISCO runs the stitcher. Once the stitcher has
completed, its entry is deleted from the stitchers.actions table. Any stitchers triggered to execute from
the stitcher that has been inserted, or upon completion of the stitcher, are also executed.
You can also configure other actions to take place on completion of the stitcher, so that the discovery
cycle completes from that point onwards.
Subprocess databases
The finders, Details, and agent databases are used during the discovery by the discovery engine
subprocesses to store information retrieved from the network. The databases are defined within the
configuration file, DiscoSchema.cfg.
The subprocess databases include:
• The finders database, which is used by the finders to store information about device existence.
• The Details database, which is used by the Details agent to store basic device information.
• The discovery agent databases, which are created using a template.
The finders, Details and AssocAddress agents must always be run, so their databases are defined in the
DiscoSchema.cfg configuration file. The databases for the rest of the discovery agents are created based
on a template that is defined in the DiscoSchema.cfg configuration file.
finders.despatch table
The finders.despatch table contains a record of all the requests sent to the finders and the current status
of the requests.
• NOT NULL
finders.returns table
When a finder finds a device, it returns the information to the finders.returns table, provided that the
discovery is still in the device discovery phase, that is, data collection phase one. If the discovery is in the
blackout state, the finders return the information to the pending table.
The returns table serves as a transfer point, notifying the system that a device exists. By default, a stitcher
sends the device information to the Details agent to discover basic device information.
finders.pending table
The pending table accepts device information when the returns table has been locked out by DISCO. The
returns table has to be locked during data processing because even though the data collection stage has
completed, it does not necessarily mean that all the devices on the network have been discovered.
Network entities that have been sent to the pending table are processed after the current discovery cycle
has been completed.
m_UniqueAddress • PRIMARY KEY Text A string that uniquely identifies this entity. The
• UNIQUE content of this field is unconstrained, and might
be an IP address or an element management
• NOT NULL system (EMS) key.
m_Creator Text The finder that created this record in the table.
m_AddressSpace Text The name of the NAT address space to which the
device belongs.
This value is set in the
translations.NATAddressSpaceIds table. If the
discovery is not using NAT, or if the device is in
the public domain, this value is NULL.
finders.processing table
The processing table contains a record of all the discovered entities that are currently being processed
by DISCO. Any device that has been reported to the returns table and is awaiting the next action to take
place has an entry in the processing table.
CollectorDetails.despatch table
The despatch table contains basic information about devices that have been detected by the collector
finders. When data is placed in this table, the CollectorDetails agent automatically interrogates the
network for more detailed device information.
m_UniqueAddress • PRIMARY KEY Text A string that uniquely identifies this entity.
• NOT NULL The content of this field is unconstrained,
and might be an IP address or an element
management system (EMS) key.
m_ManagerId NOT NULL Text Identifies the manager of the device. Takes
the value "" if device is accessed directly.
CollectorDetails.returns table
The returns table holds detailed device information retrieved by the CollectorDetails agent. Information
inserted into this table is automatically processed by the stitchers so that the device connectivity can be
discovered by the appropriate discovery agent.
details.despatch table
The despatch table contains basic information about devices that have been detected by the finders.
When data is placed in this table, the Details agent automatically interrogates the network for more
detailed device information.
m_ManagerId NOT NULL Text Identifies the manager of the device. Takes
the value "" if device is accessed directly.
Finders databases
Finders determine device existence. Each of the finders uses a different method to discover network
devices. You can enable finders for your discovery by configuring them as managed processes of DISCO in
their respective configuration files. Finders are automatically launched at the appropriate time, provided
that CTRL is running.
Each finder must be configured by editing its configuration file. The finders discover the existence of
devices and report these devices back to the finders database, but do not discover connections.
Note that the finders database is distinct from the databases that are associated with the individual
finders.
The finders are described in the table below, with their executable name and the location of their
configuration file. $NCHOME is the environment variable that contains the path to the netcool directory.
Description
The collectorFinder database is defined in the DiscoCollectorFinderSchema.cfg configuration file.
It has the following tables:
• collectorFinder.collectorRules
• collectorFinder.configuration
Description
You can override some of the settings for particular collectors in the collectorFinder.configuration table.
The collectorRules table can contain multiple records.
Schema
The collectorFinder.collectorRules database table schema is described in the following table:
m_Port • PRIMARY KEY Text The port on which the collector is listening.
• NOT NULL If the collector is running on the same host
as Network Manager, then this is a Network
Manager port.
This field may be configured for both a
discovery and a rediscovery.
Schema
The collectorFinder.configuration database table schema is described in the following table:
dbEntryFinder database
The dbEntryFinder database defines the operation of the Database finder.
Description
The dbEntryFinder database is defined in the DiscoDBEntryFinderSchema.cfg file. It has the following
tables:
• dbEntryFinder.configuration
• dbEntryFinder.dbQueries
Schema
The dbEntryFinder.configuration database table is described in the following table.
Schema
The dbEntryFinder.dbQueries database table schema is described in the following table:
m_DBEntryName • NOT NULL Text The unique name of this database entry.
• UNIQUE
m_TriggerType NOT NULL Integer Indicates which trigger type invokes this
query:
• 1 Full discovery
• 2 Partial rediscovery
• 3 Forced rediscovery
fileFinder database
The fileFinder database defines the operation of the File finder.
Description
The fileFinder database is defined in the DiscoFileFinderParseRules.cfg file. It has the following tables:
• fileFinder.configuration
• fileFinder.parseRules
Schema
The fileFinder.configuration database table is described in the following table.
Description
The fileFinder.parseRules table specifies the rules for file parsing.
A typical file that you would parse, for example, is the /etc/hosts file on the machine running DISCO.
You can also seed the discovery by parsing the /etc/defaultrouter file.
Schema
The fileFinder.parseRules database table schema is described in the following table:
m_FileName • NOT NULL Text The unique full path and filename of the file
• UNIQUE to be parsed, for example, /etc/hosts.
pingFinder database
The pingFinder database defines the operation of the Ping finder.
Description
The pingFinder database is defined in the DiscoPingFinderSeeds.cfg file. It has the following tables:
• pingFinder.configuration
• pingFinder.pingFilter
• pingFinder.pingRules
• pingFinder.scope
Description
The pingFinder.configuration table allows you to configure the way devices are pinged, including enabling
broadcast or multicast pinging. Although pinging of broadcast/multicast addresses allows devices to be
discovered more quickly than other detection methods, it is sometimes less desirable to do so under
certain network conditions, such as when the network is heavily congested. In general, you would ping
broadcast addresses on an unknown sparsely populated network. You must only ping multicast addresses
where they have been set up on the network.
Schema
The pingFinder.configuration database table schema is described in the following table:
m_TimeOut Integer The maximum time to wait for a reply from a pinged
address (the timeout).
Description
You may wish to exclude certain interfaces, such as ISDN and modem interfaces, because pinging these
interfaces generates phone calls, which costs money. If you configure the Ping finder to use both the
scope.zones table and the pingFinder.pingFilter table, the Ping finder pings those devices or subnets it
has been seeded with if they are within either the discovery scope or the Ping finder scope.
Schema
The pingFinder.pingFilter database table schema is described in the following table:
Description
The pingRules table can contain multiple records.
Schema
The pingFinder.pingRules table is described in the following table.
Description
You can use the pingFinder.scope table to configure the way the Ping finder checks whether it is allowed
to ping a particular device. You can exclude particular devices or subnets from being pinged by the Ping
finder.
Schema
The pingFinder.scope database table schema is described in the following table:
ARPhelper.ARPHelperConfig table
The ARPhelper.ARPHelperConfig database table configures the general operation of the ARP helper.
The ARPhelper.ARPHelperConfig database table is described in the following table.
m_HelperLogfile Text The full path and file for the logfile of
the current helper.
Optional
The m_HelperDoWeQuery and m_HelperDoWeStore fields each have two related optional fields. A record
entered into either m_HelperDoWeQuery or m_HelperDoWeStore is the default setting to which the
helper responds if no records are entered into the optional fields. However, a record entered into either of
the related optional fields overrides the default setting.
For example, if m_HelperDoWeQuery is set to query the network rather than the cache (that is,
m_HelperDoWeQuery=0) and if an IP address of 192.168.0.1 is specified in m_HelperDoQueryVBs, then
a request record where m_IpAddress = 192.168.0.1 results in the cache being queried rather than
the network. The network is only queried if the information is not currently held in the cache.
ARPhelper.ARPHelperTable table
The ARPHelper.ARPHelperTable database table stores information about the requests the ARP helper
makes from the network.
The ARPHelper.ARPHelperTable database table is described in the following table.
ARPHelper.configuration table
The ARPHelper.configuration database table defines the number of threads the helper uses.
The ARPHelper.configuration database is described in the following table.
DNSHelper database
The DNSHelper database is defined in NCHOME/etc/precision/DiscoHelperServerSchema.cfg.
The DNSHelper database table stores information about the requests that the DNS helper makes from the
network, and configuration information for the DNS helper.
• UNIQUE
DNSHelper.DNSHelperConfig table
The DNSHelper.DNSHelperConfig table holds configuration information for the DNS helper.
The DNSHelper.DNSHelperConfig table is described in the following table.
DNSHelper.configuration table
The DNSHelper.configuration database table configures the operation of the DNS Helper. This table must
contain only one record
The DNSHelper.configuration table is described in the following table.
m_MethodList List of text An ordered list of the methods for name retrieval.
DNShelper.methods table
The DNShelper.methods database table holds information used by the DNS Helper to access devices.
The DNShelper.methods database table is described in the following table.
PingHelper database
The PingHelper database is defined in NCHOME/etc/precision/DiscoHelperServerSchema.cfg.
PingHelper.configuration table
The PingHelper.configuration database table configures broadcast and multicast pinging.
Although pinging broadcast and multicast addresses allows devices to be discovered quicker than other
detection methods, it is not advisable to do so under certain network conditions; for instance, when the
network is heavily congested.
The PingHelper.configuration database table must contain only one record.
The schema of the PingHelper.configuration database table is described in the following table.
PingHelper.PingHelperConfig table
The PingHelper.PingHelperConfig database table configures the operation of the Ping helper.
The schema of the PingHelper.PingHelperConfig database table is described in the following table.
snmpHelper database
The snmpHelper database configures the operation of the SNMP Helper. This database is defined in
NCHOME/etc/precision/DiscoSnmpHelperSchema.cfg.
snmpHelper.configuration table
The snmpHelper.configuration database table configures the operation of the SNMP Helper.
The snmpHelper.configuration database table is described in the following table.
Schema
The snmpHelper.dependentInstanceFilter database table schema is described in the following table:
MIB_variable_name in
(eval(list_type,'&MIB_table.MIB_entry'))
Schema
The snmpHelper.instanceFilter database table schema is described in the following table:
m_Filter not null, text The name of the interface filter. The name must be unique.
Name primary
key
m_Device not null text The device filter is applied to each discovered device to determine whether or
Filter not to apply the interface filter.
The filter must be in the following form:
m_Device list Specifies any OIDs that need to be retrieved in order to allow the evaluation
FilterOids type of the device filter defined in the m_DeviceFilter field. The OIDs are usually
text determined programatically from the value of m_DeviceFilter. You do not
normally need to define the OIDs manually.
m_Instan text The interface filter to be applied to the filtered tables. The interface filter is only
ce applied to devices that match the device filter. Only rows from those tables with
Filter interfaces that match this filter are returned.
The filter must be in the following form:
Restriction: You can configure inserts into only one of the m_InstanceFilter or
m_InstanceFilterTable fields.
Restriction:
The MIB variable used in the interface filter must be from a table that is keyed
on ifIndex, for example, from ifTable or ifXTable.
m_Instan list The m_InstanceFilters field contains the full collection of interface filters.
ce type The full interface filters are automatically generated from the contents of the
Filters obje m_InstanceFilter or m_InstanceFilterTable fields.
ct
type Restriction: User-configured inserts into this field are not supported.
vblis
t
snmpHelper.SnmpHelperConfig table
The snmpHelper.SnmpHelperConfig database table configures the operation of the SNMP Helper.
The schema of the snmpHelper.SnmpHelperConfig database table is described in the following table.
snmpFilter database
The snmpFilter database is automatically populated with information about devices that have SNMP
interface filters applied to them. You can also define dependent SNMP interface filters in this database
table.
Description
The snmpFilter database is defined in the NCHOME/etc/precision/DiscoSnmpHelperSchema.cfg
file.
Schema
The snmpFilter.instances database table schema is described in the following table:
m_HostIP not null text The IP address of the device to which this
filter is applied.
m_FilterName not null text The name of the filter from which the
instance list was generated.
m_InstanceFilterTables not null list type text The list of the tables to which this interface
filter applies.
m_InstanceList list type text The list of instances for this device that
match the filter.
TelnetHelper database
The TelnetHelper database defines the operation of the Telnet helper.
• UNIQUE
XmlRpcHelper.configuration table
The XmlRpcHelper.configuration database table configures the threads and timeout for the XMLRPC
helper.
The XmlRpcHelper.configuration database table must contain only one record. The
XmlRpcHelper.configuration database table is described in the following table.
XmlRpcHelper.XmlRpcHelperConfig table
The XmlRpcHelper.XmlRpcHelperConfig helper database table configures the operation of the XMLRPC
Helper.
The schema of the XmlRpcHelper.XmlRpcHelperConfig database table is described in the following table.
Text The full path and file for the logfile of the
m_HelperLogFile
current helper.
optional
XmlRpcHelper.XmlRpcHelperTable table
The XmlRpcHelper.XmlRpcHelperTable configures the operation of the XMLRPC helper.
The schema of the XmlRpcHelper.XmlRpcHelperTable database table is described in the following table.
translations database
The translations database is defined in the $NCHOME/etc/precision/DiscoSchema.cfg file. It has
several fully qualified database table names.
The fully qualified database table names for the translations database are as follows:
• translations.ipToBaseName
• translations.vlans
• translations.NAT
translations.ipToBaseName table
The ipToBaseName table is a registry of discovered devices and the IP addresses associated with those
devices.
When a device has multiple interfaces, and therefore multiple IP addresses, the Associated Address
agent downloads all the associated addresses, stores them in the ipToBaseName table and allows the
appropriate discovery agents to discover the device. Any subsequent attempt to discover the device
by means of another of its IP addresses is halted when the Associated Address agent checks the
ipToBaseName table, that is, before the device details are passed to the appropriate discovery agent.
m_WorkAddress NOT NULL Text The address that was used for data retrieval.
m_Protocol NOT NULL Integer Protocol for this address. This field can take
the following values:
• 1: IPv4
• 3: IPv6
m_Name • PRIMARY KEY Text The name of the device associated with
• NOT NULL this entry.
translations.NAT table
The NAT table is used to hold static NAT mappings. The mapped devices are discovered even if they are
outside the scope of the discovery.
translations.NATAddressSpaceIds table
The NATAddressSpaceIds table is used to identify the IP addresses of NAT gateways and specify an
address-space identifier for each one.
specialManagementIPs table
After the discovery processing phase, this table contains an entry for each IP address that was in scope,
based on the entries in the scope.special table.
instrumentation.name table
The name table contains a record of the unique name of every discovered device.
instrumentation.subNet table
The subNet table contains a record of every discovered subnet address and mask.
instrumentation.vlan table
The vlan table contains a record of every discovered VLAN.
m_IfDlci • PRIMARY KEY Integer The Frame Relay device Data Link
• NOT NULL Connection Identifier.
• UNIQUE
m_IfIndex • PRIMARY KEY Integer The unique value for each device interface.
• NOT NULL
instrumentation.ciscoFrameRelay table
The ciscoFrameRelay table contains a record of every discovered Cisco Frame Relay device.
m_FRIfIndex • PRIMARY KEY Integer The unique value for each device interface.
• NOT NULL
m_FRDlci • PRIMARY KEY Integer The Frame Relay device Data Link
• NOT NULL Connection Identifier.
• UNIQUE
instrumentation.hsrp table
The hsrp table contains a record of every discovered Hot Standby Router Protocol (HSRP) device.
• UNIQUE
m_PeerGroupId • PRIMARY KEY Text The lowest level PNNI peer group
• NOT NULL identifier.
• UNIQUE
instrumentation.fddi table
The fddi table contains the Fibre Distributed Data Interface (FDDI) nodes that have been discovered.
workingEntities database
The workingEntities database is defined in $NCHOME/etc/precision/DiscoSchema.cfg. Its fully qualified
database table names are: workingEntities.finalEntity; workingEntities.containment.
The workingEntities database provides a central repository for information about discovered entities and
the containment details associated with each of these entities. However, this database is populated only
at the end of the discovery process.
workingEntities.finalEntity table
The finalEntity table is a central repository for information about discovered entities.
workingEntities.containment table
The containment table is a central repository for information about containment information for
discovered entities. It shows the containment relationships between all entities in the finalEntity table.
As an example of how the containment table works, assume the finalEntity table includes the following
distinct entities:
• A device with IP address 1.2.3.4
• An interface on this device, 1.2.3.4[0[1]]
m_Container='1.2.3.4'
m_Part='1.2.3.4[0[1]]'
m_IsPhysical=1
m_LinkType=1
Note that m_Container and m_Part are each unique names of entities on the network, each with a unique
m_Name in the finalEntity table.
m_Part • PRIMARY KEY Text The name of the object which is contained.
• NOT NULL This object refers to an entity on the
network and corresponds to an entity with
its own entry and unique m_Name in the
workingEntities.finalEntity table.
workingEntities.interfaceMapping
The interfaceMapping table enables the stitching to quickly identify interfaces.
The following table lists the columns in the interfaceMapping table.
Note: Not all the fields in this table are populated; however, the use of this table provides a fast way of
looking up data.
m_BaseName Not null Text Name of the "Base Entity" for this device.
dbModel database
The dbModel database maps custom discovery data from discovery agents to NCIM tables.
The dbModel database is used for mapping data that hs been retrieved by discovery agents to the
appropriate tables in the NCIM topology database. It is defined in the NCHOME/etc/precision/
ModelNcimDB.cfg configuration file.
dbModel.access table
The dbModel.access table configures database access.
The following table shows the schema for the dbModel.access database table.
EnumGroupFilter NOT NULL Text Lists the enumerations groups that contain
enumerations that can be used in the
entity maps defined in the dbModel.entityMap
table. The enumerations are defined in the
enumerations table in the NCIM topology
database.
TransactionLength NOT NULL Integer The number of SQL statements to execute within
a single transaction during topology upload
before committing.
WebTopDataSource NOT NULL Text The name of the Webtop Datasource to use. This
value can be different from the ObjectServer
name.
DomainHost Text The hostname that Topoviz connects to. This
is set in the entry for ncp_config in the
ServiceData.cfg configuration file. This field
should be left blank unless you need to
overwrite this value.
DomainPort Integer The port that Topoviz connects to. This
is set in the entry for ncp_config in the
ServiceData.cfg configuration file. This field
should be left blank unless you need to
overwrite this value.
The following example insert includes ospfIfType (shown here in bold type) in the enumerations to be
downloaded:
Because the enumeration for ospfIfType was downloaded, the integer value of ospfIfType from the
workingEntities.finalEntity table is mapped to a meaningful string in the record in the NCIM topology
database. For example, instead of 3, the value for the interface type is stored as pointToPoint.
dbModel.entityDetails table
The dbModel.entityDetails table defines extra information to be added to the EntityDetails table in the
NCIM topology database.
The following table shows the schema for the dbModel.entityDetails database table.
EntityType Primary Key Integer Any entities of this type will have the
entityDetails field in NCIM enriched with the
fields from EntityDetails. A single insert is
allowed per entity type.
EntityDetails NOT NULL Object type A list of key-value pairs that, if they are present,
vblist are inserted into the EntityDetails table in the
NCIM topology database. Use this field to set
multiple values for the same entity type.
dbModel.entityMap table
The dbModel.entityMap table defines how values are mapped from the discovery
workingEntities.finalEntity table to dNCIM and NCIM.
The NCHOME/etc/precision/ModelNcimDB.cfg configuration file contains example inserts showing
how to add data for new and existing entities.
The following table shows the schema for the dbModel.entityMap database table.
EntityFilter NOT NULL Text The filter to apply to the contents of the
workingEntities.finalEntity database table. Any
entity matching the filter has the entityMap
applied to it.
TableName NOT NULL Text The name of table to be populated in dNCIM or
NCIM.
DisplayLabel Text Evaluated in the same way as FieldMap.
Populates the entityData.displayLabel field for
different types of entity.
FieldMap NOT NULL Object of type Maps the fields of the table defined by the
vblist TableName value to the evaluation against
the data from the workingEntities.finalEntity
database table.
Connection Object of type This field is not used.
vblist
Relationships Object of type List of relationships that this entity has with
vblist other entities. For example, if it connects or
contains other entities.
Iterators Object of type Used to iterate over lists in the OQL record.
vblist
ImplicitEntities Object of type Defines any new entities to be created in NCIM
vblist that are not explicitly represented in ncp_model.
StitcherDefined Boolean If this is 1, then the mapping is done by the
integer stitchers and not by this table. By default, this
value is 0.
m_NbrName • PRIMARY KEY Text The name of the device that is connected to
• NOT NULL the unique network entity.
dNCIM schema
The dNCIM database holds the containment model that is derived from the workingEntities.finalEntity,
workingEntities.containment and layer tables, mainly fullTopology.entityByNeighbor. The model is built by
the stitchers located in the dNCIM subdirectory, $NCHOME/precision/disco/stitchers/DNCIM. This is the
version of the topology that is sent to the ncp_model component
The dNCIM database contains the same tables as the NCIM topology database. These NCIM tables hold
topology information about the network In addition, dNCIM contains extra tables that store processing
data as the topology is being built.
Related concepts
Data schema
In the NCIM database, Network Manager topology data falls into different categories.
Data dictionary
The NCIM topology database schema is made up of a set of relational database tables that represent the
topology model.
rediscoveryStore database
The rediscoveryStore database is used for comparison purposes in rediscovery mode. It is
defined in $NCHOME/etc/precision/ DiscoSchema.cfg. Its fully qualified database table names are:
rediscoveryStore.dataLibrary; rediscoveryStore.rediscoveredEntities
The rediscoveryStore database holds information from previous discovery cycles that can be used for
comparison purposes during a full or partial rediscovery.
m_CompareDb NOT NULL Text The entity that is used to compare this
network entity.
rediscoveryStore.rediscoveredEntities table
The rediscoveredEntites table stores entities found during a rediscovery.
ncimCache database
This database stores topology updates from DNCIM.
The ncimCache database is created by ncp_model. The ncp_model process sends topology updates
on the message bus to all subscribers in the format of this database. The ncp_g_event and ncp_store
processes subscribe to topology updates and keep a copy of the ncimCache database.
The Event Gateway stitchers use data from the ncimCache database.
You can query the ncimCache database tables on the service model.
ncimCache.collects table
The ncimCache.collects table lists all the entities participating in a given collection.
The following table shows the schema for the ncimCache.collects database table.
{
ENTITYID=31051;
ENTITYNAME='SUBNET_OBJECT / 192.168.232.24 / 30 /';
MSGTYPE='collects';
collects=[
{
ENTITYNAME='some-device.1[ 0 [ 33 ] ]';
SEQUENCE=0;
},
{
ENTITYNAME='some-device.2[ 0 [ 25 ] ]';
SEQUENCE=0;
}
];
}
Related reference
collects
The collects table stores data on collections of entities, such as subnets and MPLS VPNs. This table
belongs to the category collections.
ncimCache.connectActions table
The ncimCache.connectActions table lists all changes made manually to connections in the topology.
The following table shows the schema for the ncimCache.connectActions database table.
{
ENTITYID=60857;
ENTITYNAME='MyManualDevice';
MANUAL=1;
MSGTYPE='connectActions';
connectActions=[
{
ACTION='add';
AENDENTITYNAME='MyManualDevice';
CHANGETIME='2013-07-08 11:50:58';
CONNECTACTIONSID=61;
DESCRIPTION='';
LOCATION='192.168.78.108';
MANUAL=1;
TOPOENTITYNAME='Layer1Topology';
UNIDIRECTIONAL=0;
USERNAME='defaultWIMFileBasedRealm/itnmadmin';
ZENDENTITYNAME='bungle';
}
];
}
Related reference
connectActions
The connectActions table records all manual connection additions and all connection removals, including
removal of connections that were discovered rather than manually added.
ncimCache. connectstable
The ncimCache.connects table describes the type and speed of connections between devices.
The following table shows the schema for the ncimCache.connects database table.
connects NOT NULL List of name/ A list of name/value pairs for the connection.
value pairs ENTITYNAME
Corresponds to zEndEntityID in the
connects table in the NCIM database.
MANUAL
This value is 1 if the connection was
manually added. The connection can be
between discovered devices, manually
added devices, or both. If the connection
was not manually added, this name/value
pair is not present.
TOPOENTITYNAME
Corresponds to entityId in the
topologyLinks table in the NCIM
database.
UNIDIRECTIONAL
Corresponds to unidirectional in the
connects table in the NCIM database.
{
ENTITYID=42795;
ENTITYNAME='mydevice[ 0 [ 25 ] ]';
MSGTYPE='connects';
Related reference
connects
The connects table stores data on connectivity between devices. This table belongs to the category
collections.
connectSpeeds
The connectSpeeds table stores data on connectivity speed between devices.
ncimCache. containstable
The ncimCache.contains table lists containment information for a device.
The following table shows the schema for the ncimCache.contains database table.
{
ENTITYID=40892;
ENTITYNAME='my-device.mylab';
MSGTYPE='contains';
contains=[
{
ENTITYNAME='my-device.mylab[ 0 [ 31 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 19 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 20 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 22 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 23 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 24 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 25 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 26 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 27 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 28 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 30 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 35 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 37 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 39 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 41 ] ]';
UPWARDCONNECTION=1;
},
{
ENTITYNAME='my-device.mylab[ 0 [ 43 ] ]';
UPWARDCONNECTION=1;
},
{
Related reference
contains
The contains table stores data on physical and logical containment. This table belongs to the category
containment.
ncimCache.dependency table
The ncimCache.dependency table lists entities that are dependent on other devices.
The following table shows the schema for the ncimCache.dependency database table.
{
ENTITYID=60844;
ENTITYNAME='baseStation12';
MSGTYPE='dependency';
dependency=[
{
DEPENDENCYTYPE=0;
ENTITYNAME='Cell-01';
}
];
}
Related reference
dependency
The dependency table defines a general dependency between two entities. This table belongs to the
category dependency.
ncimCache.domainMembers table
The ncimCache.domainMembers table shows the domain to which an entity belongs.
The following table shows the schema for the ncimCache.domainMembers database table.
{
ENTITYID=42739;
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ]';
MSGTYPE='domainMembers';
domainMembers=[
{
DOMAINNAME='DOMAIN1';
}
];
}
Related reference
domainMembers
ncimCache.entityActions table
The ncimCache.entityActions table lists all devices added using the manual topology API.
The following table shows the schema for the ncimCache.entityActions database table.
{
ENTITYID=60857;
ENTITYNAME='MyManualDevice';
MANUAL=1;
MSGTYPE='entityActions';
entityActions={
ACTION='add';
CHANGETIME='2013-07-08 11:50:31';
DESCRIPTION='';
DOMAINNAME='STEPH';
ENTITYACTIONSID=106;
ENTITYID=60857;
ENTITYNAME='MyManualDevice';
LOCATION='192.168.78.108';
MANUAL=1;
USERNAME='defaultWIMFileBasedRealm/itnmadmin';
};
}
Related reference
entityActions
The entityActions table records all manual node additions and all node removals, including removal of
nodes that were discovered rather than manually added and the swapping of nodes into and out of a
domain.
ncimCache.entityData table
The ncimCache.entityData table holds different kinds of data about entities.
The following table shows the schema for the ncimCache.entityData database table.
{
BASENAME='xx-xx-xxnn.xx.test.lab';
ENTITYID=40892;
ENTITYNAME='xx-xx-xxnn.xx.test.lab';
ENTITYTYPE=1;
METACLASS='Element';
MSGTYPE='entityData';
classMembers={
CLASSID=33;
ENTITYID=99999;
};
computerSystem={
ENTITYID=99999;
};
discoverySource=[
{
DISCOVERYPROTOCOL='SNMP';
ENTITYID=40892;
MANAGEDBY='DirectAccess';
SOURCE='Agent';
}
];
entityData={
CDMADMINSTATE=0;
CHANGETIME='2013-06-26 14:21:10';
CREATETIME='2013-06-26 14:21:10';
DESCRIPTION='Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M),
Version 12.4(24)T7, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Tue 28-Feb-12 10:43 by prod_rel_team';
{
BASENAME='my-device1.mylab';
CONNECTIONS=['my-device2.mylabb[ 0 [ 25 ] ]'];
ENTITYID=42739;
ENTITYNAME='my-device1.mylab[ 0 [ 33 ] ]';
ENTITYTYPE=2;
METACLASS='Element';
MSGTYPE='entityData';
entityData={
CDMADMINSTATE=2;
CHANGETIME='2013-06-26 14:21:24';
CREATETIME='2013-06-26 14:21:24';
DISPLAYLABEL='[ IfIndex:33 ]';
ENTITYID=42739;
ENTITYNAME='my-device1.mylab[ 0 [ 33 ] ]';
ENTITYTYPE=2;
MAINNODEENTITYID=40892;
MANUAL=0;
};
networkInterface={
ACCESSIPADDRESS='2222:22a:2a2e:222::22';
ACCESSPROTOCOL='IPv6';
CONNECTORPRESENT='false';
{
BASENAME='my-device1.mylab[ 0 [ 33 ] ]->my-device2.mylab[ 0 [ 25 ] ]';
ENTITYID=50401;
ENTITYNAME='my-device1.mylab[ 0 [ 33 ] ]->my-device2.mylab[ 0 [ 25 ] ]';
ENTITYTYPE=40;
METACLASS='Element';
MSGTYPE='entityData';
entityData={
CDMADMINSTATE=0;
CHANGETIME='2013-07-03 10:46:35';
CREATETIME='2013-07-03 10:46:35';
DESCRIPTION='Sequential Hop between my-device1.mylab[ 0 [ 33 ] ] and
my-device2.mylab[ 0 [ 25 ] ]';
DISPLAYLABEL='my-device.mylab[ 0 [ 33 ] ]->my-device2.mylab[ 0 [ 25 ] ]';
ENTITYID=50401;
ENTITYNAME='my-device1.mylab[ 0 [ 33 ] ]->my-device2.mylab[ 0 [ 25 ] ]';
ENTITYTYPE=40;
MANUAL=0;
};
ipConnection={
ENTITYID=50401;
};
}
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
ncimCache.hostedService table
The ncimCache.hostedService table maps a main node device, the hosting entity, to the service or
applications that are running on that device, the hosted entities. The hostedService table belongs to the
category entities.
The following table shows the schema for the ncimCache.hostedService database table.
{
ENTITYID=8734;
ENTITYNAME='router3.ibm.com';
MSGTYPE='hostedService';
hostedService=[
{
ENTITYNAME='OSPF_RoutingService_ID_192.168.34.21_RD_[0]';
}
];
}
Related reference
hostedService
A hosted service is a service or application running on a specific main node device. The hostedService
table maps a main node device, the hosting entity, to the service or applications that are running on that
device, the hosted entities. The hostedService table belongs to the category entities.
ncimCache.lingerTime table
The ncimCache.lingerTime table stores the linger time for a device.
The following table shows the schema for the ncimCache.lingerTime database table.
lingerTime NOT NULL List of name/ A list of name/value pairs for the entity.
value pairs LINGERTIME
The linger time is the number of discoveries
that a device can fail to be found in before it
is removed from the topology.
The linger time is set for a device when it
is instantiated, from the default value in the
model.config table. Each time that a device
in the topology is not discovered, the linger
time is decreased by 1. When the linger time
is zero, if the device is not discovered, it is
removed from the topology.
{
BASENAME='somedevice.mylab';
ENTITYID=40892;
ENTITYNAME='somedevice.mylab';
ENTITYTYPE=1;
MSGTYPE='lingerTime';
lingerTime={
LINGERTIME=2;
};
}
Related reference
lingerTime
The lingerTime table stores the linger time for a device. The linger time is the number of discoveries that a
device can fail to be found in before it is removed from the topology.
ncimCache.managedStatus table
The ncimCache.managedStatus table stores the managed status information for network entities.
The following table shows the schema for the ncimCache.managedStatus database table.
managedStatus NOT NULL List of name/ A list of name/value pairs for the entity.
value pairs STATUS
The managed status of an entity can be one of the
following values:
0
Managed state. The entity is managed. A device
can be set to managed by using the Topoviz
or the Structure Browser GUIs, or by using the
ManagedNode.pl or RemoveNode.pl scripts.
1
Unmanaged state. The entity is unmanaged. A
device can be set to unmanaged by using the
Topoviz or the Structure Browser GUIs, or by using
the UnManagedNode.pl or RemoveNode.pl
scripts.
2
Unmanaged by ncp_disco. This setting cannot
be modified from the GUI. This value is set
by the PopulateDNCIM_ManagedStatus.stch
stitcher.
3
Unmanaged because the IP address is out
of the discovery scope. The device has been
discovered through another IP address that
is within the discovery scope. A managed
status of 3 is usually given to interfaces,
rather than chassis. This value is set
by the PopulateDNCIM_ManagedStatus.stch
stitcher.
Note: Unmanaged entities do not suppress other
events in RCA. The ncp_poller process does not
poll unmanaged entities. Events on unmanaged
entities have the field NmosManagedStatus set in the
alerts.status field in the ObjectServer.
{
BASENAME='somedevice';
ENTITYID=42766;
ENTITYNAME='somedevice[ 0 [ 47 ] ]';
ENTITYTYPE=2;
MSGTYPE='managedStatus';
managedStatus={
STATUS=1;
};
}
ncimCache.networkPipe table
The ncimCache.networkPipe table represents managed connections.
The following table shows the schema for the ncimCache.networkPipe database table.
{
ENTITYID=50401;
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ]->my-device2.lab[ 0 [ 25 ] ]';
MSGTYPE='networkPipe';
networkPipe=[
{
AENDENTITYNAME='my-device2.lab[ 0 [ 25 ] ]';
AGGREGATIONTYPE=4;
UNIDIRECTIONAL=0;
ZENDENTITYNAME='my-device.mylab[ 0 [ 33 ] ]';
}
];
}
Related reference
networkPipe
ncimCache.pipeComposition table
The ncimCache.pipeComposition table can be used with the networkPipe table to represent a hierarchy of
connections.
The following table shows the schema for the ncimCache.pipeComposition database table.
{
ENTITYID=50402;
ENTITYNAME='IP_Path_[172.30.233.103]->[172.30.233.101]';
MSGTYPE='pipeComposition';
pipeComposition=[
{
AGGREGATIONSEQUENCE=1;
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ]->ny-p1-cr28.na.test.lab[ 0 [ 25 ] ]';
}
];
}
Related reference
pipeComposition
The pipeComposition table allows a higher-level connection to be defined in terms of its lower-level
connections. This table belongs to the category connectivity.
ncimCache.protocolEndpoint table
The ncimCache.protocolEndpoint table allows a higher-level connection to be defined in terms of lower-
level connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
The following table shows the schema for the ncimCache.protocolEndpoint database table.
{
ENTITYID=42739;
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ]';
MSGTYPE='protocolEndPoint';
protocolEndPoint=[
{
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ] IP: 2222:22a:2a2e:222::22';
},
{
ENTITYNAME='my-device.mylab[ 0 [ 33 ] ] IP: 192.168.222.22';
}
];
}
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
DiscoveryUpdateMode NOT NULL Integer For internal system use only; do not modify.
Prior to a batch update, ncp_disco sets this
value to 1 for a partial discovery, or to 0 for a
full discovery.
DeleteRenamedDevice NOT NULL Boolean Controls whether duplicate nodes are created
s Integer in the topology if a device name, that is, the
EntityName, is changed between discovery
cycles but the IP address of the device
remains the same. Possible values are as
follows. An example describes the behavior
depending on the value. In this example,
the topology contains a node that is called
deviceA.home.com, which has a LingerTime
value of 3. Before the next discovery cycle,
the deviceA.home.com device is renamed to
deviceB.home.com. If you change this setting,
restart the product for the change to take
effect.
• 0 (default): A duplicate node is created.
The LingerTime of the existing node is
decremented. In the example, the nodes
deviceA.home.com and deviceB.home.com
are duplicates. The LingerTime of
deviceA.home.com is decremented to 2. The
LingerTime of deviceB.home.com is set to 3.
• 1: The existing node is overwritten by a
node that has the new name of the device.
In the example, the deviceA.home.com
node is overwritten. A node is created for
deviceB.home.com.
Important: If you set this field to 1, you
must disable sysName naming in the advanced
discovery parameters.
LingerTime • PRIMARY KEY Integer The LingerTime value is how many discovery
• NOT NULL cycles a device can fail to be found in before
it is considered as no longer present in the
• UNIQUE topology and removed.
model.profilingData
The model.profilingData table stores data associated with time and memory expended during the
discovery. This table includes information on how long it took to transfer the discovery profiling data
to the NCIM topology database.
BatchStartTime • PRIMARY KEY Integer The time that a batch update from the Discovery
• NOT NULL engine, ncp_disco, started.
• UNIQUE
BatchStartMem NOT NULL 64-bit integer Memory usage when batch started.
model.statistics table
The model.statistics table stores information about previous discoveries.
failover.config table
There must never be more than one insert into the failover.config table.
failover.status table
The failover.status table displays the number of times that the DISCO process has attempted to restart
with cached data. This table is active, so you must not configure inserts into it.
failover.findRateDetails table
The findRateDetails table gives details of devices that have been found at a certain point in the discovery.
This table is active and inserts must not be made in the schema file; the table is populated automatically.
m_StartTime • NOT NULL Text The time at which the first device
• PRIMARY KEY was found.
m_DatabaseName NOT NULL Text The name of any database that is not to
be cached during failover recovery.
The following tables must be cached in
order to use the failover recovery mode,
and therefore must not be listed in this
table:
• disco.status
• failover.status
The following tables must be cached, and
therefore must not be listed in this table:
• The agent despatch and returns tables.
• finders.processing
• translations.ipToBaseName
m_TableName NOT NULL Text The name of the table within the
database specified in m_DatabaseName
that is not to be cached.
Use * to indicate all the tables of the
database.
failover.restartPhaseAction table
The restartPhaseAction table contains the set of stitchers that are executed when restarting in a given
discovery phase. Multiple stitchers can be specified, but they are executed in an arbitrary order. It is
recommended that at least the FinalPhase stitcher is executed when restarting in the topology creation
phase.
NOT NULL
NCMONITOR databases
The NCMONITOR schema hosts a number of databases used by polling.
ncmonitor.snmpTarget table
The snmpTarget table lists each IP address that Network Manager recognizes.
ncmonitor.snmpAccess table
The snmpAccess table provides details of SNMP access.
ncmonitor.snmpv1Sec table
The snmpv1Sec table is populated only for rows in the snmpAccess table that relate to SNMPv1 and
SNMPv2.
ncmonitor.snmpv3Sec table
The snmpv3Sec table is populated only for rows in the snmpAccess table that relate to SNMPv3.
ncmonitor.snmpUser table
The snmpUser table provides a list of SNMP user details to be used by the SNMPv3 protocol.
expectedIps table
The expectedIps table contains a list of IP addresses expected to be discovered by Network Manager for
a particular domain. It is populated using the ncp_upload_expected_ips.pl script.
The following table lists the columns in the expectedIps table.
pollLog table
The pollLog table stores the latest snapshot of the status of the Polling engine. It is populated using the
ncp_ping_poller_snapshot.pl script which queries ncp_poller, and transfers the results to this table.
Each row in this table corresponds to a single entity that is within the defined scope of a single active
polling policy. The fields in the table can be divided into three conceptual groupings:
“Entity information” on page 420
This entity information can be used to cross-reference with other NCIM topology database tables.
“Managed status information” on page 421
This is the managed status being applied by the poll policy.
“Latest poll state information” on page 422
This is the latest poll state for the current entity and policy.
Entity information
Fields in the pollLog table that store entity information are described below.
ip IP address to which the ICMP ping packet was sent. This is the
accessIPAddress of the interface or chassis entity identified by
entityId.
mainNodeAddress IP address of the main node that the entity belongs to, as
found in the NCIM topology database entityData table. This
is the accessIPAddress of the chassis entity identified by
mainNodeEntityId.
ifIndex The ifIndex of the relevant interface might be available for
Interface Ping polls. This can be NULL for any ping poll.
domainMgrId ID of the relevant domain, as found in the NCIM topology
database domainMgr table.
Table 206. ncmonitor.pollLog database table latest poll state information fields
Column name Description
lastPollFailure Last time at which a ping poll failure event was raised. Defaults
to a zero timestamp if no poll failures have been raised since the
poller was started.
lastPollInterval Duration of the last complete polling cycle, in seconds. This field
is NULL if the policy is not actively monitoring the entity or a
complete poll cycle has not finished since the poller started.
Note: The system must be on the third polling interval when the
snapshot is taken.
timeSinceLastPoll Number of seconds since the last poll, at the time the snapshot
was taken.
snapshotTime Time at which the data was retrieved from the poller. This is a
zero timestamp if the policy is not actively monitoring the entity.
pollLogSummary table
This table stores a summary of the results for each snapshot written to the pollLog table for
a domain, generated using the views listed in the following sections. It is populated using the
ncp_ping_poller_snapshot.pl script which queries the poller, and transfers the results to this table.
The following table lists the columns in the pollLogSummary table.
Note: The ncp_ping_poller_snapshot.pl script never clears out existing data from this table, so the
table can grow. If required, data that is no longer of interest can be removed by filtering against the
domainMgrId or the summaryTimestamp fields.
undiscoveredIps view
The undiscoveredIps view lists any IP addresses that were are not discovered by Network Manager
and therefore are not listed in the NCIM topology database, but that you expected to discover. The IP
addresses listed in this table are those that were loaded into the expectedIps table but are not present in
NCIM.
The following table lists the columns in the undiscoveredIps view.
unmonitoredIps view
The unmonitoredIps view uses the latest poller snapshot from the pollLog table to list any IP addresses
from the expectedIps table that are not currently being polled because they are not in the scope of any
active ping policy.
The following table lists the columns in the unmonitoredIps view.
unpolledFor15MinutesIps view
The unpolledFor15MinutesIps view uses the latest poller snapshot from the pollLog table to list any
IP addresses from the expectedIps table that have not been ping polled at all in the last 15 minutes.
This includes any IP addresses that are unmanaged or outside the scope of the configured ping polling
policies.
The following table lists the columns in the unpolledFor15MinutesIps view.
discoveredIps view
The discoveredIps view lists all IP addresses in the NCIM topology database, together with details of the
associated device.
The following table lists the columns in the discoveredIps view.
managementInterfaceIps view
The managementInterfaceIps view lists SNMP management interface IP addresses for all devices for
which Network Manager obtained SNMP access. It does not list the IP addresses of chassis for which no
SNMP access was obtained.
For SNMP-accessible devices, the IP address assigned to the chassis by Network Manager must also be
the IP address of an interface on that device. This view therefore displays the set of IP addresses which
can be monitored by both chassis ping polls and interface ping polls.
The following table describes the columns in the managementInterfaceIps view.
chassisOnlyIps view
The chassisOnlyIps view lists the IP addresses which can only be monitored with the chassis ping polls,
as no interfaces with IP addresses have been discovered on these devices. This is usually the case
when Network Manager failed to obtain SNMP access to the device, although it can also depend on the
discovery configuration.
The following table lists the columns in the chassisOnlyIps view.
unpollableIps view
The unpollableIps view lists the IP addresses that the poller will not attempt to ping poll. These IP
addresses can be monitored using SNMP poll policies.
These are only the secondary IP addresses of multinet interfaces, where a single interface has multiple IP
addresses. Ping polls work from the accessIPAddress field of the NCIM chassis and interface tables, and
thus only a single IP address per interface can be monitored using ping polls.
The following table lists the columns in the unpollableIps view.
NCPOLLDATA database
The NCPOLLDATA database stores raw and historical polled data. It is used by dashboard widgets and
reports to present polling data.
NCPOLLDATA queries
Use these sample NCPOLLDATA queries to investigate issues associated with partioning of poll data
tables.
Where:
• DOMAIN is any Network Manager domain. The pollers run across all domains so it does not matter
which domain you choose.
• USERNAME is the user name for the NCIM database user. The default is ncim.
• PASSWORD is the password for the NCIM database user. The default is ncim.
Example
This example query displays sample SQL to show partitions allocated to the raw poll data , pollData.
select TABNAME,DATAPARTITIONNAME,LOWTIME,HIGHTIME
from ncpolldata.pollDataPartitions
WHERE TABNAME = 'POLLDATA'
ORDER BY HIGHTIME
2 Specify the pollDataPartitions table as the driving table for this query.
3 Limit the partition data retrieved to those partitions related to the pollData table.
4 List results in order of the HIGHTIME column. This orders the data by latest partition
first.
Results
The table below shows sample results for this query.
select TABNAME,DETACHTIME,CLIENTID,DATAPARTITIONNAME,LOWTIME,HIGHTIME,STATUS
from ncpolldata.detachedPartitions
WHERE TABNAME = 'POLLDATA'
ORDER BY HIGHTIME
2 Specify the detachedPartitions table as the driving table for this query.
3 Limit the partition data retrieved to those partitions detached from the pollData table.
4 List results in order of the HIGHTIME column. This orders the data by latest partition
first.
Results
The table below shows sample results for this query.
Table Detach time Client ID Partition Low time High time Status
name name
Example
This example query displays log messages for partitions related to the raw poll data, pollData.
select LOGID,TABNAME,CLIENTID,LOGTIME,LOGMSG
from ncpolldata.partitionLog
WHERE TABNAME = 'POLLDATA'
ORDER BY LOGTIME, LOGID
2 Specify the partitionLog table as the driving table for this query.
3 Limit the partition data retrieved to those partitions related to the pollData table.
4 List results in order of the time the message was logged, and then by the content of the
log message.
Results
The table below shows a subset of results for this query.Results of the query
OQL databases
The embedded OQL polling databases provide a number of polling configuration options.
config.properties table
The config.properties table provides the option to configure a number of polling settings.
You can set the values in the config.properties table by editing the following file: $NCHOME/etc/
precision/NcPollerSchema.cfg.
The following table describes the columns in the config.properties table.
config.failover table
The config.failover provides the option to configure failover settings for polling.
The following table describes the columns in the config.failover table.
config.realTimeControl table
The config.realTimeControl provides the option to configure settings for the managing real-time poll
policies in the MIB Grapher.
The following table describes the columns in the config.realTimeControl table. This table is used by the
MIB Grapher application to maintain real-time poll policies. Although the table is not of general use, it can
be used to debug MIB graphs if a problem is encountered.
POLICYID Not NULL Integer If there are any real-time graphs active,
a record will exist for each one in this
Primary key
table, corresponding to the poll policy
created for each graph and referenced
using this POLICYID field.
config.tableMonitor table
The config.tableMonitor table stores data that is used to monitor the raw and historical poll data tables in
the NCPOLLDATA database.
The following table describes the columns in the config.tableMonitor table.
MAXPOLLDATARATE NOT NULL LONG64 Defines the maximum insertion rate to the raw
poll data table NCPOLLDATA.polldata in units of
rows of data per hour. By default, this value is
20,000,000 (20 million) rows per hour.
MAXDAILYDATAAGE NOT NULL LONG64 Defines the maximum age, in hours, for
the data in the daily summary poll data
table NCPOLLDATA.pdEwmaForDay. Data in this
table is capped at 24 hours. If the age
of data in this table exceeds the limit in
the MAXDAILYDATAAGE field, then the Polling
engine, ncp_poller logs a message and issues an
alert.
By default, this value is 25.
MAXWEEKLYDATAAGE NOT NULL LONG64 Defines the maximum age, in days, for the
data in the daily summary poll data table
NCPOLLDATA.pdEwmaForWeek. Data in this
table is capped at 7 days. If the age of
data in this table exceeds the limit in the
MAXWEEKLYDATAAGE field, then the Polling
engine, ncp_poller logs a message and issues an
alert.
By default, this value is 8.
MAXMONTHLYDATAAGE NOT NULL LONG64 Defines the maximum age, in days, for the
data in the daily summary poll data table
NCPOLLDATA.pdEwmaForMonth. Data in this
table is capped at 30 days. If the age of
data in this table exceeds the limit in the
MAXMONTHLYDATAAGE field, then the Polling
engine, ncp_poller logs a message and issues an
alert.
By default, this value is 32.
MAXYEARLYDATAAGE NOT NULL LONG64 Defines the maximum age, in days, for the
data in the daily summary poll data table
NCPOLLDATA.pdEwmaForYear. Data in this table
is capped at 365 days. If the age of
data in this table exceeds the limit in the
MAXYEARLYDATAAGE field, then the Polling
engine, ncp_poller logs a message and issues an
alert.
By default, this value is 395.
profiling.policy table
The profiling.policy table provides summary information for poll policies and poll definitions.
The following table describes the columns in the profiling.policy table.
SCOPETIME Not NULL Integer The total time taken, in CPU clock ticks, for
the list of entities in scope for the poll to be
evaluated, excluding the first time.
SCOPECOUNT Not NULL Integer The number of times that the scope of the
poll has been evaluated.
profiling.icmp table
The profiling.icmp table stores information on ping response statistics.
The following table describes the columns in the profiling.icmp table.
profiling.snmp table
The profiling.snmp table stores information on SNMP response statistics.
The following table describes the columns in the profiling.snmp table.
DROPS Not NULL Integer Total number of packets received that were
not processed.
GETBULKSOUT Not NULL Integer Total number of SNMP Get Bulk requests
sent.
GETNEXTOUT Not NULL Integer Total number of SNMP Get Next requests
sent.
GETSOUT Not NULL Integer Total number of SNMP Get requests sent.
profiling.engine table
The profiling.engine table stores general profiling statistics information.
The following table describes the columns in the profiling.engine table.
LASTUPDATE Not NULL Timestamp Last time profiling statistics were updated.
THREADSINUSE Not NULL Integer Number of active threads in the core polling
engine.
ncp_g_event database
The Event Gateway database enables ncp_g_event, the Event Gateway, to transfer data between Network
Manager and Tivoli Netcool/OMNIbus.
The ncp_g_event database has the following database schema: config
The default configuration of the gateway is used for most systems. You can make adjustments to the
configuration settings by modifying the values inserted into the Event Gateway config database. This
database contains the configuration settings that define the operation of the Event Gateway. For example,
you can modify the mappings used between Network Manager and Tivoli Netcool/OMNIbus and the filters
that determine which events are processed.
Entity data used by the Event Gateway is stored in NCIM cache, which is a copy of the NCIM topology
database. For more information on NCIM cache see the IBM Tivoli Network Manager Reference.
For information about ncp_g_event command-line options, see the IBM Tivoli Network Manager IP Edition
Administration Guide.
Related reference
ncimCache database
This database stores topology updates from DNCIM.
Defined in NCHOME/etc/precision/EventGatewaySchema.cfg
The topics below describe the database tables of the config database.
ObjectServerUpdate NOT NULL Integer Specifies the interval that the Event
Interval Gateway uses to queue event enrichment
updates to the ObjectServer.
Precedence NOT NULL Integer Specifies the number used by the root-cause analysis
(RCA) plug-in when there are multiple events on
the same entity within the network topology. The
number is used to determine which of the events
has precedence and therefore suppresses the other
event on the interface. If a link down event has a
higher Precedence value than a ping fail event, then
the link down event suppresses the ping fail event on
the interface.
These Precedence values are unique.
• 0 - An event with this Precedence value cannot
suppress any other events. The event cannot
become a root cause event. If the Precedence
value is set to 0, then the event can become a
symptom event or be marked as cause unknown.
• 10000 and greater - An event with a Precedence
value greater than or equal to 10000 cannot
be suppressed; and the event cannot become a
symptom event. The event can only become a root
cause event or be marked as cause unknown.
EventMapName NOT NULL Text Specifies the name of the event map from the
config.eventMaps table that is used to process the
event with a matching EventId.
NcoEventId PRIMARY KEY Text Specifies the mapping from the EventId in the
alerts.status table to the values of Precedence and
NOT NULL
EventMapName defined in this table.
Note: If an event is not listed in this table, then the
event is handled by the generic-ip event map.
config.eventMaps Table
The config.eventMaps table contains the event map that specifies how an event is processed. The table
holds information specific to each type of Tivoli Netcool/OMNIbus event that is processed by the Event
Gateway.
The table below describes the config.eventMaps table.
EventMapName PRIMARY Text Specifies the name of the event map. This value is
KEY referenced by the config.precedence table.
NOT NULL
config.nco2ncp table
The config.nco2ncp table is used to filter events being passed from Tivoli Netcool/OMNIbus to Network
Manager.
The table below describes the config.nco2ncp table.
EventFilter NOT NULL Text Specifies a filter that indicates which events
should be processed by the Event Gateway.
Events that match the filter are processed.
Attention: Do not modify this
filter unless you are aware of the
consequences of the modification.
Only advanced users should modify
this filter.
The gateway determines whether to insert a new record or update an existing record according to
whether the ObjectServer sends the event as an insert using IDUC or as an update.
config.ncp2nco table
The config.ncp2nco table is used to filter and map events passed from Network Manager to Tivoli
Netcool/OMNIbus.
The table below describes the config.ncp2nco table.
FieldFilter Externally defined Object Specifies the set of ObjectServer fields that may
vblist data type be updated by the Event Gateway.
config.failover table
The config.failover table contains the failover configuration and current failover state of the Event
Gateway component.
Attention: Do not manually change the values of the config.failover table. In a failover
configuration, the FailedOver field is modified by the virtual domain process.
The table below describes the config.failover table.
ChangeTime TIMESTAMP Long Integer Specifies the time the event was last updated by
the RCA plug-in.
Not null
CreateTime TIMESTAMP Long Integer Specifies the time the event was first seen by the
RCA plug-in.
Not null
FirstOccurrence TIMESTAMP Time the event was first seen by Tivoli Netcool/
OMNIbus.
Not null
Note: This value is set by the probe, not by Tivoli
Netcool/OMNIbus. This means that this field
arrives at the ObjectServer with a value already
set. Tivoli Netcool/OMNIbus never touches this
field.
LastOccurrence TIMESTAMP Long Integer Time the event was last seen by Tivoli Netcool/
OMNIbus.
Not null
Note: This value is set by Tivoli Netcool/OMNIbus
itself when it receives the event.
NmosObjInst Not null Int Entity ID for the chassis related to the entity on
which the event occurred.
NmosSerial Not null Int Serial number of the event that suppressed this
event.
Serial Primary key Uint Serial number of this event in Tivoli Netcool/
OMNIbus. Used to uniquely identify the event and
Not null
the record in mojo.events.
SuppressionState Not null Int Suppression state for this event. This field can
take the following values:
• 0 - No suppression
• 1 - Entity suppression
• 2 - Contained suppression
• 3 - ConnectedSuppression
• 4 - IsolatedSuppression
• 5 - PeerSuppression
SuppressionTime TIMESTAMP Long Integer Time the event was last suppressed.
Not null
MaxAgeDifference NOT NULL Text Specifies the maximum age difference between
events that pass through the RCA plug-in. Events
that have a difference in age greater than this
specified value cannot suppress each other.
By default this option is switched off, that is, set
to 0. This means that events on the same entity
suppress each other regardless of the age of the
events.
Defined in NCHOME/etc/precision/SaeSchema.cfg
NCHOME/etc/precision/SaeCluster.cfg
NCHOME/etc/precision/SaeIPPath.cfg
NCHOME/etc/precision/SaeItnmService.cfg
NCHOME/etc/precision/SaeMplsVpn.cfg
config.serviceTypes table
The config.serviceTypes table contains configuration information for the SAE plug-in.
The table below describes columns in the config.serviceTypes table.
ServiceTypeName Primary key Text Represents the type of service; for example,
"MPLS VPN Edge Service" or "IP Path". This
Not null
string will appear in the eventId field of the SAE
event in the ObjectServer and will also form part
of the Summary field of the SAE event in the
ObjectServer.
CollectionEntityType Not null Integer Used to specify the entity type that corresponds
to the collection that the SAE will be generated
for; for example 17 (VPN), 34 (ITNM Service), or
80 (IP Path). For a listing of possible entity types
in the NCIM entityType table, see the IBM Tivoli
Network Manager Reference.
Related reference
entityType
The entityType table provides a comprehensive list of every entity type in NCIM. It belongs to the category
entities.
class.activeClasses table
The class.activeClasses table holds the full definition of every Active Object Class (AOC).
The table below describes the activeClasses table.
ClassName PRIMARY KEY Text Specifies the unique name of the AOC.
NOT NULL
UNIQUE
SuperClass NOT NULL Text Specifies the name of the parent AOC.
Instantiate NOT NULL Text Specifies the rules for instantiating the AOC.
VisualIcon NOT NULL Text Specifies the icon associated with the AOC,
which is displayed in a user interface.
ClassName PRIMARY KEY Text Specifies the unique name of the AOC.
NOT NULL
UNIQUE
SuperClass NOT NULL Text Specifies the name of the parent AOC.
Instantiate NOT NULL Text Specifies the rules for instantiating the
AOC.
VisualIcon NOT NULL Text Specifies the icon associated with the AOC.
class.classIds table
The class.classIds table stores the lookup values for class IDs from class name.
The table below describes the classIds table.
enableTraceFileRotation NOT NULL Integer Specifies whether log file rotation is enabled.
binaryName NOT NULL Text Base name for the binary that implements
the service. This is used in preference to the
serviceName field to launch the service.
serviceId PRIMARY KEY Integer Specifies the unique ID of the service and is
assigned internally.
NOT NULL
UNIQUE
slaveState Externally defined Integer Specifies the current operational state of the
serviceState data subordinate process.
type
serviceState Externally defined Integer Specifies an integer which reflects the current
serviceState data operational state of the service.
type
trapMux.command table
The trapMux.command database table is an active table used to control the ncp_trapmux process.
The table below describes the trapMux.command table.
trapMux.config table
The trapMux.config table contains the main configuration data for the ncp_trapmux process.
The table below describes the trapMux.config table.
trapMux.sinkHosts table
The trapMux.sinkHosts table contains details of the hosts to which traps are forwarded and the port
numbers
The table below describes the trapMux.sinkHosts table.
host NOT NULL Text Specifies the host name or IP address to which
traps are forwarded.
port NOT NULL Integer Specifies the port number of the host name or IP
address to which traps are forwarded.
m_FailoverTime NOT NULL Integer Specifies the maximum difference between the
current time and the Health Check Resolution
event timestamp. If the difference exceeds this
value, then Network Manager fails over.
The default value is 300 seconds.
m_HealthCheckPeriod NOT NULL Integer Specifies the time period between each health
check. The health check applies the filters in
state.filters to the values in state.services (the
current state of the processes monitored by the
CTRL process).
The default value is 60 seconds.
m_Domain NOT NULL Text Specifies the domain name under which the
service is running.
m_ExtraInfo Vblist Specifies additional information. The default
value is empty.
m_Pid NOT NULL Integer Specifies the process ID for the component.
The domains table holds the status of the primary and backup domains in the failover architecture. This
table always contains an entry for the primary server and the backup server.
The table below describes the columns of the domains table.
m_Backup NOT NULL Integer Specifies whether the server is configured as the
backup server. This value is automatically set by
the configuration defined in the $NCHOME/etc/
precision/ConfigItnm.DOMAIN.cfg file, or
by inclusion of the -primaryDomain command-
line option on components started by the CTRL
process.
• 0 - Not configured as the backup server
• 1 - Configured as the backup server
m_ChangeTime NOT NULL Long Specifies the timestamp from the last time the
status of the domain was updated by the Event
Gateway.
m_Domain NOT NULL Text Specifies the domain in which this installation of
Network Manager is running. The domain name
must be different from the names of the primary
and backup servers.
m_HealthStatus NOT NULL Integer Specifies the status of the Health Check events.
• 0 - Unhealthy. The Network Manager server
generated a Health Check Problem event or
the existing Health Check Resolution event
exceeded the m_failover time period.
• 1 - Healthy. The Network Manager server
generated a Health Check Resolution event
within the m_failover time period.
The filters table contains the filters that are to be applied to the values in the state.services table. The
table below describes the columns of the filters table.
Usage considerations
This information about the NCIM database assumes that you are familiar with relational databases. It also
assumes that you are familiar with SQL query techniques used to extract data from relational databases.
You can use these query techniques to query the NCIM database to obtain topology data. Expert users
can manipulate data in the NCIM database using insert, update, and delete statements.
Related reference
Techniques used in the SQL queries
The SQL query examples use a variety of techniques that are aimed at extracting information efficiently.
Use this information to familiarize yourself with the techniques used in SQL queries.
Network Manager populates NCIM by means of the Discovery engine, ncp_disco, and Topology Manager,
ncp_model, processes.
The topology data in NCIM can be shared and accessed by the following processes and applications:
1 TopoViz
Used for displaying topology maps.
2 Structure Browser
Used for navigating within the containment structure of devices in the topology.
3 Asset reporting
Used for asset reporting software.
4 Integrations with third-party applications
Used for example provisioning software that requires regularly updated topology data from Network
Manager. These activities require knowledge of programming languages such as Java and Perl.
Extensibility
The NCIM topology database can hold additional data that is collected during a customized discovery.
For example, discovery stitchers can be configured to look up customer details from a third-party source
based on an IP address. It is possible to configure MODEL to populate NCIM with this additional data and
to configure NCIM to store this additional data in the form of key-value pairs.
Continuing the example, you might configure NCIM to store a customer name and customer type,
associated with each main node entity discovered. It is also possible to modify NCIM to create new
multicolumn tables and configure MODEL to populate these tables following a customized discovery.
These modifications enable NCIM to store more custom data. For example, you might want to store a set
of data on each customer associated with an IP address.
Related concepts
Domains
A domain is a scoped set of entities that are discovered and managed by an application, such as Network
Manager. NCIM holds entity data related to multiple domains.
Topology data
When the network is discovered, both core NCIM tables and entity attribute tables are updated with
topology data. These tables include Layer 1, Layer 2, Layer 3, device structure, routing protocol,
containment, and technology-specific information.
The NCIM tables are not case-sensitive.
Domains
A domain is a scoped set of entities that are discovered and managed by an application, such as Network
Manager. NCIM holds entity data related to multiple domains.
For more information on domains, see the IBM Tivoli Network Manager User Guide and the IBM Tivoli
Network Manager IP Edition Installation and Configuration Guide.
Entities
A Network Manager discovery returns many different types of entity. If you understand the entities that
you might encounter, you can more easily restrict your queries to return only required information.
Basic information about discovered network resources is held within the entityData table. Resource-
specific attribute data is held in product-specific extension tables that typically have a foreign key
relationship with the core-model entityData table. Information on relationships between discovered
network resources, such as containment and connectivity, is also held in tables, such as the contains
and connects tables.
Records in the entityData table are at least related to a given instance and the domainMgr, manager,
and domainMembers tables.
Discovered resources held in the entityData table can be any of the following types:
• Physical and logical entities, including devices and their physical and logical characteristics, such as
slots, cards, ports, and interfaces, and the relationships between them.
• Protocol end points represent protocol or technology-specific information that is typically associated
with an entity representing a port or interface resource.
• Device collections, including MPLS VPNs, global VLANs and subnets.
• Hosted services, including BGP and OSPF services hosted on a device.
Network Manager populates the database with information about discovered layer 1, layer 2 and layer
3 entities. To uniquely identify entities as they are discovered, the NCIM database uses a unique key,
entityId. The entityId column appears in all database tables that reference entities.
192 Probe Collection Collecti probeCollection Provides a collection facility for probes
on or probe collections.
193 Internal Monitor Element Reserved for use in Agile Service Manager
Network Discovery.
200 LTE S1-U Topolog entityData Topology type for LTE S1-U connectivity.
y
201 LTE S5 Topolog entityData Topology type for LTE S5 connectivity.
y
202 LTE S8 Topolog entityData Topology type for LTE S8 connectivity.
y
203 LTE S1-MME Topolog entityData Topology type for LTE S1-MME connectivity.
y
204 LTE S10 Topolog entityData Topology type for LTE S10 connectivity.
y
205 LTE S11 Topolog entityData Topology type for LTE S11 connectivity.
y
206 LTE SGi Topolog entityData Topology type for LTE SGi connectivity.
y
207 LTE Gx Topolog entityData Topology type for LTE Gx connectivity.
y
208 LTE S3 Topolog entityData Topology type for LTE S3 connectivity.
y
209 LTE S4 Topolog entityData Topology type for LTE S4 connectivity.
y
210 LTE S6a Topolog entityData Topology type for LTE S6a connectivity.
y
211 LTE S13 Topolog entityData Topology type for LTE S13 connectivity.
y
212 LTE X2 Topolog entityData Topology type for LTE X2 connectivity.
y
213 LTE X2C Topolog entityData Topology type for LTE X2C (X2 Control
y Plane between GNodeB and 5G GNodeB).
214 LTE X2U Topolog entityData Topology type for LTE X2U (X2 User Plane
y between GNodeB and 5G GNodeB).
215 N5g Control Plane Topolog entityData Topology type for 5G Core Control Plane
y topology.
216 N5g User Plane Topolog entityData Topology type for 5G Core User Plane topology.
y
257 SMF Function Element SMF Function Data for 5G Session Management Function (SMF)
in 5G core components.
258 UPF Function Element UPF Function Data for 5G User Plane Function (UPF) in 5G core
components.
259 PCF Function Element PCF Function Data for 5G Policy Control Function (PCF) in 5G
core components.
260 NEF Function Element NEF Function Data for 5G Network Exposure Function (NEF) in
5G core components.
261 NRF Function Element NRF Function Data for 5G NF Repository Function (NRF) in 5G
core components.
262 AUSF Function Element AUSF Function Data for 5G Authentication Server Function
(AUSF) in 5G core components.
263 AF Function Element AF Function Data for 5G Application Function (AF) in 5G core
components.
264 UDM Function Element UDM Function Data for 5G Unified Data Management (UDM) in
5G core components.
265 NSSF Function Element NSSF Function Data for 5G Network Slice Selection Function
(NSSF) in 5G core components.
Related reference
entityType
The entityType table provides a comprehensive list of every entity type in NCIM. It belongs to the category
entities.
Protocol-specific data
Device entities, usually interfaces, can be associated with protocol-specific data. One example is the
association of a device interface with the IP addressing data. Ports and interfaces can also be associated
with other data, including ATM, BGP and OSPF protocol endpoints.
NCIM associates protocol-specific information with entities such as interfaces, using protocol endpoint
tables. Examples of protocol endpoint tables are the atmEndPoint and ipEndPoint tables.
Technology-specific data
NCIM models a range of different network technologies, including IP, VLANs, and MPLS VLANs.
Related reference
ipEndPoint
The ipEndPoint table represents an IP end point and includes relevant data. The endpoint is implemented
by a physical interface, as modeled in the protocolEndPoint table.
Relationships
The NCIM topology database models relationships between entities.
Connectivity data
Connectivity data defines how entities are connected in the network. It includes connections between
different devices, and VLAN-related connections within the same device. Connectivity information is
stored in the topologyLinks, networkPipe, and pipeComposition tables.
Bidirectional connections are only entered into the database once, either from the "A" end to the "Z" end
or from the "Z" end to the "A" end. Therefore, SQL queries that extract connectivity data must check for
the connection in either direction.
Containment data
Containment data defines logical and physical containment within your network. A containment model is
generated at the end of the discovery process when the network topology is created. This model reflects
the real-world topology of the network that is being modelled, in a physical, logical or business-oriented
sense.
Overview of containment
Containment is a key principle of the network model. Containers are objects that can "hold" both elements
and other containers. Elements and containers can represent logical or physical entities. You can put any
object within a container and even mix different objects within the same container.
An example of physical containment is a chassis containing network interface cards; the network interface
cards can themselves contain individual ports. An example of logical containment is a set of ports or
interfaces being contained by a particular VLAN. Network Manager also uses VLAN objects to model
containment. VLAN objects are created by the stitchers. They contain all the interfaces that exist on each
VLAN.
VLAN naming
Network Manager uses different naming conventions. One approach is to identify the entity name, card
and port numbers of specific ports, in the format EntityName [ card [ port ] ].
For example, port 12 on card 1 of chassis A is identified as A[ 1 [ 12 ] ].
By using stitchers, VLAN names can also be modified to reflect the business context in which a given
VLAN is used.
The naming used also depends on configuration of the product. This means that interface naming might
be used; for example, Se4/0.
VLAN trunking
When traffic from different VLANs is passed along a single trunk link between switches, this is
represented in the Network Manager containment model.
The following figure shows how the containment model represents this traffic.
If a port is being used for a trunk link, it contains logical sub-interfaces. The following information
describes the properties of the ports and sub-interfaces shown in Figure 3 on page 492:
1 A sub-interface connecting VLAN 2 on the switch to VLAN 2 on another switch. Sub-interfaces are
contained by trunk ports.
2 A sub-interface connecting VLAN 3 on the switch to VLAN 3 on another switch. Sub-interfaces have
no upward connections to their containing trunk port.
3 A normal port.
4 A port containing sub-interfaces.
Dependencies
When one entity in a system cannot meaningfully function without another entity it is said to be
dependent. Dependencies can be defined by the containment model. A container can be dependent upon
the objects it contains.
Network Manager applications take dependencies into account. The root-cause analysis (RCA) engine (a
plug-in to the Event Gateway, ncp_g_event), for example, can consider dependencies when performing
root cause analysis of network faults.
Collection data
Collection data defines logical collections. Collections are defined in the collects table. Examples of
logical collections defined within NCIM include MPLS VPNs, global VLANs, and subnets.
NCIM can also model OSPF areas. Each row in the collects table holds a pair of entity identifiers: the
collecting entity, for example the VPN, and one of the entities within that collecting entity.
Related reference
Find all devices in a given VPN
Hosted services
A hosted service is a service or application running on a specific device. For example, a device can
host BGP or OSPF services. NCIM can also model the fact that a software application, is running on a
workstation.
Related reference
Find all chassis devices hosting OSPF services
This query identifies all devices that are hosting OSPF services. These devices are serving as routers
within an autonomous system (AS). Each device identified has an IP address and a separate OSPF router
IP address.
$NCHOME/precision/scripts/sql/oracle/createPrecisionMgmtTables.sql
$NCHOME/precision/scripts/sql/oracle/createNetCoolCoreDb.sql
The schema files below are common to all database products.
• $NCHOME/precision/scripts/sql/data/populateMappings.sql
• $NCHOME/precision/scripts/sql/data/populateEnumerations.sql
• $NCHOME/precision/scripts/sql/data/populateDeviceFunction.sql
• $NCHOME/precision/scripts/sql/data/populateDefaults.sql
The database schema specific to Network Manager is contained in the createPrecisionIPDb.sql file.
The directory location of the Network Manager database schema is as follows:
$NCHOME/precision/scripts/sql/db2/createPrecisionIPDb.sql
$NCHOME/precision/scripts/sql/oracle/createPrecisionIPDb.sql
To better understand how to formulate queries for purposes of correlating, analyzing, or reporting data,
you can view these files, but do not attempt to modify them.
Logging in to NCIM
Log in to NCIM to run an SQL query that retrieves topology data.
Aliasing
Aliasing is the use of a temporary name for a column, sub-query or table within a query.
Common reasons for using aliasing include:
• Brevity: For example, use e to refer to the entityData table.
• Distinguishing between table data in a meaningful way: For example, use eComponent to refer to the
entityData table when extracting component data from this table. Use eMainNode to refer to the
entityData table when extracting main node data from the table.
Aliasing can also be applied to columns, functions, and subqueries. For example, aliasing can be used to
rename a results column.
Table joins
Use table joins to combine records from one or more tables. Two types of table join are used, INNER JOIN
and OUTER JOIN.
OUTER JOIN
An OUTER JOIN table join preserves all the rows in one or both tables, even when they do not have
corresponding rows in the other tables being queried. An example of when an OUTER JOIN table join
is useful is if you want to retrieve all interface and IP addressing data where applicable, bearing in
mind that some interfaces may not have IP addresses. Commonly used outer joins include:
LEFT OUTER JOIN
Retains all records from the left table even if the join predicate does not find any matching record
in the right table.
RIGHT OUTER JOIN
Retains all records from the right table even if the join predicate does not find any matching record
in the left table.
INNER JOIN
An INNER JOIN table join between tables combines the records from one or more tables based on
a given join predicate to produce a record set that incorporates rows and columns from each table
included in the join. Typically, a common attribute, such as the NCIM entityId, is used to retrieve sets
of associated records. For example, an inner join could be used to retrieve all of the records that
contain other resources by joining the entity.entityId and contains.containingEntityId attributes.
mainNodeEntityId field
The mainNodeEntityId field in the entityData table specifies the main node of the entity. This field
provides a shortcut to the main node for a particular entity, avoiding the need to traverse the entire
containment tree.
The mainNodeEntityId field is relevant only for entities that are wholly contained within a single main
node device. It therefore has a non-NULL value only for entities that are related to a single main node
device, such as:
• The main node itself
• Physical and logical device components, such as interfaces, modules, PSUs, sensors, backplanes, and
fans
• Logical interfaces entities on the main node, such as IP endpoints and VLAN trunk endpoints
• Local VLANs, which are local VLAN entities contained within a single main node device. The interfaces
contained by this VLAN are constrained to only those interfaces contained within the main node device.
Entities that are related to multiple main node devices, such as VPNs and global VLANs, have a NULL
value in the mainNodeEntityId field.
To retrieve only the entities that are wholly contained within a single main node device, use an INNER
JOIN statement on the entityData table. This statement ensures that only entities that have a non-
NULL value in the mainNodeEntityId field are retrieved.
entityType field
The entityType field can be used in SQL queries to limit the type of component data that is retrieved.
For example, if you specify the entity type 2, which corresponds to interfaces, in an SQL query, only
component data of the type "interface" is retrieved. The entity type of each entity is specified in the
entityType field of the entityData table.
Example
Description
The table below describes this query.
3 Specify the domainMgr table as the driving table for this query.
6 Restrict the entities to main nodes. Entities that have an entityType of 1 are main
nodes.
Results
The table below shows a portion of the results of this query.
1 192.168.15.23
3 192.168.15.7
5 192.168.15.21
72 VE002.example.net
74 172.20.4.20
77 172.20.4.16
83 172.50.0.2
98 VE003.example.net
109 10.1.254.7
143 10.1.254.30
269 10.1.1.9
Related reference
Choice of driving table
One of the most important design decisions when creating a query is the choice of driving table. The
choice of driving table is particularly important for ensuring the efficiency of queries.
Example
1] SELECT COUNT(*)
2] FROM domainMgr d
3] INNER JOIN entity e ON e.domainMgrId = d.domainMgrId
4] WHERE d.domainName = 'NCOMS'
Description
The table below describes this query:
Line Description
number(s)
1 Specify that we wish to count the number of rows returned by the query. Each entity
returned by the query generates a row of results; therefore the number of rows
returned corresponds to the number of entities in the domain.
2 Specify the domainMgr table as the driving table for this query.
3-4 Retrieve all entities in the NCOMS domain, by joining the entity view. Restrict the
domain to NCOMS by means of the WHERE statement.
AND e.entityType = 2
In this line e.entityType is the entityType field within the entity view. The entity view is referred
to using the alias e.
1] SELECT COUNT(*)
2] FROM domainMgr d
3] INNER JOIN entity e ON e.domainMgrId = d.domainMgrId
4] WHERE d.domainName = 'NCOMS'
5] AND e.entityType = 2
Description
The table below describes this customized query:
Line Description
number(s)
1 Specify that you want to count the number of rows returned by the query. Each
entity returned by the query generates a row of results; therefore the number of rows
returned corresponds to the number of entities in the domain.
2 Specify the domainMgr table as the driving table for this query.
Line Description
number(s)
3 Retrieve all entities in the NCOMS domain, by joining the entity view.
5 Restrict the entities returned by the query to interfaces. Entities with an entityType
of 2 are interfaces.
Related reference
Techniques used in the SQL queries
The SQL query examples use a variety of techniques that are aimed at extracting information efficiently.
Use this information to familiarize yourself with the techniques used in SQL queries.
Choice of driving table
One of the most important design decisions when creating a query is the choice of driving table. The
choice of driving table is particularly important for ensuring the efficiency of queries.
List all devices with class name and system object identifier
This query retrieves all main node devices across all domains and, for each device, provides the class
name of the device and the type of device.
Class name
The manufacturer and product family of the device. For example, CiscoCat35xx is the Cisco Catalyst
3500 product family.
Type of device
The model number of the device within product family of the manufacturer. For example,
catalyst3524XL is the Cisco Catalyst 3524XL Gigabit Ethernet switch. The query determines the type
of device by extracting the system object identifier (sysObjectId) value for the device. The sysObjectId
field is held in the chassis table, which is one of the tables joined as part of the query. The system
object identifier is a MIB value that provides the vendor's authoritative identification of the network
management subsystem contained in the entity and serves as easy and unambiguous means for
determining the type of device.
You can convert the system object identifier (for example, (1.3.6.1.4.1.9.1.248) into human-readable text
(for example, catalyst3524XL), by using an OUTER JOIN statement to join the mappings table to the
query. Within the mappings table, the sysObjectId mapping group lists system object identifier strings
and their corresponding human-readable string values. The mappings table provides string-to-string
mappings, unlike the enumerations table, which provides integer-to-string mappings.
If no entry exists in the mappings table for a specific system object identifier, the query returns a NULL
value for the device type. Use of an OUTER JOIN statement enables you to perform this conversion
without losing any rows of main node data. If no string exists for any particular system object identifier,
the OUTER JOIN statement ensures that you nevertheless do not lose the row of data for the main node
device associated with that system object identifier.
Example
5 Use the entityData table as the driving table for this query.
6 Limit the results of the query to main node devices, by joining the physicalChassis
table to the entityData table. There is now a line of data for each main node device.
Use an INNER JOIN statement to ensure that only entities that are main node devices
are retrieved.
7 For SNMP devices determine the System Object ID.
8 Determine the class to which the device belongs. This is a two-step process. The first
step, shown in this line, is to use an INNER JOIN statement to the classMembers table
to retrieve the classId value for the class to which the device belongs.
9 Use the classId retrieved in line 7 as a lookup to determine the name of the class to
which the device belongs. Do this by performing an INNER JOIN statement with the
entityClass table. The entityClass table holds class details, including class names, and
the name of the superclass, the containing class in the class hierarchy.
10-11 Look up the system object identifier in the mappings table in order to obtain a human-
readable string for the device type. Do this by performing a join on the mappings table.
Use an OUTER JOIN statement to enable you to perform this join without losing any
rows of main node data. If no string exists for any particular system object identifier,
the OUTER JOIN statement ensures that you nevertheless do not lose the row of data
for the main node device associated with that system object identifier.
12 Order the query results for maximum readability. In order to do this list the devices first
by manufacturer and product family (classname) and then by model (system object
identifier).
Results
The table below shows a portion of the results of the query.
Example
5 Use the entityData table as the driving table for this query. Use the alias e for the
entityData table.
6-7 Identify the containing main node device for each of the entities retrieved in the
preceding line.
Do this by joining the entityData table to itself using the mainNodeEntityId field.
8-9 Identify the IP addresses implemented by each of the entities identified in line 5 of the
query.
Do this by performing an INNER JOIN statement on the protocolEndPoint table to
extract the entity ID for any protocol-specific information associated with the entities
identified in line 5.
Then perform a second INNER JOIN statement on the ipEndPoint table to limit the
protocol-specific information returned by the query to IP information.
10 To facilitate readability of the results, order first by the unique entity ID of the interface.
Results
The table below shows the results of this query.
Example
4 Use the domainMgr table as the driving table for this query.
5 Retrieve data for all the entities in this domain by joining the entity view to the query.
This join retrieves all entities in the domain, including those wholly contained within a
single main node (required) as well as those entities related to multiple main nodes ,
such as VPNs and global VLANs (not required).
In this join, the entity view is aliased using a meaningful alias, eComponent.
This alias indicates that the data retrieved from the entity view using this join is
component data.
6-7 Identify the containing main node device for each of the entities by joining the
entityData table to itself using the mainNodeEntityId field. This automatically
excludes those entities that are related to multiple main node devices, such as VPNs
and global VLANs. These entities have a NULL value in the mainNodeEntityId field.
8-9 Limit the entities retrieved to those contained within the main node
VE004.example.net and the domain to the NCOMS domain.
Example
Description
The table below describes how the query determines the type of component.
Results
The table below shows the results of this query.
Example
Description
The table below describes this query.
4-6 Join relevant tables to the domainMgr table in order to retrieve the required data. The
joins are as described in the next two rows.
4 Retrieve all the entities in each domain. The INNER JOIN clause ensures that only
entities that have a valid domainMgrId field are retrieved.
5 From all the entities, extract only that subset of entities that are cards. Use an INNER
JOIN statement to ensure that only entities that have corresponding entries in the
physicalCard table are retrieved. There is a line of data for each card. This line
of data consists of all columns from the domain table, the entity view, and the
physicalCard table related to that card.
6-7 Identify the containing main node device for each of the cards by joining the
entityData table to itself using the mainNodeEntityId field. The join on this field
enables the query to go directly to the top of the containment tree.
8 Limit the resulting data to the main node devices in the NCOMS domain only.
9 Group the results by the name of the main node device. This means that the results
show the number of cards within each main node.
10 Use the HAVING clause to specify that you want to retrieve only devices that contain
two or more cards.
Results
The table below shows a portion of the results for this query.
Related reference
mainNodeEntityId field
The mainNodeEntityId field in the entityData table specifies the main node of the entity. This field
provides a shortcut to the main node for a particular entity, avoiding the need to traverse the entire
containment tree.
Prerequisites
Before you run this query, you must have enabled the Entity agent to run during the discovery process.
This enables the query to retrieve the required data. The Entity agent discovers detailed containment
information from the Entity MIB. For more information about the Entity agent, see the IBM Tivoli Network
Manager IP Edition Administration Guide. By default the Entity agent is not configured to run during
discovery. You must therefore configure this agent manually if you want the topology database to contain
the detailed MIB information that is required for queries of this type.
Example
Description
The table below describes this query.
7-11 Join relevant tables to the domainMgr table in order to retrieve the required data.
7 Retrieve all the entities in each domain. The INNER JOIN clause ensures that only
entities that have a valid domainMgrId field are retrieved.
8 From all the entities, extract only that subset of entities that are cards. Card data
is held in the physicalCard table. There is a line of data for each card. This line
of data consists of all columns from the domain table, the entity view, and the
physicalCard tables related to that card.
9 For each card, obtain the name of the main node that contains that card. Do this by
performing a second INNER JOIN statement on the entityData table to retrieve all
the data for the main node that contains the card.
Results
The following table shows an example of the results of this query.
Example
4 Use the physicalCard table as the driving table for this query.
The FROM clause extracts data for all cards.
5 For each card, extract the full set of entity data for that card. This ensures that the
entity name of the card is retrieved for display in the query results, as specified in line
1). Use the alias container for the entityData table to indicate that data extracted
using this alias is data for the containing card.
Do this by specifying an INNER JOIN statement with the entityData table.
6 For each card, extract records from the contains table on entities contained within
that card. Limit the query results to those cards that contain other entities.
Do this by specifying an INNER JOIN statement with the contains table.
The query extracts a record from the contains table for each entity contained within
a given card. Each of these records includes the entity identifier for an entity contained
within the card.
7 Extract the full set of entity data for each contained entity. Use the alias part for
the entityData table to indicate that data extracted using this alias is data for a
contained entity.
Do this by specifying a second INNER JOIN statement with the entityData table.
8 To facilitate readability of the results, order by the entity name of the containing card.
10.1.1.11_CARD_1 1 10.1.1.11[ 1 [ 1 ] ]
10.1.1.11_CARD_2 2 10.1.1.11[ 2 [ 1 ] ]
10.1.1.12_CARD_0 0 10.1.1.12[ 0 [ 14 ] ]
10.1.1.12_CARD_0 0 10.1.1.12[ 0 [ 10 ] ]
10.1.1.12_CARD_0 0 10.1.1.12[ 0 [ 12 ] ]
10.1.1.12_CARD_0 0 10.1.1.12[ 0 [ 11 ] ]
10.1.1.12_CARD_0 0 10.1.1.12[ 0 [ 13 ] ]
Related reference
Aliasing
Aliasing is the use of a temporary name for a column, sub-query or table within a query.
Table joins
Use table joins to combine records from one or more tables. Two types of table join are used, INNER JOIN
and OUTER JOIN.
Choice of driving table
One of the most important design decisions when creating a query is the choice of driving table. The
choice of driving table is particularly important for ensuring the efficiency of queries.
Example
Description
The table below describes this query.
4 Use the entityData table as the driving table for this query. Use the alias
eInterface for the entityData table to indicate that the data extracted using this
alias is interface data.
5-6 Identify the containing main node device for each of the entities retrieved in
the preceding line. Do this by joining the entityData table to itself using the
mainNodeEntityId field.
7 Limit the components of the device to interfaces only. Do this filtering the components
to retrieve only components with an entity type of 2, which corresponds to an interface.
8 To facilitate readability of the results, order first by main node name and then by
interface name.
Results
The table below shows a portion of the results for this query.
Related reference
mainNodeEntityId field
Example
Description
The table below describes this query.
4 Use the entityData table as the driving table for this query. This part of the query
retrieves all entities held in the database.
6 Limit the results of the query to interfaces with interface speeds greater than 155 MB
per second.
Results
The table below shows the results of this query.
Example
Description
The table below describes this query.
7 Use the entityData table as the driving table for this query. Use the alias
eInterface for the entityData table to indicate that the data extracted using this
alias is interface data.
8-9 Identify the containing main node device for each of the entities retrieved in the
preceding line.
Do this by joining the entityData table to itself using the mainNodeEntityId field.
10 Extract all attribute data for the various interfaces. This attribute data is held in the
networkInterface table.
Do this by joining the networkInterface table to the entityData table using
the entityId field. The INNER JOIN statement ensures that only interface data is
retrieved.
12 To facilitate readability of the results, order first by main node name and then by
ifType.
Results
The table below shows the results of this query.
Related reference
Techniques used in the SQL queries
The SQL query examples use a variety of techniques that are aimed at extracting information efficiently.
Use this information to familiarize yourself with the techniques used in SQL queries.
List all interfaces on all devices
This query provides a list of all main node devices within a domain together with the identifiers and names
of the interfaces on each device.
entityType field
Example
Description
The table below describes this query.
5 Use the entityData table as the driving table for this query. Use the alias
eInterface for the entityData table to indicate that the data extracted using this
alias is interface data.
6-7 Identify the containing main node device for each of the entities retrieved in the
preceding line.
Do this by joining the entityData table to itself using the mainNodeEntityId field.
8-9 Identify the IP addresses implemented by each of the entities identified in line 5 of the
query.
Do this by performing an INNER JOIN statement on the protocolEndPoint table to
extract the entity ID for any protocol-specific information associated with the entities
identified in line 5.
Then perform a second INNER JOIN statement on the ipEndPoint table to limit the
protocol-specific information returned by the query to IP information.
11 To facilitate readability of the results, order first by the unique entity ID of the interface.
Results
The table below shows the results of this query.
Related reference
List all interfaces on all devices
This query provides a list of all main node devices within a domain together with the identifiers and names
of the interfaces on each device.
Techniques used in the SQL queries
The SQL query examples use a variety of techniques that are aimed at extracting information efficiently.
Use this information to familiarize yourself with the techniques used in SQL queries.
ipEndPoint
The ipEndPoint table represents an IP end point and includes relevant data. The endpoint is implemented
by a physical interface, as modeled in the protocolEndPoint table.
mainNodeEntityId field
The mainNodeEntityId field in the entityData table specifies the main node of the entity. This field
provides a shortcut to the main node for a particular entity, avoiding the need to traverse the entire
containment tree.
Protocol endpoint tables
The following table shows how the connects table might store the data about the connectivity between
the device VE001.example.net and neighboring devices.
Table 283. Example data from the connects table for connections to main node device VE001.example.net
connectionId aEndEntityId zEndEntityId
101 VE001.example.net 192.168.35.225
102 VE001.example.net 192.168.34.86
103 192.168.39.175 VE001.example.net
Connections 101 and 102 show the device VE001.example.net at the aEnd of the connection.
Connection 103 shows the device VE001.example.net at the zEnd of the connection.
Connections in NCIM can be bidirectional or unidirectional. A field in the connects table that specifies
whether the connection is bidirectional or unidirectional.
To ensure that all connections are retrieved from the connects table for a given device, the query must
take into account the random ordering of aEnd and zEnd data in the table. This is done using a UNION
statement. The query works as follows:
Types of connectivity
Queries that retrieve device connectivity can identify different types of connection. Use this information to
learn about the connectivity types that can be queried.
The following types of connectivity are retrieved:
Connections to other devices
The connection passes through a physical or logical interface. Interfaces have an entity type of 2 and
are modleled using the interface table.
Trunk connection between a specific VLAN on the named device to the same VLAN on a different
device
The connection passes through a VLAN trunk port. A VLAN trunk port is a physical port that carries
data from multiple VLANs. Each VLAN trunked by the VLAN trunk port is modelled with a VLAN trunk
end point.
Connections within the named device between local VLANs and VLAN trunk ports
The connection passes between a local VLAN on the current device to a VLAN trunk on the same
device. The query reports this connection as a connection between the device and itself. Local VLANs
are modelled using the localVlan table.
Related reference
networkInterface
The networkInterface table represents interfaces on a chassis device.
vlanTrunkEndPoint
The vlanTrunkEndPoint table represents a VLAN trunk end point and includes relevant data. This endpoint
is implemented by a physical interface, as modeled in the protocolEndPoint table.
localVlan
The localVlan table specifies which global VLAN the local VLAN belongs to. A local VLAN represents all the
interfaces on a single chassis device that belong to a global VLAN.
Example
Description
The table below describes this query.
5 Use the entityData table as the driving table for this query. Use the alias loc for
the entityData table to indicate that the data extracted using this alias is for local
entities.
6 Identify all the connections for the entities associated with the local device.
Do this by joining the connects table using the aEndEntityId value.
11 Use the UNION statement to ensure that all connections are retrieved.
12-21 This is the same code as line 1-10 with the difference that here the specified device is
considered to be the zend (see line 17) and the neighboring devices are all considered
to be at the aend (see line 18).
Results
The table below shows the results of this query. This data includes examples of devices connected to
themselves. These are connections within the same device between local VLANs and VLAN trunk ports.
Local main node entity Local main node entity Neighbor main node Neighbor main mode
ID name entity ID entity name
5 VE001.example.net 83 192.168.35.225
77 VE002.example.net 77 VE002.example.net
77 VE002.example.net 77 VE002.example.net
Related concepts
Connectivity data
Example
Description
The table below describes this query.
Results
The following table shows an example of the results of the query.the results of the query.
Example
Description
The table below describes this query.
3 Use the topologyLinks table as the driving table for this query. Use the alias t for
the topologyLinks table for purposes of brevity.
4 Identify all the types of topology listed in the topologyLinks table. Do this by joining
the entityData table using the entityId field.
5 Extract the connection data for each connection. Do this by joining the connects table
using the connectionId field.
6-7 Extract entity details for each of the interfaces at either end of the connection.
Do this by joining the entityData table a second time using the entityId field in the
entityData table and the aEndEntityId and zEndEntityId fields in turn in the
connects table.
8 Limit the results to connections within layer 3 router links only. This limits the results to
connections between routers, and hence, between subnets.
Results
The table below shows the results of the query.
Related reference
Techniques used in the SQL queries
The SQL query examples use a variety of techniques that are aimed at extracting information efficiently.
Use this information to familiarize yourself with the techniques used in SQL queries.
select e.entityId,
e.entityName,
enb.eNodeBId,
enb.eNodeBName,
enb.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.enbFunction enb ON enb.entityId = e.entityId
6 Use the entityData table as the driving table for this query. This part of the query
retrieves all entities held in the database.
select e.entityId,
e.entityName,
eir.eirFunctionName,
eir.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.eirFunction eir ON eir.entityId = e.entityId
select e.entityId,
e.entityName,
hss.hssFunctionName,
hss.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.hssFunction hss ON hss.entityId = e.entityId
select e.entityId,
e.entityName,
mme.MMEGI,
mme.MMEC,
mme.mmeName,
mme.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.mmeFunction mme ON mme.entityId = e.entityId
select e.entityId,
e.entityName,
pgw.pgwFunctionName,
pgw.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.pgwFunction pgw ON pgw.entityId = e.entityId
Example: find all discovered Policy and Charging Rule Function entities
This query retrieves the details of all Policy and Charging Rule Function entities that have been
discovered.
select e.entityId,
e.entityName,
pcrf.pcrfFunctionName,
pcrf.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.pcrfFunction pcrf ON pcrf.entityId = e.entityId
select e.entityId,
e.entityName,
sgw.sgwFunctionName,
sgw.emsDistinguishedName
from ncim.entityData e
INNER JOIN ncim.sgwFunction sgw ON sgw.entityId = e.entityId
Example
Results
The following table provides an example of part of the result set for this query.
Example
Results
The following table provides an example of part of the result set for this query.
Tunnel Interface
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.7[ 0 [ 22 ] ]
12
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.7[ 0 [ 24 ] ]
12
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.4[ 0 [ 18 ] ]
12
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.4[ 0 [ 2 ] ]
12
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.6[ 0 [ 2 ] ]
12
172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_ 172.20.1.6[ 0 [ 26 ] ]
12
Example
Results
The following table provides an example of the result set for this query.
entityName 172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_
12
role head
ingressLSRId 172.20.1.7
egressLSRId 172.20.1.6
signallingProtocol rsvp
Results
The following table provides an example of part of the result set for this query.
Results
The following table provides an example of part of the result set for this query.
entityName
172.20.1.7
172.20.1.4
172.20.1.6
Example
Results
The following table provides an example of part of the result set for this query.
entityName 172.20.1.7_MPLS_TE_Tunnel_Idx_50_Inst_
12
maxRate 100000
meanRate 100000
maxBurstSize 1000
meanBurstSize 1
select e.entityId,
e.entityName,
c.className,
rbs.baseStationId,
rbs.ranTechnologyType
from ncim.entityData e
INNER JOIN ncim.physicalChassis c ON c.entityId = e.entityId
INNER JOIN ncim.ranBaseStation rbs ON rbs.entityId = c.entityId
6 Use the entityData table as the driving table for this query. This part of the query
retrieves all entities held in the database.
8 Limit the results of the query to entities that are present in the ranBaseStation
table, that is, to base stations.
Similar queries
The following example queries retrieve relevant data for different RAN entity types, using similar syntax to
the above example.
select e.entityId,
e.entityName,
c.className,
rnb.nodebId,
rnb.ranTechnologyType
from ncim.entityData e
INNER JOIN ncim.physicalChassis c ON c.entityId = e.entityId
INNER JOIN ncim.ranNodeB rnb ON rnb.entityId = c.entityId
select e.entityId,
e.entityName,
c.className,
rbsc.baseStationControllerId,
rbsc.ranTechnologyType
from ncim.entityData e
INNER JOIN ncim.physicalChassis c ON c.entityId = e.entityId
INNER JOIN ncim.ranBaseStationController rbsc ON rbsc.entityId = c.entityId
select e.entityId,
e.entityName,
c.className,
select e.entityId,
e.entityName,
c.className,
rmsc.mscId,
rmsc.msctype,
rmsc.ranTechnologyType
from ncim.entityData e
INNER JOIN ncim.physicalChassis c ON c.entityId = e.entityId
INNER JOIN ncim.ranMobileSwitchingCentre rmsc ON rmsc.entityId = c.entityId
22 Limit the results (connected devices) to entities that are main nodes.
24 Identify all the connections for the entities associated with the specified base station.
28 Determine the connecting point on the other device for the connection. This is captured
in e3.entityId.
30 Determine the layer in which the other connection is located. This is determined using
the topologyLinks object.
32 Determine the entityData entry corresponding to the topology layer. This enables
the query results to specify in which layer the connecting point on the other device is;
for example, layer 1,or layer 2.
36 Use the UNION statement to ensure that all connections are retrieved.
37-71 This is the same code as line 1-36 with the difference that here the specified device is
considered to be the zend (see line 60) and the neighboring devices are all considered
to be at the aend (see line 62).
Similar queries
The following example queries retrieve relevant data for different RAN relationships, using similar syntax
to the above example.
7 Use the entityData table as the driving table for this query.
9-10 The alias e3 identifies the hosting transceiver. The JOIN operations on these lines limit
the results to the transceiver that hosts the RAN sectors.
11-12 The alias e2 identifies the cells that collect the transceivers. The JOIN operations on
these lines limit the results to the cells that collect the transceiver, that in turn hosts
the RAN sectors.
13-14 Join the two cell tables, GSM and UTRAN. Use an outer join, as one of these tables will
be empty.
15-23 Specify the cell name and include results for GSM cells (entityType = 130) and
UTRAN cells (entityType = 131).
Similar queries
The following example queries retrieve relevant data for different RAN relationships, using similar syntax
to the above example.
SELECT e.entityId,
e.entityName, ch.className,
e2.entityName RANRadioCore,
rrc.mmc, rrc.mnc
FROM ncim.entityData e
INNER JOIN ncim.physicalChassis ch ON ch.entityId = e.entityId
INNER JOIN ncim.collects c ON c.collectedEntityId = e.entityId
INNER JOIN ncim.entityData e2 ON e2.entityId = c.collectingEntityId
INNER JOIN ncim.ranRadioCore rrc ON rrc.entityId = e2.entityId
WHERE
e2.entityType = 138
SELECT e.entityId,
e.entityName, ch.className,
e2.entityName RANCircuitSwitchedCore,
rcsc.mmc, rcsc.mnc
FROM ncim.entityData e
INNER JOIN ncim.physicalChassis ch ON ch.entityId = e.entityId
INNER JOIN ncim.collects c ON c.collectedEntityId = e.entityId
INNER JOIN ncim.entityData e2 ON e2.entityId = c.collectingEntityId
SELECT e.entityId,
e.entityName, ch.className,
e2.entityName RANPacketSwitchedCore,
rpsc.mmc,
rpsc.mnc
FROM ncim.entityData e
INNER JOIN ncim.physicalChassis ch ON ch.entityId = e.entityId
INNER JOIN ncim.collects c ON c.collectedEntityId = e.entityId
INNER JOIN ncim.entityData e2 ON e2.entityId = c.collectingEntityId
INNER JOIN ncim.ranPacketSwitchedCore rpsc ON rpsc.entityId = e2.entityId
WHERE
e2.entityType = 136
7 Use the entityData table as the driving table for this query.
9-11 Limit the results of the query to cells that have dependencies listed on entities that are
RAN base stations.
12 Limit the results of the query to cells managed by the base station known as
base_station_name.
Similar queries
The following example queries retrieve relevant data for different RAN relationships, using similar syntax
to the above example.
Example: find all base stations managed by a given base station controller
This query retrieves the details of all base stations managed by a given base station controller.
Example: find all Node B entities managed by a given radio network controller
This query retrieves the details of all Node B entities managed by a given radio network controller.
Example
Description
The table below describes this query.
3 Use the entityData table as the driving table for this query.
4 Restrict the entities returned to devices that host services. Do this by joining the
hostedService table.
5 For each of the entities identified as devices hosting services, retrieve the OSPF service
hosted on that device. Do this by joining the ospfService table to the query.
Results
The table below shows the results of this query.
172.18.1.2 22.130.159.0
172.18.2.4 22.130.53.0
router1.ibm.net 172.20.4.16
Related concepts
Hosted services
A hosted service is a service or application running on a specific device. For example, a device can
host BGP or OSPF services. NCIM can also model the fact that a software application, is running on a
workstation.
Example
Example
This example shows PIM adjacencies for the device 172.20.1.7.
Example
1] SELECT e.entityName,
2] c.sysName,
3] p.joinPruneInterval
4] FROM pimService p
5] INNER JOIN hostedService h ON h.hostedEntityId=p.entityId
Example
Description
The table below describes this query.
4 Use the subnet table as the driving table for this query. This enables the query to
extract all the subnets in the database.
5 Retrieve a listing of all the collected entities within each subnet. At this point the
collected entities are identified by their entity identifier only. The corresponding IP
address is retrieved in the next line. Do this by joining the collects table.
6 Extract the entity data for each interface or main node collected within each subnet. Do
this by joining the entityData table to the query. This enables the query to retrieve
the IP address for each of the collected entities.
7 For readability purposes, order the results by the IP address of the collecting subnet.
Results
The table below shows the results of this query.
Example
Description
The table below describes this query.
4 Use the networkVpn table as the driving table for this query. This enables the query to
extract all the VPNs in the database.
5 Retrieve a listing of all the collected entities within each VPN. At this point the collected
entities are identified by their entity identifier only. The corresponding IP address is
retrieved in the next line. Do this by joining the collects table.
6 Extract the entity data for each interface or main node collected within each VPN. Do
this by joining the entityData table to the query. This enables the query to retrieve
the IP address for each of the collected entities
7 For readability purposes, order the results by the name of the collecting VPN.
Results
The table below shows the results of this query.
Related concepts
Collection data
Collection data defines logical collections. Collections are defined in the collects table. Examples of
logical collections defined within NCIM include MPLS VPNs, global VLANs, and subnets.
This query identifies the list of all device manufacturers held in the topology database by extracting a list
of all mappings in the MACVendors mapping group in the mappings table.
The mappings table provides string-to-string mappings, whereas the enumerations table provides
integer-to-string mappings.
Example
Description
The following table describes this query.
2 Use the mappings table as the driving table for this query. This enables the query to
extract all the mapping data in the database.
3 Limit the mappings to those that form part of the MACVendors mapping group.
4 Order the results by the name of the equipment vendor.
Results
The following table shows an example of the results of this query.
Equipment vendor
360 Systems
3COM
Equipment vendor
Abatron AG
ABIT CORPORATION
AboveCable, Inc.
Related reference
Identify all the device hardware manufacturers listed in the database
This query provides a list of all device manufacturers held in the topology database.
Example
Description
The following table describes this query.
Results
The following table shows some of the results of this query.
Related concepts
Topology data
When the network is discovered, both core NCIM tables and entity attribute tables are updated with
topology data. These tables include Layer 1, Layer 2, Layer 3, device structure, routing protocol,
containment, and technology-specific information.
Core schema
Use the following information to understand the NCIM database core schema.
The following UML diagram shows how NCIM models containment relationships.
In this diagram, the entity class has no connections to any of the other classes. This is intentional
because the entity view is no longer part of the NCIM model as it got split into the entityData and
domainMembers classes, and their corresponding tables. However, the entity class has been maintained
as a database view partly for convenience as it makes some SQL easier to write but mainly to ensure
backwards compatibility with previous versions of the schema. The entity class is shown in the diagram
for completeness.
Table 312 on page 556 describes the NCIM relationship database table and data dictionary that
correspond to each class and relationship in the core schema.
BGP
Use this information to understand how the NCIM database models Border Gateway Protocol (BGP).
The following UML diagram shows how NCIM models BGP.
Table 313 on page 558 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model BGP.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Collections
Use this information to understand how the NCIM database models device collections, such as subnets,
VPNs, and VLANs.
The following UML diagram shows how NCIM models device collections, such as subnets, VPNs and
VLANs.
Table 314 on page 560 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used for modelling device collections.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Containment
Use this information to learn how the NCIM database models containment relationships.
The following UML diagram shows how NCIM models containment relationships.
Table 315 on page 561 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model containment relationships.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Endpoints
Use this information to understand how the NCIM database models endpoints.
The following UML diagram shows how NCIM models protocol endpoints. Not all endpoints are shown in
the diagram; see the following table for a full list of endpoints.
Table 316 on page 563 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model endpoints.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Geographical location
The NCIM database models geographical locations using several database tables.
The following UML diagram shows how NCIM models geographical locations.
Table 317 on page 564 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model geographical locations.
Table 318 on page 565 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model IP endpoints.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
LTE
In the NCIM database, Network Manager LTE topology data is modelled using a variety of NCIM tables.
LTE schema
Use the following information for a high-level view of the LTE schema.
The following UML diagram shows how NCIM models LTE entities and relationships.
The following table describes the NCIM relationship database table that correspond to each class and
relationship in the LTE schema.
LTE interfaces
The NCIM database models LTE interfaces using several database tables.
The following UML diagram shows how NCIM models the LTE interfaces.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model LTE interfaces.
LTE elements
In the NCIM database, Network Manager LTE elements are modelled using a variety of NCIM tables.
Note: Equipment Identity Register (EIR), Home Subscriber Server (HSS) and Policy and Charging Rules
Function (PCRF) are not exclusively LTE elements. These three elements service a variety of technologies,
including GSM, LTE, and UMTS. However, within the NCIM topology database, these elements are
currently modelled only within LTE. They are therefore presented in the NCIM schema together with
the other LTE elements.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model the EIR.
Related reference
LTE interfaces
Evolved NodeB
The NCIM database models the Evolved NodeB (eNodeB) using several database tables.
The following UML diagram shows how NCIM models the eNodeB.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model the eNodeB.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model the Home Subscriber Server (HSS).
Table 323. Classes and relationships for Home Subscriber Server (HSS)
Related reference
LTE interfaces
The NCIM database models LTE interfaces using several database tables.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model Mobility Management Entity.
Table 324. Classes and relationships for Mobility Management Entity (MME)
Related reference
LTE interfaces
The NCIM database models LTE interfaces using several database tables.
Packet Gateway
The NCIM database models the Packet Gateway (PGW) using several database tables.
The following UML diagram shows how NCIM models the Packet Gateway.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model Packet Gateway.
Related reference
LTE interfaces
The NCIM database models LTE interfaces using several database tables.
Table 326. Classes and relationships for Policy and Charging Rules Function (PCRF)
Related reference
LTE interfaces
The NCIM database models LTE interfaces using several database tables.
Serving Gateway
The NCIM database models the Serving Gateway (SGW) using several database tables.
The following UML diagram shows how NCIM models the Serving Gateway.
The following table describes the NCIM relationship database tables and data dictionary that correspond
to each class and relationship used to model Serving Gateway.
Related reference
LTE interfaces
Table 328 on page 578 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model MPLS TE tunnels.
MPLS VPNs
Use this information to understand how the NCIM database models Multi Protocol Label Switching Virtual
Private Networks (MPLS VPNs).
The following UML diagram shows how NCIM models MPLS VPNs.
Table 329 on page 579 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model MPLS VPNs.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
OSPF
Use this information to understand how the NCIM database models Open Shortest Path First (OSPF)
protocols .
The following UML diagram shows how NCIM models OSPF.
Table 330 on page 581 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model OSPFs.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Services
Use this information to understand how the NCIM database models the services that are offered by device
interfaces, for example BGP services or OSPF services.
The following UML diagram shows how NCIM models services. Not all services are shown in the diagram;
see the following table for a full list of services.
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
GSM
The NCIM database models GSM using several database tables.
The following UML diagram shows how NCIM models GSM.
Note: In addition to the standard relationships between entities shown in the core schema diagram, the
GSM schema diagram models extra relationships between RAN entities. These RAN entity relationships
have been added to make it easier to process RAN data. For example, the dependency relationship
between ranBaseStation and ranBaseStationController was added to enable a single query to
retrieve all RAN base stations managed by a given RAN base station controller.
Table 332 on page 583 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model GSM.
RAN collections
The NCIM database models RAN collections using several database tables.
The following UML diagram shows how NCIM models RAN collections.
Table 333 on page 585 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model RAN collections.
Table 334 on page 586 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model radio access network entity location.
Table 334. Classes and relationships for radio access network entity location
NCIM table Class or relationship Data dictionary
UMTS
The NCIM database models UMTS using several database tables.
The following UML diagram shows how NCIM models UMTS.
Note: In addition to the standard relationships between entities shown in the core schema diagram, the
UMTS schema diagram models extra relationships between RAN entities. These RAN entity relationships
have been added to make it easier to process RAN data. For example, the dependency relationship
between ranUtranCell and ranNodeB was added to enable a single query to retrieve all UTRAN cells
managed by a given Node B entity.
Table 335 on page 587 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model UMTS.
VLANs
Use this information to understand how the NCIM database models virtual local area networks (VLANs).
The following UML diagram shows how NCIM models VLANs.
Table 336 on page 589 describes the NCIM relationship database tables and data dictionary that
correspond to each class and relationship used to model VLANs.
vlanCollection Class
Related concepts
NCIM topology database schemas
Use this information to understand how the relationships between topology data are modelled.
Core tables
Core tables define entities and relationships between them. Core tables do not provide detailed attribute
information on the entities.
Core tables include those tables that define the domains, for example the domainMgr table and the
domainSummary table, and also the entityData table, which provides generic information about an
entity, for example entityName and entityType.
The core table models the following categories of topology data:
Domains
A domain is a scoped set of entities that are discovered and managed by an application, such as
Network Manager. Domains are represented using the domainMgr table. Membership of entities
within these domains is represented using the domainMembers table.
Entities
An entity is a topology database concept. All devices and device components discovered by Network
Manager are entities. Also device collections such as VPNs and VLANs, as well as pieces of topology
that form a complex connection, are entities. Generic information for all entities within NCIM
is held within the entityData table. The entity view joins data from the entityData and
domainMembers tables and is equivalent to the entity table that existed in Network Manager
versions 3.8 and earlier.
Containment relationships
Containment relationships express physical and logical containment. These relationships are
represented by the contains table.
Connectivity relationships
Connectivity relationships are relationships between entities. These relationships are represented
by the connects table. Other tables used to define connectivity include the networkPipe,
pipeComposition, and topologyLinks tables.
Collection relationships
Collection relationships enable NCIM to model collections of entities, such as MPLS VPNs, global
VLANs and subnets. The relationship is represented by the collects table.
Dependency relationships
Dependency relationships express a generic dependency relationship between two entities. This
relationship is represented by the dependency table.
Mappings
Mappings provide a means of looking up a database value in numerical or textual format and retrieving
corresponding human-readable text.
aggregatedLink
The aggregatedLink table records the entity IDs of aggregated links in Link Aggregation Groups.
The following table describes the aggregatedLink table.
aggregationDomain
The aggregationDomain table records the timestamps of when the last aggregation for an entity was done.
If an entity is already up to date, it is not updated again.
The following table describes the aggregationDomain table.
CIDRinfo
The CIDRinfo table provides the means to map between different representations of subnets and subnet
masks. This table belongs to the category mappings.
The following table describes the CIDRinfo table.
maskBits 32-bit integer Primary key The number of bits in the mask.
For example, for a class C
Not null network, this is 24.
CIDRString 7-character string Not null The Classless Inter-Domain
Routing (CIDR) notation for the
subnet. For example, for a class
C network, this is /24.
inverseMask IP Address Not null The inverse mask for the
network. The inverse mask acts
as a wildcard for OSPF and
ACLs.
numHosts 64-bit integer Not null The number of IP addresses in
the network. For example, for a
class C network this is 256.
numClassC Double precision Not null The number of class C
floating point networks within the subnet.
number
netmask 15-character string Not null The subnet mask for the
network. For example, for
a class C network this is
255.255.255.0.
classMembers
The classMembers table specifies the device class to which a specific entity belongs. This table belongs to
the category entities.
This table is populated only for entities that are chassis devices.
The following table describes the classMembers table.
Related concepts
Collection data
Collection data defines logical collections. Collections are defined in the collects table. Examples of
logical collections defined within NCIM include MPLS VPNs, global VLANs, and subnets.
Related reference
ncimCache.collects table
The ncimCache.collects table lists all the entities participating in a given collection.
connectActions
The connectActions table records all manual connection additions and all connection removals, including
removal of connections that were discovered rather than manually added.
The following table describes the connectActions table.
Related reference
ncimCache.connectActions table
The ncimCache.connectActions table lists all changes made manually to connections in the topology.
connects
The connects table stores data on connectivity between devices. This table belongs to the category
collections.
Each row in the connects table defines a relationship between two entities.
The connects table stores each connection as a single record. However, because two entities are
involved in a connection, the order of the connected entities within the connects table is random. One of
the devices involved in the connection is considered to be at a notional start (or aEnd) of the connection,
while the second device is considered to be at a notional end (or zEnd) of the connection.
The following table describes the connects table.
Related reference
ncimCache. connectstable
The ncimCache.connects table describes the type and speed of connections between devices.
connectSpeeds
The connectSpeeds table stores data on connectivity speed between devices.
The connectSpeeds table stores each connection as a single record.
The following table describes the connectSpeeds table.
Related reference
ncimCache. connectstable
The ncimCache.connects table describes the type and speed of connections between devices.
contains
The contains table stores data on physical and logical containment. This table belongs to the category
containment.
The following table describe the contains table.
Related reference
ncimCache. containstable
dependency
The dependency table defines a general dependency between two entities. This table belongs to the
category dependency.
This relationship is more general than the containment and connectivity relationships defined in other
tables.
The following table describes the dependency table.
Related reference
ncimCache.dependency table
The ncimCache.dependency table lists entities that are dependent on other devices.
deviceFunction
The deviceFunction table stores data on device vendors, associated device models together with the role
of the device model such as router, switch, and so on. This table belongs to the category entities.
The following table describes the deviceFunction table.
discoverySource
The discoverySource table describes the source of the data discovered for an entity. In the case where
there are multiple sources, for example, SNMP and an EMS, or two different EMSs, the table identifies all
of the data sources for that entity.
In the case where there are multiple data sources for a single entity, there will be multiple rows in the
discoverySource table for that entity. The nativeId and nativeIdString fields are important, as they are
the identifiers used by the EMS to identify a given device. Network Manager might refer to the same entity
in a completely different way. For example, a DNS lookup on a retrieved IP might have provided a DNS
name, and this DNS name would then be used to name the entity in the NCIM topology database.
The following table describes the discoverySource table.
domainMembers
The domainMembers table stores information on membership of entities within domains. This table
belongs to the category domains.
The following table describes the domainMembers table.
domainMgr
The domainMgr table stores data on network domains. This table belongs to the category domains.
The following table describes the domainMgr table.
Related concepts
entityData table and entity view
Information on entities is held in the entityData table in Network Manager versions 3.9 and later. This
table replaces the entity table used in earlier versions. To ensure backward compatibility an entity view
has been created to hold the same data as the entity table from earlier versions.
domainOrder
The domainOrder table stores the queue of domains for queued discovery. This table belongs to the
category domains.
The following table describes the domainOrder table.
entityActions
The entityActions table records all manual node additions and all node removals, including removal of
nodes that were discovered rather than manually added and the swapping of nodes into and out of a
domain.
The following table describes the entityActions table.
Related reference
ncimCache.entityActions table
The ncimCache.entityActions table lists all devices added using the manual topology API.
entityClass
The entityClass table stores information on all device classes and relationships between device classes.
The table belongs to the category entities.
The following table describes the entityClass table.
Not null
Automatically
incremented
Unique
Related reference
physicalChassis
The physicalChassis table stores the attributes of chassis entities.
entityData
The entityData table stores data on entities. This table belongs to the category entities.
The following table describes the entityData table.
Related concepts
entityData table and entity view
Information on entities is held in the entityData table in Network Manager versions 3.9 and later. This
table replaces the entity table used in earlier versions. To ensure backward compatibility an entity view
has been created to hold the same data as the entity table from earlier versions.
Related reference
ncimCache.entityData table
The ncimCache.entityData table holds different kinds of data about entities.
entityDetails
The entityDetails table allows the addition of arbitrary data about an entity in the form of key-value pairs.
This enables you to extend the database to provide additional data on entities. The entityDetails table
belongs to the category entities.
To add arbitrary data about an entity to the entityDetails table, you must first customize your discovery to
retrieve data from an external source, using the IP address of the device as a lookup.
Restriction: NCIM cannot check the constraints of any value that is stored with the key in the
entityDetails table.
On completion of a new discovery, MODEL automatically populates the NCIM topology database. You can
modify the way in which this population occurs in order to ensure that the customer data held in the
ExtraInfo section of the interface records within the MODEL database is used to populate key-value pair
records within the entityDetails table.
The following table describes the entityDetails table.
entityNameCache
The entityNameCache table is a lookup table that provides the entity name for every entity in the
entityData table. This table belongs to the category entities.
The following table describes the entityNameCache table.
entityType
The entityType table provides a comprehensive list of every entity type in NCIM. It belongs to the category
entities.
If you want to define a new entity type, you must update the entityType table to include the new entity
type.
The following table describes the entityType table:
The following table summarizes the information in the entityType table. You can use this table to look up
the value for a particular type of entity, for example, for defining a connectivity type for use in the Hop
View and Network Views.
Related concepts
Entities
A Network Manager discovery returns many different types of entity. If you understand the entities that
you might encounter, you can more easily restrict your queries to return only required information.
Related reference
config.serviceTypes table
The config.serviceTypes table contains configuration information for the SAE plug-in.
enumerations
The enumerations table provides a means of looking up a human-readable string value by providing a
numerical value. Each enumeration is defined as a key-value pair. The enumerations table belongs to
the category mapping.
Description
The following table describes the enumerations table.
Not null
Summary
The following table summarizes the information in the enumerations table.
hostedService
A hosted service is a service or application running on a specific main node device. The hostedService
table maps a main node device, the hosting entity, to the service or applications that are running on that
device, the hosted entities. The hostedService table belongs to the category entities.
The following table describes the hostedService table.
Related reference
ncimCache.hostedService table
The ncimCache.hostedService table maps a main node device, the hosting entity, to the service or
applications that are running on that device, the hosted entities. The hostedService table belongs to the
category entities.
bgpService
The bgpService table represents a BGP service and includes relevant protocol data. This BGP service runs
on a device, as modeled in the hostedService table.
ospfService
manager
The manager table lists the applications that manage the network domains stored in NCIM, for example
Network Manager. The manager table belongs to the category domains.
The following table describes the manager table.
mappings
The mappings table provides a means of looking up an alternative textual name. It is used to map non-
human-readable data to human-readable data. The mappings table belongs to the category mapping.
Description
The following table describes the mappings table.
Summary
The following table summarizes the information held in the mappings table.
Related reference
physicalChassis
The physicalChassis table stores the attributes of chassis entities.
networkPipe
The networkPipe table represents managed connections in the network. This table belongs to the
category connectivity.
The following table describes the networkPipe table.
Related reference
ncimCache.networkPipe table
The ncimCache.networkPipe table represents managed connections.
entityDetails
The entityDetails table allows the addition of arbitrary data about an entity in the form of key-value pairs.
This enables you to extend the database to provide additional data on entities. The entityDetails table
belongs to the category entities.
pipeComposition
notes
The notes table provides a means of storing textual data related to an entity. This table belongs to the
category entities.
The following table describes the notes table.
pipeComposition
The pipeComposition table allows a higher-level connection to be defined in terms of its lower-level
connections. This table belongs to the category connectivity.
The pipeComposition table can be used together with the networkPipe table to represent a hierarchy of
connections.
The following table describes the pipeComposition table.
partComponent 32-bit integer Foreign key A foreign key from the row
in the entityData table that
Primary key with represents the network pipe
groupComponent that is part of the composition.
Not null
Related reference
ncimCache.pipeComposition table
probeTooltip
The probeTooltip view joins data from the entityData, probeEndPoint, and probe tables.
The information stored in this view is accessible from the tooltip by hovering over a link between two SLA
Probe entities on a network map.
The following table describes the probeTooltip view.
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
The following table describes the protocolEndPoint table.
Related reference
ncimCache.protocolEndpoint table
The ncimCache.protocolEndpoint table allows a higher-level connection to be defined in terms of lower-
level connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
atmEndPoint
The atmEndPoint table represents a logical ATM end point and includes relevant ATM data. This endpoint
is implemented by a physical interface.
bgpEndPoint
The bgpEndPoint table represents a logical BGP end point and includes relevant BGP data. This endpoint
is implemented by a physical interface, as modeled in the protocolEndPoint table
igmpEndPoint
The igmpEndPoint table holds information on the Internet Group Membership Protocol (IGMP) End Points.
ipMRouteEndPoint
The ipMRouteEndPoint table holds information on the IP Multicast Routing Protocol End Points.
mplsTETunnelEndPoint
The mplsTETunnelEndPoint table represents an MPLS TE protocol end point and is implemented on the
interface associated with the configured tunnel. The end point references the associated TE tunnels
unique instance id.
ospfEndPoint
The ospfEndPoint table represents an OSPF end point and includes relevant data. This endpoint is
implemented by a physical interface, as modeled in the protocolEndPoint table.
pimEndpoint
topologyLinks
The topologyLinks table allows you to identify which connections belong to a specific type of topology.
This table belongs to the category connectivity.
Examples of distinct network topologies modeled in NCIM include:
• Layer 2 topology
• Layer 3 router links: This refers to connections between routers, and therefore, between subnets.
• Pseudowire topology
• OSPF topology
The following table describes the topologyLinks table.
discoveryOverview
The discoveryOverview view joins data from the entityData collates timestamps from various
sources.
The information stored in this view is accessible from the Show Discovery Overview right-click tool in the
topology GUIs.
For more information on the Show Discovery Overview right-click tool, see the IBM Tivoli Network
Manager IP Edition Administration Guide.
The following table describes the discoveryOverview view.
rebootTime Date and time when the Calculated based on data in the
device was last rebooted. This chassis table
is calculated based on the
sysUpTime MIB value retrieved
from the device, so Last Reboot is
only available if the sysUpTime was
retrieved. For example, for devices
with no SNMP access, the value of
Last Reboot is NULL.
entity
The entity view joins data from the entityData and domainMembers tables and is equivalent to the
entity table that existed in Network Manager versions 3.8 and earlier.The entity view stores data on
entities and includes the domainMgrId, which the domain in which the entity is located.
The following table describes the entity view.
Related concepts
entityData table and entity view
Information on entities is held in the entityData table in Network Manager versions 3.9 and later. This
table replaces the entity table used in earlier versions. To ensure backward compatibility an entity view
has been created to hold the same data as the entity table from earlier versions.
Related reference
entityType
The entityType table provides a comprehensive list of every entity type in NCIM. It belongs to the category
entities.
interfaceDomain
The interfaceDomain view adds the domain name to the interface table. This view is used to get the
domain details of a particular interface.
The following table describes the interfaceDomain view.
interfaces
The interfaces view provides a consolidated set of data on all device interfaces.
The following table describes the interfaces view. The type, constraints, and description are
automatically inherited, where appropriate, from the tables to which the fields belong.
• 0 – Meters
• 1 – Kilometers
• 2 – Centimeters
• 3 - Feet
• 4 – Yards
• 5 - Miles
• 6 - Inches
interfaceDomain
The interfaceDomain view adds the domain name to the interface table. This view is used to get the
domain details of a particular interface.
The following table describes the interfaceDomain view.
aggregationGroup
The aggregationGroup table holds information about Link Aggregation Groups (LAGs).
The following table describes the aggregationGroup table.
antennaFunction
The antennaFunction table models the physical antenna which support eUTRAN cells and sectors.
The following table describes the antennaFunction table.
atmEndPoint
The atmEndPoint table represents a logical ATM end point and includes relevant ATM data. This endpoint
is implemented by a physical interface.
The following table describes the atmEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
bgpAutonomousSystem
The bgpAutonomousSystem table stores data about a BGP autonomous system (AS), including number,
name, and whether the AS is private.
The following table describes the bgpAutonomousSystem table.
ASN 32-bit integer Not null The number of this BGP AS.
This can be a value between
1 and 65535; the range from
64512 to 65535 is reserved
for private use. Every AS has
a unique AS number, which is
assigned to it by an Internet
Registry or a service provider.
ASName 64-character string The name of this BGP AS.
isSingleHomed 8-bit integer Indicates whether this AS is
single-homed. A single-homed
AS reaches networks outside of
its domain through a single exit
point.
bgpCluster
The bgpCluster table represents use of route reflectors within a BGP AS. This table is currently not used.
The following table describes the bgpCluster table.
clusterID 15-character string Not null Identifier for the BGP route
reflector in the cluster when
there is more than one route
reflector in the local AS.
bgpEndPoint
The bgpEndPoint table represents a logical BGP end point and includes relevant BGP data. This endpoint
is implemented by a physical interface, as modeled in the protocolEndPoint table
The following table describes the bgpEndPoint table:
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
frameRelayEndPoint
The frameRelayEndPoint table represents a logical Frame Relay end point and includes relevant data. This
endpoint is implemented by a physical interface, as modeled in the protocolEndPoint table.
ipEndPoint
The ipEndPoint table represents an IP end point and includes relevant data. The endpoint is implemented
by a physical interface, as modeled in the protocolEndPoint table.
bgpNetwork
The bgpNetwork table holds a collection of BGP ASs.
The following table describes the bgpNetwork table:
bgpRouteAttribute
The bgpRouteAttribute table stores data about a given BGP route such as its next hop and prefix. These
attributes affect routing decisions for the AS.
The following table describes the bgpRouteAttribute table.
bgpService
The bgpService table represents a BGP service and includes relevant protocol data. This BGP service runs
on a device, as modeled in the hostedService table.
Each row in this table corresponds to a single hosted BGP service. BGP routers can only host one BGP
service.
The following table describes the bgpService table.
Related reference
hostedService
computerSystem
The computerSystem table represents the logical or virtual perspective of the physical device
The following table describes the computerSystem table.
controlPlaneViewCollection
The controlPlaneViewCollection table supports the dynamic collection views under LTE Network
Topology > Control Plane by Tracking Area in the Network Views. Each instance of this entity type
collects the eNodeBs in the corresponding tracking area, together with the devices that these eNodeBs
are connected to on the control plane..
The following table describes the controlPlaneViewCollection table.
cpu
The cpu table describes Central Processing Units (CPUs).
The following table describes the cpu table.
discoveryAttributes
The discoveryAttributes table stores data that shows whether a device has been subject to interface
filtering.
The following table describes the discoveryAttributes table.
Not null
domainSummary
The domainSummary table stores statistical data on a given domain.
The following table describes the domainSummary table.
eirFunction
The eirFunction table models the Equipment Identity Register (EIR). The EIR keeps track of mobile
devices which should either be banned from using the network or monitored. When a mobile phone is
stolen its identity it is added to the EIR blacklist and the result is that this phone will never be able to
attach to the network for service. Usually each network has its own EIR which is often combined with
the HSS node. It is possible for multiple operators to share a common EIR which enables the blacklisted
information to be more easily and widely available.
The following table describes the eirFunction table.
emsSystem
The emsSystem table describes EMS system entities.
The following table describes the emsSystem table.
enbFunction
The enbFunction table models the role of the eNodeB entity within a network hardware node. Multiple
enbFunction instances may be implemented within a single network hardware node. The eNodeB entity
manages radio air interface communication with users of the LTE network. Each eNodeB controls one or
more cells which are geographic areas of radio coverage.
The following table describes the enbFunction table.
eUtranCell
The eUtranCell table models a geographical area of radio coverage that is implemented and supported
by physical radio equipment, such as towers, amplifiers, and antennas.
The following tables describes the eUtranCell table.
eUtranCellId 64-character NOT NULL Uniquely identifies a cell within a PLMN. It is often
string constructed from eNodeB ID + Physical Cell ID.
eUtranCellName 64-character NOT NULL Cell identifier or name of the cell.
string
PSS + 3*SSS
maximumOutputPower Float Maximum power in Watts for the sum of all downlink
channels that are allowed to be used simultaneously in
a cell.
userCapacity Integer Maximum number of pieces of user equipment (UEs)
that can connect to this eUtranCell simultaneously.
earfcnDl Integer E-UTRA Absolute Radio Frequency Channel Number
(downlink). An integer value which identifies the
downlink carrier frequency of the cell.
earfcnUl Integer E-UTRA Absolute Radio Frequency Channel Number
(uplink). An integer value which identifies the uplink
carrier frequency of the cell.
administrativeState Enumeration Administrative state of the LTE sector. Takes one of the
following values:
• Unlocked
• Locked
• Shutting Down
• Other
• Unknown
eUtranSector
The eUtranSector table models a geographic area of radio coverage that is implemented and supported
by physical radio equipment. An eUTRAN sector implements one or more eUTRAN cells.
The following table describes the eUtranSector table.
frameRelayEndPoint
The frameRelayEndPoint table represents a logical Frame Relay end point and includes relevant data. This
endpoint is implemented by a physical interface, as modeled in the protocolEndPoint table.
The following table describes the frameRelayEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
bgpEndPoint
The bgpEndPoint table represents a logical BGP end point and includes relevant BGP data. This endpoint
is implemented by a physical interface, as modeled in the protocolEndPoint table
genericCollection
The genericCollection table stores information on generic collections of entities.
The following table describes the genericCollection table.
genericRange
The genericRange table holds information about which Customer VLANS are switched through each
Virtual Switch Instance (VSI).
The following table describes the genericRange table.
geographicLocation
The geographicLocation table stores geographic location information for network entities. It does this
by creating collections of entities at a specific location.
The following table describes the geographicLocation table.
globalVlan
The globalVlan table models global VLAN logical collections. A global VLAN is a collection of VLAN entities
across multiple chassis devices that combine to form a virtual network.
gnbFunction
The gnbFunction table models the role of the gNodeB entity within a network hardware node. Multiple
gnbFunction instances may be implemented within a single network hardware node. The gNodeB entity
hsrpGroup
The hsrpGroup table represents a Cisco Hot Standby Routing Protocol (HRSP) group logical collection.
The HRSP implements a virtual router with its own IP and MAC addresses. This virtual router forms an
HSRP group that consists of a number of real interfaces, only one of which is active at any given time. The
active interface forwards IP traffic that is sent to the virtual router and the other interfaces in the group
stand by ready to become active if the active interface fails.
The following table describes the hsrpGroup table.
hssFunction
The hssFunction table models the Home Subscriber Server (HSS). The HSS manages subscriber
identities, service profiles, authentication, authorization, and quality of service (QoS), and acts as the
master repository for subscriber profiles, device profiles and state information.
The following table describes the hssFunction table.
igmpEndPoint
The igmpEndPoint table holds information on the Internet Group Membership Protocol (IGMP) End Points.
Each End Point holds various attributes describing the interface that implements it. There is a
dependency between the end point and service associated with it (modeled via the existing dependency
table). The End Point is associated with the interface which implements it using the existing
protocolEndPoint table.
The following table describes the igmpEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
igmpGroup
The igmpGroup table holds multicast group collections for which there are associated Internet Group
Membership Protocol (IGMP) end points in the igmpEndPoint table. Entries in the igmpGroup table collect
associated igmpEndPoints using the existing collects table.
The following table describes the igmpGroup table.
igmpService
The igmpService table represents an Internet Group Management Protocol (IGMP) service. Each row in
the table corresponds to a single hosted IGMP service. The service is associated with the device on which
it runs using the hostedService table.
The following table describes the igmpService table.
ipConnection
The ipConnection table stores information on IP connections.
The following table describes the ipConnection table.
ipEndPoint
The ipEndPoint table represents an IP end point and includes relevant data. The endpoint is implemented
by a physical interface, as modeled in the protocolEndPoint table.
The following table describes the ipEndPoint table:
cdmAddressType 16-bit integer Not null The IBM Common Data Model defines
an attribute named AddressType in the
Default value: 0
IpV4Address and IPv6Address views and
the ipEndPoint class is the equivalent
object in NCIM. Therefore to make the
attributes in the classes consistent, a
new attribute named cdmAddressType has
been added to the ipEndPoint table.
Related concepts
Technology-specific data
ipMRouteDownstream
The ipMRouteDownstream table holds the downstream route statistics per device or MDT. Each entity in
this table will have a dependency relationship with the associated MDT via the existing dependency table.
The following table describes the ipMRouteDownstream table.
ipMRouteEndPoint
The ipMRouteEndPoint table holds information on the IP Multicast Routing Protocol End Points.
Each End Point holds various attributes describing the interface that implements it. There is a
dependency between the end point and service associated with it (modelled using the existing
dependency table). The End Point is associated with the interface which implements it through the
existing protocolEndPoint table.
The following table describes the ipMRouteEndPoint table.
flowDirection Enumerated value Takes one of the Indicates the direction of flow
following values: represented by this end point
• upstream
• downstream
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
ipMRouteGroup
The ipMRouteGroup table represents Multicast Groups, as contained by the Multicast Distribution Tree
(MDT).
The following table describes the ipMRouteGroup table.
mdtType Enumerated value Takes one of the Holds the type of MDT
following values: represented
• unknown
• other
• SPT
• SDT
ipMRouteService
The ipMRouteService table represents an IP Multicast Routing service and includes any attributes
relevant to the service. Each row in the table corresponds to a single hosted IPMRouting service. The
service is associated with the device on which it runs through the hostedService table.
The following table describes the ipMRouteService table.
ipMRouteSource
The ipMRouteSource table represents Multicast Sources, as contained by the Multicast Distribution Tree
(MDT).
The following table describes the ipMRouteSource table.
ipMRouteUpstream
The ipMRouteUpstream table holds the upstream (RPF) route statistics for each device or MDT. Each
entity in this table has a dependency relationship with the associated MDT through the existing
dependency table.
The following table describes the ipMRouteUpstream table.
rtProto Enumerated value Takes one of the The protocol used to learn
following values; the upstream interface for this
route entry
• other
• local
• netmgmt
• ICMP
• EGP
• GGP
• hello
• RIP
• ISIS
• ESIS
• ciscoIGRP
• bbnSpfIGP
• OSPF
• BGP
• IDRP
• ciscoEIGRP
• DVMRP
ipPath
The ipPath table stores information on IP paths.
The following table describes the ipPath table.
itnmService
The itnmService table represents Service-Affected Events (SAE); the table is used by the SAE plug-ins
in the Event Gateway, ncp_g_event. This table is used only indirectly by the SAE plug-ins, since the SAE
plug-ins use the NCIM cache tables, which are based on NCIM tables.
The following table describes the itnmService table.
lagEndPoint
The lagEndPoint table holds information about end points within Link Aggregation Groups (LAGs).
The following table describes the lagEndPoint table.
lingerTime
The lingerTime table stores the linger time for a device. The linger time is the number of discoveries that a
device can fail to be found in before it is removed from the topology.
The linger time is set for a device when it is instantiated, from the default value in the model.config table.
Each time that a device in the topology is not discovered, the linger time is decreased by 1. When the
linger time is zero, if the device is not discovered, it is removed from the topology.
The lingerTime table is described in the following table:
Not null
Related reference
ncimCache.lingerTime table
The ncimCache.lingerTime table stores the linger time for a device.
localVlan
The localVlan table specifies which global VLAN the local VLAN belongs to. A local VLAN represents all the
interfaces on a single chassis device that belong to a global VLAN.
In addition, the contains table specifies the interfaces contained by the local VLAN.
Related reference
contains
The contains table stores data on physical and logical containment. This table belongs to the category
containment.
lteInterface
The lteInterface table models the different types of interfaces between LTE devices.
Gx
Interface between the PGW and the Policy and Charging Rules Function (PCRF). In particular, this is
the interface between the Policy Control Enforcement Function (PCEF) or the PGW and the PCRF.
OAM
Operational and maintenance interface, used to manage the device.
SGi
Interface between the PGW and any packet data network.
S1
Interface between the eNodeB and the core network.
S1-MME
Control plane interface between an eNodeB and an MME.
S1-U
User plane interface between an eNodeB and one or more SGWs.
S3
Control plane interface between an MME and a Serving GPRS Support Node (SGSN). The interface is
used to manage mobility inter-3GPP Radio Access Technology (RAT) mobility between, for example,
LTE and UMTS or GPRS.
S4
Control and user plane interface between an SGW and a Serving GPRS Support Node (SGSN).
S5
Modelled in NCIM as a user plane interface between an SGW and a PGW within the same Public Land
Mobile Network (PLMN).
Note: The S5 interface can carry control and user plane data but in NCIM it is modelled as user plane
only.
S6a
Control plane interface between MME and Home Subscriber Server (HSS).
S8
Equivalent to the S5 interface except that it connects an SGW in the Visited PLMN (VPLMN) to a PGW
in the roaming subscriber's Home PLMN (HPLMN).
Note: The S5 interface can carry control and user plane data but in NCIM it is modelled as user plane
only.
ltePool
The ltePool table is a generic modelling mechanism for groups of pooled LTE entities, and is used
to model MME pools, PGW pools, and SGW pools. As an example, in order to model an MME pool,
the relationship between the ltePool entity and associated mmeFunction entities is modelled using the
collects table.
The following table describes the ltePool table.
ltePoolArea 64-character string The name of the Pool Area that is covered
by the pool. There is a one to one mapping
between a Pool and a Pool Area.
managedStatus
The managedStatus table stores the managed status information for each network entity in the
topology.
The following table describes the managedStatus table.
username 240– Name of the user who last set the status of the entity.
character
string
changeTime Timestamp Date and time when the status of the entity was changed.
maintenance Timestamp Start time for device to be in unmanaged state.
StartTime
maintenance Timestamp End time for device to be in unmanaged state.
EndTime
Related reference
ncimCache.managedStatus table
The ncimCache.managedStatus table stores the managed status information for network entities.
mmeFunction
The mmeFunction table models the role of the Mobility Management Entity (MME) within a network
hardware node. Multiple mmeFunction instances can be implemented within a single network hardware
node. The MME is the main signalling control element in the core network and is the key control node for
enabling user equipment access to the core network.
The following table describes the mmeFunction table.
mplsTEService
The mplsTEService table represents an MPLS TE service and includes relevant protocol data. This MPLS
TE service runs on a device, as modeled in the hostedService table. Each row in this table corresponds to
a single hosted MPLS TE service. MPLS TE configured devices will host only one MPLS TE service, which in
turn can support multiple MPLS TE tunnels.
The following table describes the mplsTEService table.
mplsTETunnel
The mplsTETunnel table represents the MPLS TE tunnels discovered in the network and includes a
number of tunnel attributes. Each row in this table corresponds to a TE tunnel discovered on a device.
The following table describes the mplsTETunnel table.
• none
• rsvp
• crldp
• other
mplsTETunnelEndPoint
The mplsTETunnelEndPoint table represents an MPLS TE protocol end point and is implemented on the
interface associated with the configured tunnel. The end point references the associated TE tunnels
unique instance id.
The following table describes the mplsTETunnelEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
mplsTETunnelResource
The mplsTETunnelResource table represents the MPLS TE Tunnel resource configurations that tunnels
might be associated with.
The following table describes the mplsTETunnelResource table.
mplsLSP
The mplsLSP table represents LSPs (Label Switched Paths) that might be traversed by MPLS TE tunnels.
The following table describes the mplsLSP table.
multiplexer
The multiplexer table describes multiplexer entities.
The following table describes the multiplexer table.
netcoolAsmsRunning
The netcoolAsmsRunning table lists instances of ASM running on main node devices.
The following table describes the netcoolAsmsRunning table.
networkInterface
The networkInterface table represents interfaces on a chassis device.
The following table describes the networkInterface table.
networkServiceEntityEndPoint
The networkServiceEntityEndPoint table describes network service entity endpoints.
The following table describes the networkServiceEntityEndPoint table.
networkVpn
The networkVpn table represents a logical collection of IP addresses collected within a VPN.
The following table describes the networkVpn table.
nrCellCU
The nrCellCU table models a geographical area of radio coverage that is implemented and supported
by physical radio equipment for 5G NR GNB devices, such as towers, amplifiers, and antennas. These are
contained in GNBCUCP/GNBCUUP Functions.
The following table describes the nrCellCU table.
nRCellName 64-character string NOT NULL Cell identifier or name of the cell.
emsDistinguishedName 255-character string Distinguished name by which the
nrCellCU is known to its element
management system (EMS).
nRCellId 64-character string NOT NULL Uniquely identifies a cell within a
PLMN. It is often constructed from
gNodeB ID + Physical Cell ID.
TAI 64-character string NOT NULL Tracking Area Identifier (TAI). This
is a globally unique tracking area
identifier, made up of the PLMN ID
and the TAC.
physicalCellID Integer Physical cell identifier. Takes a
value in the range 0 to 503.
The physical cell id is used by
the cell to encode and decode
the data that it transmits. It is
used in a similar way to the
UMTS scrambling code. To avoid
interference, neighboring cells
should have different physical cell
identifiers. The physical cell id
is derived from the primary and
secondary synchronization signals
(PSS and SSS). The PSS takes
a value from 0 to 2, the SSS
takes a value from 0 to 167, and
the physical cell id is determined
based on the following formula:
PSS + 3*SSS
nrCellDU
The nrCellDU table models a geographical area of radio coverage that is implemented and supported
by physical radio equipment for 5G NR GNB devices, such as towers, amplifiers, and antennas. These are
contained in GNBDU Functions.
The following table describes the nrCellDU table.
nRCellName 64-character string NOT NULL Cell identifier or name of the cell.
emsDistinguishedName 255-character string Distinguished name by which the
nrCellDU is known to its element
management system (EMS).
nRCellId 64-character string NOT NULL Uniquely identifies a cell within a
PLMN. It is often constructed from
gNodeB ID + Physical Cell ID.
nRCellState 10-character string Represents the active state of the
cell. Takes one of the following
values:
• IDLE
• ACTIVE
• INACTIVE
• UNKNOWN
TAI 64-character string NOT NULL Tracking Area Identifier (TAI). This
is a globally unique tracking area
identifier, made up of the PLMN ID
and the TAC.
channelBandwidthUl Float Uplink channel bandwidth.
channelBandwidthDl Float Downlink channel bandwidth.
PSS + 3*SSS
operatingSystem
The operatingSystem table represents the software responsible for interacting with hardware devices.
The following table describes the operatingSystem table.
ospfArea
The ospfArea table models an OSPF area.
The following table describes the ospfArea table.
ospfEndPoint
The ospfEndPoint table represents an OSPF end point and includes relevant data. This endpoint is
implemented by a physical interface, as modeled in the protocolEndPoint table.
The following table describes the ospfEndPoint table.
1: down
2: loopback
3: waiting
4: pointToPoint
5: designated-
Router
6: backup-
DesignatedRouter
7: other-
DesignatedRouter
ospfIfType Enumerated value Takes one of the The OSPF interface type.
following values:
1: broadcast
2: nbma
3: pointTo-
Point
5: pointTo-
Multipoint
ospfNetworkLSA
The ospfNetworkLSA table represents an OSPF Link-State Advertisement (LSA) and includes relevant
data.
The following table describes the ospfNetworkLSA table.
ospfRoutingDomain
The ospfRoutingDomain table represents an OSPF routing domain.
The following table describes the ospfRoutingDomain table.
ospfService
The ospfService table represents an OSPF service and includes relevant protocol data. This OSPF service
runs on a device, as modeled in the hostedService table.
The following table describes the ospfService table.
Related reference
hostedService
A hosted service is a service or application running on a specific main node device. The hostedService
table maps a main node device, the hosting entity, to the service or applications that are running on that
device, the hosted entities. The hostedService table belongs to the category entities.
pcrfFunction
The pcrfFunction table models the Policy and Charging Rules Function (PCRF). The PCRF manages the
policy and charging for uplink and downlink service flows and the permitted EPS bearer QoS.
pgwFunction
The pgwFunction table models the Packet Data Network Gateway, which provides user plane
connectivity to packet data networks. The role of the PGW is implemented within a network hardware
node and is modelled by NCIM using the pgwFunction entity type. Multiple pgwFunction instances can be
implemented within a single network hardware node.
The following table describes the pgwFunction table.
pgwFunctionName 64-character NOT NULL Name of the PGW function instance configured
string on the physical node.
MCC 3-character A PGW can support multiple PLMNs. The MCC
string attribute specifies the Mobile Country Code
(MCC) of the primary PLMN supported by the
PGW. Primary PLMN usually means the sole
PLMN or the PLMN of the operator responsible
for the operation and maintenance of the PGW.
The MCC consists of three digits.
MNC 3-character A PGW can support multiple PLMNs. The MNC
string attribute specifies the Mobile Network Code
(MNC) of the primary PLMN supported by the
PGW. Primary PLMN usually means the sole
PLMN or the PLMN of the operator responsible
for the operation and maintenance of the PGW.
The length of the MNC (two or three digits)
depends upon the value of the MCC.
supportedPLMNs Integer This is a count of the number of PLMNs (Public
Land Mobile Networks) supported by the PGW
emsDistinguishedNam 255-character The distinguished name by which the PGW
e string is known to its element management system
(EMS)
physicalBackplane
The physicalBackplane table stores the attributes of chassis entities.
The following table describes the physicalBackplane table.
physicalCard
The physicalCard table represents card entities.
The following table describes the physicalCard table.
softwareImage 100-character
string
physicalChassis
The physicalChassis table stores the attributes of chassis entities.
The following table describes the physicalChassis table.
Related reference
entityClass
The entityClass table stores information on all device classes and relationships between device classes.
The table belongs to the category entities.
mappings
The mappings table provides a means of looking up an alternative textual name. It is used to map non-
human-readable data to human-readable data. The mappings table belongs to the category mapping.
physicalConnector
The physicalConnector table stores information about physical connectors.
The following table describes the physicalConnector table.
physicalPowerSupply
The physicalPowerSupply table represents a power supply unit (PSU) entity.
The following table describes the physicalPowerSupply table.
physicalSensor
The physicalSensor table represents sensor entities.
The following table describes the physicalSensor table.
cdmRow 255-character
string
physicalSlot
The physicalSlot table represents slot entities.
If you want this table to be populated with MIB data, you must configure the Entity agent to run during the
discovery process. The Entity agent discovers detailed containment information from the Entity MIB. By
default, the Entity agent is configured not to run during discovery.
The following table describes the physicalSlot table:
entityId 32-bit integer Foreign key The identifier of a slot entity from
the entityData table.
Not null
pimEndpoint
The pimEndPoint table represents the Protocol Independent Multicast (PIM) end points discovered in the
network and their associated attributes.
The following table describes the pimEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
pimNetwork
The pimNetwork table holds the Protocol Independent Multicast (PIM) Network collection entity which
collects all PIM-enabled routers.
The following table describes the pimNetwork table.
pimService
The pimService table represents a Protocol Independent Multicast (PIM) service and includes relevant
protocol data.
The following table describes the pimService table.
plmn
The plmn table models a Public Land Mobile Network (PLMN). A PLMN is a network that provides land
mobile telecommunications services to the public. Each operator providing mobile services has its own
PLMN.
The following table describes theplmn table.
portEndPoint
The portEndPoint holds data about TCP/UDP endpoints found by the NMAPScan agent.
The following table describes the portEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
probe
The probe table holds probe specific details of all discovered network probes.
The following table describes the probe table.
entityId 32-bit integer Primary Key Unique identifier for the entity.
Foreign Key
(entityData table)
Not Null
frequency 32-bit integer Duration between probe
operations, in seconds.
probeCollection
The probeCollection table represents entities that collect probes, or further probe collections. This
table is used to provide a hierarchical probe collection and to allow the display of probes and the devices
they relate to.
The following table describes the probeCollection table.
Foreign Key
(entityData table)
Not Null
probeEndPoint
The probeEndPoint table provides probe-specific protocol end point information. These end points are
implemented by interfaces that are identified as a probe source or target.
The following table describes the probeEndPoint table.
Foreign Key
(entityData table)
Not Null
probeService
The probeService table holds details of the technology that provides network probes for a given device.
The following table describes the probeService table.
Foreign Key
(entityData table)
Not Null
maxProbes 32-bit integer Total number of probes
supported.
monitorType 16-character string Name of the technology that
provides the probes. For
example, IPSLA. This value is
used to group probes.
responderEnabled Enumerated value Indicates whether the device is
configured as a responder.
Takes one of the following
values:
• true
• false
ranBaseStation
The ranBaseStation table describes Radio Access Network (RAN) base stations.
The following table describes the ranBaseStation table.
ranBaseStationController
The ranBaseStationController table describes Radio Access Network (RAN) base station controllers.
The following table describes the ranBaseStationController table.
ranGGSN
The ranGGSN table describes Radio Access Network (RAN) Gateway GPRS Serving Nodes (GGSNs).
The following table describes the ranGGSN table.
ranGSMCell
The ranGSMCell table describes Radio Access Network (RAN) GSM cells.
The following table describes the ranGSMCell table.
ranLocationArea
The ranLocationArea table describes Radio Access Network (RAN) location areas, in which there may be
one or more GSM/UMTS cells. This entity is a collection and it models those devices within which a given
mobile user can move for voice access before having to switch to a different location area.
The following table describes the ranLocationArea table.
ranMediaGateway
The ranMediaGateway table describes Radio Access Network (RAN) media gateways.
The following table describes the ranMediaGateway table.
ranMobileSwitchingCentre
The ranMobileSwitchingCentre table describes Radio Access Network (RAN) Mobile Switching Centers.
The following table describes the ranMobileSwitchingCentre table.
ranMSS
The ranMSS table describes Radio Access Network (RAN) mobile switching center servers.
The following table describes the ranMSS table.
ranNodeB
The ranNodeB table describes Node B entities.
The following table describes the ranNodeB table.
ranNodeBLocalCell
The ranNodeBLocalCell table models the local Node B identifier. This identifier is related to local
hardware that is available to manage a given cell.
The following table describes the ranNodeBLocalCell table.
ranPacketControlUnit
The ranPacketControlUnit table describes Radio Access Network (RAN) base station controllers.
The following table describes the ranPacketControlUnit table.
ranPacketSwitchedCore
The ranPacketSwitchedCore table describes RAN packet switched core entities, which are collection
entities that collect the entities involved in the packet switch core network of a given mobile phone
network.
The following table describes the ranPacketSwitchedCore table.
ranRadioCore
The ranRadioCore table describes RAN radio core entities, which are collection entities that collect the
entities involved in the RAN network radio core; that is, radio network controller (RNC) and base station
controller (BSC) entities.
The following table describes the ranRadioCore table.
ranRadioNetworkController
The ranRadioNetworkController table describes RAN radio network controller entities.
The following table describes the ranRadioNetworkController table.
ranRoutingArea
The ranRoutingArea table describes RAN routing area entities, which are devices within which a given
mobile user can move for data access before having to switch to a different routing area.
The following table describes the ranRoutingArea table.
ranSector
TheranSector table describes Radio Access Network (RAN) cell sectors.
The following table describes the ranSector table.
ranSGSN
The ranSGSN table describes Radio Access Network (RAN) Serving GPRS Serving Nodes (SGSNs).
The following table describes the ranSGSN table.
ranUtranCell
The ranUtranCell table describes Radio Access Network (RAN) UTRAN cells.
The following table describes the ranUtranCell table.
rtExportList
The rtExportList table stores export route targets associated with Virtual Forwarding and Routing (VRF).
The following table describes the rtExportList table.
rtImportList
The rtImportList table stores import route targets associated with Virtual Forwarding and Routing (VRF).
The following table describes the rtImportList table.
sgwFunction
The sgwFunction table models the Serving Gateway (SGW), which resides in the user plane where it
forwards and routes packets to and from the eNodeB and packet data network gateway (PGW). The
role of the SGW is implemented within a network hardware node and is modelled by NCIM using the
sgwFunction entity type. Multiple sgwFunction instances can be implemented within a single network
hardware node.
The following table describes the sgwFunction table.
subnet
The subnet table represents a logical collection of IP addresses collected within a subnet.
The following table describes the subnet table
trackingArea
The trackingArea table models an LTE tracking area.
The following table describes the trackingArea table.
transmissionTp
The transmissionTp table provides information about transmission interface entities in the network.
The following table describes the transmissionTp table.
userPlaneViewCollection
The userPlaneViewCollection table supports the dynamic collection views under LTE Network
Topology > User Plane by Tracking Area in the Network Views. Each instance of this entity type collects
the eNodeBs in the corresponding tracking area, together with the devices that these eNodeBs are
connected to on the user plane.
The following table describes the userPlaneViewCollection table.
vlanTrunkEndPoint
The vlanTrunkEndPoint table represents a VLAN trunk end point and includes relevant data. This endpoint
is implemented by a physical interface, as modeled in the protocolEndPoint table.
The following table describes the vlanTrunkEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
vpnRouteForwarding
The vpnRouteForwarding table models a VPN routing and forwarding table.
The following table describes the vpnRouteForwarding table.
vpwsEndPoint
The vpwsEndPoint table represents a VPWS end point and includes relevant data. This endpoint is
implemented by a physical interface, as modeled in the protocolEndPoint table.
The following table describes the vpwsEndPoint table.
Related reference
protocolEndPoint
The protocolEndPoint table allows a higher-level connection to be defined in terms of lower-level
connections. It associates a device entity, usually an interface, with protocol-specific information
associated with that device entity. The protocolEndPoint table belongs to the category connectivity.
vtpDomain
The vtpDomain table represents a VLAN trunking protocol domain.
The following table describes the vtpDomain table.
wlan
The wlan table stores information about wireless networks.
The following table describes the wlan table.
wlanAccessPoint
The wlanAccessPoint table stores information about wireless access points.
The following table describes the wlanAccessPoint table.
wlanChannel
The wlanChannel table stores information about wireless channels.
The following table describes the wlanChannel table.
wlanDot11Interface
The wlanDot11Interface table stores information about DOT11 interfaces.
The following table describes the wlanDot11Interface table.
wlanService
The wlanService table stores information about wireless LAN services.
The following table describes the wlanService table.
wlanSpec
The wlanSpec table stores information about wireless specifications.
The following table describes the wlanSpec table.
backplane
The backplane view joins data from a number of tables and is equivalent to the backplane table that
existed in Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the backplane view.
chassis
The chassis view joins data a number of tables, and is equivalent to the chassis table that existed in
Network Manager versions 3.9 and earlier, thereby ensuring backward compatibility.
The following table describes the chassis view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalChassis
The physicalChassis table stores the attributes of chassis entities.
fan
The fan view joins data from a number of tables and is equivalent to the fan table that existed in
Network Manager versions 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the fan view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalFan
The physicalFan table represents fan cooling unit entities.
interface
The interface view joins data from a number of tables and is equivalent to the interface table that
existed in Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the interface view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
networkInterface
The networkInterface table represents interfaces on a chassis device.
module
The module view joins data from a number of tables and is equivalent to the module table that existed in
Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the module view.
softwareImage physicalCard
softwareImage
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalCard
The physicalCard table represents card entities.
other
The other view joins data from a number of tables and is equivalent to the other table that existed in
Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the other view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalOther
psu
The psu view joins data from a number of tables and is equivalent to the psu table that existed in
Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the psu view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalPowerSupply
The physicalPowerSupply table represents a power supply unit (PSU) entity.
sensor
The sensor view joins data from a number of tables and is equivalent to the sensor table that existed in
Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the sensor view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalSensor
The physicalSensor table represents sensor entities.
slot
The slot view joins data from a number of tables and is equivalent to the slot table that existed in
Network Manager version 3.9 and earlier , thereby ensuring backward compatibility.
The following table describes the slot view.
Related reference
entityData
The entityData table stores data on entities. This table belongs to the category entities.
physicalSlot
The physicalSlot table represents slot entities.
sourceEms
The sourceEms view joins data a number of tables. This view provides data on devices discovered by an
EMS collector and provides a mapping between the device and the EMS or EMSs that manage the device.
The following table describes the sourceEms view.
CDM views
The CDM views are described below. For each CDM view the corresponding row lists the tables and views
mapped to by the CDM view.
Table 513.
CDM view Tables and views mapped to by this CDM view
Related information
IBM Tivoli Common Data Model: Guide to Best PracticesThe Common Data Model (CDM) is an information
model that provides consistent definitions for managed resources, business systems and processes,
and other data, and the relationships between those elements. CDM is based on the unified modeling
language (UML). This IBM Redpaper presents a set of example templates and scenarios that help you
learn and apply the basics of the Common Data Model.
Syntax
Specify the following parameters within a REST client in order to extract topology data for all chassis
devices.
Table 514. Parameters to extract topology data for all chassis devices
Parameter Value
Method GET
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
• includeSubChassis is an optional Boolean parameter. If this parameter is set to
true, the results of the call include sub-chassis. If this parameter is set to false,
the results of this call exclude sub-chassis. The default is true. For the purposes
of this feature, a sub-chassis is defined as a device that exists in ncim.chassis,
where its entityId in ncim.entityData is not equal to its mainNodeEntityId,
and its className in ncim.chassis is equal to the className of the row for its
mainNodeEntityId.
For example:
https://myHost:16311/ibm/console/nm_rest/topology/devices/
all?includeSubChassis=true
Extracting topology data for all chassis devices that belong to a set of
classes
You can use the Topology API to extract topology data from the NCIM topology database for all chassis
devices that belong to a specified set of classes, or that do not belong to a specified set of classes.
Syntax
Specify the following parameters within a REST client in order to extract topology data for all chassis
devices that do or do not belong to a specified set of classes.
Table 515. Parameters to extract topology data for all chassis devices that do or do not belong to a
specified set of classes
Parameter Value
Method GET
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
• classes is a comma-separated list of class names. See “Retrieving class data” on
page 790 for information about retrieving class data by using the Topology API.
• include is an optional parameter. It can be set to true, in which case data is
extracted for devices that belong to the specified classes, or false, in which case
data is extracted for all devices except those that belong to the specified classes.
The default is true.
• includeSubChassis is an optional Boolean parameter. If this parameter is set to
true, the results of the call include sub-chassis. If this parameter is set to false,
the results of this call exclude sub-chassis. The default is true. For the purposes
of this feature, a sub-chassis is defined as a device that exists in ncim.chassis,
where its entityId in ncim.entityData is not equal to its mainNodeEntityId,
and its className in ncim.chassis is equal to the className of the row for its
mainNodeEntityId.
For example:
https://myHost.com:16311/ibm/console/nm_rest/topology/
devices/classes?classes=Router,Linux&includeSubChassis=true
Extracting topology data for all chassis devices within a specified network
view
You can use the Topology API to extract topology data from the NCIM topology database for all chassis
devices within a specified network view and all views under it, recursively. You could use this export
to write new widgets for Network Manager. You could use this mode to integrate widgets from another
product into a dashboard, as long as that product understands Network Manager entity identifiers or the
other properties that the Topology API returns. If you are integrating with a third-party product, then
that product does not need to know anything about network views; it just knows that it needs to call the
Topology API with the view ID parameter, and display information for the devices that the API returns. In
the case where you are using the network view tree to drive the Topology API export, this export would
run interactively.
Syntax
Specify the following parameters within a REST client in order to extract topology data for all chassis
devices within a specified network view.
Where:
• host is the hostname or IP address of the Dashboard Application Services Hub
server.
• port is the secure port number of the Dashboard Application Services Hub server. By
default, this is 16311.
• root-context is the path from the root of your file system to the Topology API.
• view-id is the numerical identifier of the network view from which you want to
extract chassis device data.
• allAttributes is an optional parameter. If set to true, the query retrieves
all attributes of the entities. If it is omitted, or set to false, the query retrieves only
the entity IDs.
For example:
https://myHost.com:16311/ibm/console/nm_rest/topology/devices/
viewId/4203?allAttributes=true
Extracting topology data for all chassis devices within specified domains
You can use the Topology API to extract topology data from the NCIM topology database for all chassis
devices within a specified domain or set of domains, or that do not belong to a specified set of domains.
Syntax
Specify the following parameters within a REST client in order to extract topology data for all chassis
devices within a specified domain.
Table 517. Parameters to extract topology data for all chassis devices within a specified domain
Parameter Value
Method GET
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
• DOMAIN_NAME is a comma-separated list of the names of the domains from which
you want to extract chassis device data.
• include=true|false is a domain filter. The filter considers the list of domains
passed to the URL. If include=true, only devices in those domains are retrieved. If
include=false the filter excludes all devices in those domains.
For example:
https://myHost:16311/ibm/console/nm_rest/topology/devices/
domains?domains=NCOMS1,NCOMS2,NCOMS3&include=true
Syntax
Specify the following parameters within a REST client in order to extract topology data for a limited set of
chassis devices.
Table 518. Parameters to extract topology data for a limited set of chassis devices
Parameter Value
Method POST
URL
https://HOST:PORT/ROOT-CONTEXT/nm_rest/topology/devices/
entityIds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
11649,11654,11661
In order to retrieve an entity identifier for devices for which you know the IP address, execute an SQL
query similar to the following against the NCIM database:
For information on how to retrieve a list of chassis device or main node identifiers in a domain, see the
IBM Tivoli Network Manager Reference.
{
"devices":
{
"items":
[
{
"memorysize":null,
"classid":5,
"classname":"NetworkDevice",
"syslocation":"3rd Floor Lab",
"entphysicalvendortype":"1.3.6.1.4.1.9.12.3.1.3.436",
"manual":0,
"entphysicalparentrelpos":-1,
"accessipaddress":"172.30.233.101",
"createtime":1376304329000,
"entphysicalname":"2811 chassis",
"cdmadminstate":0,
"domainname":"PEMBERS",
"alias":null,
"entphysicalindex":1,
"sysdescr":"Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M),
Version 12.4(24)T7, RELEASE SOFTWARE (fc2)\r\n
Technical Support: http://www.cisco.com/techsupport\r\n
Copyright (c) 1986-2012 by Cisco Systems, Inc.\r\n
Compiled Tue 28-Feb-12 10:43 by prod_rel_team",
"sysname":"uk-t1-cj31.na.test.lab",
"entitytype":1,
Syntax
Specify the following parameters within a REST client in order to extract view data for a device.
Where:
• host is the hostname or IP address of the Dashboard Application Services Hub
server.
• port is the secure port number of the Dashboard Application Services Hub server. By
default, this is 16311.
• root-context is the path from the root of your file system to the Topology API, by
default, ibm/console.
• E is a numeric entity ID.
For example:
https://host:port/ibm/console/nm_rest/topology/views/entityId/1234
https://host:port/root-context/nm_rest/topology/views/entityId/E
{
"views":
[
{"name":"NetworkDevice","id":891243},
{"name":"converged topology","id":7827}
]
}
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method GET
URL
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/devices/meta/domains
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
For example:
https://myHost:16311/ibm/console/nm_rest/topology/
devices/meta/domains
Parameter Value
This API call retrieves only the domains that the user can access. For more information, see Restricting
access to domains in the GUI in the IBM Tivoli Network Manager User Guide.
https://myHost:16311/ibm/console/nm_rest/topology/
devices/meta/domains
{
"devices":
{
"instrumentation":
{
"count":1,
"queryTime":4,
"totalExecTime":8,
"processTime":4
},
"items":
[
{
"lastUpdated":1552404469000,
"webtopDataSource":"NCO_AGG_P",
"creationTime":1546622278000,
"domainName":"NCOMS",
"description":null,
"domainHost":"10.10.10.232",
"domainMgrId":1,
"managerName":"PrecisionIP",
"domainPort":7968,
"batchUpdatePercent":0
}
],
"properties":
[
{"domainmgrid":"LONG"},
{"domainname":"STRING"},
{"creationtime":"DATETIME"},
{"lastupdated":"DATETIME"},
{"managername":"LONG"},
{"description":"STRING"},
{"webtopdatasource":"STRING"},
{"domainhost":"STRING"},
{"domainport":"LONG"},
{"batchupdatepercent":"LONG"}
]
}
}
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method GET
Parameter Value
URL
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/devices/meta/classes
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
For example:
https://myHost:16311/ibm/console/nm_rest/topology/
devices/meta/classes
https://myHost:16311/ibm/console/nm_rest/topology/
devices/meta/classes
{
"devices":
{
"instrumentation":
{
"count":427,
"queryTime":15,
"totalExecTime":20,
"processTime":5
},
"items":
[
{"classId":6,"className":"3Com","superClassId":5,"managerName":
"PrecisionIP","classType":"NetworkDevice"},
{"classId":7,"className":"3ComAccessPoint","superClassId":6,"managerName"
:"PrecisionIP","classType":"Router"},
{"classId":8,"className":"3ComCoreBuilder","superClassId":6,"managerName"
:"PrecisionIP","classType":"Switch"},
...
{"classId":161,"className":"zOS","superClassId":200,"managerName":
"PrecisionIP","classType":"EndNode"}
],
"properties":
[
{"classid":"LONG"},
{"classname":"STRING"},
{"superclassid":"LONG"},
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method GET
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/locations/
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Optional The following parameters can be included in any order. If no optional parameters are
parameters specified, all locations are retrieved.
aggToRegion
A boolean value that defines whether locations are aggregated to their containing
region. The default is true.
classType
A comma-separated list of ClassIds to include or exclude, depending on the
value of the include parameter. If both the classType and domain parameters
are specified, then only those entities that match both filters are included or
excluded. For information on retrieving class data, see “Retrieving class data” on
page 790.
domain
A comma-separated list of DomainMgrIds to include or exclude, depending
on the value of the include parameter. If both the classType and domain
parameters are specified, then only those entities that match both filters are
included or excluded. For information on retrieving domain data, see “Retrieving
domain data” on page 788.
include
A boolean value that defines whether domains and classType are inclusive (true)
or exclusive (false). The default is false.
lazyLoad
A boolean value that defines whether to include additional information in the
query. The default is true.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
locations?aggToRegion=true&domain=1,2&include=true
Parameter Value
Example output
The example output is for this query:
https://myHost:16311/ibm/console/nm_rest/topology/
/locations?aggToRegion=true&lazyLoad=true
{
"locations": [ // Array of locations.
{
"level": 0, // Level within the hierarchy. Level 0 is the lowest.
"displaylabel": "62 West Wallaby Street, Wigan, UK",
"latitude": 38.554953,
"longitude": -119.393031,
"entityname": "62 West Wallaby Street, Wigan, UK",
"entityid": 168101409,
"webtopdatasource": "NCO_AGG_P",
"sublocationcount": 0, // Number of locations contained in this one.
"locationdescription": "62 West Wallaby Street, Wigan, UK",
"entitytype": 111, // = geographic location
"boundsnorth": 38.554953, // bounding box around the location
"boundswest": -119.393031,
"boundssouth": 38.554953,
"boundseast": -119.393031,
"deviceidlist": [ // entity IDs of devices at this location
168101541,
168029392
],
"mainnodeentityid": 168101409
},
{
"level": 2,
"displaylabel": "DLLS",
"latitude": 38.554953,
"entityname": "DLLS",
"entityid": 168101343,
"webtopdatasource": "NCO_AGG_P",
"sublocationcount": 3,
"locationdescription": "DLLS",
"entitytype": 112, // = geographic region
"boundsnorth": 41.2127,
"boundswest": -75.5755,
"boundssouth": 32.4759085,
"boundseast": -96.4912846,
"deviceidlist": [
168029315,
168101509,
168029314,
168101460,
168101478,
168101473,
168029317,
168101474,
168101471,
168029305,
168029358
],
"mainnodeentityid": 168101343,
"longitude": -88.88560613
},
{
"level": 0, // If a location has only one device at it, the displayLabel comes from that
device rather than the location.
"displaylabel": "<strong>sysDescr:</strong> Cisco IOS Software, 2800 Software
(C2800NM-ADVIPSERVICESK9-M), Version 15.1(4)M10,
RELEASE SOFTWARE (fc2)..Technical Support: http://www.cisco.com/techsupport..
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method GET
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/locations/bounds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Mandatory The following parameters must be included at the beginning of the URL.
parameters
bounds
A rectangle specified by two locations, of the following form:
The latitudes and longitudes are in decimal degrees. Positive latitudes are north of
the equator, and positive longitudes are east of the Greenwich meridian. A single
whitespace character is optional after the commas for readability.
The following is an example of the bounds parameter:
Parameter Value
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
locations?bounds=((34.461276680644175, -99.68994179687502),
(37.13404478358378, -95.29541054687502))?domain=1,2
Note: For examples of the output format that applies to this call, see “Retrieving locations” on page 793
and “Retrieving specific devices” on page 797.
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method POST
Parameter Value
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/entityIds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Mandatory entityIds
parameters The entity IDs of the devices to retrieve. The IDs must be a comma-separated list
in the request body.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
locations?entityIds?aggToRegion=false&lazyLoad=false
The entity IDs, for example, 1,2, must be included in the request body.
https://myHost:16311/ibm/console/nm_rest/topology/
locations?entityIds?&lazyLoad=true
The output is formatted for readability and has comments added. The output contains any geographic
locations where devices with any of the given entity IDs are present.
{
"locations": [ // array of devices
{
"level": 0,
"displaylabel": "<strong>sysDescr:</strong> Cisco NX-OS(tm) aci, Software (aci-n9000-
system), Version 11.2(1k),
RELEASE SOFTWARE Copyright (c) 2002-2015 by Cisco Systems, Inc. Compiled 2015/12/21 21:59:07<br>
<strong>sysContact:</strong> joe@example.com<br><strong>sysLocation:</strong>
SoutbankDatasuite1<br><strong>netview_props.domain</strong> NCOMS",
"latitude": 38.5657001,
"entityname": "62 West Wallaby Street, Wigan, UK",
"classtype": "Switch",
"entityid": 168101409, // entity ID of geographic location
"webtopdatasource": "NCO_AGG_P",
"boundsnorth": 38.554953,
"sublocationcount": 0,
"locationdescription": "62 West Wallaby Street, Wigan, UK",
"entitytype": 111,
"boundswest": -119.393031,
"boundssouth": 38.554953,
"boundseast": -119.393031,
"deviceidlist": [
168101541 // Which of the given entity IDs are here?
],
"mainnodeentityid": 168101409,
"longitude": -119.393031
}
],
"instrumentation": { // Metadata
"countByClass": [ // For each entity class present in the output, how many of each are
present?
{
"count": 1,
"label": "CiscoNexus9xxx",
"value": 449 // Numeric class ID
}
],
"count": 1, // Total number of devices in the output.
"queryTime": 6070, // Time in milliseconds to run the SQL query.
"processTime": 660, // Time in milliseconds to convert the results of the SQL query to JSON.
"totalExecTime": 6730, // queryTime + processTime
"domains": { // Information about the domains that contain the devices in the output.
"1": { // DomainMgrId (numeric ID) of domain.
"createtime": 1662984303000, // Epoch time when the domain was created (milliseconds
after 1 January 1970).
"domainname": "NCOMS",
"domainmgrid": 1, // Numeric ID of domain
"lastupdated": 1664295618000, // Epoch time when the domain was last updated (usually
the time when a
discovery last completed).
"webtopdatasource": "NCO_AGG_P"
}
},
"countByDomain": [ // For each domain that has devices in the output, how many devices does
each domain have?
{
"count": 1,
"label": "NCOMS",
"value": 1 // DomainMgrId (numeric ID) of this domain.
}
]
}
}
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method POST
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/locations/bounds/bounds/entityIds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Mandatory bounds
parameters
A rectangle specified by two locations, of the following form:
The latitudes and longitudes are in decimal degrees. Positive latitudes are north of
the equator, and positive longitudes are east of the Greenwich meridian. A single
whitespace character is optional after the commas for readability.
The following is an example of the bounds parameter:
entityIds
The entity IDs of the devices to retrieve. The IDs must be a comma-separated list
in the request body.
Parameter Value
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
locations?bounds=((34.461276680644175, -99.68994179687502),
(37.13404478358378, -95.29541054687502))&entityIds?
aggToRegion=false&lazyLoad=false
The entity IDs, for example, 1,2, must be included in the request body.
Note: For examples of the output format that applies to this call, see “Retrieving locations” on page 793
and “Retrieving specific devices” on page 797.
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method GET
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/locations/viewId/viewId
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Parameter Value
Mandatory viewId
parameters The numeric ID of the view for which to retrieve devices.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
locationsviewId/47?classType=15
Note: For examples of the output format that applies to this call, see “Retrieving locations” on page 793
and “Retrieving specific devices” on page 797.
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method POST
Parameter Value
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/connections/collectionIds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Mandatory /connections
parameters The collections between which to return connections. The entity IDs of the
required collections must be passed as a comma-separated list in the request
body.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
/connections/collectionIds?layer=72
The entity IDs of the required collections must be passed as a comma-separated list in
the request body.
Example output
The example output is for this query:
https://myHost:16311/ibm/console/nm_rest/topology/
/connections?lazyLoad=true
{
"links": [ // Information about links between the given collections on the given layers.
{
"linkid": "168101353-168101363", // Entity IDs of collections at either end of the links.
"connectionscount": 18, // Number of connections between the given collections on any of
the given layers.
"interfaceidslist": [ // Entity IDs of interfaces that are at one end of a connection in
either collection.
168106453, // (Interfaces that are connected only to other interfaces in the same
collection are not included here.)
168108708,
168105606,
168106513,
168105601,
168106498,
168108156,
168106492,
168106473,
168105592,
168105611,
168106442
]
},
{
"connectionscount": 17,
"linkid": "168101323-168101406",
"interfaceidslist": [
168106741,
168104452,
168106708,
168104705,
168104784,
168104258,
168104706,
168104301,
168104783,
168106041,
168108185,
168108776
]
}
],
"instrumentation": { // Metadata
"countByLayer": [ // For each layer that has any connections between the given collections
on the given layers, how many connections exist between the given collections?
{
"count": 10, // Number of connections on this layer.
"label": "Layer 2 Topology", // Name of this layer.
"value": 72 // Internal ID of this layer.
},
{
"count": 12,
"label": "Layer 3 Meshed Topology",
"value": 73
},
{
"count": 2,
"label": "OSPF Topology",
"value": 78
},
{
"count": 1,
"label": "BGP Topology",
"value": 79
}
],
"count": 25, // Total number of connections between all the given collections on all the
given layers.
"queryTime": 33, // Time in milliseconds to run the SQL query.
"processTime": 3, // Time in milliseconds to convert the result of the SQL query to JSON.
"totalExecTime": 36 // queryTime + processTime
}
}
// lazyLoad = false
// The output is the same as lazyLoad = true, except that each element in the links array
// has an additional element, connections. This is an array of connections between the
collections
// whose entity IDs are given by the linkid element.
],
"instrumentation": {
"countByLayer": [
{
"count": 2,
"label": "Layer 3 Meshed Topology",
"value": 73
}
],
"queryTime": 6,
"count": 2,
"totalExecTime": 8,
"processTime": 2
}
}
Syntax
Specify the following parameters within a REST client.
Parameter Value
Method POST
Parameter Value
URL root
https://HOST:PORT/
ROOT-CONTEXT/nm_rest/topology/connections/entityIds
Where:
• HOST is the hostname or IP address of the Dashboard Application Services Hub
server.
• PORT is the secure port number of the Dashboard Application Services Hub server.
By default, this is 16311.
• ROOT-CONTEXT is the path from the root of your file system to the Topology API.
This path is usually ibm/console.
• nm_rest/topology completes the path to the Topology API.
• locations is the name of the function that retrieves data related to geographic
views.
Mandatory entityIds
parameters The entity IDs of the required devices must be passed as a comma-separated list
in the request body.
Example URL
https://myHost:16311/ibm/console/nm_rest/topology/
/connections/connections/entityIds?layer=72,73
The entity IDs, for example, 1,2, must be included in the request body.
Example output
The example output is for this query:
https://myHost:16311/ibm/console/nm_rest/topology/
/connections/
{
"interfaceIdsList": "168051933,168051934,168051272", // Entity IDs of interfaces that are a
source or target in the connections array.
"connections": [ // Array of connections between the given devices.
{
"sourcedeviceid": 7, // Entity ID of the source device
"layertype": 72, // Numeric ID of the layer that this connection exists on
"sourceinterfaceid": 168051272, // Entity ID of source interface
"sourceinterfacename": "172.20.3.21[ IP1 ]",
"sourcedevicename": "172.20.3.21",
"layername": "Layer 2 Topology", // Name of the layer that this connection exists on
"targetinterfacename": "172.20.5.1[ me0 ]",
"targetdeviceid": 10262 // Entity ID of target device
},
{
"sourcedeviceid": 7,
"layertype": 73,
Discovery subprocesses
The discovery process consists of several subprocesses that work together to discover devices and device
interconnectivity.
When you launch a discovery, the internal Network Manager discovery engine (ncp_disco) is run. The
ncp_disco engine manages the process of discovering device existence and interconnectivity.
Whenever you launch a full discovery the Discovery Engine, ncp_disco, rereads its configuration files. The
Discovery Engine also instructs the Helper Server and the individual helpers to reread their configuration
files. This is controlled by the DiscoReadConfig() rule within the FullDiscovery stitcher file.
Note: When you launch a partial discovery, ncp_disco does not read its configuration files.
The Discovery engine operates by detecting the existence of a device on the network and querying the
device for inventory and connectivity information, which is subsequently processed or 'stitched' together
to generate a connectivity or topology model. The discovery engine components are described in Table
529 on page 811.
Helper Server The Helper Server manages the helpers and stores the information that is retrieved
from the network. Discovery agents retrieve their information through the Helper
Server to reduce the load on the network. The Helper Server can service the requests
directly with cached data or pass on the request to the appropriate helper.
Helpers The helpers retrieve information from the network on behalf of the discovery agents.
Helpers also translate agent queries into the appropriate network protocol and make
requests to the devices.
Stitchers Stitchers are processes that transfer, manipulate and distribute data between
databases. The discovery stitchers are also responsible for processing the
information collected by the agents and using this information to create the network
topology. A predefined set of stitchers is included with Network Manager. You can
modify existing stitchers or write new stitchers to perform custom manipulation of
your network topology. For example, you can write a stitcher to make your device
interfaces appear with a custom naming convention. Stitchers are coded using the
stitcher language.
Figure 30. Discovery timing for a full discovery with two discovery cycles
In Figure 30 on page 812, the blackout state for the first discovery cycle begins and ends at the instants
indicated by the numbers 1 and 2 respectively:
1 : Blackout state begins. A predetermined majority of devices on the network have now been
discovered. Any devices discovered after this point are placed into the finders.pending table for
processing in the subsequent discovery cycle.
2 : Blackout state ends. Devices stored in the finders.pending table are now processed in the
subsequent discovery cycle.
First phase
In the first phase of data collection, the finders identify all the devices that exist on the network.
Generally, a phase can be completed when all the launched processes have completed their operation.
However, although you might want to wait until all devices have been discovered by the finders before
proceeding to phase two, it is inefficient to hold back the discovery process by waiting indefinitely. The
Blackout state
After phase one, the discovery enters the blackout state. The finders have discovered the existence of a
pre-determined majority of devices on the network. Any new device addresses discovered in the blackout
state, either by the finders or recursively by a discovery agent, are put into the finders.pending database
table.
Devices in the finders.pending database table are processed in the next discovery. If there are devices in
the finders.pending database table, the next discovery starts as soon as the current discovery finishes.
Second phase
After the criteria for the completion of phase one have been fulfilled, phase two begins. To map layers two
and three of the OSI model, the ARP Cache discovery agent populates the Helper Server with ARP data,
which is a list of device IP address-to-MAC address resolution.
Before the discovery can transfer from phase two to phase three, the processes from phase two must
have completed their operation. An agent is considered to have finished after all entities in its despatch
table are also in its returns table.
The agents are multithread, and records of discovered devices passed to the agents are tagged with a
certain phase. Consequently, at any time an agent can be processing devices in two separate phases. If
any action that should have occurred in phase two is detected after phase three has begun, phase three
continues while the agent runs through phase two processing.
Third phase
By phase three, the discovery process has full knowledge of the devices that exist within the network
(acquired from phase one) and access to full IP address-to-MAC address mappings for all devices in the
Helper Server (acquired from phase two). The Switch agents can now proceed to download all the forward
database table information of the network switches whilst pinging all devices to confirm the accuracy of
the contents of the forward database tables.
When phase three has finished, which is signified by the completion of all processes scheduled to run in
the phase, the discovery is ready to proceed from the data collection stage to the data processing stage,
where all the connectivity information is knitted together to form a network topology.
Switch connectivity
In determining the connectivity of some devices, it is sometimes necessary for the discovery agent
to know all the devices that exist before requesting particular Management Information Base (MIB)
variable(s), especially if the requested information is transient.
An example is when the layer 2 agents discover connectivity between Ethernet switches. Ethernet
switches have forward database tables that expire over time. So, to ensure that a switch has a fully
populated forward database table at the time of interrogation, you could ping all devices associated with
the switch.
You would therefore configure the switch discovery agents to perform some other processing in data
collection phase one. After the agents receive the signal that phase one has been completed (that is, all
devices have been found) they can start phase two operations. For example, they could ping all devices
within the discovery domain while downloading the forward database tables for all switches.
Discovery cycles
A discovery cycle has occurred when the discovery data flow for a particular cycle has gone from start to
finish. A full discovery might require more than one cycle.
The discovery data flow can be categorized into the following conceptual steps:
• Discovering device existence
• Discovering device details (standard)
• Discovering device details (context-sensitive)
• Discovering associated device addresses
• Discovering device connectivity
• Creating the topology
These steps follow the discovery data flow in order from start to finish, with the exception of discovering
device details (context-sensitive), which replaces discovering device details (standard) if the discovery is
context-sensitive.
On-demand stitchers
Stitchers can be started on demand. If you insert a stitcher into the stitchers.actions database, DISCO
automatically runs the stitcher. This means that the discovery cycle can be started at any point, and
further actions can be configured to start when the stitcher completes.
Partial matching
By default, the discovery process uses partial matching, which means that the discovery agents do not
need to download the full routing tables during discovery.
You do not need to modify the discovery agent definition files to use partial matching. However, it
is possible to prevent the IpForwardingTable and IpRoutingTable discovery agents from using partial
matching in certain cases if you have devices on your network that do not support partial matching.
To prevent partial matching on certain devices, you must specify the devices that do not
support partial matching in the DiscoRouterPartialMatchRestrictions(); section of the
IpForwardingTable.agnt definition file (for modern devices that use RFC2096) or the
IpRoutingTable.agnt definition file (for older devices that use RFC1213). If a discovered device
matches the filter specified in the DiscoRouterPartialMatchRestrictions(); section, partial
matching is not attempted on that device.
Figure 38. Collector discovery process flow: Discovery of basic device information
Rediscovery
When a discovery has completed, ncp_disco enters rediscovery mode, in which the discovery of new
devices results in updates to the topology model.
Full rediscoveries
Comparing the current relationship between devices to their previous relationship, and rediscovering all
the devices whose relationships have changed, can sometimes become circular. However, the discovery
process includes a check to prevent this repetition.
If the ratio of entities that have been compared to the entities that need to be rediscovered exceeds
the percentage specified in the disco.config.m_PendingPerCent column, then DISCO stops rediscovering
individual devices and initiates a full network discovery.
Additionally, the fact that all rediscovered entities are recorded in the
rediscoveryStore.rediscoveredEntities table means that a given entity can be rediscovered only once.
Rediscovery completion
When all the entities that need to be rediscovered have been processed, the topology layers are rebuilt by
the FinalPhase.stch stitcher. This stitcher also clears the rediscoveryStore database so that it is ready for
the next rediscovery.
It is important to note that DISCO might go through many discovery cycles during rediscovery before
the topology is rebuilt. DISCO rebuilds the topology only when there are no entities needing to be
rediscovered.
Agents
Discovery agents retrieve information about devices in the network. They also report on new devices by
finding new connections when investigating device connectivity. Discovery agents are used for specialized
tasks. For example, the ARP Cache discovery agent populates the Helper Server database with IP
address-to-MAC address mappings.
In addition to the main discovery agents, which can be enabled or disabled according to your discovery
requirements, there are two agents that must always be run: the Details agent and the Associated
Address agent.
Each discovery agent has its own database resident within DISCO. These databases are generically
structured and based on a template called the agentTemplate database.
Each discovery agent database contains the following tables:
• agentName.despatch
• agentName.returns
Note: The default configuration sets the majority of agents to run. This is because the more agents that
are run, the wider the range of networks that can be discovered. Furthermore, agents are designed to
quickly stop analyzing devices that do not provide the data they require. This means that running a large
number of agents increases network traffic by a very small amount only.
Note: Network Manager kills all discovery agents at the end of data collection stage 3. This ensures that
the next discovery restarts the agents and forces the agents to reread their configuration files at the
beginning of a discovery, thereby detecting any changes to the configuration files.
Details agent
This agent is triggered by the entries in the finders.processing table. At least one finder is needed
to activate this agent. The SNMP helper configuration for associated devices is also a prerequisite for
running this agent.
The Details agent retrieves basic information about devices discovered by the finders, and determines
whether SNMP access to the device is available. This mandatory agent is triggered by the entries in the
finders.processing table, so at least one finder is needed to activate this agent.
The Details agent is triggered when device information (usually transferred from the finders by a stitcher)
is placed in the Details.despatch database table.
The Details agent retrieves basic information from the network and deposits this information in the
Details.returns table. The basic information retrieved comprises the DNS name of the device
obtained by the configured DNS helper, and the system object ID obtained by the SNMP helper.
IpForwarding data is downloaded and inserted into the ExtraInfo field which is used to identify
routing devices. SysName information is also downloaded for use if this optional naming scheme is
required. The insertion of data into the returns table triggers a stitcher that sends this information to the
Associated Address agent.
DiscoAgentClass
The DiscoAgentClass keyword specifies the basic type of agent. The following table identifies the most
commonly used values:
Value Description
0 Specifies an IP type agent.
1 Specifies a switch type agent.
2 Specifies a hub type agent.
3 Specifies an ATM device type agent.
4 Specifies an FDDI type agent.
5 Specifies a PVC type agent.
6 Specifies a frame relay type agent.
8 Specifies a NAT gateway agent.
The following example shows a DiscoAgentClass keyword set to a frame relay type agent. Frame relay
type agents typically discover Frame Relay interfaces and connections between two points on Frame
Relay networks that incorporate specific network devices, for example, CISCO devices.
DiscoAgentClassEnabledByDefault
The DiscoAgentClassEnabledByDefault keyword specifies whether the agent is enabled by default
for full discoveries. Specify one of the following values:
Value Description
0 Specifies that the agent is not enabled by default for full discoveries.
1 Specifies that the agent is enabled by default for full discoveries.
DiscoCompiledAgent
{
.
.
.
DiscoAgentClass( 6 );
.
.
.
DiscoAgentEnabledByDefault( 1 );
}
DiscoAgentClassEnabledByDefaultOnPartial
The DiscoAgentClassEnabledByDefaultOnPartial keyword specifies whether the agent is
enabled by default for partial discoveries. Specify one of the following values:
Value Description
0 Specifies that the agent is not enabled by default for partial discoveries.
1 Specifies that the agent is enabled by default for partial discoveries.
DiscoCompiledAgent
{
.
.
.
DiscoAgentClass( 6 );
.
.
.
DiscoAgentEnabledByDefaultOnPartial( 1 );
DiscoAgentEnabledByDefault( 1 );
}
Value Description
0 Specifies that the agent is a direct agent.
1 Specifies that the agent is an indirect agent.
The following example shows a DiscoAgentIsIndirect keyword set to specify that a frame relay type
agent is a direct agent.
DiscoCompiledAgent
{
.
.
.
DiscoAgentGUILocked( 0 );
DiscoAgentClass( 6 );
DiscoAgentIsIndirect( 0 );
.
.
.
DiscoAgentEnabledByDefaultOnPartial( 1 );
DiscoAgentEnabledByDefault( 1 );
}
DiscoAgentCompanionAgents
The DiscoAgentCompanionAgents keyword is used to display in the GUI the agent or agents that this
agent should execute with.
The following example shows a DiscoAgentCompanionAgents keyword that displays in the GUI the
agent (ArpCache.agnt) that should execute with the Centillion Networks agent.
DiscoCompiledAgent
{
.
.
.
-- This agent examines all devices originally made by Centillion
-- Networks (enterprise OID 1.3.6.1.4.1.930), to see if it can
-- discover them.
.
.
.
DiscoAgentCompanionAgents( "ArpCache" );
.
.
.
}
DiscoAgentCompletionPhase
The DiscoAgentCompletionPhase keyword specifies during which of the discovery phases the
specified agent should complete executing. Specify one of the following values:
The following example shows a DiscoAgentCompletionPhase keyword set to enable a frame relay
type agent to complete execution during discovery phase 1.
DiscoCompiledAgent
{
.
.
.
DiscoAgentCompletionPhase( 1 );
.
.
.
DiscoAgentEnabledByDefaultOnPartial( 1 );
DiscoAgentEnabledByDefault( 1 );
}
DiscoAgentConflictingAgents
The DiscoAgentConflictingAgents keyword is used to display in the GUI the agent or agents that
this agent should not execute with.
The following example shows a DiscoAgentConflictingAgents keyword that displays in the GUI the
agents (IpRoutingTable.agnt and IpForwardingTable.agnt) that should not execute with the IP
backup routes agent.
DiscoCompiledAgent
{
.
.
.
-- This agent examines every device with SNMP access to see if it
-- can discover it.
.
.
DiscoAgentConflictingAgents( "IpRoutingTable","IpForwardingTable" );
.
.
.
}
DiscoAgentDescription
The DiscoAgentDescription keyword specifies a description of the agent that is displayed in the GUI.
The following example shows a DiscoAgentDescription keyword that specifies a description to
display in the GUI for a frame relay type agent. The description makes use of HTML coding.
DiscoCompiledAgent
{
.
.
.
DiscoAgentDescription("
<b>Agent Name :</b> CiscoFrameRelay<br>
<br>
<b>Agent Type :</b> Layer 3<br>
<br>
<b>Agent Prerequisites :</b> SNMP helper configuration for associated devices.<br>
<br>
<b>Operation :</b><br>
Discovers Frame Relay interfaces and connections between two points on Frame Relay
networks that incorporate Cisco devices. If you need to add DLCI information to the
DiscoAgentMinCertifiedDeviceOS
The DiscoAgentMinCertifiedDeviceOS keyword specifies a device operating system specific filter.
This filter can be configured to run the specified agent against specific releases of a device operating
system.
The following example shows a DiscoAgentMinCertifiedDeviceOS keyword that specifies a device
operating system specific filter for an agent that discovers MPLS VRFs, VPNs, and label switching
information from CISCO routers. This device operating specific filter configures the agent to run against
the following CISCO devices and associated operating system releases:
• m_ObjectId — Specifies the CISCO devices (OID 1.3.6.1.4.1.9) that the agent attempts to
discover.
• m_OSVersion — Specifies the CISCO device operating system filter that configures the agent to run
against the following device operating system versions:
– 12.0 releases of 12.0(27) or later which are not experimental
– 12.2 releases of 12.2(19) or later which are not experimental
– 12.3 releases of 12.3(18) or later which are not experimental
– 12.4 releases
DiscoCompiledAgent
{
.
.
.
DiscoAgentMinCertifiedDeviceOS
(
"(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.',
m_OSVersion >= '12.0(27)' AND m_OSVersion < '12.1' AND m_OSVersion
NOT LIKE '.*Experimental.*',
m_MibVar = 'sysDescr.0'
),
(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.',
m_OSVersion >= '12.2(19)' AND m_OSVersion < '12.3' AND m_OSVersion
NOT LIKE '.*Experimental.*',
m_MibVar = 'sysDescr.0'
),
(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.',
m_OSVersion >= '12.3(18)' AND m_OSVersion < '12.4' AND m_OSVersion
NOT LIKE '.*Experimental.*',
m_MibVar = 'sysDescr.0'
),
(
m_ObjectId LIKE '1\.3\.6\.1\.4\.1\.9\.',
m_OSVersion >= '12.4',
m_MibVar = 'sysDescr.0'
)"
);
.
.
.
}
DiscoCompiledAgent
{
.
.
.
DiscoAgentGUILocked( 0 );
DiscoAgentClass( 6 );
DiscoAgentIsIndirect( 0 );
DiscoAgentPrecedence( 2 );
.
.
.
DiscoAgentEnabledByDefaultOnPartial( 1 );
DiscoAgentEnabledByDefault( 1 );
}
DiscoPerlAgent
The DiscoPerlAgent keyword specifies whether this .agnt file refers to a Perl agent.
The following example shows a DiscoPerlAgent keyword specified for a Perl based agent that extracts
information about the operating system running on the device.
DiscoPerlAgent
{
.
.
.
DiscoAgentGUILocked( 0 );
DiscoAgentClass( 0 );
DiscoAgentIsIndirect( 0 );
DiscoAgentPrecedence( 2 );
DiscoAgentEnabledByDefaultOnPartial( 0 );
DiscoAgentEnabledByDefault( 0 );
}
Types of agents
The agents supplied with Network Manager can be divided into categories according to the type of data
they retrieve or the technology they discover.
CentillionSwitch The CentillionSwitch agent contains the methods that are needed
to retrieve and resolve information from the Centillion switching
devices, in particular the enterprise-specific VLAN information.
CiscoVSS The Cisco VSS agent discovers Virtual Switching System information
from Cisco switches.
DefaultEthernetHub This agent has a specialized class for dealing with semi-intelligent
hubs.
HPSwitch The HPSwitch agent contains the specialized methods for retrieving
connectivity information from HP ProCurve switches, including the
download of enterprise-specific VLAN information.
CiscoBGPTelnet The CiscoBGPTelnet agent downloads the following BGP data from Cisco
routers:
• Peer data: the agent retrieves iBGP and eBGP data from peer routers.
• Route data: the agent retrieves routing information from BGP routing tables
of peer routers. This option is off by default as it will retrieve huge amounts
of data from a typical service provider network. This agent also provides the
option to configure a filter to specify the route data that you would like to
retrieve.
Note: Before enabling this agent, configure Telnet access and the Telnet helper.
FoundryVRRP VRRP is not modelled for RCA. The FoundryVRRP agent only sets tags on VRRP
interfaces that show the state of Foundry routers at the time of the discovery.
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
HSRPSnmp The HSRPSnmp agent retrieves connectivity information using SNMP by means
of the MIB from routing devices that use the HSRP (Hot Stand-by Routing
Protocol) Virtual IP protocol.
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
IpForwardingTable The IpForwardingTable agent finds links in the more recent version of the
routing tables, that is, the IP Forwarding table as specified in RFC 2096. It also
exploits Open Shortest Path First (OSPF) information to enhance the discovery
of Juniper devices. This agent downloads elements from the routing table based
on discovery scoping. The default setting assumes that the SNMP agent for a
particular device supports partial matching. If the device cannot partial match,
this should be specified in the DiscoRouterPartialMatchRestrictions section of
the .agnt file.
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
ISISExperimental Discovers connectivity between routers that support the experimental ISIS
MIBs. This agent should be used when some of your routers are configured with
netmasks of 255.255.255.255, making them unsuitable for standard discovery.
Before enabling this agent, configure SNMP access and the SNMP helper.
Note: This agent is deprecated in Fix Pack 17 in favour of the
StandardISIS agent.
LinkStateAdvOSPF Retrieves link state advertisements (LSAs) from OSPF routers. These LSAs
are used by the CreateOSPFNetworkLSAPseudoNodes stitcher to create OSPF
pseudonodes. Pseudonodes overcome the problem of full meshing when
representing OSPF area in Topoviz Network Views and enables connections
within OSPF areas to be visualized in a clear, uncluttered manner.
JuniperBGPTelnet Downloads BGP information from Juniper routers. It is not enabled by default
because it gathers a very specific piece of information only, that is, whether
devices are route reflectors.
Note: Before enabling this agent, configure Telnet access and the Telnet helper.
NokiaVRRP Downloads VRRP information from routers that support the Nokia interpretation
of the VRRP MIB. The information retrieved includes the VRRP state, ID, primary
IP and associated addresses. This information is retrieved from the following
MIB variables:
• vrrpOperState
• vrrpOperMasterIpAddr
• vrrpAssoIpAddrRowStatus
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
StandardOSPF The StandardOSPF agent is responsible for the discovery of networks running
the Open Shortest Path First (OSPF) protocol. It will support any device that
complies with the standard RFC1850.
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
5. Save the files with the ending .MIB in the directory $NCHOME/precision/
mibs.
6. Load the updated MIB information by running the ncp_mib command-ine
application.
TraceRoute The TraceRoute agent finds links by tracing the route taken by an ICMP
ping packet with a predetermined life span. If you are using this agent, you
should increase the value of m_Timeout in the DiscoPingHelperSchema.cfg
configuration file, as traceroute functionality takes longer than standard ICMP.
This agent is not enabled by default as it does not only operate on SNMP-
enabled devices. Therefore, if this agent were switched on by default, it would
trace the route to every device on the network. The result could be incomplete
connectivity in a meshed environment or inaccurate connectivity in a load-
balanced environment.
Note: Before enabling this agent, configure SNMP access and the SNMP helper.
CollectorDetails Retrieves basic information about the devices on the collector, including
sysObjectId, sysDescr, and naming data.
CollectorInventory Retrieves local neighbor, entity and associated address data for each of the
devices on the collector.
CollectorLayer1 Retrieves layer 1 and microwave connectivity information for the devices
on the collector.
CollectorLayer2 Retrieves layer 2 connectivity information for the devices on the collector.
CollectorLayer3 Retrieves layer 3 connectivity information for the devices on the collector.
CollectorLTE Retrieves LTE-specific entity information for the devices on the collector.
CollectorRan Retrieves radio access network (RAN) information for the devices on the
collector.
CollectorVpn Retrieves layer 2 and layer 3 VPN data for the devices on the collector.
CiscoPVC The CiscoPVC agent retrieves PVC data from Cisco devices.
ILMI The ILMI agent retrieves connectivity information from devices using the Interim
Local Management Interface (ILMI), an RFC standard for managing ATM and IP
networks. It investigates how ATM networks are connected down to the layer 2
virtual circuit and port level. This agent also removes logical connectivity from
LANE interfaces.
MariposaAtm The MariposaAtm agent discovers the ATM connectivity of the SE420 and SE440
Integrated Access Devices (IADs).
Note: The Ethernet switching and Frame Relay capabilities of these devices are not
currently certified.
PnniForeSys The PnniForeSys agent discovers physical ATM connections between devices by
using the Private Network-to-Network Interface (PNNI) connectivity information
provided by the Marconi ASX series switches. The PnniForeSys agent is designed
to operate in conjunction with the AtmForumPnni agent.
The PnniForeSys agent performs extra processing on Fore devices that do not store
a logical ifIndex in their pnniLinkIfIndex variable. The information retrieved from
these devices requires further processing to retrieve the actual ifIndex, which is
held within the ifTable .
Note: SNMP helper configuration for associated devices is a prerequisite for this
agent. The AtmForumPnni agent must also be active.
Multicast agents
Multicast agents retrieve data from devices participating in multicast groups and routes.
The agents that retrieve multicast data need SNMP and Ping access to retrieve the data. Before enabling
the multicast agents, ensure that you first configured SNMP to enable the agents to access devices and to
specify threads, timeouts, and number of retries.
The following table describes the multicast agents.
NATTextFileAgent The NATTextFileAgent mimics the function of the other NAT gateway agents by
reading NAT mapping information from a flat file. The translations are then used
to identify within which part of the network a particular device exists.
Note: Before enabling this agent, it is necessary to configure SNMP access and
the SNMP Helper.
CiscoUCSSnmp The CiscoUCSSnmp agent discovers a type of logical containment called blade
servers on Cisco Unified Computing System (UCS) devices.
When this agent is enabled and run in a discovery, stacked chassis and blade
server information is available in the topology database and in the Structure
Browser.
Note: You must obtain the following MIBs, copy them to the NCHOME/
precision/mibs directory, and load updated MIB information by running the
ncp_mib command before using this agent: CISCO-UNIFIED-COMPUTING-
COMPUTE-MIB.mib, CISCO-UNIFIED-COMPUTING-MIB.mib, and CISCO-
UNIFIED-COMPUTING-TC-MIB.mib.
IfStackTable The IfStackTable determines the interface stacking hierarchy on devices that
support the RFC 2863 MIB.
Note: Configure SNMP access and the SNMP Helper before enabling this agent.
JuniperBoxAnatomy The JuniperBoxAnatomy agent retrieves information about which modules and
components are installed in a Juniper device and their containment. The agent
uses vendor-specific MIBs such as the Juniper Box Anatomy MIB.
JuniperERXIfStackTable The JuniperERXIfStackTable determines the interface stacking hierarchy on
Juniper ERX devices.
This agent determines virtual-router and VRF context-sensitive stacking
information for Juniper ERX devices. When a context-sensitive discovery is
enabled this agent can be disabled, as the IfStackTable agent also determines
this information. This will improve the performance of discovery.
Note: Configure SNMP access and the SNMP Helper before enabling this agent.
JuniperLAGStack The JuniperLAGStack agent retrieves Link Aggregation Group (LAG) information
from Juniper devices. LAG information is needed to accurately represent the
interface stacking hierarchy.
JuniperVlanTagTelnet Discovers VLAN tagging configuration for Juniper E, ERX, M and MX Series
routers. For Juniper model MX, M and T series, the agent issues the
telnet command show configuration interfaces and captures the
vlan-id from the output. For Juniper model E and ERX series, the agent
retrieves juniVlanSubIfVlanId and juniVlanSubIfVlanStackId from the Juniper-
ETHERNET-MIB.
Note: Configure the SNMP Helper and the Telnet Helper before enabling this
agent.
Airspace The Airspace Perl discovery agent retrieves WLAN information from devices using the
Airspace MIBs.
AlteonStp This is a Spanning Tree Protocol discovery agent for Alteon switches that support the
dot1dStp section of the BRIDGE-MIB.
BrocadeFDPSnmp The BrocadeFDPSnmp agent provides Layer 2 links using the Foundry Discovery Protocol
(FDP). The agent establishes links between Brocade devices. By using the FOUNDRY-SN-
ROOT-MIB and IF-MIB MIB files, the agent can discover the neighboring devices and
store minimal information about the local device and its corresponding neighbor. This
agent uses the index from the FDP network layer address of the device to find complete
information that links to the neighboring devices.
CDP The CDP agent understands the protocol used among Cisco communication devices. Using
CDP, Cisco devices can discover their nearest neighbors and store minimal information
about them.
This agent begins with the address of a known Cisco device and uses CDP to find more
complete information about the locations of other connected or neighboring Cisco devices.
FddiDefault The FddiDefault agent discovers any device that supports the standard FDDI MIB. When
an FDDI device is interrogated, information relating to the interfaces of that device and its
upstream and downstream neighbours is returned. The FddiLayer stitcher uses this and all
other FDDI agents to determine the FDDI ring topology.
FddiCiscoConc The FddiCiscoConc agent discovers Cisco Concentrator FDDI devices. Cisco concentrators
know the full connectivity of every FDDI ring that passes though them, as opposed to
just their upstream and downstream neighbours. Hence the FddiLayer stitcher gives the
topology information returned by this agent precedence over that found by FddiDefault.
IEEE8023LAG The IEEE8023LAG agent discovers the LAG (Link Aggregation Group) Link
entities and physical ports associated with the LAG between two network devices. The
agent discovers information from Cisco Carrier Routing System (CRS) LAG networks.
LLDP The LLDP agent discovers layer 2 connectivity between devices that support the LLDP MIB
and have Link Layer Discovery Protocol (LLDP) enabled.
The LLDP agent use data from the LLDP MIB that is indexed by lldpRemLocalPortNum.
This variable indicates which ifIndex or port a particular LLDP connection exists on. The
LLDP agent supports devices where lldpRemLocalPortNum refers to the ifIndex on the
device: typically, Cisco devices.
The LLDP agent checks if the device supports the Extended-LLDP-MIB. If it does, the
agent retrieves the mapping between lldpRemLocalPortNum and ifIndex. If the device
does not support the Extended-LLDP-MIB, lldpRemLocalPortNum is assumed to be the
ifIndex. Enable the LLDP agent so that Network Manager is able to find LLDP connectivity
on devices that have different implementations of lldpRemLocalPortNum.
SONMP The SONMP agent uses the SynOptics Network Management Protocol, the protocol used
between Nortel communications devices. The SONMP agent begins with the address of
a known Nortel device and uses SONMP to discover location, containment, address, and
connection information from connected, or neighbouring, Nortel devices.
StandardSTP The StandardSTP agent discovers STP connectivity data on any STP-enabled switch
that supports the dot1dSTP section of the BRIDGE-MIB. You should run this agent in
addition to any other necessary switch agents in order to discover STP backup (blocking)
connections.
The STP switch discovery method has the following advantages over other switch-based
discovery methods:
• Hidden links: STP backup (blocking) connections are discovered.
• Speed: the agent completes in Phase 1; no pinging is required.
Note : The STP agent only shows connections between STP enabled switches, that is, it
ignores connections to nodes, non-switch devices, and non-STP enabled switches.
This agent will not discover multiple STP instances, VLANs, or Virtual Routers.
CheckpointContext This Perl agent queries CheckPoint VSX firewalls to retrieve context data.
Retrieving context data allows other context-sensitive discovery agents to
retrieve interface and connectivity data from the appropriate contexts.
CheckpointVSX The CheckpointVSX agent retrieves details of the virtual firewalls running
on a VSX device. For those virtual firewalls it retrieves further information
to resolve the dependencies between the physical hardware and the logical
interfaces running on top of the hardware. This information is then used to
inform the root cause analysis and better model the VSX devices.
ARPCache The ARPCache agent assists in populating the Helper Server with IP to
MAC address mappings in preparation for the Ethernet-based discovery
agents.
You must run this agent if you are running a layer 2 discovery. This agent
is optional if you are running a layer 3 discovery. However, it can be more
efficient to use the ARP Cache discovery agent because in most network
environments the ARP helper can only run on one subnet at a time.
Note: Before enabling this agent, it is necessary to configure SNMP
access and the SNMP Helper.
BGPPeerNextHop All PE to CE interfaces are added to a members list and an event on any
Interface of the interfaces in this members list causes the system to generate a
synthetic MPLS VPN SAE.
This agent, which is off by default, enables the generation of
MPLS VPN service-affected events (SAEs) based on interfaces
dependencies deeper in the core network. This agent calls the
AddLayer3VPNInterfaceDependency.stch stitcher.
This stitcher determines all PE to core provider router (P) interfaces and
P to PE interfaces involved in a VPN. These PE -> P and P ->PE interfaces
are added to a dependency list. An event on any of the interfaces in this
dependency list causes the system to generate a synthetic MPLS VPN
SAE. If an MPLS VPN SAE has already been generated based on an event
on any of the interfaces in the members list, then any events in interfaces
in the dependency list will be added as related events to that already
generated MPLS VPN SAE.
CiscoNexusVdc Discovers Virtual Device Context (VDC) information from Cisco Nexus
7000 and 9000 series devices. Each VDC instance is hosted under a
hypervisor entity contained by the physical device.
CM Retrieves data from cable modems that are connected to a cable modem
termination system device.
Note: If activated, this agent retrieves a large amount of information.
Activating this agent may therefore place a heavy load on memory. You
should only activate this agent if specific cable modem information is
required beyond that provided by other agents.
CMTS Discovers cable modem termination system devices. This agent also
discovers cable modem connectivity.
Note: If activated, this agent retrieves a large amount of information.
Activating this agent may therefore place a heavy load on memory. You
should only activate this agent if specific cable modem information is
required beyond that provided by other agents.
ExtraDetails The ExtraDetails agent is a text-based agent that builds on the basic
SNMP information already retrieved by the Details agent.This agent
retrieves the following information:
• sysDescr
• sysLocation
• sysUpTime
• sysServices
• ifNumber
Note: Before enabling this agent, it is necessary to configure SNMP
access and the SNMP Helper.
MACFromArpCache The ArpCache agent must be enabled for this agent to run.
The MACFromArpCache agent is optionally activated in phase 3 of
Discovery. It uses the ArpCache information retrieved by the ArpCache
agent to retrieve the MAC address of the device. The agent is useful as it
does not require SNMP access to the device to obtain the MAC address.
MACFromTDWDatabase This agent queries the Tivoli Data Warehouse. The agent retrieves the
mapping of MAC address to IP address for each server. Run this agent if
the connectivity of servers is not represented properly in the network
topology due to incomplete mapping of MAC address to IP address
of the servers. The IBM Tivoli Monitoring (ITM) Operating System (OS)
Agent must be running on the servers in the network for which you want
to retrieve information. You must also have access to the Tivoli Data
Warehouse database in order to access the information retrieved by the
ITM OS agents.
Before running this agent, add the access details for the Tivoli Data
Warehouse database to the DbLogins.cfg file. Edit the DbLogins.cfg file
and add an insert similar to the following example:
NMAPScan The NMAPScan agent is a Perl agent that runs the NMAP scanner against
devices discovered by Network Manager. By default, the agent runs
against devices that do not have SNMP access, or devices that have
SNMP access but return sysObjectIds of devices from Apple, Compaq,
IBM, Microsoft, Sun, Network Harmoni, UC David, Net-SNMP, and HP.
The agent retrieves the following data:
• Operating System Fingerprint details
• TCP/UDP port and application information including port number,
name, state, type, and service
You must install NMAP version 4.85 or later on the same server where
the Network Manager core components are installed. You must then edit
the NMAPScan.pl file and specify the path to the NMAP binary in the my
$nmapBinary line, and remove the comment from the beginning of the
line. NMAP is available at http://nmap.org.
Attention: Enabling the NMAPScan agent can extend the
duration of the discovery. NMAP has a large number of scan
options, refer to the NMAP documentation for more information.
The following options are set by default for NMAP:
• -sS: Perform a TCP SYN scan
• -sV: Enable service version identification
• -PN: Do not ping each target (Network Manager already uses the ping
or file finder, or both)
• -O: Enable Operating System fingerprinting
• -oX: Enable XML output
Important: Do not change this value.
SSMOracle The SSM application and the Oracle monitoring package must also be
running.
The SSMOracle agent retrieves MIB information by SNMP from devices
running SSM agents. This agent retrieves information such as the Oracle
database names, fields, and database sizes.
The SSMOracle agent can only retrieve this information from network
devices on which the SSM Agent is deployed. Typically, you would deploy
a SSM Agent on devices whose performance you wish to monitor.
For more information on the SSM Agent, see the SSM Application Guide.
Note: Before enabling this agent, it is necessary to configure SNMP
access and the SNMP Helper.
TunnelAgent Template for a Perl agent to retrieve information about all tunnels,
including IPv6 over IPv4 tunnels, present in the network. This agent
works in conjunction with the IPv6Interface agent.
IPv6Interface Template for a Perl agent to retrieve interface information from an IPv6 device. This
agent is designed to work in an identical way to the Interface agent. This agent
template is located in the Perl agents directory at the following location: $NCHOME/
precision/disco/agents/perlAgents.
CiscoIPSLA Discovers IP SLA-related data from Cisco devices that support the CISCO-RTTMON-
MIB and CISCO-RTTMON-IP-EXT-MIB MIBs. The agent retrieves data such as
information on the configured probes.
HuaweiNQA The Huawei Network Quality Analyser (NQA) agent discovers IP SLA-related data
from Huawei NQA devices that support the NQA-MIB MIB. The agent retrieves data
such as information on the configured probes.
JuniperRPM The Juniper Realtime Performance Monitoring (RPM) agent discovers IP SLA-related
data from Juniper RPM devices that support the DISMAN-PING-MIB and JUNIPER-
PING-MIB MIBs. The agent retrieves data such as information on the configured
probes.
Helpers
Helpers retrieve information from devices and pass it to the Helper Server for retrieval by the agents.
The default helpers are described in the following table.
Dynamic timeouts
The Helper System uses dynamic timeouts to handle network requests.
As an example of the benefit of dynamic timeouts, if the SNMP helper is asked to perform numerous
SNMP Get requests, the helper might begin to slow down and therefore exceed the timeout. A static
timeout would cause the retrieval of data to terminate (with data lost) even though the device is still
responding with data.
To prevent this situation, the helpers incorporate a dynamic timeout system in which they note SNMP Get
requests and recalculate and update the timeout as the SNMP daemons of the device begin to slow down.
AddBaseNATTags Updates all the private NAT addresses that have a private address
with their public address and adds a tag denoting the private
address.
AddClass For each discovered entity, retrieves class definition data from
the Active Object Class manager, ncp_class, and adds this data
to the workingEntities database. This stitcher is called by the
PostLayerProcessing.stch stitcher.
AddGlobalVlans Builds global Virtual Local Area Network (VLAN) objects using the
translations.vlans table.
[ce]---[PE]*---*[P]---[P]---[P]*---*[PE]---[ce]
|*
|
|*
[PE]---[ce]
AddLayer3VPNInterfaceDependency {
(continued) m_Name='VPN_CONTAINER_ACME';
m_Creator='STITCHER CREATED';
m_Description='Logical object for VPN ACME';
m_EntityType=7;
m_ObjectId='VIRTUAL_PRIVATE_NETWORK';
m_HaveAccess=0;
m_IsActive=0;
m_ExtraInfo={
m_VPNName='ACME';
m_MPLSVPNType='MPLS IP VPN MESH';
m_Members=['pe7-cr38.core.eu.test.lab[Vl2]',
'pe7-cr38.core.eu.test.lab[Fa0/3/1]',
'pe8-cr72.core.eu.test.lab[Fa5/0]'];
m_DependsOn=['pe7-
cr38.core.eu.test.lab[Se0/0/0:0.202]',
'pe8-cr72.core.eu.test.lab[Fa0/0]',
'p4-cr28.core.eu.test.lab[Se0/0/1:0.202]',
'p4-cr28.core.eu.test.lab[Gi0/0]'];
};
}
AddSwitchRoutingLinks Adds switch routing data (that assists the RCA plug-in when
performing Root Cause Analysis) to the topology database.
AgentStatus This stitcher sends events to the disco.events table about the
status of the discovery agents. These events indicate changes in
the state of the agent; for example, if it has started, has finished,
or has crashed. See also, FinderStatus, CreateStchTimeEvent, and
DiscoEventProcessing stitchers.
AnalyseTopology Analyses a connectivity database to find how many connections
there are on each interface.
AnalyseTopologySummary This stitcher uses the analysis summary information produced
by the AnalyseTopology stitcher to provide an optional deeper
topology analysis. This functionality is kept separate from the
basic topology analysis as it might affect performance or create
topology issues on some networks.
ApplyMainDisplayLabel Sets the display label for devices in the GUI based on the
setting of m_DisplayMode in the disco.config configuration
file. Modifies the entities in the workingEntities.finalEntity
database table. Called by the BuildFinalEntityTable.stch and
RebuildFinalEntityTable.stch stitchers.
ASMAgentRetProcessing Based on MIB variable data retrieved by the ASM stitcher, this
stitcher generates a list of ASM sub agents running on a given
device. Each ASM subagent running on a device corresponds to a
commercial server or database product running on that device.
The list of ASMs enables autopartitioning of devices within a
network based on the commercial server or database products
running on those devices.
ASAMIfStringLayer Uses the ASAM ifDescr format to deduce connectivity.
ASMProcessing Updates entities based on the services running on them.
ASRetProcessing Used in MPLS discoveries where devices in different customer
VPNs have identical IP addresses. This stitcher performs the
processing necessary to differentiate between these devices and
correctly resolve device connectivity. This stitcher is called by the
AsAgent agent and works with the ASMap.txt file in NCHOME/
precision/etc.
AssocAddressRetProcessing Processes data in the AssocAddress.returns table, sending
the device details to the appropriate discovery agent if the device
has not already been discovered.
baseName[<card>[<port>]]
baseName[0[<ifIndex>]]
baseName[eth0/0]
BuildLayers Activated in the final phase to implement the stitchers that build
the layer databases.
BuildMPLSContainers This stitcher calls the BuildVPNContainers and
BuildVRAndVRFContainers stitchers. It builds VPN, VR, and VRF
containers.
BuildNATTranslation Builds a global translation table for all NAT devices.
BuildNexusVRFContainers Builds Virtual Route Forwarding (VRF) containers for Cisco Nexus
devices.
BuildVPNContainers Creates objects to represent the MPLS VPNs within the system.
BuildVRAndVRFContainers Creates virtual router (VR) and virtual routing and forwarding table
(VRF) objects within the system. These objects are useful for
displaying MPLS information.
BuildVSIContainers Creates Virtual Switch Instance (VSI) and Virtual Forwarding
Instance (VFI) entities. This stitcher also creates logical
containment of devices associated with VSIs, VFIs, and CE-PE
links.
CabletronLayer Determines connectivity information based on Cabletron data
returned by the discovery agents.
CDPLayer Determines connectivity information based on the data returned
by the CDP agent.
CheckAndSendNATGatewaysToArpCache Sends the NAT gateways to the ArpCache agent.
CollectorLTELayer Processes all return records from the CollectorLTE agent where
the variable m_RemoteNbr is not null. Based on information
in the m_RemoteNbr variable, the stitcher populates the
CollectorLTEControlLayer.entityByNeighbor OQL table to store
all LTE control plane connectivity records. For example, the
CollectorLTEControlLayer.entityByNeighbor table stores eNodeB
to eNodeB connectivity over the X2 interface, and eNodeB to MME
connectivity over the S1-MME interface.
This stitcher also determines the LTE user plane connectivity from
information available in the m_RemoteNbr variable and populates
the OQL table CollectorLTEUserPlaneLayer.entityByNeighbor to
store all LTE user plane connectivity records. For example ,
the CollectorLTEUserPlaneLayer.entityByNeighbor table stores
eNodeB to Serving Gateway connectivity over the S1-U
interface, and Serving Gateway to Packet Data Network
Gateway connectivity over the S5/58 interface.
ContainResolvableGenericPortEntities Creates containment for non-ENTITY MIB- like port entities that
have existing corresponding interface records.
IPAddressNaming Causes the system to name devices using the IP address where
the data is valid. This stitcher is optional and is off by default.
IPLayer Creates the IP layer topology connections.
You can configure how data retrieved by the IPLayer
stitcher is handled by using parameters in the DiscoConfig.cfg
file. Set m_RemoveSlash30NonPTPCon to 1 to ignore all
interfaces that are not connected to a slash 30 subnet. Set
m_RemoveSlash31NonPTPCon to 1 to ignore all interfaces that
are not connected to a slash 31 subnet. The default for both
values is 0.
int processingMethod = 2;
MPLStackProcessing Ensures that any interfaces that are situated below a VPN
supporting interface in the interface stack are marked as being
part of the VPNs which flow through the higher interfaces.
NameResolution Finds entities where the name has not been resolved and attempts
to resolve the entity name based on the resolved names of the
other interfaces of the device.
RemoveDeviceFromTopology Removes a device from the topology. The first argument of this
stitcher must be the base name of the device to be removed.
RemoveInferredCEDuplicates When the existence of a CE router is inferred, this stitcher removes
potential duplicate devices from the topology.
SysNameNaming Causes the system to name devices using the SNMP sysName
where the data is valid. This is an optional stitcher that is off by
default.
TagManagementInterfaces Tags the interface that has the IP address used as the main access
IP address for a given entity. This stitcher is used in root cause
analysis.
TraceRouteConnectivity Updates the IPLayer.entityByNeighbor table with
connectivity information retrieved from the TraceRoute agent
returns data.
DNCIM stitchers
The following stitchers all interact with the DNCIM database. The Discovery engine, ncp_disco, uses
these stitchers to store the network model data in the DNCIM database .
The DNCIM stitchers are called from one of the following stitchers:
• CreateAndSendTopology: if Network Manager is in full discovery mode
• RecreateAndSendTopology: if Network Manager is in rediscovery mode
The following table describes the discovery stitchers that interact with the DNCIM database.
Note: This list is subject to change.
Cross-domain stitchers
Cross-domain stitchers look for links between devices in different domains and create connections
between them in the topology.
The following table describes the stitchers currently included with Network Manager that are used for
cross-domain discovery.
Note: This list is subject to change.
Administration scripts
Use these scripts to administer domains, manage nodes, query processes, and perform actions on the
topology.
AddNode.pl
Use the AddNode.pl Perl script to add devices to your network topology.
Description
You might want to add a device to your network topology if you know it has been added since the last
discovery.
Command-line options
The following table describes the command-line options for the AddNode.pl script.
domain_create.pl
Use the domain_create.pl Perl script to migrate discovery configuration and existing poll policies from
an existing domain to a newly created domain.
Description
If your deployment requires additional network domains, you must configure process control for the
domains. Once you have done this, you can then use the domain_create.pl Perl script to migrate
configuration files and network polls from an existing domain to the new domain. You must use one
instance of ncp_ctrl to run and manage each domain. The script does not migrate the topology from the
original domain.
The script also registers the new domain with the NCIM topology database. To create the connection
to the NCIM topology database for the new domain, you must specify the connection details in a domain-
specific DbLogins.new_domain.cfg configuration file or specify the connection details on the command
line.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/domain_create.pl -domain NCOMS2 [ -clone NCOMS1 ]
Command-line options
The following table describes the command-line options for the script. All options are optional unless
noted as mandatory.
-clone Existing domain The name of the domain to copy. If this option is
not specified, a new domain is created with default
poll policies and configuration files.
-help Provides help on this command.
-nopolls Configures the script to not migrate polls.
-password Mandatory if you are not using a domain-specific
DbLogins.new_domain.cfg configuration file.
The NCIM database password.
domain_drop.pl
Use the domain_drop.pl Perl script to remove network domains from the NCIM topology database. The
entire topology for the domain is removed, together with any poll policies and network views for that
domain. The configuration information for the domain and the topology cache is not affected.
Important: Before you run this script, stop the domain that you want to remove. Use the itnm_stop
command to stop the domain.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/domain_drop.pl -domain obsoletedomain -password
password
Command-line options
The following table describes the command-line options for the script.
Table 552. NCIM topology database command-line options for the domain_drop.pl script
Command-line option Description
-password password Optional: The password associated with the
domain to remove.
-server db2 | oracle Optional: Type of database server.
-host Optional: Host name or IP address of the device
running the DB server
-port Optional: Port number on the host. If this value is
not supplied and is not read from the DbLogins.cfg
configuration file, then the default port number for
the server type is used.
-username Optional: Username used for accessing the
database.
-schema Deprecated: Name of the schema. Do not use this
option.
-dbname Optional: Database name or Oracle Service Name.
inject_fake_events.pl
Use the inject_fake_events.pl Perl script to inject fake events onto specified entities and interfaces
in the NCIM topology database.
You can use this script to inject fake events onto entities that match a specified string, together with all
the interfaces on those entities. Unless specified otherwise, the script will inject events onto entities of
the following types:
• 1: Chassis devices
• 2: Interfaces
• 8: Daughter cards
Alternatively you can specify one or more of the three entity types listed above onto which to inject the
fake events.
The script injects two types of events:
• PingFail events
– Events injected onto chassis entities are always PingFail events. These events have NmosEventMap
set to 'PrecisionMonitorEvent.300', where 300 is the precedence value.
– Events on interfaces are PingFail events if the interface has an IP address. In this case these events
have NmosEventMap set to PrecisionMonitorEvent.300, where 300 is the precedence value.
• LinkState events: events on interfaces are LinkState events if the interface does not have an IP address.
In this case these events have NmosEventMap set to PrecisionMonitorEvent.910, where 910 is the
precedence value.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -entityType 1
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4[ 0 [ 747 ] ]" -entityType 1
3. Inject events onto all matching chassis entities and their interfaces for devices with a name like
"BakerStreetWAN4"
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4"
4. This example is similar to example 3 but with a -interfaceDescriptionString parameter to restrict the
search to FastEthernet interfaces only.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -interfaceDescriptionString "FastEthernet" -entityType 2
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -interfaceDescriptionString "Fa2" -entityType 2
6. This example is similar to example 5, but inject events onto the chassis entities too
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -interfaceDescriptionString "Fa2"
7. Create resolution events for those events raised by example 6 by simply adding the -resolution
command-line option. Tivoli Netcool/OMNIbus will eventually delete the problem events and their
matching resolution events.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -interfaceDescriptionString "Fa2" -entityType 2 -resolution
8. To see the SQL queries that are executed, use the -debug 1 command-line option.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
/perl/scripts/inject_fake_events.pl -domain NCOMS -entityNameString
"BakerStreetWAN4" -debug 1
9. To see the SQL queries and the entities found, use the -debug 2 command-line option.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts
Command-line options
The following table describes the command-line options for the script.
Usage
The script displays the path in ASCII format providing the path is not asymmetric or load-balanced. If the
path is asymmetric or load-balanced, the path data is displayed in raw format.
Tracing a path
The following example command line traces a path from IPv4 address 172.16.254.1 to IPv4 address
172.16.2.3.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/webtools/bin/
itnm_pathTool.pl -domain NCOMS -from 172.16.254.1 -to 172.16.2.3
Command-line options
The following table describes the command-line options for the script. All options are optional unless
noted otherwise.
ITListener.pl
Use the ITListener.pl script to listen to messages being passed between processes on the message
bus.
Usage
Many Network Manager processes communicate through a message bus. For example, ncp_model
broadcasts topology updates on the message bus. Each process broadcasts on a different subject. For
example, ncp_model broadcasts on the subject MODEL. The ITListener.pl script listens to messages
on the message bus and prints them to screen.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ITListener.pl -domain NCOMS -process Model -messageClass NOTIFY
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ITListener.pl -domain NCOMS -process DNCIM2NCIM -messageClase NOTIFY
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ITListener.pl -domain NCOMS -process ITNMSTATUS -messageClass NOTIFY
Command-line options
The following table describes the command-line options for the script.
list_applied_updates.pl
Use the list_applied_updates.pl script to check which fixpack and interim fix schema updates have
been applied to the NCIM topology database.
Description
The list_applied_updates.pl script queries the ncim.schemaAudit table and lists the fixpack and
interim fix schema updates that have been applied to the NCIM topology database recorded there, in
the order that they were applied. Note that if a given fixpack or interim fix was applied but contained no
updates to the schema, it is not recorded in the ncim.schemaAudit table, and so this script will not list
it.
Note: This script works in conjunction with the update_db_schemas.pl script. The
update_db_schemas.pl script applies the schema changes, and this script is used to check that
changes for a particular fixpack or interim release were applied.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
list_applied_updates.pl -domain DOMAIN_NAME [ -dbname DATABASE_NAME ] [ -debug ]
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
list_applied_updates.pl -server DATABASE_TYPE [ -dbname DATABASE_NAME ]
-host DATABASE_HOST -username DATABASE_USERNAME -password DATABASE_PASSWORD
Command-line options
The following table describes the command-line options for the script.
ManageNode.pl
Use the ManageNode.pl perl script to set the status of one or more unmanaged devices back to
managed state following a period of maintenance.
Description
You can set the status of one or more unmanaged devices back to managed state following a period of
maintenance.
This is useful when a device is in unmanaged state and you want to set it to managed state again to
receive alerts that are not tagged unmanaged and are used for root cause analysis.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/ManageNode.pl
-domain NCOMS -user root -pwd fruit -verbose -file mynodes.txt
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/ManageNode.pl
-domain NCOMS -user root -pwd fruit -verbose neptune.ibm.com 192.168.0.6
Command-line options
The following table describes the command-line options for the script.
ncp_password_update.pl
The ncp_password_update.pl script is used to update the passwords that are stored in Network
Manager configuration files.
Description
These passwords are used by the Network Manager back-end processes to access the NCIM database
and the ObjectServer. The script does not change the NCIM or ObjectServer passwords themselves.
However, if your database administrator changes the NCIM or ObjectServer password, then in order to
enable the Network Manager back-end processes to access the NCIM database (or the ObjectServer) you
must run this script to update the passwords configured in Network Manager to match the new NCIM
database (or ObjectServer) passwords.
Note that this script does not change the passwords that are used by the Network Manager GUI
components to access the NCIM database and the ObjectServer.
As the ncp_password_update.pl script runs, this script requires user confirmation. The following
configuration files are affected by the script.
DbLogins.cfg
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/scripts/perl/scripts/ncp_password_update.pl -domain NCOMS
• Alternatively, to update only the NCIM password, use the -ncim command-line option.
2. To update the passwords in the GUI, click the Administration icon and select Network > Database
Access Configuration.
3. If you are using DB2 as the NCIM database, you can send a sighup signal to the ncp_model process
for the updated password to take effect without restarting Network Manager. To do this, run the utility
ncp_sighup_model.pl using the following command.
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/scripts/perl/scripts/ncp_sighup_model.pl -domain NCOMS
4. If you are using Oracle as the NCIM database, do not run the ncp_sighup_model.pl script. Instead,
restart Network Manager.
Command-line options
The following table describes the command-line options for the ncp_password_update.pl script.
ncp_scan_storm_diagnostic_dir.pl
The Perl script ncp_scan_storm_diagnostic_dir.pl is used to purge binary data files from the
$NCHOME/precision/PD/core/storm/ directory, and leave the javacore.txt file that gives an
indication of the type and source of the problem.
Description
The Apache Storm processes aggregate the Network Manager poll data and are highly resilient. If a
problem occurs at run time, the processes restart. When there is a major issue, the java run time can
create large files in the $NCHOME/precision/PD/core/storm/ directory, similar to the following files.
core.20150826.164534.6612.0001.dmp
heapdump.20150826.164534.6612.0002.phd
javacore.20150826.164534.6612.0003.txt
Snap.20150826.164534.6612.0004.trc
The 3 binary files can be large, and repeated restarts can result in the filling up of disk space. This Perl
script ref_ncp_scan_storm_diagnostic_dir.pl can be used to purge the directory of the binary
data files and to leave only the javacore text file, which gives an indication of the type and source of the
problem.
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/scripts/perl/scripts/ncp_scan_storm_diagnostic_dir.pl
• Scan once and log the affected files, if there are affected files.
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/bin/ncp_scan_storm_diagnostic_dir.pl -verbose
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/scripts/perl/scripts/ncp_scan_storm_diagnostic_dir.pl -loop 600
• Scan to see what files might be removed, but the files are not removed.
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/scripts/perl/scripts/ncp_scan_storm_diagnostic_dir.pl -test
read_ncp_cfg.pl
Use the read_ncp_cfg.pl Perl script to query the Master Domain Controller process, ncp_ctrl, and
extract the current service state of the processes that ncp_ctrl has been configured to run.
Description
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/read_ncp_cfg.pl
Command-line options
The following table describes the command-line options for the script.
RemoveNode.pl
Use the RemoveNode.pl perl script to remove specified devices from the network topology.
Description
The RemoveNode.pl script removes the specified devices from the network topology by issuing an OQL
command to the Model service to delete the entity from the ncimCache.entityData database table. A
rediscovery is not required because the devices are removed immediately after running the script.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/RemoveNode.pl
-domain NCOMS -verbose -file mynodes.txt
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/RemoveNode.pl
-domain NCOMS -force 192.168.0.6
Command-line options
The following table describes the command-line options for the script.
set_db_details.pl
Use the set_db_details.pl script to modify parameters for a database. The script modifies the
DbLogins.DOMAIN.cfg file.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
set_db_details.pl -domain NCOMS -dbId DNCIM -portNum 2316
This example updates the domain-specific DbLogins.NCOMS.cfg file and sets the port number for the
DNCIM database to 2316. All other settings for the DNCIM database remains unchanged.
Note: The ncp_password_update.pl script performs similar database configuration tasks. See the
ncp_password_update.pl documentation topic for more information.
Command-line options
The following table describes the command-line options for the script.
UnmanageNode.pl
Use the UnmanageNode.pl Perl script to set one or more devices to unmanaged state so that engineers
can work on these devices without generating network events. Unmanaged devices are not polled by
Network Manager. Events for these devices from other sources are tagged in the Event Viewer to indicate
they are from an unmanaged device.
Description
If you set a device to unmanaged, polling is suspended for the unmanaged node. In the Event Viewer, all
alerts are tagged to indicate they are from an unmanaged device, and are not used for root cause analysis.
You can also unmanage individual devices or groups of devices from the topology map views. There is also
an option to set individual components of a device to unmanaged state using the Structure Browser.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/UnmanageNode.pl
-domain NCOMS -user root -pwd fruit -noMainNodeLookup -verbose -file mynodes.txt
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/UnmanageNode.pl
-domain NCOMS -user root -pwd fruit -verbose neptune.ibm.com 192.168.0.6
Command-line options
The following table describes the command-line options for the script.
update_db_schemas.pl
Use the update_db_schemas.pl script to apply all necessary schema updates for one or more fixpacks
or interim fixes.
Description
Starting with Network Manager V4.2, when you download a new fixpack or interim fix, the download
includes the update_db_schemas.pl script and associated update files. These update files include all
NCIM topology database schema changes for all fixpacks and interim fixes up to the current fix.
You can apply all schema changes for the current fixpack or interim fix to the NCIM topology database
by running the update_db_schemas.pl script. Update all NCIM databases at the same time. The
script also applies schema changes for multiple fixpacks or interim fixes. For example, if for a
particular major release you did not install fixpack 1, but are now installing fixpack 2, running the
update_db_schemas.pl script applies all schema changes for both fixpack 1 and fixpack 2.
Note: Not every fix pack contains database schema updates. For a list of fix packs and whether or not
they contain database schema updates, refer to the IBM Tivoli Network Manager IP Edition Release Notes.
If the fix pack that you want to upgrade to, or any of the intervening fix packs, contain database schema
changes then you must run the update_db_schemas.pl script.
This script works in conjunction with the list_applied_updates.pl script. This script applies the
schema changes, and the list_applied_updates.pl script is used to check that changes for a
particular fixpack or interim release were applied.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
update_db_schemas.pl -domain DOMAIN_NAME [ -dbname DATABASE_NAME ]
[-preview [PREVIEW_FILE] ] [ -debug ]
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
update_db_schemas.pl -server DATABASE_TYPE [ -dbname DATABASE_NAME ]
-host DATABASE_HOST -username DATABASE_USERNAME -password DATABASE_PASSWORD
[ -port DATABASE_PORT ] [-preview [PREVIEW_FILE] ] [ -debug ]
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
update_db_schemas.pl -domain DOMAIN_NAME -preview
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/sql/
update_db_schemas.pl -domain DOMAIN_NAME
Note: When the schema updater has successfully applied all the changes for a given fixpack, it writes a
row to the ncim.schemaAudit table, giving the name of the file that contained those changes and the
timestamp when they were applied.
Command-line options
The following table describes the command-line options for the script.
Database scripts
Use these scripts to query and control the databases.
catalog_db2_database
Use this script to catalog a Db2 database as part of setting up an existing Db2 database for use with
Network Manager.
Command-line options
The following table describes the command-line options for the catalog_db2_database script.
configTCR
This script is deprecated as of Fix Pack 11. As of 4.2 Fix Pack 11, Tivoli Common Reporting is not
supported. You must use Cognos Analytics. Refer to the Cognos Analytics Knowledge Center at https://
www.ibm.com/support/knowledgecenter/SSEP7J.
The following example deploys reports and configures Db2 data sources.
Command-line options
The following table describes the command-line options for the configTCR script.
create_all_schemas
Use the create_all_schemas script to apply the NCIM schemas to an existing topology database. This
script is useful, for example, if an NCIM database was not created during the installation of the product,
during an upgrade, or to change from one database type to another. Run the script only after you created
the topology database. Otherwise the script fails.
The create_all_schemas.sh script requires the following information. Specify the information in the
order that is given in the table.
Examples
The following example creates the NCIM schemas on an Oracle database that has the service name
DB_123 on a remote host that is called samplehost, on port 9088. The user/password combination for
connecting to the database is ncim/password.
create_db2_database
Use this script to create the back end NCIM relational database schemas in a Db2 database.
Command-line options
The following table describes the command-line options for the create_db2_database script.
create_oracle_database
Use this script to create the back end NCIM relational database schemas in an Oracle database. This
script must be run as the Oracle system user.
$NCHOME/precision/scripts/sql/oracle/create_oracle_database.sh user_name
password [-asm] [-pdb pluggable_database_name]
create_oracle_ncadmin_user
Use the create_oracle_ncadmin_user.sh script to create the ncadmin user. Run the script as the
sys user, the user with database administrator privileges. The ncadmin user is needed to provide access
to the dbms_lock methods. These locking methods are used in our stored procedures when creating and
dropping partitions associated with historical poll data storage.
This script must be run as the sys user because the script needs to run sqlplus as sysdba. Also, only
the database administrator role has permission to grant execute on dbms_lock, which is required for
the ncadmin user.
Note: If you prefer not to run this script as the sys user, then you can use an alternative method to create
the ncadmin user that does not require this script and does not involve the sys user. The alternative
method is as follows:
1. Run the commands in the create_oracle_ncadmin_user.sql file.
2. As a DBA user, grant execute on dbms_lock to the ncadmin user.
3. As the ncadmin user, execute the commands in the create_oracle_ncadmin_functions.sql file.
Both the create_oracle_ncadmin_user.sql and create_oracle_ncadmin_functions.sql SQL
files can be found in the same directory as the create_oracle_ncadmin_user.sh script.
Command-line options
The following table describes the command-line options for the drop_db2_database script.
drop_oracle_database
Use this script to remove the back end NCIM relational database implemented using Oracle. This script
must be run as the Oracle system user.
$NCHOME/precision/scripts/sql/oracle/drop_oracle_database.sh user_name
password [-pdb pluggable_database_name]
Command-line options
The following table describes the command-line options for the drop_oracle_database script.
Command-line options
The following table describes the command-line options for the populate_db2_database script.
populate_oracle_database
Use this script to populate the back end NCIM relational database schemas in an Oracle database.
You usually run this script after having created the NCIM relational database using the shell or batch
script create_oracle_database. This script must be run as the ncim user, the user created by the
create_oracle_database.sh script.
$NCHOME/precision/scripts/sql/oracle/populate_oracle_database.sh
user_name password [-pdb pluggable_database_name]
Command-line options
The following table describes the command-line options for the populate_oracle_database script.
$NCHOME/precision/scripts/sql/oracle/restrict_oracle_privileges.sh user_name
password [-pdb pluggable_database_name]
Command-line options
The following table describes the command-line options for the restrict_oracle_privileges.sh
script.
uncatalog_db2_database
Use this script to uncatalog a Db2 database if you have changed the hostname, port, or database name.
$NCHOME/precision/scripts/sql/db2/uncatalog_db2_database.sh database_name
Command-line options
The following table describes the command-line options for the uncatalog_db2_database script.
audit.pl
Use the audit.pl script to generate a status report for the Discovery engine, ncp_disco. The output is in
html format and reports information about discovery, agents and stitchers. You can set the frequency at
which the status report is generated. The default is 500 seconds.
Description
This script produces a status report for the Discovery engine, ncp_disco. The file containing this report is
output to the following location:
current_directory/audit.html
The status report includes information on the current state of each of the following:
• Discovery mode
• Discovery phase
• Blackout state
• Cycle count
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/audit.pl
-domain NCOMS [ frequency ]
Command-line options
The following table describes the command-line options for the script.
Related reference
disco.status table
Use the disco.status table to monitor the progress of the ncp_disco process during the discovery
process.
BuildSeedList.pl
Use the BuildSeedList.pl Perl script to write a list of seeds to a file.
Description
The BuildSeedList.pl Perl script retrieves the list of hostnames and IP addresses discovered during
the discovery and writes this list to a file. The script also provides the insert that can be used in the file
finder to use this list to seed the discovery. The use of a fully populated seed list for discovery speeds up
discovery time.
The file containing the list of hostnames and IP addresses discovered during the discovery is output to the
following location:
$NCHOME/etc/precision/seedfile.txt
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
BuildSeedList.pl
Command-line options
The following table describes the command-line options for the BuildSeedList.pl script.
discoAgentsUsed.pl
Use the discoAgentsUsed.pl script to determine which discovery agents were used to discover the
most recently discovered devices in the current domain. Results are presented in an HTML file for viewing
using a Web browser.
Description
This script produces a list of agents. The file containing this list is output to the following location:
current_directory/agentList.html
Note: The Discovery engine, ncp_disco, must be running when you run this script.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
discoAgentsUsed.pl -domain NCOMS
Command-line options
The following table describes the command-line options for the script.
disco_profiling_data.pl
Use the disco_profiling_data.pl script to output summary data of all the discoveries run on a
domain or extracted from a given profiling cache. This script includes data on how long it took to transfer
discovery profiling data to the NCIM topology database. Data is sorted by discovery time.
Description
The script is run using the following command line. Optional arguments are shown enclosed in square
brackets.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
disco_profiling_data.pl -domain domain_name [ -fromcache ]
[ -discocachefile discovery_cache_filename ] [ -modelcachefile model_cache_filename ]
[ -last ] [ -agents ] [ -debug debug_level ]
[ -help ]
The script reads data from the Topology manager database table, model.profilingData. For more
information on this table see the IBM Tivoli Network Manager IP Edition Administration Guide.
Note: The Discovery engine, ncp_disco, must be running in order for this script to work.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
disco_profiling_data.pl -domain NCOMS
To retrieve data from cache files, use a command line similar to the following:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
disco_profiling_data.pl -domain NCOMS -fromcache
To retrieve data from discovery and model caches, use a command line similar to the following:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
disco_profiling_data.pl -domain NCOMS
-discocachefile Disco.Cache.disco.profilingData.NCOMS
-modelcachefile Model.Cache.model.profilingData.NCOMS
Command-line options
The following table describes the command-line options for the script.
-----------------------------------------------------------------------------------
Domain Date_of_discovery collection processing transfer total
-----------------------------------------------------------------------------------
----------------------------------------------------------
entities devices access interfaces discoMem modelMem
----------------------------------------------------------
GrpcQueryCollector
The GRPCQueryCollector script is used to query Network Manager Java collector running on a given
host and port. By default, it runs on the local host.
Sample
This sample shows how to use the hist command:
history
> GetInfo()
> UpdateData(1,0,'','')
> GetDeviceList(1,0,'','')
>GetDeviceInfo(1,'Test-device-id')
To execute the fourth command from the history of commands, enter !4.
Command-line options
The following table describes the command-line options for the GRPC Query Collector script.
itnmMetaDiscoAudit.pl
Use the itnmMetaDiscoAudit.pl script to generate a report that contains audit information on device
classification, and missing device metadata. The output also includes templates of SQL inserts that you
can use to rectify missing metadata issues.
Generate a report
To run the script to generate a report, use a command similar to the following example:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnmMetaDiscoAudit.pl –domain NCOMS –report > my_report.txt
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnmMetaDiscoAudit.pl –domain NCOMS –report –exclude AIX –exclude Sun
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnmMetaDiscoAudit.pl –domain NCOMS –showClassCisco –showClassIBM
Script output
The script generates output in the following distinct sections:
AOC Class Hierarchy and Device Membership
Visualizes the AOC device class tree and indicates how many devices are in each class. The marker
### is used to bring specific AOC classes to your attention. For example, consider the following output
snippet:
1 Core
5 |--- NetworkDevice 3 device(s) ###
127 | |--- Redback (Router)
71 | |--- Dasan (Switch)
118 | |--- Nortel (NetworkDevice)
119 | | |--- BayWellfleet (Router)
120 | | |--- Centillion (Switch)
121 | | |--- NortelEthernetRoutingSwitch (Router)
123 | | `-- NortelPassport (Switch)
124 | | |--- NortelPassport15000 (Switch)
171 | | |--- NortelPassport8xxx (Switch)
125 | | `-- NortelPassport7000 (Switch)
358 | |--- Moxa (NetworkDevice)
359 | | `-- MoxaNPortExpress (NetworkDevice)
220 | |--- RANBaseStation (Transmitter)
11 | |--- Adtran (Router)
12 | | |--- AdtranMX2800 (Router)
13 | | `-- AdtranNetVanta (Router)
itnm_disco.pl
Use the itnm_disco.pl script to start and stop network discoveries, and display status of a running
discovery.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/itnm_disco.pl
-domain NCOMS -status -delay 5
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/itnm_disco.pl
-domain NCOMS -start
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/itnm_disco.pl
-domain NCOMS -stop
Command-line options
The following table describes the command-line options for the script.
listEntities.pl
Use the listEntities.pl script to retrieve device information from the ncimCache.entityData database
table and output the information in HTML format.
Description
This script produces output to the following location:
current_directory/entityListing.html
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
listEntities.pl -domain NCOMS [ displayMode ] [ reportFileName ]
Command-line options
The following table describes the command-line options for the script.
ncp_domain_discovery_start.pl
The ncp_domain_discovery_start.pl script starts the discovery of the next domain in the queue, if
queued discovery is being used.
Description
This script is run by the DomainQueueCheck.stch stitcher as a part of queued discovery. You do not
need to run this script manually.
restart_disco_process.pl
Use the restart_disco_process.pl script to stop the currently running discovery process and start
a new instance. The running discovery process must have been started by ncp_ctrl for the script to take
effect.
Description
The script stops the current discovery process by removing its entry from ncp_ctrl’s services.inTray table.
The script then inserts the entry into services.inTray again using the original argument list, triggering
the process to restart. The -startDiscovery optional argument determines whether or not the script
should wait for the discovery process to start and then initiate a new full discovery.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
Command-line options
The following table describes the command-line options for the script.
scheduleDiscovery.pl
Use the scheduleDiscovery.pl script to display when the next full discovery is scheduled. You can
also use this script to schedule full discoveries.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/
scheduleDiscovery.pl -domain NCOMS -display -v
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/
scheduleDiscovery.pl -domain NCOMS -time 24_hour_time -v
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/
scheduleDiscovery.pl -domain NCOMS -day 0..6 -time 24_hour_time -v
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/
scheduleDiscovery.pl -domain NCOMS -date 0..31 -time 24_hour_time -v
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/
scheduleDiscovery.pl -domain NCOMS -interval number_of_hours_between_discovery -v
Example scripts
Use the example OQL and SNMP scripts as a starting point for creating your own scripts.
oql_example.pl
This script provides examples of Perl-scripted queries into the OQL databases. Use these examples as a
starting point when writing your own script that uses the OQL extensions provided by ncp_perl.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
oql_example.pl
Command-line options
There are no command-line options for this script.
snmp_example.pl
This script provides examples of Perl-scripted SNMP queries into a specified device. Use this example
script as a starting point when writing your own script that uses the SNMP extensions provided by
ncp_perl.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_example.pl -node <Device>
create_all_control
On UNIX systems, use this script to configure processes to start automatically when your system is
started or restarted, and to set up the itnm_start, itnm_stop, and intm_status scripts for your
installation.
$NCHOME/precision/install/scripts/create_all_control.sh -auto_only
Command-line options
The following table describes the command-line options for the create_all_control script.
$NCHOME/precision/scripts/register_all_agents.sh
Command-line options
This script has no command-line options.
setup_run_as* scripts
Certain core processes in Network Manager must be run as root. If you installed Network
Manager as a non-root user, then these processes will not be able to run unless you execute the
setup_run_as_root.sh, setup_run_as_setuid_root.sh, or setup_run_as_capabilities.sh
script on the server where the back-end processes are installed.
These scripts affect which user can run the scripts that control the startup and shutdown of Network
Manager as follows. The scripts affected are itnm_start, itnm_stop, and itnm_status.
Note: In order for these scripts to work correctly, you must be logged on as root when you run them.
Table 590. Who can run the itnm_start, itnm_stop, and itnm_status scripts
Installing user Which setup_run_as* script was run User who can run
itnm_start
itnm_stop
itnm_status
setup_run_as_root.sh
If you installed Network Manager as a non-root user, and you want to run Network Manager while logged
in as the root user, then you must run the setup_run_as_root.sh script to alter permissions so that
you can run the back-end processes while logged on as the root user.
Note: In order for this script to work correctly, you must be logged on as root when you run it.
$NCHOME/precision/scripts/setup_run_as_root.sh
setup_run_as_setuid_root.sh
If you installed Network Manager as a non-root user, and you want to run Network Manager while logged
on as the non-root user who installed the product, or another user in the same group, then you must run
the script setup_run_as_setuid_root.sh. The processes that must be run as root have their setuid
permission changed so that they run as root even when started by a non-root user. This procedure has
security implications and must not be done on a server that untrusted users can log in to.
If you can not run binary files with a UID of root for security reasons, run the
setup_run_as_capabilities.sh script instead, on Linux platforms only.
Note: For this script to work correctly, you must be logged on as root when you run it.
Due to the way this script makes certain shared libraries into trusted libraries, only one installation per
server can be set up to be run by a non-root user. If you have multiple installations of Network Manager
on the same server, you must run all of them as root.
$NCHOME/precision/scripts/setup_run_as_setuid_root.sh
$NCHOME/omnibus/probes/linux2x86/ SNMP Trap probe, needs to bind to port less than 1024
nco_p_mttrapd
$NCHOME/omnibus/platform/linux2x86/ SNMP Trap probe, needs to bind to port less than 1024
probes64/ nco_p_mttrapd
The following directories are made trusted, so that setuid binaries can search them:
• $NCHOME/precision/platform/linux2x86/lib64
• $NCHOME/omnibus/platform/linux2x86/lib64
• $NCHOME/platform/linux2x86/lib64
• $NCHOME/precision/platform/linux2x86/oracle_instant_client-11.2.0.4
• $NCHOME/precision/platform/linux2x86/oracle_instant_client-12.1.0.2.0
• $NCHOME/precision/jre/bin
• $NCHOME/precision/jre/bin/j9vm
• $NCHOME/precision/jre/lib/amd64
• $NCHOME/precision/platform/linux2x86/db2-10.5.0.5/odbc_cli/clidriver/lib
zLinux
On zLinux, the following binaries are made setuid root:
$NCHOME/omnibus/probes/linux2s390/ SNMP Trap probe, needs to bind to port less than 1024
nco_p_mttrapd
$NCHOME/omnibus/platform/ SNMP Trap probe, needs to bind to port less than 1024
linux2s390/probes64/ nco_p_mttrapd
The following directories are made trusted, so that setuid binaries can search them:
• $NCHOME/precision/platform/linux2s390/lib64e
• $NCHOME/omnibus/platform/linux2s390/lib64
• $NCHOME/platform/linux2s390/lib64
• $NCHOME/precision/platform/linux2s390/oracle_instant_client-11.2.0.4
The following libraries are made trusted, so that setuid binaries can use them. This is done by creating
symbolic links to them from /usr/lib.
These following libraries in $NCHOME/precision/platform/aix5/lib64/ are made trusted:
• libDiscoCommon.so
• libDiscoFinders.so
• libDiscoHelper.so
• libNCPBase.so
• libNCPComms.so
• libNCPMOM.so
• libNCPPort.so
• libNCPVersion.so
• libVertigo.so
• libNCPCrypt.so
• libncryptcpp.so
unsetup_run_as_setuid_root.sh
You can use this script to reverse the effects of the setup_run_as_setuid_root.sh script.
Note: In order for this script to work correctly, you must be logged on as root when you run it.
$NCHOME/precision/scripts/unsetup_run_as_setuid_root.sh
Command-line options
This script has no command-line options.
setup_run_as_capabilities.sh
Certain binaries require root privileges to run properly but setting UID to enable the root privilege can
cause a security scanner to flag these binaries as a security threat. If you want to enable capabilities for
binaries instead of setting UID, you must run the script setup_run_as_capabilities.sh. This script
works only on Linux platforms.
Note: For this script to work correctly, you must be logged on as root when you run it.
Due to the way this script makes certain shared libraries into trusted libraries, only one installation per
server can be set up to be run by a non-root user. If you have multiple installations of Network Manager
on the same server, you must run all of them as root.
$NCHOME/precision/scripts/setup_run_as_capabilities.sh
Note: You must run the script setup_run_as_capabilities.sh after every Fix Pack upgrade and roll
back.
The following directories are made trusted, so that setcapabilities binaries can search them:
• $NCHOME/precision/platform/$arch/lib64
• $NCHOME/omnibus/platform/$arch/lib64
• $NCHOME/platform/$arch/lib64
• $NCHOME/precision/platform/$arch/oracle_instant_client-11.2.0.4
• $NCHOME/precision/platform/$arch/oracle_instant_client-12.1.0.2.0
• $NCHOME/precision/platform/$arch/oracle_instant_client-19.13.0.0
• $NCHOME/precision/jre/bin
• $NCHOME/precision/jre/bin/j9vm
• $NCHOME/precision/jre/lib/$jre_arch
• $NCHOME/precision/platform/$arch/db2-10.5.0.5/odbc_cli/clidriver/lib
unsetup_run_as_capabilities.sh
You can use this script to reverse the effects of the setup_run_as_capabilities.sh script.
Note: In order for this script to work correctly, you must be logged on as root when you run it.
$NCHOME/precision/scripts/unsetup_run_as_capabilities.sh
Command-line options
This script has no command-line options.
setup_run_storm_as_non_root.sh
If you installed Network Manager as the root user, then you must run the
setup_run_storm_as_non_root.sh script to enable the historical polling data processes to run. You
do not need to run this script if you installed Network Manager as a non-root user.
Note: In order for this script to work correctly, you must be logged on as root when you run it.
Command-line options
The following table describes the command line options for the setup_run_storm_as_non_root.sh
script.
Polling scripts
Use these scripts to control and diagnose network polling,
get_policies.pl
Use the get_policies.pl Perl script to move poll policies and associated data between domains. This
script can also be used to back up all poll policies to file or to load poll policies from a file into a specified
domain. You can also move a subset of poll policies.
Description
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
get_policies.pl -from domain=SOURCE -to domain=DESTINATION -ncim_password NCIM_password
-ncmonitor_password NCMONITOR_password
To run the script to copy policies from one domain to a file, use a command line similar to the following:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
get_policies.pl -from domain=SOURCE -to file=exportedData.xml
Command-line options
The following table describes the command-line options for the script.
-from file=filename Optional; This can be a file name, in which case the contents of the
file are expected to have been generated using this script, and have a
format as outlined in the manual pages for NCP::Policies.
Note: If supplied, this considers the same format as
-to file=filename. If not supplied, poll policies are taken
from the default set, in $NCHOME/precision/scripts/sql/
monitorDefaultPolicies.xml.
-password password Optional; the database password used for accessing the NCIM and
NCMONITOR schemas. This is required only if the password is
encrypted in the DbLogins configuration file.
-policy policy name Optional; the policies that are copied and supplied to restrict the set of
policies to write to the destination.
-keep thresholds|policies| Optional; this script is used to update a policy for one domain that will
defaultPing be passed on to subsequent domains.
-viewTemplates filename Optional; this option is used to generate the network view information
for policies with device scope defined, and write to a file conforming to
Network Manager autoprovision template format.
-triggerUpdates Optional; this option causes to set the policy.lastUpdate so that poller
picks the changes to configuration if it is running.
-commitPolicies yes|no Optional; when the destination is a database and if this option is set
to yes, then it causes transactions to be committed with each policy
written. If the option is set to no, then all policies are updated within a
single transaction.
-noViewTransfer Optional; this is used to prevent copying of any policyView data to the
target system. This is desirable in cases where the source and target
systems are not likely to share the same viewId data.
-syncToBackup Optional; if a backup system is configured, updates it with changes to
policies and templates on the primary, and delete any policies which
are no longer exist on the primary.
-help Optional; provides help on this command.
Syntax
Run the script with the following syntax:
ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain domain [-poller pollername]
[-enable policyid|-disable policyid] [-status all|static|realtime]
[-refresh policyid|all] [-chassis ipaddress|filename][-interface ipaddress|filename] [-metrics]
[-window] [-timestamp timestamp] [-help]
The following table describes the options for the script. To obtain poll policy IDs for use with these
options, run the script with the -status option first.
-refresh policyid|all Optional: Refreshes the policy configuration and its entity list. To
refresh a single policy, specify the policy ID. To refresh all policies, use
the -refresh all option.
-status all|static|realtime Optional: Displays the status of the specified policies, and also the ID of
each poll policy. Possible options are as follows:
• all
• static (default)
• realtime
Important: Do not use this option with the -metrics option. If you do,
the script displays a message and terminates.
Examples
• “Display poll policy status and ID” on page 959
• “Enable poll policies” on page 959
• “Disable poll policies” on page 959
• “Trigger the refresh of a policy configuration and its entity list” on page 960
• “Display polling status of a chassis ping poller” on page 960
• “Display poller health charts” on page 960
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -status all
The following example displays the status of the poll policies for the default poller, ncp_poller_default, on
the NCOMS domain:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -status all -poller ncp_poller_default
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -enable 10
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -disable 10
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -refresh 10
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
itnm_poller.pl -domain NCOMS -chassis 10.101.10.10
The following example outputs the bar charts for a poller that is called 2345_POLL. The time period for
the metrics starts 24 hours before the most recent time stamp.
The following example outputs the bar charts for the default poller. The time period for the metrics starts
from the time stamp that was 4 hours before 09:14 and 59 seconds on December 10, 2013
The following example outputs the bar charts for the poll policies and poll definitions for a poller that is
called 2345_POLL. The time period for the metrics starts from the time stamp that was 8 hours before
09:14 and 59 seconds on December 10, 2013.
For more information about the NCMONITOR polling status tables, including the ncmonitor.expectedIps
table, see the IBM Tivoli Network Manager Reference. For more information about how to ensure that the
important IP addresses in your network are polled as expected, see the IBM Tivoli Network Manager IP
Edition Administration Guide.
monitoredEntities.py
Use the monitoredEntities.py Python script to retrieve the number of monitored entities.
./monitoredEntities.py domain_name
ncp_ping_poller_snapshot.pl
This script is used for troubleshooting ping polling of network devices. After the
ncp_upload_expected_ips.pl script has uploaded a plain text file of IP addresses, the
ncp_ping_poller_snapshot.pl script creates and stores a snapshot of the current ping polling status of
these addresses. You can then run a report on these devices using the ncp_polling_exceptions.pl script.
Description
The ncp_ping_poller_snapshot.pl script retrieves the polling status of the uploaded IP addresses; that is,
whether they will be polled by the ncp_poller process. The polling status of devices can change after a
network discovery or a change in polling configuration.
The data retrieved by this script is stored in the pollLog database table in the NCMONITOR schema, and
can be used to generate reports on the polling status using the ncp_polling_exceptions.pl script.
For more information on ensuring that the important IP addresses in your network are being polled as
expected by Network Manager, see the IBM Tivoli Network Manager IP Edition Administration Guide.
Prerequisites for this script are as follows:
• You must have run the ncp_upload_expected_ips.pl script on a valid file of IP addresses.
• The pollLog and pollLogSummary tables must have been created in the NCMONITOR schema.
• The DbLogins file must be usable for the given domain.
• The domain must exist in the NCIM topology database.
• The Polling engine, ncp_poller, must be running in the given domain.
• There must be at least one active ping poll in the current domain.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_ping_poller_snapshot.pl -domain DOMAIN_NAME -password PASSWORD
Command-line options
The following table describes the command-line options for the script.
ncp_polling_exceptions.pl
This script is used for troubleshooting ping polling of network devices. After having run the
ncp_upload_expected_ips.pl and ncp_pingpoller_snapshot.pl scripts, use this script to print a report of
polling status of network devices.
Description
After uploading a list of IP addresses that you want to monitor using the ncp_upload_expected_ips.pl
script, and creating a snapshot of the polling status of those devices using the ncp_pingpoller_snapshot.pl
script, use this script to print a report of the snapshot data. The script lists those addresses that are not
being polled using ICMP, and indications why they are not being polled.
For more information on the procedure to ensure that the important IP addresses in your network
are being polled as expected by Network Manager, see the IBM Tivoli Network Manager IP Edition
Administration Guide.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_polling_exceptions.pl -domain DOMAIN_NAME -format list | report
Command-line options
The following table describes the command-line options for the script.
Description
Use the ncp_upload_expected_ips.pl script as part of the procedure to ensure that the important IP
addresses in your network are being ping polled as expected by Network Manager and, if not, to provide
information to resolve the problem.
The script loads a list of IP addresses to the ncmonitor.expectedIps table. Any data already in the table is
removed.
Run the ncp_upload_expected_ips.pl script before running the ncp_pingpoller_snapshot.pl
and ncp_pollingexceptions.pl scripts. You can run the ncp_pingpoller_snapshot.pl and
ncp_pollingexceptions.pl scripts many times after running the ncp_upload_expected_ips.pl script once.
Run the ncp_upload_expected_ips.pl again when the IP addresses that you want to check have changed.
For more information on the NCMONITOR polling status tables, including the ncmonitor.expectedIps
table, see the IBM Tivoli Network Manager Reference.
For more information on the procedure to ensure that the important IP addresses in your network
are being polled as expected by Network Manager, see the IBM Tivoli Network Manager IP Edition
Administration Guide.
Prerequisites for this script are as follows:
• A plain text file containing IP addresses you want to monitor is available on the local file system.
• The expectedIps table must have been created in the NCMONITOR schema.
• The DbLogins file must be usable for the given domain.
• The domain must exist in the NCIM topology database.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_upload_expected_ips.pl -domain DOMAIN_NAME -file FILENAME -password PASSWORD
Command-line options
The following table describes the command-line options for the script.
SQL scripts
Use the supplied SQL scripts to perform setup tasks on the Tivoli Netcool/OMNIbus ObjectServer.
create_itnm_triggers.sql
Use this script to set up a Tivoli Netcool/OMNIbus ObjectServer to support the setting of event severity
based on the value of the NmosCauseType field. For example, if NmosCauseType has the value 1 (root
cause), then running this script will cause the event severity to be set to Critical.
Command-line options
The following table describes the command-line options for the create_itnm_triggers.sql script.
create_sae_automation.sql
Use this script to set up the Tivoli Netcool/OMNIbus ObjectServer with automations and right-click tools
to support the generation of service-affected events.
Command-line options
The following table describes the command-line options for the create_sae_automation.sql script.
drop_itnm_triggers.sql
Use this script to set up a Tivoli Netcool/OMNIbus ObjectServer to remove support for setting of
event severity based on the value of the NmosCauseType field. After running this script, the value of
NmosCauseType (for example 1,root cause) has no effect on event severity.
Command-line options
The following table describes the command-line options for the drop_itnm_triggers.sql script.
drop_sae_automation.sql
Use this script to remove from the Tivoli Netcool/OMNIbus ObjectServer the automations and right-click
tools to support the generation of service-affected events.
Command-line options
The following table describes the command-line options for the drop_sae_automation.sql script.
GetDiscoCache.pl
To generate discovery cache files for a recent discovery as if it had been run in failover mode, use
the GetDiscoCache.pl Perl script. Failover cache files help IBM Support and Development teams to
troubleshoot discovery.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
GetDiscoCache.pl -domain DomainName
Note: On UNIX systems only, the script also compresses the cache files into a .tar file by default. For
more information, see option -buildtar in the following table.
Command-line options
The following table describes the command-line options for the GetDiscoCache.pl script.
The following is an example of using the command-line options for GetDiscoCache.pl on a UNIX
system:
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
GetDiscoCache.pl -domain NCOMS -service Disco -buildtar 1
GetEndDeviceConnections.pl
Run this script to show physical connections of a target device without needing to discover the entire IP
address space.
$NCHOME/precision/bin/ncp_perl
$NCHOME/precision/bin/GetEndDeviceConnections.pl
-domain DomainName -target IPaddress
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/bin/GetEndDeviceConnectionsv3.pl
-domain NCOMS -target 10.10.10.25
Command-line options
The following table describes the command-line options for the script.
itnm_data.pl
Use the itnm_data.pl Perl script to collect information about your installation for use in
troubleshooting by IBM Support.
Description
This script can capture the following information, based on the collection type:
• Environmental information such as operating system, ulimits, hardware specifications
• Version information
• Log and trace files for Network Manager, Tivoli Integrated Portal, or Cognos Analytics.
• Configuration files and backups
• Discovery agents and stitchers
• Poller status, targets. and policies
• Cache files for ncp_disco and ncp_model
• Network Views
• Installation information
You can automatically send the data to IBM, if your machine has Internet access, by using the -f and
-pmr options. Otherwise, you can use your normal method of transfer or the customer portal to upload
the data.
The script can take a long time to run, and can use a lot of system resources, depending on the size of the
topology. When the script completes, it tells you where the output file is.
Command-line options
The following table describes the command-line options for the itnm_data.pl script.
ncp_db_access.pl
Checks database setup and determines whether access to the databases is being prevented by firewalls.
This script accesses the topology database, historical polling database, and the distributed polling
database.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_db_access.pl -domain NCOMS
ncp_storm_validate.sh
Use this script as a troubleshooting aid for the Apache Storm realtime computation system, which is used
to aggregate raw poll data into historical poll data.
Syntax
The ncp_storm_validate script uses the following syntax:
Where:
• storm is an optional argument used to additionally use Storm scripts to trigger Java code. By default,
the Java code is triggered directly to reduce unhelpful messages. Add the optional storm argument to
run this script using the Storm scripts.
• testName is the name of the test to run.
• testArgs are the arguments required by that test.
Examples
Here are some examples of how to run the script:
Display the current default configuration
$NCHOME/precision/scripts/ncp_storm_validate.sh config
$NCHOME/precision/scripts/ncp_storm_validate.sh db
Validate access to the NCPOLLDATA database using existing credentials but by additionally using the
Apache Storm scripts
$NCHOME/precision/scripts/ncp_storm_validate.sh storm db
Here are some examples of how to export sample data using the kafkaexport option.
Note: The topic names are case sensitive. In normal use you do not need to be concerned with topic
names. A scenario in which you do need to take care, however, is when troubleshooting with the
Here are some examples of how to listen for data requests using the kafkaimport option. The format of
the output depends on the topics configured.
Note: The topic names are case sensitive. In normal use you do not need to be concerned with topic
names. A scenario in which you do need to take care, however, is when troubleshooting with the
ncp_storm_validate.sh script. In this case be aware that you must type the topic name exactly
as spelled here; that is, all lowercase, for example: nm.monitoredobject.
ncp_validate_ncim_tables.pl
This script compares the created NCIM tables and views with the tables and views defined in the schema
files, to verify that all defined tables and views have been created. Run this script if you suspect that there
are issues with the NCIM database, for example after migration.
Description
Before running this script, you must ensure that NCIM database credentials are available in a
$NCHOME/etc/precision/DbLogins.cfg file for the domain that you want to check.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_validate_ncim_tables.pl -domain TEST
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_validate_ncim_tables.pl -domain TEST -verbose
Command-line options
The following table describes the command-line options for the script.
PrintCacheFile.pl
Takes a specified cache file and prints the ROMP contents of the file in a human-readable format. This
script is mostly useful for scripting and debugging purposes.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
PrintCacheFile.pl -domain domain cache_file
Command-line options
The following table describes the command-line options for the script.
snmp_walk.pl
Performs an SNMP walk of all or part of a device using the SNMP helper.
Description
The snmp_walk.pl script walks the entire device MIB (starting from internet by default) or part of the
MIB.
By default, the script writes output to screen. You can change how the script writes output using the
-format option.
Restriction:
Before running this script, ensure that the Helper Server process, ncp_d_helpserv, and either the
master process controller, ncp_ctrl, or the SNMP helper process, ncp_dh_snmp, are running in the
required domain.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_walk.pl -domain domain_name [
-debug ] [ -format ] [ -help ] [ -ignoreInstanceFilters ] [ -latency ] [ -quiet ]
IP_address [ OID|MIB_variable [ community_add_on ] ]
Note: You can configure this script to ignore SNMP interface filters. For more information on SNMP
interface filtering, see SNMP interface filtering in the IBM Tivoli Network Manager IP Edition Administration
Guide.
Examples
The following example command line performs a complete walk of a device with IP address 1.2.3.4.
Output is written to screen.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_walk.pl -domain TEST 1.2.3.4
The following example command line performs a complete walk of a device with IP address 1.2.3.4.
Output is written to screen and to a file.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_walk.pl -domain TEST -format out -format name 1.2.3.4
The following example command line performs a walk of the ifTable of a device with IP address 1.2.3.4.
The ifTable is specified as a MIB variable. Output is written to screen.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_walk.pl -domain TEST 1.2.3.4 ifTable
The following example command line performs a walk of the ifTable of a device with IP address 1.2.3.4.
The ifTable is specified as an OID. Output is written to screen.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
The following example command line performs a walk of the ifTable of a device with IP address 1.2.3.4
with a VLAN context. Output is written to screen.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
snmp_walk.pl -domain TEST -format out 1.2.3.4 ifTable @vlan2
Command-line options
The following table describes the command-line options for the script.
ITNMDataExport.pl
This script exports Network Manager configuration data. You can then import this data into a new Network
Manager system when migrating to that new system.
perl $NCHOME/precision/scripts/
upgrade/ITNMDataExport.pl -export -from 4.1.1
Command-line options
The following table describes the command-line options for the script.
ITNMDataImport.pl
This script imports Network Manager configuration data.
perl $NCHOME/precision/scripts/
upgrade/ITNMDataImport.pl -import -from 3.9
Command-line options
The following table describes the command-line options for the script.
Description
This script backs up all user created Network Views in a particular domain to a file. If your Network
Views are deleted, you can use the script to restore the Network Views. Do not use the script to import
Network Views if you have existing views: you might get unpredictable results such as duplicate views.
To import views, first delete existing views.
Restriction: Views that were automatically created based on the Dynamic View template are not
exported. These views are automatically recreated on the target installation based on the last discovered
topology.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/
upgrade/ITNMExportNetworkViews.pl
Command-line options
The following table describes the command-line options for the script.
Description
If your deployment requires additional network domains, you must configure process control for the
domains and register the domains with the NCIM topology database. Once you have done this, you can
then use the domain_create.pl Perl script to migrate the configuration and network polls from an
existing domain to the new domain. You must use one instance of ncp_ctrl to run and manage each
domain. The script does not migrate the topology from the original domain.
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_ncim_diff.pl -domain NCOMS1
Dump the structure of the NCIM database in the specified domain to a file in XML format
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_ncim_diff.pl -domain NCOMS1 -dumpToFile NCIM_NCOMS1.xml
Compare the contents of a file dump generated by this script to the structure of an NCIM database in
a different domain
$NCHOME/precision/bin/ncp_perl $NCHOME/precision/scripts/perl/scripts/
ncp_ncim_diff.pl -domain NCOMS2 -file NCIM_NCOMS1.xml
Command-line options
The following table describes the command-line options for the script.
nmExport
Use this script to export customized data for the core components from a previous version of Network
Manager.
The script creates a .pkg file containing discovery configuration data, network views, poll policies and
definitions, other configuration files, and log files containing information about the successful export.
If the export is unsuccessful, log files are saved to the /itnmExportLogs/ directory in your home
directory.
Command-line options
The following table describes the command-line options for the nmExport script.
nmGuiExport
Use this script to export customized GUI data from a previous version of Network Manager.
The script creates a data.zip file in one of the following directories: $TIPHOME/profiles/
TIPProfile/output/ or $JazzSM_HOME/ui/upgrade/data/. The file contains configuration data,
user roles, and custom Tivoli Integrated Portal pages, views, and roles. Any errors are saved to one of the
following directories: $TIPHOME/profiles/TIPProfile/logs/tipcli.log or $JazzSM_HOME/ui/
logs/consolecli.log.
Command-line options
The following table describes the command-line options for the nmGuiExport script.
nmGuiImport
Use this script to import customized GUI data from a previous version of Network Manager.
Command-line options
The following table describes the command-line options for the nmGuiImport script.
nmImport
Use this script to import customized core components data from a previous version of Network Manager.
./nmImport -n netcool_location
Note: The script asks various questions as part of execution, including the following:
• Enter all migration packages to process.
• Check current server settings.
• Specify NCIM database account password.
• In the case of copying one current system to another: Specify whether to allocate new entity identifiers.
Command-line options
The following table describes the command-line options for the nmImport script.
WebTools configuration files define all parameters used by WebTools. You should not normally need to
change these parameters.
The only parameters that you might be required to configure are the Telnet login details for the Cisco and
Juniper tools, as described in "Configuring Telnet Login Details".
Note: Passwords specified in the WebTools configuration files are plain-text. If you configure Telnet login
details within these files, then it is recommended that you apply appropriate security measures to the
WebTools directories, $NMGUI_HOME/profile/etc/tnm/ and ITNMHOME/scripts/webtools/etc.
URL parameters
Use URL parameters to construct a URL to launch any of the Network Manager Web applications directly
from a Web browser. For example, you can construct a URL to launch the Hop View containing a
predefined network map.
These parameters can be typed directly into the address bar of your browser. Alternatively, you could
write a Tivoli Netcool/OMNIbus Web GUI tool to pass column values for an event to a CGI script. The
script could then call the relevant Web application with these parameters.
Default windows composed of multiple Web applications, such as the Network Health View, cannot be
opened using a URL. The following table lists the Network Manager Web applications that can be opened
using URLs.
The following topics explain the URL parameters to use for the different Web applications.
URL parameters
The following table shows the URL parameters that you can pass to the Hop View to display layer 2 or
layer 3 connectivity maps.
Note: If you specify a seed that has no matches or multiple matches, the search dialogue is displayed.
Multiple matches can occur if no domain is specified and a device with the same name or IP address
exists in more than one domain. Multiple matches can also occur if a domain is specified and more than
one device in that domain has the same name.
hops This is the number of hops from the seed device. This No
corresponds to the Hops field in the Hop View toolbar.
The default is 1.
seed An identifier for the seed device. This may be the Yes
EntityName, IPAddress or EntityId of the required
seed device. This corresponds to the Seed field in the Hop
View toolbar.
You can use multiple seed devices in the same
Hop View. Administrator can set a limit for seed
devices using the topoviz.hopview.maximum.seeds
property in topoviz.properties. This defaults value for
topoviz.hopview.maximum.seeds is 10. If it is set to
a negative value, then it does not limit the number of seed
devices.
https://host:port/ibm/console/ncp_topoviz/HopView.do?domain=MPLSTEST&type=layer2
&layout=hierarchical&seed=lon-core-cis-h.ibm.com&hops=2&endNodes=true
https://host:port/ibm/console/ncp_topoviz/HopView.do?domain=MPLSTEST&type=layer3
&layout=symmetric&seed=lon-core-cis-h.ibm.com&HOPS=2&endNodes=true
Example 3: URL for layer 2 connectivity map with multiple seed devices
The following example shows the format of a Topoviz URL for a layer 2 map with two devices. Note that
Topoviz URLs are case-sensitive.
https://host:port/ibm/console/ncp_topoviz/HopView.do?domain=MPLSTEST&type=layer2
&layout=hierarchical&seed=lon-core-cis-h.ibm.com&seed=dub-core-cis-g.ibm.com
&hops=2&endNodes=true
https://host:port/ibm/console/ncp_topoviz/HopView.do?domain=MPLSTEST&type=layer3
&layout=symmetric&seed=lon-core-cis-h.ibm.com&HOPS=2&endNodes=true
Connectivity parameters
The following table shows the integer and string values that you can use for the connectivity
parameter in Topoviz URLs.
Table 622.
Integer String Description
-1 ipsubnets Logical collection that lists the
IP address in a class A, B, or C
subnet.
71 layer1 Grouping of connections which
belong to a Layer 1 topology.
72 layer2 Grouping of connections which
belong to a Layer 2 topology.
73 layer3 Grouping of connections which
belong to a Layer 3 meshed
topology.
74 convergedtopology Based on data available in NCIM,
groups together connections at
the lowest layer for which data is
available.
75 mplste Grouping of connections which
belong to an MPLS TE topology.
77 pseudowire Grouping of connections which
belong to a Pseudo Wire
topology.
URL Parameters
You can supply the following optional parameters when you launch the MIB Browser:
• domain: name of the Network Manager domain to use to obtain the MIB and SNMP data. The value of
this parameter is used to set the Domain option menu in the Configuration Toolbar.
If you are writing a tool to launch the MIB Browser from the Event Viewer, then you may wish to
specify the name of the ObjectServer rather than the name of the Network Manager domain. Do this by
supplying the parameter $selected_rows.ServerName, where ServerName is the field in the Event
Viewer event that specifies the name of the ObjectServer.
• host: IP address of the target device to be queried for SNMP data. This value is used to populate the
Host field in the SNMP Query Toolbar.
• variable: the MIB object to query. This value can be the OID of the MIB object, such as
1.3.6.1.2.1.1.3 or it can be the name of the MIB object, such as sysUpTime. This value is used to
populate the OID field in the SNMP Query Toolbar.
• resultsOnly: takes one of the values true or false.
– If true, then the MIB Browser is launched in full mode.
Examples of URLs
Some examples of URLS to launch the MIB Browser are shown below:
• https://host:port/ibm/console/ncp_mibbrowser/Launch.do
The MIB Browser opens up with the Domain option menu set to the first value. No host or OID values
are set in the SNMP Query Toolbar.
• https://host:port/ibm/console/ncp_mibbrowser/Launch.do?domain=NCOMS
The MIB Browser opens up with the Domain option menu set to the specified domain.
• https://host:port/ibm/console/ncp_mibbrowser/Launch.do?domain=NCOMS
&host=198.162.3.4
The MIB Browser opens up with the Domain option menu set to the specified domain and the Host field
set to 198.162.3.4.
• https://host:port/ibm/console/ncp_mibbrowser/Launch.do?domain=NCOMS
&host=198.162.3.4&variable=ifTable
The MIB Browser opens up with the Domain option menu, the Host and OID fields set accordingly. In
addition, an SNMP Get Table query will automatically be issued for the MIB object ifTable. The
results will be displayed in the SNMP Query Results Area.
• https://host:port/ibm/console/ncp_mibbrowser/Launch.do?domain=NCOMS
&host=198.162.3.4&variable=sysUpTime&resultsOnly=true
The MIB Browser opens up with the Domain option menu, the Host and OID fields set accordingly.
In addition, an SNMP Get query will automatically be issued for the MIB object sysUpTime. The MIB
Browser opens in results-only mode and contains only the results showing the value of sysUpTime for
the network device with IP address 198.162.3.4.
URL parameters
The following table shows the URL parameters that you can pass to the network views.
id Each saved network view has a unique ID. To find out the ID Yes
of a particular view, hover the cursor over the name of the
view in the navigation tree. The ID is displayed in the status
bar at the bottom of the browser window, and as a tooltip.
Passing a network view ID in the URL to Network Views
opens that network view. The view is shown without the
navigation tree.
selectNode This is the entity ID of an entity to which you want the Optional
display to zoom in. If you specify this parameter, it enables
the Toggle Overview button on the toolbar.
showTree By default, this is set to true to display the network view Yes
tree as well as network view. You can set this to false to
stop the network view tree from being displayed.
https://host:port/ibm/console/ncp_topoviz/NetworkView.do?id=10690
URL parameters
The following table shows the parameters for the Top Performers URL.
viewId The path view ID or the network view ID, A positive Yes, if you
for which you want to plot the performance Integer that want to plot
information. Cannot use this parameter in is greater information
partnership with the parameters entityIds than 0. for viewId.
or mainNodeEntityIds
https://<server>:<port>/ibm/console/NetworkHealth/pages/performance/
nmPerformance.jsp?viewId=348
https://<server>:<port>/ibm/console/NetworkHealth/pages/performance/
nmPerformance.jsp?mainNodeEntityIds=11596,11628,11551&entityIds=
https://<server>:<port>/ibm/console/NetworkHealth/pages/performance/
nmPerformance.jsp?mainNodeEntityIds=&entityIds=12343,12785
https://host:port/ibm/console/ncp_webtools/pages/ncp_wt_index.jsp?
domain=domain name&removeHttpHeader=true
&servletDebug=false
In this URL:
• host is the IP address of the host on which the Dashboard Application Services Hub server is
running.
• port is the port to access on the host on which the Dashboard Application Services Hub server is
running. By default this takes the value of 16311.
• domain is the domain you want to access with the tools.
For example,
https://test.itnm.com:16311/ibm/console/ncp_webtools/pages/ncp_wt_index.jsp?
domain=NCOMS&removeHttpHeader=true
&servletDebug=false
The Dashboard Application Services Hub Login page appears in the web browser.
2. Enter your username and password.
Note: Usernames and passwords are case-sensitive.
3. Click the Log In button.
The main WebTools menu appears. This provides access to the following web tools:
• General tools
• Cisco-specific tools
• Juniper-specific tools
Note: It is also possible to launch a web tool from a third-party application, such as a web page. To do
this, launch the desired web tool in Topoviz, copy the URL that Topoviz generates in the Address field of
your browser, and paste this URL to the third-party application.
Web Tool Commands executed Right-click menu option Menu option in the
main WebTools menu
Cisco show ip bgp summary Webtools > Information Tools Cisco Information Tool
Information Tool > View BGP Information > BGP information
show ip bgp flap-
– BGP
statistics
show ip bgp dampened-
paths
show ip bgp inconsistent-
as
show ip bgp neighbors
Cisco show ip interface brief Webtools > Information Tools Cisco Information
Information Tool > View Interfaces Tool > Interface
– Interface information
Cisco show isis neighbors Webtools > Information Tools Cisco Information Tool
Information Tool > View ISIS Information > ISIS information
show isis topology
– ISIS
Web Tool Commands executed Right-click menu option Menu option in the
main WebTools menu
Cisco show ip bgp vpn all flap- Webtools > Information Tools Cisco Information Tool
Information Tool statistics > View MBGP Information > MBGP information
– MBGP
show ip bgp vpn all
dampened-paths
show ip bgp vpn all
neighbors
show ip bgp vpn all paths
Cisco show ip rsvp interface Webtools > Information Tools Cisco Information Tool
Information Tool > View MPLS Information > MPLS information
show ip vrf detail
– MPLS
show mpls l2transport vc
show mpls forwarding-
table
Cisco show mpls traffic-eng Webtools > Information Tools Cisco Information Tool
Information Tool tunnels brief > View MPLS TE Information > MPLS TE Tunnel
– MPLS TE information (general)
show mpls traffic-eng
autoroute
Cisco show mpls traffic-eng Webtools > Information Tools Not available
Information Tool tunnels source > View MPLS TE Information
source
– MPLS TE (filtered)
(filtered)
show mpls traffic-eng
tunnels destination
destination
Cisco show mpls traffic-eng Webtools > Information Tools Not available
Information Tool link-management > View MPLS TE Link
summary
– MPLS TE Link Management Information
Management
show mpls traffic-eng
link-management
interfaces [interface]
Web Tool Commands executed Right-click menu option Menu option in the
main WebTools menu
Cisco show ip ospf Webtools > Information Tools Cisco Information Tool
Information Tool > View OSPF Information > OSPF Information
show ip ospf interface
– OSPF
show ip ospf neighbor
show ip ospf border-
routers
show ip ospf statistics
Cisco show ip protocols Webtools > Information Tools Cisco Information Tool
Information Tool > View Routing Summary > Routing summary
show ip route summary
– Routing Information
Summary show ip route static
show ip route eigrp
show ip route ospf
show ip route isis
Cisco show ip vrf list Webtools > Information Tools Cisco Information Tool
Information Tool > View VRF Information > VRF list
show ip vrf interfaces
– VRF List
Cisco Route show ip route target Cisco Tools… Diagnostic Cisco Routing
Information Tools… View a Route… Information
Tool
Cisco LSP Ping ping mpls ipv4 target Cisco Tools… Cisco LSP Ping
Tool verbose
Diagnostic Tools…
LSP Ping from this device…
Cisco VRF Ping ping vrf vrf_name ip Cisco Tools… Cisco VRF Ping
Tool target
Diagnostic Tools…
VRF Ping from this device…
Cisco LSP traceroute mpls ipv4 Cisco Tools… Cisco LSP Traceroute
Traceroute Tool target verbose
Diagnostic Tools…
LSP Traceroute from this
device…
Cisco VRF traceroute vrf vrf_name Cisco Tools… Cisco VRF Traceroute
Traceroute Tool ip target
Diagnostic Tools…
VRF Traceroute from this
device…
Namespaces
The Network Manager data model provides the following namespaces for designing reports.
Event
The Event namespace contains query subjects to create Current Status reports.
Monitoring Data
The Monitoring Data namespace contains query subjects to create Performance reports. The polled
data timestamp has a time dimension relationship to allow time dimension reports. The data for the
Monitoring Data namespace comes from the NCPOLLDATA database.
Network
The Network namespace contains query subjects to create Asset and Troubleshooting reports. The
data for the Network namespace comes from the NCIM database.
Network Views
The Network Views namespace contains query subjects to create reports about network views and
policies updating views. The data for the Network Views namespace comes from the NCPGUI and
NCMONITOR databases.
Path Views
The Path Views namespace contains query subjects to create Path Views reports.
Shared
The Shared namespace contains query subjects that can be shared to prevent query subject
duplicates.
Shared Dimensions
The Shared Dimensions namespace contains query subjects to create reports with Time Dimension.
Performance Value
The Performance Value namespace contains the performance value to build reports based on Time.
Monitoring Dimension
The Monitoring Dimension namespace contains the monitoring information to navigate through its
attributes.
Asset reports
Asset reports provide views on the discovered attributes of the network devices for inventory information.
To access the Asset reports, complete the following steps. Click the Reporting icon and select Common
Reporting. Within the widget, select Network Manager. A list of folders display. These folders contain all
Cognos reports for your access. Then click Asset Reports.
Report properties
The following table describes the Card Detail by Device Type report.
Report properties
The following table describes the Card Detail by Device Type report.
Discovery report
Displays the results of the network discovery organized by device vendor. The report displays a list of
vendor names. It lists device classes for each vendor.
Report properties
The following table describes the Discovery report.
Report properties
The following table describes the Interface Availability report.
Report properties
The following table describes the IP Addressing Summary report.
Report properties
The following table describes the Operating System by Device report.
Report properties
This is the Bandwidth Utilization report using snmpInBandwidth poll policy. The following table describes
the Bandwidth In Utilization report.
IfInDiscards report
Displays the ifInDiscards of the device.
Report properties
This is the Cognos Generic Trend Analysis report using ifInDiscards poll policy. The following table
describes the IfInDiscards report.
Report properties
This is the Cognos Generic Trend Analysis report using memoryPoll poll policy. The following table
describes the Memory usage report.
Report properties
This is the Cognos Generic Trend Analysis report using cpuBusyPoll poll policy. The following table
describes the CPU Usage report.
Monitoring reports
Monitoring reports provide a list of devices being polled under each monitoring policy to help you verify
that you are polling the correct devices for the correct information.
To access the Monitoring reports, complete the following steps. Click the Reporting icon and select
Common Reporting. Within the widget, select Network Manager. A list of folders display. These folders
contain all Cognos reports for your access. Then click Monitoring Reports.
Report properties
The following table describes the Monitoring Device Details report.
Report properties
The following table describes the Monitoring Policy Details report.
Report properties
The following table describes the Monitoring Summary report.
Report properties
The following table describes the BGP Details report.
Report properties
The following table describes the BGP Summary report.
Report properties
The following table describes the LTE Interfaces report.
Report properties
The following table describes the MPLS VPN Details report.
Report properties
The following table describes the MPLS VPN Summary report.
Report properties
The following table describes the VLAN Details report.
Report properties
The following table describes the Monitored Network Views report.
Report properties
The following table describes the IP Path Summary report.
Report properties
The following table describes the IP Routing Info report.
Report properties
The following table describes the MPLS TE Path Summary report.
Report properties
The following table describes the MPLS TE Routing Info report.
Performance reports
Performance reports allow you to view the last hour of performance data that has been collected
by the monitoring system for diagnostic purposes. In addition, the Device Summarization, Interface
Summarization, and Interface Availability Summarization reports allow you to view any historical
performance data that has been collected by the monitoring system. View trend and topN charts for
data to gain insight on short term behaviors.
To access the Performance reports, complete the following steps. Click the Reporting icon and select
Common Reporting. Within the widget, select Network Manager. A list of folders display. These folders
contain all Cognos reports for your access. Then click Performance Reports.
Note: The amount of historical data that the system can store and, consequently, the amount of historical
data that the Performance reports can display, is restricted by default to preserve report performance.
You can increase the storage limit for historical performance data; however, this can lead to a degradation
in the performance of the Performance reports.
Report properties
The following table describes the Bandwidth Top N report.
Report properties
The following table describes the Bandwidth Utilization report.
Report properties
The following table describes the Composite Trending report.
Report properties
The following table describes the Device Availability Summarization report.
Report properties
The following table describes the Device Summarization report.
Report properties
The following table describes the Historical SNMP Top or Bottom N report.
Report properties
The following table describes the Historical SNMP Trend Analysis Report.
Report properties
The following table describes the Historical SNMP Trend Quick View report.
Table 662. Properties of the Historical SNMP Trend Quick View report
Property Description
Typical uses Use this report to quickly list a set of selected
devices to be used as an index to drill down to see
a trend graph over time.
Prerequisites None
Report properties
The following table describes the Interface Availability Summarization report.
Report properties
The following table describes the Interfaces Summarization report.
Report properties
The following table describes the System Availability Summary report.
Troubleshooting reports
Troubleshooting reports help you identify problems while optimizing the discovery of the network as well
as help identify possible problems discovered in the network such as duplex mismatches.
To access the Troubleshooting reports, complete the following steps. Click the Reporting icon and select
Common Reporting. Within the widget, select Network Manager. A list of folders display. These folders
contain all Cognos reports for your access. Then click Troubleshooting Reports.
Report properties
The following table describes the Connected Interface Duplex Mismatch report.
Report properties
The following table describes the Devices Pending Delete on Next Discovery report.
Table 667. Properties of the Devices Pending Delete on Next Discovery report
Property Description
Typical uses If device has been removed from the network, it
will remain in the topology for x more discoveries,
where x is the value of the LingerTime variable for
the device in the topology database. This report
can show devices that you do not expect to be
deleted from the topology, and you can investigate
why they were not discovered.
Prerequisites None
Report properties
The following table describes the Devices with no SNMP Access report.
Report properties
The following table describes the Devices with Unclassified SNMP Object IDs report.
Table 669. Properties of the Devices with Unclassified SNMP Object IDs report
Property Description
Typical uses This report shows devices that could not be
classified properly by analyzing the ncim.mappings
table to check whether the sysObjectId is
recognized. You can then investigate whether the
Active Object Classes (AOCs) need to be modified
to be able to classify devices with these OIDs. For
example, the correct agents might not have been
run.
Prerequisites None
Report properties
The following table describes the Devices with Unknown SNMP Object IDs report.
Table 670. Properties of the Devices with Unknown SNMP Object IDs report
Property Description
Typical uses Use this report to identify devices with sysObjectId
that were not recognized. For example, Network
Manager might recognize the sysObjectID as
belonging to a specific vendor, but not the specific
model. Such devices are collected in the class
NetworkDevice. Update both the AOC files and the
ncim.mappings table in order to correctly classify
the device.
Prerequisites None
Utility reports
Utility reports display all discovered devices and their interfaces in different views.
To access the Utility reports, complete the following steps. Click the Reporting icon and select Common
Reporting. Within the widget, select Network Manager. A list of folders display. These folders contain all
Cognos reports for your access. Then click Utility Reports.
Report properties
The following table describes the Discovered Nodes and Interfaces Flat File List report.
GUI
The GUI encrypts the password for the NCIM topology database in the tnm.properties file using AES
encryption.
For more information about configuring the encryption key length, see Configuring encryption length and
type in the IBM Tivoli Network Manager IP Edition Installation and Configuration Guide.
Configuration files
Passwords are encrypted in configuration files using the DES3 algorithm.
Discovery
The discovery collectors use TLS v1.2 for the SSL connection to the Element Management system (EMS).
The discovery agents and the Webtools use the discovery helpers to connect to devices. The Telnet and
SNMP helpers use the following kinds of encryption:
• SSHv1
– DES3 encryption
– MD5 hashing
• SSHv2
– Hashing algorithms: hmac-sha1, hmac-sha2-256, hmac-sha2-512
– Key exchange: diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, diffie-hellman-group14-
sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512
– Encryption: ssh-rsa, ssh-des, 3des-cbc , aes128-cbc, aes128-ctr, aes192-ctr, aes256-ctr
• SNMPV3
– Secure Hash Algorithm (SHA2): SHA256
– Secure Hash Algorithm (SHA2): SHA512
FIPS-140-2 considerations
If FIPS 140–2 compliance is important to you, you must install Network Manager with a restricted set of
cryptographic algorithms by clearing the Additional cryptographic routines feature in the installer.
For more information, see FIPS 140-2 installations in the IBM Tivoli Network Manager IP Edition
Installation and Configuration Guide.
IBM Corporation
Trademarks
The terms in Table 672 on page 1027 are trademarks of International Business Machines Corporation in
the United States, other countries, or both:
Adobe, Acrobat, Portable Document Format (PDF), PostScript, and all Adobe-based trademarks are
either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, other
countries, or both.
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon,
Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or
its subsidiaries in the United States and other countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or
its affiliates.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Notices 1027
1028 IBM Tivoli Network Manager IP Edition: Reference
IBM®
Part Number:
(1P) P/N:
2024-4219-01