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
This commit is contained in:
Ilija Matoski 2020-02-15 15:56:16 +01:00 committed by GitHub
parent 95d4908987
commit e1a815381a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)