community.zabbix.zabbix_host_events_update module – update the status of event(s).
Note
This module is part of the community.zabbix collection (version 3.1.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.zabbix
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.zabbix.zabbix_host_events_update
.
Synopsis
Updates the status of event(s).
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
Parameters
Parameter |
Comments |
---|---|
Basic Auth password |
|
Basic Auth login |
|
Parameters to update event(s) with. Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/event/acknowledge Additionally supported parameters are below |
|
action to update the event with Overrides “action” in API docs Required when actions is not used. Mutually exclusive with actions. Choices:
|
|
actions to update the event with Overrides “action” in API docs Required when action is not used. Mutually exclusive with action. Choices:
|
|
Text of the message. Alias for “message” in API docs |
|
New severity for events. Overrides “severity” in API docs Choices:
|
Examples
# If you want to use Username and Password to be authenticated by Zabbix Server
- name: Set credentials to access Zabbix Server API
ansible.builtin.set_fact:
ansible_user: Admin
ansible_httpapi_pass: zabbix
# If you want to use API token to be authenticated by Zabbix Server
# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens
- name: Set API token
ansible.builtin.set_fact:
ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895
# Acknowledge single event
- name: ack event
community.zabbix.zabbix_host_events_update:
params:
eventids: 12345
actions: ack
- name: ack and close event with a message
community.zabbix.zabbix_host_events_update:
params:
eventids: [12345, 67890]
actions: ['ack', 'msg', 'close']
msg: 'closed by user'