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

JdbcEventUtil should not set distPoller to "undefined"

    Details

    • Sprint:
      NMS Sprint 1

      Description

      If an incoming event does not have the "dpName" property set, then JdbcEventWriter will set the distPoller field for the event to the string "undefined". Because there is no row in the distPoller table with the key "undefined", this can break some database mappings. For instance, if you call OnmsEvent.getDistPoller() or OnmsAlarm.getDistPoller() (for alarms that have been rolled up from events), these calls will throw an exception that no row in the distPoller table can be found.

      We should change JdbcEventWriter to set the distPoller key to "localhost" instead since this is the default row that is inserted into the distPoller table.

      We should also write a liquibase migration that updates the value in all existing events and alarms.

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: