From e1a815381a3b280d6d4b21e1f409a1631b3ba8be Mon Sep 17 00:00:00 2001 From: Ilija Matoski Date: Sat, 15 Feb 2020 15:56:16 +0100 Subject: [PATCH] Thresholds need to be passed for the log alert type (#64851) * Thresholds need to be passed for the log alert type * removed whitespace from linting error --- lib/ansible/modules/monitoring/datadog/datadog_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/monitoring/datadog/datadog_monitor.py b/lib/ansible/modules/monitoring/datadog/datadog_monitor.py index add559b77ac..258a31123c6 100644 --- a/lib/ansible/modules/monitoring/datadog/datadog_monitor.py +++ b/lib/ansible/modules/monitoring/datadog/datadog_monitor.py @@ -343,7 +343,7 @@ def install_monitor(module): if module.params['type'] == "service check": options["thresholds"] = module.params['thresholds'] or {'ok': 1, 'critical': 1, 'warning': 1} - if module.params['type'] == "metric alert" and module.params['thresholds'] is not None: + if module.params['type'] in ["metric alert", "log alert"] and module.params['thresholds'] is not None: options["thresholds"] = module.params['thresholds'] monitor = _get_monitor(module)