Is it possible to fire event/alert if a service registered with Eureka goes UP or DOWN?

901 views Asked by At

Netflix-Eureka has a well defined RESTful API to get status of all services currently registered with it. We can pull this information anytime with a simple GET request.

I want to setup an alerting system that will notify someone either by email or sms if a service goes DOWN or UP.

Currently I am trying to achieve this using hawkular-alerts. I was wondering if this can be possible without writing much of custom code.

If there is some other better solution, please quote.

Scenario: Eureka provides an endpoint something like http://domain/eureka/v2/apps on which if we make a GET request, it returns a JSON something like:

{
  "applications": [
    {
      "name": "SERVICE01",
      "status": "UP"
    },
    {
      "name": "SERVICE02",
      "status": "DOWN"
    }
  ]
}

Now based on this resultant JSON, I need to fire an alert email telling SERVICE02 is down. Is it possible with hawkular-alerts?

1

There are 1 answers

2
Lucas Ponce On

I am not familiar with Eureka but I guess you can use a similar example as defined in

https://github.com/hawkular/hawkular-alerts/tree/master/examples/hello-world

Basically, you can create a script to feed data into Hawkular Alerting and define rules there to detect your scenario.

If you give me more details I can help with a prototype.