OpenNMS 1.3.2

From OpenNMS
(Redirected from OpenNMS 1.3)
Jump to: navigation, search

OpenNMS 1.3 (2.0 development branch)


OpenNMS 1.3 is the development branch that will become OpenNMS 2.0. To anticipate the question, 2.0 will be released when it is ready. The plan is for the first part of 2007.

There are a number of very significant changes in 1.3.2 from all previous versions of OpenNMS. The default install directory is now /opt/opennms (all lower case). JRobin is the default data storage method (although RRDTool is still supported). There is also a new GUI.

New Features

Most of the new features can be found on New and noteworthy.

Known Issues

Known issues are always tracked in Bugzilla. Anything affecting 1.3.2 or CVS unstable applies to the 1.3.2.

Database Changes

The database in 1.3 has added a lot of indexes and other checks to insure that it is internally consistent. This implies that it is possible to have an OpenNMS database that isn't, so when hitting some installer problems on the new code here are some steps to take.

See Bugzilla bug #1570 for some more details on this issue.

Duplicate keys

If you get this error:

Unique index '<name>' cannot be added to table '<table>' because <count> rows are not unique. See the install guide for details on how to correct this problem. You can use the following SQL to see which rows are not unique: ...

It most likely happens on the ipInterface or ifServices tables.

Remove any duplicates from the ipinterface table.

SELECT ctid,* FROM ipInterface WHERE ( nodeID, ipAddr ) IN ( SELECT nodeID, ipAddr 
FROM ipInterface 
GROUP BY nodeID, ipAddr 
HAVING count(nodeID) > 1 AND ( ipAddr != '' ) ORDER BY nodeID, ipAddr ) ORDER BY nodeID, ipAddr;

This may return something like:

   ctid   | nodeid |     ipaddr      | ifindex |   iphostname    | ismanaged | ipstatus | iplastcapsdpoll | issnmpprimary 
 (745,62) |     15 |    |         |    | M         |        1 |                 | S
 (745,61) |     15 |    |         |    | M         |        1 |                 | S
 (746,61) |   2151 |    |         |    | M         |        1 |                 | S
 (746,60) |   2151 |    |         |    | M         |        1 |                 | S

So to get rid of this duplicates, remove one of the entries from each pair:

DELETE FROM ipInterface WHERE ctid in ( '(745,62)', '(746,61)' );

Repeat for ifServices:

SELECT ctid,* FROM ifservices WHERE ( nodeID, ipAddr, serviceId ) IN ( SELECT nodeID, ipAddr, serviceId 
FROM ifservices 
GROUP BY nodeID, ipAddr, serviceId 
HAVING count(nodeID) > 1 ORDER BY nodeID, ipAddr, serviceId ) ORDER BY nodeID, ipAddr, serviceId;

Foreign key constraint violation

If you get this error:

Table <table> contains <count> rows (out of <total>) that violate new constraint <name>. See the install guide for details on how to correct this problem. You can execute this SQL query to see a list of the rows that violate the constraint: ...

You can use the "-C <name> -X" options to the installer to remove the offending rows.

Other changes that might be useful

  • Set all non-positive ifIndex values to null
UPDATE ipinterface SET ifindex=null WHERE ifindex < 0;
UPDATE ifservices SET ifindex=null WHERE ifindex < 0;
UPDATE snmpinterface SET snmpifindex=null WHERE snmpifindex < 0;
  • Delete any outages that now reference bad ifservices records
delete from outages where (nodeid, ipaddr, serviceid) in 
   (SELECT outages.nodeid, outages.ipaddr, outages.serviceid 
    FROM outages LEFT JOIN ifservices 
    ON (outages.nodeid = ifservices.nodeid AND outages.ipaddr = ifservices.ipaddr 
        AND outages.serviceid = ifservices.serviceid) 
        WHERE ifservices.nodeid is NULL AND outages.nodeid IS NOT NULL 
        AND outages.ipaddr IS NOT NULL AND outages.serviceid IS NOT NULL);