mirror of
https://github.com/moudsen/mailGraph
synced 2025-01-31 04:11:39 +01:00
Refactoring for optimized flow and relevant data retrieval (v1.25)
This commit is contained in:
parent
17cdbea2bd
commit
66b504a66c
@ -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;
|
||||||
|
@ -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 @@
|
|||||||
|
|
||||||
// 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;
|
||||||
@ -138,6 +132,8 @@ Customization:
|
|||||||
- "graphWidth" and "graphWidth" can be defined for the image size
|
- "graphWidth" and "graphWidth" can be defined for the image size
|
||||||
- "showLegend" can be defined to show or hide the legend of the graph
|
- "showLegend" can be defined to show or hide the legend of the graph
|
||||||
- "subject" can be defined for a customized subject for the mail message
|
- "subject" can be defined for a customized subject for the mail message
|
||||||
|
- "periods" and "periods_headers" can be defined for displaying multiple periods of the same graph, or
|
||||||
|
- "period" and "period_header" can be defined to display a single graph
|
||||||
|
|
||||||
The html.template and plain.template files can be adjusted (TWIG format).
|
The html.template and plain.template files can be adjusted (TWIG format).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user