[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opennms-install
Subject:    Re: [opennms-install] Upgrade from 1.3.1 to 1.3.2 -- Failed DB
From:       DJ Gregor <dj () opennms ! org>
Date:       2007-01-12 19:22:00
Message-ID: 1CAC3EEB-3EA3-4010-8843-AEDC55A16389 () opennms ! org
[Download RAW message or body]

On Jan 12, 2007, at 12:43 PM, DJ Gregor wrote:
> This will delete the offending rows in ipInterface, but this isn't  
> a good idea unless these interfaces shouldn't be in the database  
> and they don't have any services that should be monitored or data  
> collected on them.
>
> delete from ipinterface where (nodeid, ifindex) in (select  
> ipinterface.nodeid, ipinterface.ifindex from ipinterface left join  
> snmpinterface on ipinterface.nodeid = snmpinterface.nodeid and  
> ipinterface.ifindex = snmpinterface.snmpifindex where  
> ipinterface.ifindex > 0 and snmpinterface.nodeid is null);
>
> I'm still looking into this some more.  One of the other  
> developer's has a box which shows a large number of ipInterface  
> rows that point at non-existent snmpInterface rows, and I'll be  
> taking a look at the data that he's gathered shortly.  It might be  
> the case that these are all (or mostly) bogus non-IP interfaces  
> (i.e.: an ifIndex changed on the device, but one of the records  
> didn't get updated).

Another option is to set the ifIndex on the ipInterface table to null  
(or -100, which signals a "lame" SNMP agent, instead of just not  
being able to find an SNMP agent on the device).

update ipinterface set ifindex = null where (nodeid, ifindex) in  
(select ipinterface.nodeid, ipinterface.ifindex from ipinterface left  
join snmpinterface on ipinterface.nodeid = snmpinterface.nodeid and  
ipinterface.ifindex = snmpinterface.snmpifindex where  
ipinterface.ifindex > 0 and snmpinterface.nodeid is null);

That's probably the best option, frankly, other than going through by  
hand and deleting ipInteface records or adding fake snmpInterface  
records for them.


	- djg

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-install mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-install
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic