mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-23 06:21:43 -07:00
Revert "Revert new features since the 2.0.0 release so we can release 2.0.1 from this branch."
This reverts commit 1d90e91528
.
This commit is contained in:
parent
033582b696
commit
3eadb9d637
4 changed files with 28 additions and 6 deletions
|
@ -49,7 +49,8 @@ options:
|
|||
type:
|
||||
description:
|
||||
- The type of the monitor.
|
||||
choices: ['metric alert', 'service check', 'event alert', 'process alert', 'log alert']
|
||||
- The types C(query alert), C(trace-analytics alert) and C(rum alert) were added in community.general 2.1.0.
|
||||
choices: ['metric alert', 'service check', 'event alert', 'process alert', 'log alert', 'query alert', 'trace-analytics alert', 'rum alert']
|
||||
type: str
|
||||
query:
|
||||
description:
|
||||
|
@ -208,7 +209,9 @@ def main():
|
|||
api_host=dict(required=False),
|
||||
app_key=dict(required=True, no_log=True),
|
||||
state=dict(required=True, choices=['present', 'absent', 'mute', 'unmute']),
|
||||
type=dict(required=False, choices=['metric alert', 'service check', 'event alert', 'process alert', 'log alert']),
|
||||
type=dict(required=False, choices=['metric alert', 'service check', 'event alert',
|
||||
'process alert', 'log alert', 'query alert',
|
||||
'trace-analytics alert', 'rum alert']),
|
||||
name=dict(required=True),
|
||||
query=dict(required=False),
|
||||
notification_message=dict(required=False, no_log=True, default=None, aliases=['message'],
|
||||
|
@ -348,7 +351,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'] in ["metric alert", "log alert"] and module.params['thresholds'] is not None:
|
||||
if module.params['type'] in ["metric alert", "log alert", "query alert", "trace-analytics alert", "rum alert"] and module.params['thresholds'] is not None:
|
||||
options["thresholds"] = module.params['thresholds']
|
||||
|
||||
monitor = _get_monitor(module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue