5.2 ADDITIONAL DISCOVERY METHODSYou may be interested additional discovery techniques for a couple of reasons: Perhaps your network has limited SNMP devices, or maybe you missed a few devices in your seed file, or new devices have been added to the network that you would like to include in your management domain. Here are two additional ways to discover devices: you can use loadhosts, which is similar to using a seed file in that you must create an input file. You can also add devices via the NNM GUI, which can be labor-intensive if you plan to add more than a few devices. Neither of these two methods requires restarting background processes, which is required when using a seed file. 5.2.1 Discovery using loadhostsAfter the network has been discovered, you can use the loadhosts command to add additional devices to the NNM database. Although the use of a seed file accomplishes the same end result, loadhosts is useful in the following situations:
If you have a list of devices with an arp cache and the SNMP community names are public (or you know the community names), either a seed file or loadhosts will work for you. If the devices don't have an arp cache or the community names are unknown, you will need to build a list of all devices (not just the ones that would be listed in the seed file) that you would like NNM to discover. The input file for loadhosts is an ASCII file in the format of the /etc/hosts file. To use the loadhosts command, issue the following commands:
Each system in the file will be discovered by NNM and placed into NNM's databases and displayed on a submap and in Dynamic Views. NNM will perform the status and configuration queries on the device. A sample loadhosts file is available for download from the server http://www.phptr.com/title/0130352098 for both UNIX and Windows systems. Obtain the Readme file this chapter for a description of the files available and install procedures. 5.2.2 Discovery via the NNM GUIManual discovery of network devices can be done from within the NNM GUI by adding devices to the appropriate submap. Why might you want to manually add a device instead of discovering it with a seed file or using loadhosts ? You might be doing third-party monitoring and need to add a critical device that does not reside on any of the currently discovered networks and was not previously added in the seed file. The distinct advantage that the seed file provides is that you can put hundreds of entries in it and netmon will take care of the discovery of these devices. It may take hours to add hundreds of devices manually. The seed file requires stopping the background processes; manually adding devices does not. You probably wouldn't want to use the GUI to manually discover more than a couple of devices. Although, if you are adding a device such as a router, you may find that a great many more devices (located "behind" the router) are discovered. The seed file is also reproducible. If you ever need to delete the database, the seed file automates the discovery of specific nodes. If you've added nodes manually, you will either want to create a seed file or re-add them after network re-discovery. To manually add a gateway or router, select from the Internet submap Edit Figure 5-1. To add a router or gateway, select the Symbol Class Connector and drag the Symbol Subclass Gateway to the IP Internet submap.Figure 5-2. To populate the router information, select the IP Map attribute and click the[Set Object Attributes…] button. To add an object to be managed by NNM to the Internet submap, double-click "IP Map" from the Add Object dialog box shown in Figure 5-2. (You can also select "IP Map" and click [Set Object Attributes] .) You will see the set attribute dialog box shown in Figure 5-3. Fill in the device IP address and subnet mask and click the [Verify] button. After clicking [OK] in dialog box shown in Figure 5-3 and then in Figure 5-2, one of the following four things will occur on the Internet submap: If the device responds to NNM's SNMP queries, all other fields in the dialog box will be populated, including the Selection Name and Label, and will be set to the hostname of the device. If the device responds to ping but not to SNMP, the symbol will be set to the Computer Class and Generic Subclass. If the device does not respond to ping or SNMP but is a valid device for the submap, the symbol will be added to the submap with a reflecting status of Unknown (Blue). If the device is not valid for the submap, such as adding a Gateway to a node level submap, the symbol will display with shading around the lower and right edges. This is a visual indicator that the object resides in the user plane and is not being managed by the controlling application "IP Map." Figure 5-3. Set the IP address and Subnet Mask fields of the device and click[Verfiy] . At this point, NNM will send a series of SNMPGETs to the specified device. If the device responds, the remaining fields (Selection Name, Label, and Physical address) will be populated. Chapter 6, "Customizing NNM from the GUI." |