- Docs »
- manageiq_alerts - Configuration of alerts in ManageIQ
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
manageiq_alerts - Configuration of alerts in ManageIQ
- The manageiq_alerts module supports adding, updating and deleting alerts in ManageIQ.
The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
description
|
|
The unique alert description in ManageIQ.
Required when state is "absent" or "present".
|
enabled
bool |
|
Enable or disable the alert. Required if state is "present".
|
expression
|
|
The alert expression for ManageIQ.
Can either be in the "Miq Expression" format or the "Hash Expression format".
Required if state is "present".
|
expression_type
|
|
Expression type.
|
manageiq_connection
required |
|
ManageIQ connection configuration information.
|
|
url
required |
|
ManageIQ environment url. MIQ_URL env var if set. otherwise, it is required to pass it.
|
|
username
|
|
ManageIQ username. MIQ_USERNAME env var if set. otherwise, required if no token is passed in.
|
|
password
|
|
ManageIQ password. MIQ_PASSWORD env var if set. otherwise, required if no token is passed in.
|
|
token
|
|
ManageIQ token. MIQ_TOKEN env var if set. otherwise, required if no username or password is passed in.
|
|
verify_ssl
|
Default:
"yes"
|
Whether SSL certificates should be verified for HTTPS requests. defaults to True.
|
|
ca_bundle_path
|
|
The path to a CA bundle file or directory with certificates. defaults to None.
|
options
|
|
Additional alert options, such as notification type and frequency
|
resource_type
|
Choices:
- Vm
- ContainerNode
- MiqServer
- Host
- Storage
- EmsCluster
- ExtManagementSystem
- MiddlewareServer
|
The entity type for the alert in ManageIQ. Required when state is "present".
|
state
|
Choices:
- absent
present ←
|
absent - alert should not exist,
present - alert should exist,
|
- name: Add an alert with a "hash expression" to ManageIQ
manageiq_alerts:
state: present
description: Test Alert 01
options:
notifications:
email:
to: ["[email protected]"]
from: "[email protected]"
resource_type: ContainerNode
expression:
eval_method: hostd_log_threshold
mode: internal
options: {}
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
verify_ssl: False
- name: Add an alert with a "miq expression" to ManageIQ
manageiq_alerts:
state: present
description: Test Alert 02
options:
notifications:
email:
to: ["[email protected]"]
from: "[email protected]"
resource_type: Vm
expression_type: miq
expression:
and:
- CONTAINS:
tag: Vm.managed-environment
value: prod
- not:
CONTAINS:
tag: Vm.host.managed-environment
value: prod
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
verify_ssl: False
- name: Delete an alert from ManageIQ
manageiq_alerts:
state: absent
description: Test Alert 01
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
verify_ssl: False
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.