From 324b0a67d7d25ded1da6cbf577ce34200133e002 Mon Sep 17 00:00:00 2001 From: Ivan Chernetsky Date: Mon, 29 Jan 2018 09:40:23 -0800 Subject: [PATCH] Filter events on server side, in order to decrease load on Marathon (#541) * Filter events on server side, in order to decrease load on Marathon * Use lightweight Marathon events. --- marathon_lb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/marathon_lb.py b/marathon_lb.py index c864b911..fc45de9e 100755 --- a/marathon_lb.py +++ b/marathon_lb.py @@ -226,7 +226,10 @@ def tasks(self): return self.api_req('GET', ['tasks'])["tasks"] def get_event_stream(self): - url = self.host + "/v2/events" + url = self.host + "/v2/events?plan-format=light&" + \ + "event_type=status_update_event&" + \ + "event_type=health_status_changed_event&" + \ + "event_type=api_post_event" return CurlHttpEventStream(url, self.__auth, self.__verify) def iter_events(self, stream):