Refactoring for optimized flow and relevant data retrieval (v1.25)

This commit is contained in:
Mark Oudsen 2021-03-17 13:57:25 +01:00
parent 17cdbea2bd
commit 66b504a66c
2 changed files with 9 additions and 15 deletions

View File

@ -17,9 +17,7 @@ try {
// Must have fields // Must have fields
fields.itemId = params.itemId; fields.itemId = params.itemId;
fields.triggerId = params.triggerId;
fields.eventId = params.eventId; fields.eventId = params.eventId;
fields.eventValue = params.eventValue;
fields.recipient = params.recipient; fields.recipient = params.recipient;
fields.baseURL = params.baseURL; fields.baseURL = params.baseURL;
fields.duration = params.duration; fields.duration = params.duration;

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<zabbix_export> <zabbix_export>
<version>5.0</version> <version>5.0</version>
<date>2021-03-12T15:29:06Z</date> <date>2021-03-17T12:55:43Z</date>
<media_types> <media_types>
<media_type> <media_type>
<name>MailGraph</name> <name>MailGraph</name>
@ -19,10 +19,6 @@
<name>eventId</name> <name>eventId</name>
<value>{EVENT.ID}</value> <value>{EVENT.ID}</value>
</parameter> </parameter>
<parameter>
<name>eventValue</name>
<value>{EVENT.VALUE}</value>
</parameter>
<parameter> <parameter>
<name>graphHeight</name> <name>graphHeight</name>
<value>120</value> <value>120</value>
@ -35,6 +31,10 @@
<name>HTTPProxy</name> <name>HTTPProxy</name>
<value/> <value/>
</parameter> </parameter>
<parameter>
<name>infoTest</name>
<value>Test</value>
</parameter>
<parameter> <parameter>
<name>itemId</name> <name>itemId</name>
<value>{ITEM.ID}</value> <value>{ITEM.ID}</value>
@ -59,10 +59,6 @@
<name>subject</name> <name>subject</name>
<value>{{ HOST_NAME|raw }}: ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }}</value> <value>{{ HOST_NAME|raw }}: ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }}</value>
</parameter> </parameter>
<parameter>
<name>triggerId</name>
<value>{TRIGGER.ID}</value>
</parameter>
<parameter> <parameter>
<name>URL</name> <name>URL</name>
<value>https://mydomain.com/mailGraph.php</value> <value>https://mydomain.com/mailGraph.php</value>
@ -87,9 +83,7 @@
&#13; &#13;
// Must have fields&#13; // Must have fields&#13;
fields.itemId = params.itemId;&#13; fields.itemId = params.itemId;&#13;
fields.triggerId = params.triggerId;&#13;
fields.eventId = params.eventId;&#13; fields.eventId = params.eventId;&#13;
fields.eventValue = params.eventValue;&#13;
fields.recipient = params.recipient;&#13; fields.recipient = params.recipient;&#13;
fields.baseURL = params.baseURL;&#13; fields.baseURL = params.baseURL;&#13;
fields.duration = params.duration;&#13; fields.duration = params.duration;&#13;
@ -138,6 +132,8 @@ Customization:&#13;
- &quot;graphWidth&quot; and &quot;graphWidth&quot; can be defined for the image size&#13; - &quot;graphWidth&quot; and &quot;graphWidth&quot; can be defined for the image size&#13;
- &quot;showLegend&quot; can be defined to show or hide the legend of the graph&#13; - &quot;showLegend&quot; can be defined to show or hide the legend of the graph&#13;
- &quot;subject&quot; can be defined for a customized subject for the mail message&#13; - &quot;subject&quot; can be defined for a customized subject for the mail message&#13;
- &quot;periods&quot; and &quot;periods_headers&quot; can be defined for displaying multiple periods of the same graph, or&#13;
- &quot;period&quot; and &quot;period_header&quot; can be defined to display a single graph&#13;
&#13; &#13;
The html.template and plain.template files can be adjusted (TWIG format).&#13; The html.template and plain.template files can be adjusted (TWIG format).&#13;
&#13; &#13;