3 Zabbix Tags and Macros - moudsen/mailGraph GitHub Wiki
Trigger Tags
Trigger Tags can adjust behavior of mailGraph to change parameters or to point to a specific graph that is indirectly associated to the trigger (this allows you to add graphs that are relevant to the information you need to troubleshoot or identify impact).
To configure this each Zabbix Trigger can have it's own specific settings which can configured through Tags (note that such settings will override any other settings from config.php):
Tag | Description |
---|---|
mailGraph.period |
To set a specific graph period for this particular Trigger like "4h" for 4 hours (Zabbix format). Defaults to 48h . |
mailGraph.period_header |
To set a specific graph period header for this particular Trigger like "Last 4 hours". Defaults to mailGraph.period . |
mailGraph.periods |
To set a specific set of graph periods for this particular Trigger like "10m,4h,12h,7d" (maximum of 4 allowed). |
mailGraph.periods_headers |
To set a specific set of graph period headers for this particular Trigger like "Last 10 minutes,Last 4 hours,Last 12 hours,Last 7 days". |
mailGraph.graph |
To set a specific graph ID to be embedded for this particular Trigger. |
mailGraph.showLegend |
To set a specific graph to show or hide for this particular Trigger. |
mailGraph.graphHeight |
To set a specific graph height for this particular Trigger. |
mailGraph.graphWidth |
To set a specific graph width for this particular Trigger. |
mailGraph.debug |
To enable the attachment of the log file of MailGraph processing for this particular Trigger to each mail message (0=off,1=on). |
mailGraph.screen |
To specificy a Screen ID from which all graphs will be embedded in the e-mail. |
mailGraph.screenPeriod |
To specify the period of all the graphs of the Screen. Defaults to mailGraph.period or the first period in mailGraph.periods . |
mailGraph.screenPeriodHeader |
To specify the period header for the section in which all the graphs of the Screen will be displayed. Defaults to mailGraph.period_header or the first header in mailGraph.periods_headers . |
mailGraph.valueTruncate |
To specify if specific truncing for this Trigger is required for ITEM values (ITEM_LASTVALUE and ITEM_PREVIOUSVALUE). Overrides the global "item_value_truncate" in the configuration file. Set to zero to disable truncing. |
Host Tags
Tag | Description |
---|---|
mailGraph.screen |
To specificy a Screen ID from which all graphs will be embedded in the e-mail. |
mailGraph.screenPeriod |
To specify the period of all the graphs of the Screen. |
mailGraph.screenPeriodHeader |
To specify the period header for the section in which all the graphs of the Screen will be displayed. |
Host Macros
Macro | Description |
---|---|
mailGraph.screen |
To specificy a Screen ID from which all graphs will be embedded in the e-mail. |
mailGraph.screenPeriod |
To specify the period of all the graphs of the Screen. |
mailGraph.screenPeriodHeader |
To specify the period header for the section in which all the graphs of the Screen will be displayed. |
Zabbix Macros
It is possible to pass any Zabbix Macro value to mailGraph simply by defining the macro within the mailGraph Media Type. The Zabbix Macro is accessible in Twig with the same name while replacing "." with "_" for syntax compatibility in Twig.
Example: {ITEM.ID}
becomes available in Twig as ITEM_ID
.
The full list of Zabbix Macros can be found at https://www.zabbix.com/documentation/current/en/manual/appendix/macros/supported_by_location.