Syslog Northbounder runs in a NullPointerException
Description
Acceptance / Success Criteria
Attachments
Lucidchart Diagrams
Activity

Alejandro Galue April 25, 2014 at 11:13 AM
Fixed on revision da8a1017abf5969a31edb24997c8be87ba1272a8.
This was an easy fix.
The Syslog Northbounder was assuming that an OnmsAlarm has always parameters, which is not correct.

Peter Eckel April 24, 2014 at 12:36 PM
Update:
My last comment doesn't seem to get everything covered.
Now, I get syslog messages for some alerts, but not for all. It seems to be depending on the uei, as I invariably get the alerts for e.g. uei.opennms.org/internal/importer/importSuccessful and uei.opennms.org/internal/authentication/failure, but never for e.g. uei.opennms.org/nodes/nodeLostService.
There are messages regarding this in alamd.log:
2014-04-24 16:26:15,206 ERROR [SyslogNBI:org.opennms.netmgt.alarmd.northbounder.syslog.SyslogDestination@26cbb7db-Thread] SyslogNorthbounder: Caught exception sending to destination: SEC
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
at org.opennms.netmgt.model.OnmsServiceType_$$javassist_27.getName(OnmsServiceType$$_javassist_27.java)
at org.opennms.netmgt.alarmd.northbounder.syslog.SyslogNorthbounder.createMapping(SyslogNorthbounder.java:227)
at org.opennms.netmgt.alarmd.northbounder.syslog.SyslogNorthbounder.forwardAlarms(SyslogNorthbounder.java:170)
at org.opennms.netmgt.alarmd.api.support.AbstractNorthbounder.run(AbstractNorthbounder.java:139)
at java.lang.Thread.run(Thread.java:662)

Peter Eckel April 2, 2014 at 6:45 AM
I just ran a test with sendEvent.pl.
1. send-event.pl --interface 10.2.3.30 uei.opennms.org/nodes/nodeDown
does not work, error message is the same as observed by Ronny. The error seems to suggest that the northbounder can't process the parameters (there aren't any), so I gave it a dummy parameter:
2. send-event.pl --interface 10.2.3.30 uei.opennms.org/nodes/nodeDown -p dummy
Now there's no error message and the alert is forwarded to Syslog (parameters missing, but that's no surprise):
Apr 2 10:38:48 sinnvmonpapc02.neosventures.com <local0:err> OpenNMS: ALARM ID:2 NODE:; Node is down.
All in all it seems that the syslog northbounder has a problem when there are no parameters at all. If any parameter is present, the general mechanism works.

Ronny Trommer February 5, 2014 at 12:12 PM
Configuration files for Syslog northbounder and rsyslog receiving TCP syslog messages on TCP/127.0.0.1:514
Details
Assignee
Alejandro GalueAlejandro GalueReporter
Ronny TrommerRonny TrommerLabels
Components
Sprint
NoneFix versions
Affects versions
Priority
Major
Details
Details
Assignee

Reporter

Labels
Components
Sprint
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

I tried to build a minimal setup to use the Syslog-Northbounder to forward Alarms to a syslog server. I build a minimal setup on CentOS 6.5 with rsyslog. The configuration from my rsyslog daemon is attached on the issue. I've also attached my syslog-northbounder-configuration.xml. In my example the rsyslog server is running on localhost listening on TCP/127.0.0.1:514. Syslogd in OpenNMS is not running. The setup is just in a test environment so I don't filter UEI's and want to forward all generated OpenNMS Alarms to syslog. In Alarmd log file the following error message appears after creating an outage for a node by setting a null route to the IP address.
This issue can be verified running the OpenNMS Vagrant box and using the two configuration files attached to this issue. http://www.opennms.org/wiki/OpenNMS_and_Vagrant_with_VirtualBox