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.0 for Zabbix 7.0).

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.0-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.0-2M-apache/import_templates.sh \
  /tmp/templates_bundles-7.0-2M-apache \
  https://example.com/zabbix/api_jsonrpc.php \
  d8d6b5c78ee2a8333db11bfcd3e448c49c239d8ce00702759e2b56f42e24dbe4