From ba8689fa39910cdae56e6f5978a5abc77221ffc7 Mon Sep 17 00:00:00 2001 From: qqfr2507 Date: Tue, 3 Jun 2014 22:08:41 +0000 Subject: [PATCH] Add the mute_timeout_ts parameter in the PUT method for editing an alert --- src/dogapi/http/alerts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dogapi/http/alerts.py b/src/dogapi/http/alerts.py index 7cec7f2..c7cfda4 100644 --- a/src/dogapi/http/alerts.py +++ b/src/dogapi/http/alerts.py @@ -33,7 +33,7 @@ def alert(self, query, name=None, message=None, silenced=False, ) def update_alert(self, alert_id, query, name=None, message=None, silenced=False, - notify_no_data=None, timeout_h=None): + silenced_timeout_ts=None, notify_no_data=None, timeout_h=None): """ Update the metric alert identified by *alert_id* with the given *query*. If *name* is unset, the alert will be given a name based on @@ -56,6 +56,8 @@ def update_alert(self, alert_id, query, name=None, message=None, silenced=False, body['notify_no_data'] = notify_no_data if timeout_h: body['timeout_h'] = timeout_h + if silenced_timeout_ts: + body['silenced_timeout_ts'] return self.http_request('PUT', '/alert/%s' % alert_id, body, response_formatter=lambda x: x['id'],