community.zabbix.zabbix_settings module – Update Zabbix global settings.
Note
This module is part of the community.zabbix collection (version 3.2.0).
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_settings
.
New in community.zabbix 2.1.0
Synopsis
This module allows you to update Zabbix global settings.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
---|---|
A name of user group which user belongs to receive an alerm message when database down. |
|
Enable audit logging if Choices:
|
|
A time of period for blinking status changed triggers. Accepts seconds and time unit with suffix (e.g. 5m). |
|
A time of connection timeout with Zabbix server. |
|
Custom event color settings will be activated if Choices:
|
|
A default value for host inventory mode. Choices:
|
|
Default language for users. |
|
Default theme for users. Choices:
|
|
Default time zone for users. Please set |
|
A hostgroup which discovered hosts will belong to. |
|
A URL of frontend. This parameter is used for url parameter of settings API. |
|
A text of Geomap attribution. |
|
Max zoom level of geomap. |
|
A provider of Geomap tile. Please set Choices:
|
|
A URL of geomap tile. |
|
Max period of displaying history data. Accepts seconds and time unit with suffix (e.g. 24h). |
|
Basic Auth password |
|
Basic Auth login |
|
The Zabbix uses iframe sandboxing if Choices:
|
|
A text of iframe sandboxing exceptions. |
|
A time of network timeout for item tests. |
|
A number of login attempts you can try with non blocked. |
|
A time of interval to reset login attempts when the user is blocked. Accepts seconds and time unit with suffix (e.g. 5m). |
|
Max count of elements to show inside table cell |
|
Max number of columns and rows in overview tables |
|
Max period for time filter. Accepts seconds and time unit with suffix (e.g. 1y). |
|
A time of network timeout for media type test. |
|
A custom color for acknowledged RESOLVED events. This setting will be activated if custom_color=true. Please set hexadecimal color code (e.g. 00FF00). |
|
Acknowledged RESOLVED events blink if Choices:
|
|
A time of period for displaying OK triggers. Accepts seconds and time unit with suffix (e.g. 5m). |
|
A custom color for unacknowledged RESOLVED events. This setting will be activated if custom_color=true. Please set hexadecimal color code (e.g. 00FF00). |
|
Unacknowledged RESOLVED events blink if Choices:
|
|
Default period value for time filter. Accepts seconds and time unit with suffix (e.g. 1h). |
|
A custom color for acknowledged PROBLEM events. This setting will be activated if custom_color=true. Please set hexadecimal color code (e.g. 00FF00). |
|
Acknowledged PROBLEM events blink if Choices:
|
|
A custom color for unacknowledged PROBLEM events. This setting will be activated if custom_color=true. Please set hexadecimal color code (e.g. 00FF00). |
|
Unacknowledged PROBLEM events blink if Choices:
|
|
A time of network timeout for scheduled report test. |
|
A time of network timeout for script execution. |
|
A number of search and filter results limit. |
|
The Zabbix shows “Zabbix server is down” warning if Choices:
|
|
A custom color for not classified severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom color for information severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom color for warning severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom color for average severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom color for high severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom color for disaster severity. Please set hexadecimal color code (e.g. 00FF00). |
|
A custom name for not classified severity. |
|
A custom name for information severity. |
|
A custom name for warning severity. |
|
A custom name for average severity. |
|
A custom name for high severity. |
|
A custom name for disaster severity. |
|
The Zabbix shows PHP and SQL technical errors to users who are non-Super admin or belong to user groups with debug mode not enabled if Choices:
|
|
Logging unmatched SNMP traps will be ebabled if Choices:
|
|
A time of network default timeout. |
|
A list of valid URI scheme. |
|
Validate URI schemes if Choices:
|
|
A name of vault provider. This parameter is available since Zabbix 6.2. Choices:
|
|
Working time setting. https://www.zabbix.com/documentation/current/en/manual/appendix/time_period |
|
A text of X-Frame-Options of HTTP header. |
Notes
Note
This module manages settings related with settings api except ha_failover_delay.
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
- name: Update settings
# set task level variables as we change ansible_connection plugin here
vars:
ansible_network_os: community.zabbix.zabbix
ansible_connection: httpapi
ansible_httpapi_port: 443
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_zabbix_url_path: "zabbixeu" # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu
ansible_host: zabbix-example-fqdn.org
community.zabbix.zabbix_settings:
alert_usrgrp: "0"
auditlog_enabled: false
blink_period: "10m"
connect_timeout: "30s"
custom_color: false
default_inventory_mode: automatic
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The result of the operation Returned: success Sample: |