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

Use node category membership in Drools rules for alarms

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 23.0.0, 23.0.1, 23.0.2
    • Fix Version/s: 24.0.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - March 6th 2019, Horizon - March 13th 2019, Horizon - March 20th 2019, Horizon - March 27th 2019

      Description

      Example automation we would like to accomplish with Drools rules:

      <automation name="escalationEMERGENCYF0" interval="30000" active="true"
                      trigger-name="selectEmergencyF0NodeAlarms"
                      action-name="escalateAlarm"
                      action-event="sendAlarmEscalatedEvent" />
      
       <trigger name="selectEmergencyF0NodeAlarms" operator=">=" row-count="1" >
            <statement>
                SELECT a.alarmid AS _alarmid,
                       now() AS _ts
                  FROM alarms a
       LEFT JOIN category_node cn
                    ON cn.nodeid = a.nodeid
       LEFT JOIN categories ca
                    ON ca.categoryid = cn.categoryid
                 WHERE ( a.eventuei = 'uei.opennms.org/nodes/nodeDown'
                         OR a.eventuei = 'uei.opennms.org/nodes/interfaceDown')
                   AND ca.categoryname = 'EMERGENCY_F0'
                   AND severity > 3
                   AND severity < 7
            </statement>
          </trigger>
      

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: