diff --git a/javascript/zabbix.mailGraph.js b/javascript/zabbix.mailGraph.js index fdc75bf..739fbd6 100644 --- a/javascript/zabbix.mailGraph.js +++ b/javascript/zabbix.mailGraph.js @@ -17,9 +17,7 @@ try { // Must have fields fields.itemId = params.itemId; - fields.triggerId = params.triggerId; fields.eventId = params.eventId; - fields.eventValue = params.eventValue; fields.recipient = params.recipient; fields.baseURL = params.baseURL; fields.duration = params.duration; @@ -60,4 +58,4 @@ catch (error) // In case something went wrong in the processing, pass the error back to Zabbix Zabbix.Log(127, 'MailGraph notification failed : '+error); throw 'MailGraph notification failed : '+error; -} \ No newline at end of file +} diff --git a/mailGraph.xml b/mailGraph.xml index c1fff2d..e934dc2 100755 --- a/mailGraph.xml +++ b/mailGraph.xml @@ -1,7 +1,7 @@ 5.0 - 2021-03-12T15:29:06Z + 2021-03-17T12:55:43Z MailGraph @@ -19,10 +19,6 @@ eventId {EVENT.ID} - - eventValue - {EVENT.VALUE} - graphHeight 120 @@ -35,6 +31,10 @@ HTTPProxy + + infoTest + Test + itemId {ITEM.ID} @@ -59,10 +59,6 @@ subject {{ HOST_NAME|raw }}: ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }} - - triggerId - {TRIGGER.ID} - URL https://mydomain.com/mailGraph.php @@ -87,9 +83,7 @@ // Must have fields fields.itemId = params.itemId; - fields.triggerId = params.triggerId; fields.eventId = params.eventId; - fields.eventValue = params.eventValue; fields.recipient = params.recipient; fields.baseURL = params.baseURL; fields.duration = params.duration; @@ -138,6 +132,8 @@ Customization: - "graphWidth" and "graphWidth" can be defined for the image size - "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 +- "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). @@ -191,4 +187,4 @@ itemId: {ITEM.ID] - \ No newline at end of file +