hawkular

hawkular alert triggers do not fire


This is my test environment: - Hawkular Services 0.30 - Ubuntu Desktop 16.04.1 LTS running over VMWare - Apache Cassandra 3.9

I can send data to the metrics engine without no error, and the data is correctly stored. I checked it against the grafana plugin and with the csql cassandra client.

My problem is when trying the alerting engine, triggers are not fired. I have started from the very first example in the Quick Start Guide from Hawkular Services, the ADD Metrics point.

I can create the trigger, and I can see it in the cassandra store, I can recover it from the rest api, but it is never fired when data meeting the conditions is sended.

I have been trying creating another tenants, kind of triggers, events and alerts, sending loads of data ... but the result is exactly the same, the trigger is not fired.

I know the problem is not in the dumpening configuration, as it is said in the documentation

Note that default dampening for triggers is Strict(1). Which just means that by default a trigger fires every time it’s condition set evaluates to true.

The code of the trigger is this one. But I have tried creating another ones, with same result.

I know the email plugin is default configured to use a localhost:25 smtp server, which it is not installed in my environment. But I should see something in the log. The actions executed, at least, as explained in the docs. Just to clarify, these logs are not from me, but from the documentation. I have also changed the mail configuration in the wildfly standalone.xml file, to use my gmail account and its smtp server, but no mail received again.

11:59:37,361 INFO [org.hawkular.alerts.actions.api] (Thread-251 (ActiveMQ-client-global-threads-1118700939)) HAWKALERT240001: Plugin [email] has received an action message: [BusActionMessage[action=Action[eventId='temperature-trigger-1472551176767-dc41aaf3-bdd7-4a89-a950-44dc92f10c8b', ctime=1472551176769, event=Alert [alertId=temperature-trigger-1472551176767-dc41aaf3-bdd7-4a89-a950-44dc92f10c8b, status=OPEN, ackTime=0, ackBy=null, resolvedTime=0, resolvedBy=null, context={}], result='null']]] 11:59:37,385 INFO [org.hawkular.alerts.actions.api] (Thread-242 (ActiveMQ-client-global-threads-1118700939)) HAWKALERT240001: Plugin [email] has received an action message: [BusActionMessage[action=Action[eventId='temperature-trigger-1472551176770-300fda0d-2c82-46e3-9f09-f4e9ed4ffa3a', ctime=1472551176771, event=Alert [alertId=temperature-trigger-1472551176770-300fda0d-2c82-46e3-9f09-f4e9ed4ffa3a, status=OPEN, ackTime=0, ackBy=null, resolvedTime=0, resolvedBy=null, context={}], result='null']]]

{
  "triggers": [
    {
      "trigger": {
        "id": "temperature-trigger",
        "name": "Trigger for the temperature sensor",
        "severity": "HIGH",
        "enabled": true,
        "actions": [
          {
            "actionPlugin": "email",
            "actionId": "notify-admin"
          }
        ]
      },
      "conditions": [
        {
          "triggerMode": "FIRING",
          "type": "threshold",
          "dataId": "temperature",
          "operator": "LT",
          "threshold": 0
        }
      ]
    }
  ],
  "actions": [
    {
      "actionPlugin": "email",
      "actionId": "notify-admin",
      "properties": {
        "to": "admin@example.org"
      }
    }
  ]
}

I think I am missing something really very obvius, but I can't see it.


Solution

  • If you are feeding data from metrics, the dataId on the conditions should need a prefix to define the type.

    http://www.hawkular.org/blog/2016/10/06/hawkular-metrics-0.20.0.Final-released.html

    So, dataId = "temperature" should be something as dataId = "hm_g_temperature" (in case temperature definition is a gauge).

    Please, let us know if this is the root cause of your issue.

    You can reach us on #hawkular (Freenode) in case you would need further assistance.

    Thanks.