Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-7396

Notifications with asset fields on the message are not working

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 15.0.0
    • Fix Version/s: 15.0.1
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:

      Description

      After upgrading from 14.0.3 notifications are no longer sent.

      Only have the following in notifications.xml:

      <notifications xmlns="http://xmlns.opennms.org/xsd/notifications">
          <header>
              <rev>1.2</rev>
              <created>den 29 januari 2015 14:23:10 GMT</created>
              <mstation>localhost</mstation>
          </header>
          <notification name="nodeLostService" status="on" writeable="yes">
              <uei>uei.opennms.org/nodes/nodeLostService</uei>
              <rule>(catincS-Production)</rule>
              <destinationPath>Jourgruppen</destinationPath>
              <text-message>The %service% service poll on interface %interfaceresolve% (%interface%) &#xd;
      on node %nodelabel% failed at %time%. &lt;br&gt;&#xd;
      &lt;br&gt;&#xd;
      Customer: %asset[division]%&lt;br&gt;&#xd;
      Site: %asset[department]%&lt;br&gt;&#xd;
      Rack: %asset[rack]%&lt;br&gt;&#xd;
      Group: %asset[notifycategory]%&lt;br&gt;&#xd;
      &lt;br&gt;&#xd;
          </text-message>
              <subject>Notice #%noticeid%: %service% down on %interfaceresolve% (%interface%) on node %nodelabel%.</subject>
              <numeric-message>Notice #%noticeid%: %service% down on %interfaceresolve% (%interface%) on node %nodelabel% at %time%. Customer: %asset[division]% Site: %asset[department]%</numeric-message>
          </notification>
      </notifications>
      

      I can see the following in the notifd.log:

      2015-01-29 15:54:00,197 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.n.BroadcastEventProcessor: notify status for service SNMP on interface/node 10.1.1.126/1779 is 'Y', continuing...
      2015-01-29 15:54:00,197 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.c.NotificationManager: Checking notification uei.opennms.org/nodes/nodeLostService against event 101939189 with UEI uei.opennms.org/nodes/nodeLostService
      2015-01-29 15:54:00,197 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.c.NotificationManager: Checking event severity: null against notification severity: Minor
      2015-01-29 15:54:00,197 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.f.JdbcFilterDao: Filter.isRuleMatching((((catincS-Production)) & (nodeId == 1779) & (ipAddr == '10.1.1.126') & (serviceName == 'SNMP')))
      2015-01-29 15:54:00,198 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.f.JdbcFilterDao: Filter.isRuleMatching((((catincS-Production)) & (nodeId == 1779) & (ipAddr == '10.1.1.126') & (serviceName == 'SNMP'))): SQL statement: SELECT DISTINCT ipInterface.ipAddr FROM ipInterface JOIN node ON (ipInterface.nodeID = node.nodeID) JOIN ifServices ON (ipInterface.id = ifServices.ipInterfaceId) JOIN service ON (ifServices.serviceID = service.serviceID) WHERE (((node.nodeID IN (SELECT category_node.nodeID FROM category_node, categories WHERE categories.categoryID = category_node.categoryID AND categories.categoryName = 'S-Production'))) AND (node.nodeId = 1779) AND (ipInterface.ipAddr = '10.1.1.126') AND (service.serviceName = 'SNMP')) LIMIT 1
      2015-01-29 15:54:00,199 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.f.JdbcFilterDao: isRuleMatching: rule "(((catincS-Production)) & (nodeId == 1779) & (ipAddr == '10.1.1.126') & (serviceName == 'SNMP'))" matches an entry in the database
      2015-01-29 15:54:00,199 DEBUG [Notifd:BroadcastEventProcessor-Thread] o.o.n.c.NotificationManager: Event nodeLostService matched notice uei.opennms.org/nodes/nodeLostService
      2015-01-29 15:54:00,204 WARN  [Notifd:BroadcastEventProcessor-Thread] o.o.n.e.EventIpcManagerDefaultImpl: run: an unexpected error occured during ListenerThread Notifd:BroadcastEventProcessor
      org.hibernate.LazyInitializationException: could not initialize proxy - no Session
          at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
          at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
          at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
          at org.opennms.netmgt.model.OnmsNode_$$_jvst8d4_20.getLabel(OnmsNode_$$_jvst8d4_20.java) ~[opennms-model-15.0.0.jar:?]
          at org.opennms.netmgt.eventd.EventUtilDaoImpl.getAssetFieldValue(EventUtilDaoImpl.java:78) ~[org.opennms.features.events.daemon-15.0.0.jar:?]
          at org.opennms.netmgt.eventd.AbstractEventUtil.getValueOfParm(AbstractEventUtil.java:554) ~[org.opennms.features.events.daemon-15.0.0.jar:?]
          at org.opennms.netmgt.eventd.AbstractEventUtil.expandParms(AbstractEventUtil.java:933) ~[org.opennms.features.events.daemon-15.0.0.jar:?]
          at org.opennms.netmgt.eventd.AbstractEventUtil.expandParms(AbstractEventUtil.java:877) ~[org.opennms.features.events.daemon-15.0.0.jar:?]
          at org.opennms.netmgt.notifd.BroadcastEventProcessor.nullSafeExpandedPut(BroadcastEventProcessor.java:733) ~[opennms-services-15.0.0.jar:?]
      
          at org.opennms.netmgt.notifd.BroadcastEventProcessor.buildParameterMap(BroadcastEventProcessor.java:717) ~[opennms-services-15.0.0.jar:?]
          at org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:531) ~[opennms-services-15.0.0.jar:?]
          at org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:201) ~[opennms-services-15.0.0.jar:?]
          at org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$EventListenerExecutor$2.run(EventIpcManagerDefaultImpl.java:176) [org.opennms.features.events.daemon-15.0.0.jar:?]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_76]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_76]
          at org.opennms.core.concurrent.LogPreservingThreadFactory$2.run(LogPreservingThreadFactory.java:106) [opennms-util-15.0.0.jar:?]
          at java.lang.Thread.run(Thread.java:745) [?:1.7.0_76]
      

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              kcbark Kalle Carlbark
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: