IBM Support

DiscoScope. I made changes, is that what is blocking an IP address in discovery?

Technical Blog Post


Abstract

DiscoScope. I made changes, is that what is blocking an IP address in discovery?

Body

With IBM Tivoli Network Manager if a scopeless discovery is not used the DiscoScope configuration file can be very large.   It can contain inclusions and exclusions.   How can I tell if an IP address should pass through the DiscoScope and be discovered?

First create a new test stitcher.    You don't have to name it after me.

Place it in $PRECISION_HOME/disco/stitchers

//
//
UserDefinedStitcher
{
        //
        //      When does the stitcher start
        //
        StitcherTrigger
        {
                //
        }

        //
        //      What does it do
        //
        StitcherRules
        {
        text address = '192.160.0.10';
        text mask = '255.255.255.255';
        int protocol = 1;
        int inScope = 0;

        inScope = ExecuteStitcher('IsInScope',
                    address, mask, protocol);

        mask = NULL;
        inScope = ExecuteStitcher('IsInScope',
                    address, mask, protocol);
        }
}
 

I'm saving this to TestScopeKen.stch.

Leave the mask at 255, because you are checking only a single IP address, the 192.168.0.10

I recommend testing this when a discovery is finished.   At that time your ncp_disco process should be at debug 4, or you can use kill -usr2 to bump the process to debug 4.

In one window, start a tail on that trace file in $NCHOME/log/precision

[root@nc9053115085 precision]# tail -f ncp_disco.PCOM39.trace | grep "CDiscoScopeTable::AllowRange returning"
 

In another window, go into your -service disco and insert your stitcher.

[root@server bin]# pwd
/opt/IBM/tivoli/netcool/precision/bin
[root@server bin]# !?service di
./ncp_oql -username admin -service disco -domain PCOM39 -latency 123456
ncp_oql ( IBM Tivoli Network Manager OQL Interface )
Copyright (C) 1997 - 2010 By IBM Corporation.  All Rights Reserved.  See product license for details.

IBM Tivoli Network Manager Version 3.9 (Build 97) created by ncpbuild at 17:09:54 Fri Feb  8 GMT 2013

Using no authentication
|server:1.> insert into stitchers.actions (m_Name) values ('TestScopeKen');
|server:2.> go
.
( 0 record(s) : Transaction complete )
|server:1.>
 

Now go back to your first window.

[root@server precision]#
tail -f ncp_disco.PCOM39.trace | grep "CDiscoScopeTable::AllowRange returning"
CDiscoScopeTable::AllowRange returning true for 192.168.0.10/0x20

If the output is true, then this IP would successful pass through the DiscoScope file.   If the return is false, then either there is an exclusion in the DiscoScope file, or perhaps the wrong subnet mask is in the DiscoScope file.

Simply edit this Test stitcher to test other IP addresses.
 

 

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11082223