threshd,log shows wrong nodeId in certain circumstances
Description
threshd,log can show the wrong nodeId under certain circumstances. I found it in the following way. Delete a node and re-add it with a new suspect event. In the ipinterface table, all the interfaces under the old nodeId will be marked for deletion. The interfaces will also show up under the new nodeId as we would expect.
Then while getting snmp thresholding to work, The discrepancy showed up in threshd.log in the following line:
2004-12-29 15:03:40,440 DEBUG [ThreshdScheduler-5 Pool-fiber0] ThresholdableService: sendEvent: Sent event uei.opennms.org/nodes/thresholdingSucceeded for 449/128.193.10.6/SNMP
449 was the old nodeId, the new one is 510. Other lines in the log hae the correct nodeId. It looks like somewhere the nodeId is being retrieved from the database without excluding interfaces marked 'D', but I dug around in the source for awhile without tracking it down. I'll attach a bigger piece of the log file.
Version: 1.1.5-0.20041221.0 Server Time: Thu Dec 30 12:30:20 PST 2004 Client Time: Thu Dec 30 2004 12:30:21 GMT-0800 (PST) Java Version 1.4.2_06 Sun Microsystems Inc. Java Virtual Machine: 1.4.2_06-b03 Sun Microsystems Inc. Operating System: Linux 2.6.7-osu-2 (i386) Servlet Container: Apache Tomcat/4.1 (Servlet Spec 2.3) User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Firefox/0.8
Environment
Operating System: Linux
Platform: PC
Acceptance / Success Criteria
None
Attachments
1
Lucidchart Diagrams
Activity
Show:
Seth Leger August 3, 2011 at 11:58 AM
I found a SQL query in Threshd.java that was not restricting the results to active (status=A) services in the ifservices table. I added this restriction which should fix this bug. Marking as fixed.
commit b00cf2753f27444fba7d27141f70f158f8dbade0
Benjamin Reed October 6, 2008 at 11:52 AM
moving to 1.6.1 target milestone; only things left pending for 1.6.0 are blocker-level bugs
Bill Ayres December 30, 2004 at 2:32 PM
Created an attachment (id=135) snippet from threshd.log
threshd,log can show the wrong nodeId under certain circumstances. I found it in
the following way. Delete a node and re-add it with a new suspect event. In the
ipinterface table, all the interfaces under the old nodeId will be marked for
deletion. The interfaces will also show up under the new nodeId as we would expect.
Then while getting snmp thresholding to work, The discrepancy showed up in
threshd.log in the following line:
2004-12-29 15:03:40,440 DEBUG [ThreshdScheduler-5 Pool-fiber0]
ThresholdableService: sendEvent: Sent event
uei.opennms.org/nodes/thresholdingSucceeded for 449/128.193.10.6/SNMP
449 was the old nodeId, the new one is 510. Other lines in the log hae
the correct nodeId. It looks like somewhere the nodeId is being retrieved from
the database without excluding interfaces marked 'D', but I dug around in the
source for awhile without tracking it down. I'll attach a bigger piece of the
log file.
Version: 1.1.5-0.20041221.0
Server Time: Thu Dec 30 12:30:20 PST 2004
Client Time: Thu Dec 30 2004 12:30:21 GMT-0800 (PST)
Java Version 1.4.2_06 Sun Microsystems Inc.
Java Virtual Machine: 1.4.2_06-b03 Sun Microsystems Inc.
Operating System: Linux 2.6.7-osu-2 (i386)
Servlet Container: Apache Tomcat/4.1 (Servlet Spec 2.3)
User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506
Firefox/0.8