mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +00:00
datadog: Add missing priority (#4311)
* 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 <felix@fontein.de> Co-authored-by: Fredrik Lysén <fredrik.lysen@klarna.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user