Tutorial Discovery

From OpenNMS
Jump to: navigation, search

Automated Device Discovery

Getting OpenNMS to discover the devices on your network is a very simple process. As you saw in the section on Capability Scanning, all OpenNMS needs to add a device to its inventory is a newSuspect event containing the IP address of the device that you would like OpenNMS to scan.

While sending these events is easy, sending one for every address that you need to manage can be very tedious; as can entering every address into the OpenNMS GUI. For that reason OpenNMS has a couple of ways to automate the process.

Discovery Daemon

The simplest method of find IP addresses on your network is to write a simple loop that pings one address after another to see if it finds a response and send a newSuspect event for each one.

This is exactly what the OpenNMS Discovery daemon does. It pings every IP address in its configuration and sends itself a newSuspect event for each of those that respond and has not yet been added to OpenNMS's list of nodes.

You can't get much simpler than this.

The OpenNMS Discovery daemon can be configured with specific IP addresses and ranges of IP addresses. By default, Every 24 hours each of these addresses is pinged about once per second to determine if they exist on the network. Any new ones are added to OpenNMS by sending a newSuspect event.

Note.png Try It! Configure an Address Range

Let's try having OpenNMS ping all the addresses close to your management system.

First determine the IP address of your management system. (We'll use in this example.) We will configure Discovery with the class C range of your address (For this example, to

Go to the admin page in the OpenNMS web UI and then click "Configure Discovery", under the "Operations" section. In the Discovery Configuration GUI click on Add New in the Include Ranges section.

This will bring up a window like the one below. Fill it in with the begin and end address of your managements systems network and click 'Add'. After this return the main Discovery Configuration GUI and click Save & Restart Discovery.

Add Include Range Window

Assuming you have no other include ranges configured on this system it should take opennms about 5 minutes to ping all of those devices. After that time go look at the Node List and see the devices it has discovered.

Trap based Discovery

Our SNMP Trap daemon can be configured to send a newSuspect event whenever it receives an SNMP trap from a node that is does not recognize. Therefore all you need to do to discover nodes is to configure them to forward their traps to OpenNMS. When OpenNMS receives these traps it will automatically send a newSuspect event for the IP address that sent the trap.

Note.png Try It! Configure Trapd to Send New Suspect Events

To configure trapd to to send a newSuspect event when it receives a trap you need to edit $OPENNMS_HOME/etc/trapd-configuration.xml and make sure that the new-suspect-on-trapd is set to true.

<?xml version="1.0"?>
    <trapd-configuration snmp-trap-port="162" new-suspect-on-trap="true"/>

After this send a trap from a device that has not yet been discovered. If should then show up in the Node List.

These are the two simplest ways to have OpenNMS automatically discover your nodes.

Though automatic discovery is a simple way to get devices into OpenNMS. Take a look at the Provisioning Feature of OpenNMS for more fine grained control of exactly what gets discovered and added to OpenNMS.

Next-arrow.png Next Step: Data Collection

This tutorial is still under construction. Next you will want to learn to configure polling, but we are still writing that section, so please come back in a day or two and it should be available. In the meantime, let's discuss data collection next.