Les macros définies par l'utilisateur sont prises en charge aux emplacements suivants :
* Intervalle d'actualisation
* Nom de contexte SNMPv3
* Nom de la sécurité SNMPv3
* Phrase d'authentification SNMPv3
* Phrase de passe de confidentialité SNMPv3
* Communauté SNMPv1/v2
* OID SNMP
* Nom
* Intervalle d'actualisation
* Agent
* Proxy HTTP
* Variables
* En-tête
* Nom de l'étape
* URL de l'étape
* Variables POST de l'étape
* En-tête de l'étape
* Expiration de l'étape
* Chaîne requise
* Code d'état requis
* Authentication (utilisateur et mot de passe)
* Fichier de certificat SSL
* Fichier de clé SSL
* Mot de passe de la clé SSL
* Nom
* Expression (seulement dans les constantes et les paramètres de fonction)
* Description
* URLs
Pour une liste complète de toutes les macros supportées par Zabbix, voir les macros supportées.
In actions, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Trigger-based notifications and commands | yes | |
Trigger-based internal notifications | yes | |
Problem update notifications | yes | |
Time period condition | no | |
Operations | ||
Default operation step duration | no | |
Step duration | no |
In a host configuration, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Interface IP/DNS | DNS only | |
Interface port | no | |
SNMP v1, v2 | ||
Interface community | yes | |
SNMP v3 | ||
Interface context name | yes | |
Security name | yes | |
Authentication passphrase | yes | |
Privacy passphrase | yes | |
IPMI | ||
Username | yes | |
Password | yes | |
//Tags // | ||
Tag names | yes | |
Tag values | yes |
In an item or an item prototype configuration, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Name (deprecated) | yes | |
Item key parameters | yes | |
Update interval | no | |
Custom intervals | no | |
History storage period | no | |
Trend storage period | no | |
//Calculated item // | ||
Formula | yes | |
Database monitor | ||
Username | yes | |
Password | yes | |
SQL query | yes | |
//HTTP agent // | ||
URL | yes | |
Query fields | yes | |
Timeout | no | |
Request body | yes | |
Headers (names and values) | yes | |
Required status codes | yes | |
HTTP proxy | yes | |
HTTP authentication username | yes | |
HTTP authentication password | yes | |
SSl certificate file | yes | |
SSl key file | yes | |
SSl key password | yes | |
Allowed hosts | yes | |
JMX agent | ||
JMX endpoint | yes | |
//SNMP agent // | ||
SNMP OID | yes | |
//SSH agent // | ||
Username | yes | |
Public key file | yes | |
Private key file | yes | |
Password | yes | |
Script | yes | |
//TELNET agent // | ||
Username | yes | |
Password | yes | |
Script | yes | |
//Zabbix trapper // | ||
Allowed hosts | yes | |
Preprocessing | ||
Step parameters | yes |
In a low-level discovery rule, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Name | yes | |
Key parameters | yes | |
Update interval | no | |
Custom interval | no | |
Keep lost resources period | no | |
SNMP agent | ||
SNMP OID | yes | |
SSH agent | ||
Username | yes | |
Public key file | yes | |
Private key file | yes | |
Password | yes | |
Script | yes | |
TELNET agent | ||
Username | yes | |
Password | yes | |
Script | yes | |
Zabbix trapper | ||
Allowed hosts | yes | |
Database monitor | ||
Additional parameters | yes | |
JMX agent | ||
JMX endpoint | yes | |
HTTP agent | ||
URL | yes | |
Query fields | yes | |
Timeout | no | |
Request body | yes | |
Headers (names and values) | yes | |
Required status codes | yes | |
HTTP authentication username | yes | |
HTTP authentication password | yes | |
//Filters // | ||
Regular expression | yes |
In a network discovery rule, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Update interval | no | |
SNMP v1, v2 | ||
SNMP community | yes | |
SNMP OID | yes | |
SNMP v3 | ||
Context name | yes | |
Security name | yes | |
Authentication passphrase | yes | |
Privacy passphrase | yes | |
SNMP OID | yes |
In a proxy configuration, user macros can be used in the following field:
Location | Multiple macros/mix with text1 | |
---|---|---|
Interface port (for passive proxy) | no |
In a template configuration, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
//Tags // | ||
Tag names | yes | |
Tag values | yes |
In a trigger configuration, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Name | yes | |
Operational data | yes | |
Expression (only in constants and function parameters; secret macros are not supported). | yes | |
Description | yes | |
URL | yes | |
Tag for matching | yes | |
//Tags // | ||
Tag names | yes | |
Tag values | yes |
In a web scenario configuration, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Name | yes | |
Update interval | no | |
Agent | yes | |
HTTP proxy | yes | |
Variables (values only) | yes | |
Headers (names and values) | yes | |
//Steps // | ||
Name | yes | |
URL | yes | |
Variables (values only) | yes | |
Headers (names and values) | yes | |
Timeout | no | |
Required string | yes | |
Required status codes | no | |
//Authentication // | ||
User | yes | |
Password | yes | |
SSL certificate | yes | |
SSL key file | yes | |
SSL key password | yes |
In addition to the locations listed here, user macros can be used in the following fields:
Location | Multiple macros/mix with text1 | |
---|---|---|
Global scripts (including confirmation text) | yes | |
Monitoring → Screens | ||
URL field of dynamic URL screen element | yes | |
Administration → Users → Media | ||
When active | no | |
Administration → General → Working time | ||
Working time | no |
For a complete list of all macros supported in Zabbix, see supported macros.
1 If multiple macros in a field or macros mixed with text are not supported for the location, a single macro has to fill the whole field.