From c40684db583bf8ff7413b346d367a2e57f592ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Lys=C3=A9n?= Date: Mon, 14 Mar 2022 07:14:58 +0100 Subject: [PATCH] datadog: Add missing priority (#4311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * datadog: Add missing priority * datadog: Add missing priority * datadog: Add missing priority * datadog: Add documentation and variable declaration * datadog: Add documentation and variable declaration * datadog: Add documentation and variable declaration * Update plugins/modules/monitoring/datadog/datadog_monitor.py Co-authored-by: Felix Fontein Co-authored-by: Fredrik Lysén Co-authored-by: Felix Fontein --- plugins/modules/monitoring/datadog/datadog_monitor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index ab25777ecd..b38779407e 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -153,6 +153,11 @@ options: type: bool default: yes version_added: 1.3.0 + priority: + description: + - Integer from 1 (high) to 5 (low) indicating alert severity. + type: int + version_added: 4.6.0 ''' EXAMPLES = ''' @@ -239,6 +244,7 @@ def main(): evaluation_delay=dict(), id=dict(), include_tags=dict(required=False, default=True, type='bool'), + priority=dict(type='int'), ) ) @@ -298,6 +304,7 @@ def _post_monitor(module, options): name=_fix_template_vars(module.params['name']), message=_fix_template_vars(module.params['notification_message']), escalation_message=_fix_template_vars(module.params['escalation_message']), + priority=module.params['priority'], options=options) if module.params['tags'] is not None: kwargs['tags'] = module.params['tags'] @@ -322,6 +329,7 @@ def _update_monitor(module, monitor, options): name=_fix_template_vars(module.params['name']), message=_fix_template_vars(module.params['notification_message']), escalation_message=_fix_template_vars(module.params['escalation_message']), + priority=module.params['priority'], options=options) if module.params['tags'] is not None: kwargs['tags'] = module.params['tags']