nv-l
[Top] [All Lists]

Re: [NV-L] Making a smart set based on ip's

To: Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
Subject: Re: [NV-L] Making a smart set based on ip's
From: Greg Keetch <gkeetch@ca.ibm.com>
Date: Tue, 22 May 2007 08:40:19 -0700
Delivery-date: Tue, 22 May 2007 16:41:44 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <OF84F1D18D.AADABB49-ON882572E3.0052F8CE-882572E3.0054F23E@ca.ibm.com>
List-help: <mailto:nv-l-request@lists.ca.ibm.com?subject=help>
List-id: Tivoli NetView Discussions <nv-l.lists.ca.ibm.com>
List-post: <mailto:nv-l@lists.ca.ibm.com>
List-subscribe: <http://lists.ca.ibm.com/mailman/listinfo/nv-l>, <mailto:nv-l-request@lists.ca.ibm.com?subject=subscribe>
List-unsubscribe: <http://lists.ca.ibm.com/mailman/listinfo/nv-l>, <mailto:nv-l-request@lists.ca.ibm.com?subject=unsubscribe>
Reply-to: Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
Sender: nv-l-bounces@lists.ca.ibm.com

Hello again,

I notice I made a couple of mistakes in this (I guess that's what happens when you try doing too many things at once ;-).

With the subnet calculation thing, it may be calculating based on IP Address/Subnet Mask, or, it may be basing the information on nodes that are appear in specific subnets in NetView (which would have to be based on the TopM Network/Segment ID fields associated with the interface objects in the OV Object Database).

In my contiguous subnet example, I should have used an OR (||) instead of AND (&&):
# nvUtil e '((IN_SUBNET 192.168.254.0) || (IN_SUBNET 192.168.254.1))'

Apologies for the errors.

Regards,
Greg Keetch
IT Specialist (Advisor), Network Services
Network Management Tools Specialist
Information Technology Services Americas (ITSA), Global Services, IBM Canada

Inactive hide details for Greg Keetch/CanWest/IBM@IBMCAGreg Keetch/CanWest/IBM@IBMCA


          Greg Keetch/CanWest/IBM@IBMCA
          Sent by: nv-l-bounces@lists.ca.ibm.com

          05/22/2007 08:27 AM
          Please respond to
          Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>


To

Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>

cc


Subject

Re: [NV-L] Making a smart set based on ip's

Hello,

One thing you need to keep in mind with when using the "SNMP ipAddress" field is that it will only work for single interface devices. If you are trying to get a list of multiple interface devices you will need to approach this differently.

One method using nvUtil is (which can be used for creating a smartset):
# nvUtil e '(IN_SUBNET 19.39.0.0)'

The only problem with this is that it is based on a calculation of IP Address and Subnet Mask to determine which hosts match. If there are incorrect Subnet Masks results could be incorrect. This calculation thing also means that you would need to have more than one entry if you were looking addresses in a contiguous set of subnets... eg. ((IN_SUBNET 192.168.254.0) && (IN_SUBNET 192.168.254.1))


If you are just wanting to get this list from the command line or a script, a .format file with the nvdbformat command could be used:
###########################################################
#
# NVDBFormat interface listing .format file
# Modified version of interfaces.format
#
# Usage: nvdbformat -f <filename>
#
# If this file were named 'interfaces.format' it would be processed by:
#
# nvdbformat -f interfaces.format
#
###########################################################
SELECTRULE:isInterface=TRUE
SELECTRULE:IP Address~19.39.*.*
SELECTFIELD:1:TopM Node ID:Selection Name
SELECTFIELD:2:IP Address
SELECTFIELD:3:IP Subnet Mask
SELECTFIELD:4:IP Status
#
GROUPBY:1:TopM Node ID:Selection Name
SORTBY:1:IP Address
#
HEADER:Interface List by Selection Name
HEADER:Selection Name,IP Address,IP Subnet Mask,IP Status
#
OUTPUT:${1},${2},${3},${4}
#

With some modification and cron, this could be used to create/maintain a smartset with a list of nodes that meet fit.
# run nvdbformat command to get Selection Name list
# run nvUtil command to create a smartset with the selection names: nvUtil a "Smartset Name" "description" "(IN '"host1" "host2"')"

Hope this helps.

Regards,

Greg Keetch

IT Specialist (Advisor), Network Services
Network Management Tools Specialist
Information Technology Services Americas (ITSA), Global Services, IBM Canada


Inactive hide details for Leslie Clark <lclark@us.ibm.com>Leslie Clark <lclark@us.ibm.com>

                  Leslie Clark <lclark@us.ibm.com>
                  Sent by: nv-l-bounces@lists.ca.ibm.com

                  05/22/2007 07:54 AM

Please respond to
Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
To

Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>
cc
Subject

Re: [NV-L] Making a smart set based on ip's


Look at the object info for a node. Nodes don't have a field 'IP Address'. That's an attribute of an interface. So you are getting a list of Selection Names of interfaces or Networks.

Nodes do have a field called 'SNMP ipAddress'.


Cordially,

Leslie A. Clark
IT Services Specialist, Network Mgmt
Information Technology Services Americas
IBM Global Services
(248) 552-4968 Voicemail, Fax, Pager


"Kain, Becki \(B.\)" <bkain1@ford.com>
Sent by: nv-l-bounces@lists.ca.ibm.com

05/22/2007 09:51 AM


Please respond to
Tivoli NetView Discussions <nv-l@lists.ca.ibm.com>

To
"Tivoli NetView Discussions" <nv-l@lists.ca.ibm.com>
cc
Subject
[NV-L] Making a smart set based on ip's




I tried making a smartset based on ip's:

nvUtil e '("IP Address" ~ "19.39.*.*")'

But the results that I get are not nodes but something else:
sdg100344q3b1.itek.ford.com:19.39.25.75
sdg100g3tfmb1.itek.ford.com:19.39.40.103
SEP001380AD917D.itek.ford.com:19.39.50.110

How do I make a smartset, based on a range of ip's, AND get actual nodes in it? Thanks in advance


_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com

http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to internal IBM'ers only)_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com

http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to internal IBM'ers only)_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to internal IBM'ers only)

GIF image

_______________________________________________
NV-L mailing list
NV-L@lists.ca.ibm.com
Unsubscribe:NV-L-leave@lists.ca.ibm.com
http://lists.ca.ibm.com/mailman/listinfo/nv-l (Browser access limited to 
internal IBM'ers only)
<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web