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

Event notification filter validation does not match execution

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Medium
    • Resolution: Unresolved
    • 30.0.1
    • None
    • Security Level: Default (Default Security Scheme)
    • CentOS 7
      Installed from RPM
    • Backlog

    Description

      When configuring an event notification with a filter, say:

      !(IPADDR IPLIKE 10.10..)

      Upon validation we are presented a list with all node IPs that are NOT 10.10.., which is correct.  However, if a node within 10.10.. also has an unmonitored additional IP, that is included, notifications will be sent.  Therefor the Validation display and the execution of a notification differ.

      Likely the notification filter should be updated so that it uses the same query as the validation display so users are not surprised when they get erroneous notifications, hard to have the UI telling you one thing and the backend doing another.

      E.g.:

      opennms=# SELECT DISTINCT ipInterface.ipAddr FROM ipInterface JOIN node ON (ipInterface.nodeID = node.nodeID) WHERE ((( NOT (IPLIKE(ipInterface.IPADDR, '10.10.*.*')) AND (ipInterface.IPADDR != '10.255.255.2'))) AND (node.nodeId = 396)) LIMIT 1;
          ipaddr    
      --------------
       30.59.152.66

       

      Should probably include the issnmpprimary filter which I suspect the UI Validate list is using:

       

      opennms=# SELECT DISTINCT ipInterface.ipAddr FROM ipInterface JOIN node ON (ipInterface.nodeID = node.nodeID) WHERE ((( NOT (IPLIKE(ipInterface.IPADDR, '10.10.*.*')) AND (ipInterface.IPADDR != '10.255.255.2'))) AND (node.nodeId = 396) AND (ipInterface.issnmpprimary = 'P')) LIMIT 1;
       ipaddr 
      --------
      (0 rows)

       

      This query would match the validation, should be a quick fix?

      Attachments

        Activity

          People

            Unassigned Unassigned
            Harvanek Scott Harvanek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: