9 Templates out of the box

Overview

Zabbix provides a growing set of pre-configured templates to simplify and speed up the setup of monitoring targets.

All out-of-the-box templates are available in Data collection > Templates.

When you upgrade Zabbix, templates are not upgraded automatically. This avoids overwriting any custom changes you have made. To upgrade or add templates manually, see the Template upgrade section below.

Please use the sidebar to access information about specific template types and operation requirements.

See also:

Template upgrade

To upgrade or add a single template:

1. Open the templates directory in Zabbix Git repository.

2. Choose the branch (under the Source label) that matches your Zabbix version (e.g., release/7.4 for Zabbix 7.4).

3. Find the template you want to add or upgrade (e.g., MySQL by Zabbix agent).

4. Copy the contents of the template file (e.g., template_db_mysql_agent.yaml) and save them to a local file.

5. In the Zabbix user interface, go to Data collection > Templates and import the local file.

Webhook media types can be upgraded similarly: get them from the media directory and import in Alerts > Media types.

To upgrade or add multiple templates:

1. Download the template bundles archive depending on your web server:

2. Extract the archive. It has YAML files, each with multiple templates, and an index file listing which templates are in each YAML file.

3. In the Zabbix user interface, go to Data collection > Templates and import the YAML files one by one.

Webhook media types can be upgraded similarly: take the media_bundle-7.4-000.yaml file from the template bundles archive and import in Alerts > Media types.

To upgrade or add all templates at once, you can use the import_templates.sh script included in the template bundles archive. The script requires curl and jq utilities, and uses the configuration.import Zabbix API method. When running the script, provide the directory containing the YAML files and your Zabbix API URL and authentication token.

The import_templates.sh script overwrites all existing templates, with no option to review or undo template changes.

Example:

/tmp/templates_bundles-7.4-2M-apache/import_templates.sh \
  /tmp/templates_bundles-7.4-2M-apache \
  https://example.com/zabbix/api_jsonrpc.php \
  d8d6b5c78ee2a8333db11bfcd3e448c49c239d8ce00702759e2b56f42e24dbe4

Template compatibility with Host Wizard

For a full list of out-of-the-box templates that are currently compatible with the Host Wizard, see hw_compatible_templates.txt.

You can also make your custom templates compatible with the Host Wizard:

1. In Zabbix frontend, go to Data collection > Templates and export the custom template.

2. Edit the exported file:

3. In Zabbix frontend, go to Data collection > Templates and import the updated template file.