6 Commits
v2.02 ... v2.11

5 changed files with 332 additions and 215 deletions

View File

@@ -1,4 +1,44 @@
## mailGraph v2.11 release ##
_(2023/07/01)_
_This version has been verified with Zabbix 5.4 and 6.0 LTS and is expected to work with 6.4 and later (based on v2.10 testing)_
Release notes
- Added pre- and postchecking of variables to the Zabbix javascript - this will prevent the 'invalid JSON' messages and provide better feedback for errors
- When testing MailGraph it is now possible to set the eventId to zero - a random problem will be picked up via the API
- Zabbix Media Type XML reverted back to version 5.4 (for backwards compatibility)
Modified files
- mailGraph.php
- mailGraph.xml
- javascript/zabbix.mailGraph.js
For those upgrading to the latest release without installing the media type:
- copy new mailGraph.php over existing mailGraph.php
- open the Media type MailGraph in Zabbix and edit the javascript
-- replace the script contents with the contents of javascript/zabbix.mailGraph.js
Changes are in effect immediately, no need to restart any services.
## mailGraph v2.10 release ##
_(2023/06/30)_
_This version has been verified with Zabbix 5.4, 6.0 LTS and 6.4._
Minor updates to the mailGraph code
- When not defining zabbix_api_user and zabbix_api_pwd in the configuration file the zbx_user and zbx_user_pwd wll be used
## Zabbix 6.4.x testing ## ## Zabbix 6.4.x testing ##
_(2023/06/30)_
Zabbix 6.4 verification has succesfully completed.
- Refactored code to remove deprecated and removed functions since Zabbix 6.4.0
-- Zabbix Javascript now using HttpRequest instead of CurlHttpRequest (function name changes implemented)
-- Zabbix API user.login is now based on "username" (instead of "user")
Sidenotes
- Zabbix logging still shows deprecation messages however it is believed these are internal to Zabbix and not related to mailGraph
_(2023/06/29)_ _(2023/06/29)_
Zabbix 6.4.x verification is in progress. Required intermediate release to fix one major issue (Zabbix login parameters deprecation) and some minor coding updates. Zabbix 6.4.x verification is in progress. Required intermediate release to fix one major issue (Zabbix login parameters deprecation) and some minor coding updates.

View File

@@ -1,7 +1 @@
As per the details captured in issue #32 the javascript code portion of this Media Type has changed due to a platform/library change at Zabbix side. Issue #32 has been resolved. The javascript code now works for Zabbix 5.4, 6.0 LTS and 6.4.
A distinction is now made for the following Zabbix versions:
Zabbix <6.2 - use "zabbix.mailGraph.js"
Zabbix >=6.2 - <coming soon>
Please make sure you install the right javascript in your environment!

View File

@@ -1,7 +1,8 @@
// mailGraph v2.11
try { try {
// Pickup parameters // Pickup parameters
params = JSON.parse(value), params = JSON.parse(value),
req = new CurlHttpRequest(), req = new HttpRequest(),
fields = {}, fields = {},
resp = '', resp = '',
result = { tags: {} }; result = { tags: {} };
@@ -13,14 +14,26 @@ try {
} }
// Declare output type // Declare output type
req.AddHeader('Content-Type: application/json'); req.addHeader('Content-Type: application/json');
// Must have fields // Must have fields
fields.itemId = params.itemId; fields.itemId = params.itemId * 1;
fields.eventId = params.eventId; fields.eventId = params.eventId * 1;
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;
if (isNaN(fields.eventId)) {
throw '[MailGraph Webhook] Invalid event ID? Integer required (use actual event ID from Zabbix!)';
}
if (isNaN(fields.duration)) {
throw '[MailGraph Webhook] Invalid duration? Integer required (set to zero if unknown)!';
}
if (fields.recipient.charAt(0) == '{') {
throw '[MailGraph Webhook] Please define recipient for the test message!';
}
// Optional fields // Optional fields
if (typeof params.graphWidth === 'string') { fields.graphWidth = params.graphWidth; } if (typeof params.graphWidth === 'string') { fields.graphWidth = params.graphWidth; }
@@ -40,15 +53,27 @@ try {
// Post information to the processing script // Post information to the processing script
Zabbix.Log(4, '[MailGraph Webhook] Sending request: ' + params.URL + '?' + JSON.stringify(fields)); Zabbix.Log(4, '[MailGraph Webhook] Sending request: ' + params.URL + '?' + JSON.stringify(fields));
var resp = req.Post(params.URL,JSON.stringify(fields)); var resp = req.post(params.URL,JSON.stringify(fields));
Zabbix.Log(4, '[Mailgraph Webhook] Receiving response:' + resp); Zabbix.Log(4, '[Mailgraph Webhook] Received response:' + resp);
// If there was an error, report it // If blank the email address is likely incorrect
if (req.Status() != 200) { throw JSON.parse(resp).errors[0]; } if (resp==null) {
throw '[MailGraph Webhook] No data received from mailGraph! Likely the email processing failed? Check mailGraph logging';
}
// If there was an error, report it and stop
if (req.getStatus() != 200) { throw JSON.parse(resp).errors[0]; }
// If no datas returned, report it and stop
if (resp.charAt(0) == "!") {
throw '[MailGraph Webhook] No data received from mailGraph! Likely the event ID provided does not exist? Check mailGraph logging';
}
// We expect the message id back from the processing script // We expect the message id back from the processing script
resp = JSON.parse(resp); msg = JSON.parse(resp);
result.tags.__message_id = resp.messageId;
result.tags.__message_id = msg.messageId;
Zabbix.Log(4, '[MailGraph Webhook] Message sent with identification "' + msg.messageId + '"');
// Pass the result back to Zabbix // Pass the result back to Zabbix
return JSON.stringify(result); return JSON.stringify(result);
@@ -56,6 +81,6 @@ try {
catch (error) catch (error)
{ {
// In case something went wrong in the processing, pass the error back to Zabbix // In case something went wrong in the processing, pass the error back to Zabbix
Zabbix.Log(127, 'MailGraph notification failed : '+error); Zabbix.Log(127, 'MailGraph notification failed: '+error);
throw 'MailGraph notification failed : '+error; throw 'MailGraph notification failed : '+error;
} }

View File

@@ -8,6 +8,8 @@
// upon an alert message. // upon an alert message.
// //
// ------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------
// Release 1 tested with Zabbix 5.4 and 6.0 LTS
// ------------------------------------------------------------------------------------------------------
// 1.00 2021/02/26 - Mark Oudsen - MVP version, ready for distribution // 1.00 2021/02/26 - Mark Oudsen - MVP version, ready for distribution
// 1.01 2021/02/27 - Mark Oudsen - Enhanced search for associated graphs to an item // bug fixes // 1.01 2021/02/27 - Mark Oudsen - Enhanced search for associated graphs to an item // bug fixes
// 1.10 2021/02/27 - Mark Oudsen - Moved all configuration outside code // 1.10 2021/02/27 - Mark Oudsen - Moved all configuration outside code
@@ -40,10 +42,15 @@
// 2021/07/05 - Mark Oudsen - Minor detail added: CLI debug mode now also outputs version // 2021/07/05 - Mark Oudsen - Minor detail added: CLI debug mode now also outputs version
// 2021/07/07 - Mark Oudsen - Fixed HTTPProxy typo in code (instead of HTTPPRoxy) // 2021/07/07 - Mark Oudsen - Fixed HTTPProxy typo in code (instead of HTTPPRoxy)
// ------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------
// Release 2 tested with Zabbix 5.4, 6.0 LTS and 6.4 - tested with latest Composer libraries
// ------------------------------------------------------------------------------------------------------
// 2.00 2021/12/16 - Mark Oudsen - itemId not always provisioned by Zabbix // 2.00 2021/12/16 - Mark Oudsen - itemId not always provisioned by Zabbix
// Several fixes on warning - several small bug fixes // Several fixes on warning - several small bug fixes
// 2.01 2021/12/16 - Mark Oudsen - Screens are no longer available - reverting to using Dashboards now // 2.01 2021/12/16 - Mark Oudsen - Screens are no longer available - reverting to using Dashboards now
// 2.02 2022/01/30 - Mark Oudsen - Added cleanup routine for old logs and images // 2.02 2022/01/30 - Mark Oudsen - Added cleanup routine for old logs and images
// 2.10 2023/06/30 - Mark Oudsen - Refactored deprecated code - now compatible with Zabbix 6.0 LTS, 6.4
// 2.11 2023/07/01 - Mark Oudsen - Refactored Zabbix javascript - now capturing obvious errors
// Added ability to locate latest problems for testing purposes
// ------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------
// //
// (C) M.J.Oudsen, mark.oudsen@puzzl.nl // (C) M.J.Oudsen, mark.oudsen@puzzl.nl
@@ -65,7 +72,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////
// CONSTANTS // CONSTANTS
$cVersion = 'v2.020'; $cVersion = 'v2.11';
$cCRLF = chr(10).chr(13); $cCRLF = chr(10).chr(13);
$maskDateTime = 'Y-m-d H:i:s'; $maskDateTime = 'Y-m-d H:i:s';
$maxGraphs = 4; $maxGraphs = 4;
@@ -589,9 +596,20 @@
$z_pass = $config['zabbix_user_pwd']; $z_pass = $config['zabbix_user_pwd'];
// Zabbix API user (requires Super Admin access rights) // Zabbix API user (requires Super Admin access rights)
// --- Copy from Zabbix user and override when defined in configuration
// TODO: Check if information retreival can be done with less rigths // TODO: Check if information retreival can be done with less rigths
$z_api_user = $config['zabbix_api_user']; $z_api_user = $z_user;
$z_api_pass = $config['zabbix_api_pwd']; $z_api_pass = $z_pass;
if (isset($config['zabbix_api_user']))
{
$z_api_user = $config['zabbix_api_user'];
}
if (isset($config['zabbix_api_pwd']))
{
$z_api_pass = $config['zabbix_api_pwd'];
}
// Mail sender // Mail sender
$mailFrom = array($config['mail_from']=>'Zabbix Mailgraph'); $mailFrom = array($config['mail_from']=>'Zabbix Mailgraph');
@@ -627,7 +645,7 @@
$request = array('jsonrpc'=>'2.0', $request = array('jsonrpc'=>'2.0',
'method'=>'user.login', 'method'=>'user.login',
'params'=>array('user'=>$z_api_user, 'params'=>array('username'=>$z_api_user,
'password'=>$z_api_pass), 'password'=>$z_api_pass),
'id'=>nextRequestID(), 'id'=>nextRequestID(),
'auth'=>null); 'auth'=>null);
@@ -647,6 +665,31 @@
_log('> Token = '.$token); _log('> Token = '.$token);
// -----------------------------------
// --- IF NO EVENT ID FETCH LATEST ---
// -----------------------------------
if ($p_eventId=="0")
{
_log('# No event ID given, picking up random event from Zabbix');
$request = array('jsonrpc'=>'2.0',
'method'=>'problem.get',
'params'=>array('output'=>'extend',
'recent'=>'true',
'limit'=>1),
'auth'=>$token,
'id'=>nextRequestID());
$thisProblems = postJSON($z_url_api, $request);
_log('> Problem data'.$cCRLF.json_encode($thisProblems,JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK));
if (!isset($thisProblems['result'][0])) { echo '! No response data received?'.$cCRLF; die; }
$p_eventId = $thisProblems['result'][0]['eventid'];
_log('> Picked up random last event #'.$p_eventId);
}
// ------------------------------ // ------------------------------
// --- READ EVENT INFORMATION --- // --- READ EVENT INFORMATION ---
// ------------------------------ // ------------------------------
@@ -1424,8 +1467,15 @@
// Return Event TAG information for Zabbix // Return Event TAG information for Zabbix
$response = array('messageId.mailGraph'=>$messageId); $response = array('messageId'=>$messageId);
echo json_encode($response).$cCRLF;
if ($response=="")
{
_log("! Failed to send mail message");
echo "! Failed to send mail message. Likely an issue with the recipient email address?".$cCRLF;
} else {
echo json_encode($response).$cCRLF;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////
// Wrap up ////////////////////////////////////////////////////////////////////////////////////////////// // Wrap up //////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,190 +1,198 @@
<?xml version="1.0" encoding="UTF-8"?> zabbix_export:
<zabbix_export> version: '5.4'
<version>5.0</version> date: '2023-07-01T10:54:39Z'
<date>2021-03-17T12:55:43Z</date> media_types:
<media_types> -
<media_type> name: MailGraph
<name>MailGraph</name> type: WEBHOOK
<type>WEBHOOK</type> parameters:
<parameters> -
<parameter> name: baseURL
<name>baseURL</name> value: 'https://myzabbix.example.com/'
<value>https://mydomain.com/zabbix/</value> -
</parameter> name: duration
<parameter> value: '{EVENT.DURATION}'
<name>duration</name> -
<value>{EVENT.DURATION}</value> name: eventId
</parameter> value: '{EVENT.ID}'
<parameter> -
<name>eventId</name> name: graphHeight
<value>{EVENT.ID}</value> value: '120'
</parameter> -
<parameter> name: graphWidth
<name>graphHeight</name> value: '300'
<value>120</value> -
</parameter> name: HTTPProxy
<parameter> value: ''
<name>graphWidth</name> -
<value>300</value> name: infoTest
</parameter> value: Test
<parameter> -
<name>HTTPProxy</name> name: itemId
<value/> value: '{ITEM.ID}'
</parameter> -
<parameter> name: periods
<name>infoTest</name> value: '10m,4h,1d,7d'
<value>Test</value> -
</parameter> name: periods_headers
<parameter> value: 'Last 10 minutes,Last 4 hours,Last day,Last 7 days'
<name>itemId</name> -
<value>{ITEM.ID}</value> name: recipient
</parameter> value: '{ALERT.SENDTO}'
<parameter> -
<name>periods</name> name: showLegend
<value>10m,4h,1d,7d</value> value: '0'
</parameter> -
<parameter> name: subject
<name>periods_headers</name> value: '{{ HOST_NAME|raw }}: ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }}'
<value>Last 10 minutes,Last 4 hours,Last day,Last 7 days</value> -
</parameter> name: URL
<parameter> value: 'https://myzabbix.example.com/mailGraph.php'
<name>recipient</name> script: |
<value>{ALERT.SENDTO}</value> // mailGraph v2.11
</parameter> try {
<parameter> // Pickup parameters
<name>showLegend</name> params = JSON.parse(value),
<value>0</value> req = new HttpRequest(),
</parameter> fields = {},
<parameter> resp = '',
<name>subject</name> result = { tags: {} };
<value>{{ HOST_NAME|raw }}: ({{ EVENT_SEVERITY }}) {{ EVENT_NAME|raw }}</value>
</parameter> // Set HTTP proxy if required
<parameter> if (typeof params.HTTPProxy === 'string' && params.HTTPProxy.trim() !== '') {
<name>URL</name> req.setProxy(params.HTTPProxy);
<value>https://mydomain.com/mailGraph.php</value> fields.HTTPProxy = params.HTTPProxy;
</parameter> }
</parameters>
<script>try {&#13; // Declare output type
// Pickup parameters&#13; req.addHeader('Content-Type: application/json');
params = JSON.parse(value),&#13;
req = new CurlHttpRequest(),&#13; // Must have fields
fields = {},&#13; fields.itemId = params.itemId * 1;
resp = '',&#13; fields.eventId = params.eventId * 1;
result = { tags: {} };&#13; fields.recipient = params.recipient;
&#13; fields.baseURL = params.baseURL;
// Set HTTP proxy if required&#13; fields.duration = params.duration * 1;
if (typeof params.HTTPProxy === 'string' &amp;&amp; params.HTTPProxy.trim() !== '') {&#13;
req.setProxy(params.HTTPProxy);&#13; if (isNaN(fields.eventId)) {
fields.HTTPProxy = params.HTTPProxy;&#13; throw '[MailGraph Webhook] Invalid event ID? Integer required (use actual event ID from Zabbix!)';
}&#13; }
&#13;
// Declare output type&#13; if (isNaN(fields.duration)) {
req.AddHeader('Content-Type: application/json');&#13; throw '[MailGraph Webhook] Invalid duration? Integer required (set to zero if unknown)!';
&#13; }
// Must have fields&#13;
fields.itemId = params.itemId;&#13; if (fields.recipient.charAt(0) == '{') {
fields.eventId = params.eventId;&#13; throw '[MailGraph Webhook] Please define recipient for the test message!';
fields.recipient = params.recipient;&#13; }
fields.baseURL = params.baseURL;&#13;
fields.duration = params.duration;&#13; // Optional fields
&#13; if (typeof params.graphWidth === 'string') { fields.graphWidth = params.graphWidth; }
// Optional fields&#13; if (typeof params.graphHeight === 'string') { fields.graphHeight = params.graphHeight; }
if (typeof params.graphWidth === 'string') { fields.graphWidth = params.graphWidth; }&#13; if (typeof params.subject === 'string') { fields.subject = params.subject; }
if (typeof params.graphHeight === 'string') { fields.graphHeight = params.graphHeight; }&#13; if (typeof params.showLegend === 'string') { fields.showLegend = params.showLegend; }
if (typeof params.subject === 'string') { fields.subject = params.subject; }&#13; if (typeof params.periods === 'string') { fields.periods = params.periods; }
if (typeof params.showLegend === 'string') { fields.showLegend = params.showLegend; }&#13; if (typeof params.periods_headers === 'string') { fields.periods_headers = params.periods_headers; }
if (typeof params.periods === 'string') { fields.periods = params.periods; }&#13; if (typeof params.debug === 'string') { fields.debug = params.debug; }
if (typeof params.periods_headers === 'string') { fields.periods_headers = params.periods_headers; }&#13;
if (typeof params.debug === 'string') { fields.debug = params.debug; }&#13; // Add generic fields
&#13; Object.keys(params).forEach(function(key) {
// Add generic fields&#13; if (key.substring(0, 4) == 'info') {
Object.keys(params).forEach(function(key) {&#13; fields[key] = params[key];
if (key.substring(0, 4) == 'info') {&#13; }
fields[key] = params[key];&#13; });
}&#13;
});&#13; // Post information to the processing script
&#13; Zabbix.Log(4, '[MailGraph Webhook] Sending request: ' + params.URL + '?' + JSON.stringify(fields));
// Post information to the processing script&#13; var resp = req.post(params.URL,JSON.stringify(fields));
Zabbix.Log(4, '[MailGraph Webhook] Sending request: ' + params.URL + '?' + JSON.stringify(fields));&#13; Zabbix.Log(4, '[Mailgraph Webhook] Received response:' + resp);
var resp = req.Post(params.URL,JSON.stringify(fields));&#13;
Zabbix.Log(4, '[Mailgraph Webhook] Receiving response:' + resp);&#13; // If blank the email address is likely incorrect
&#13; if (resp==null) {
// If there was an error, report it&#13; throw '[MailGraph Webhook] No data received from mailGraph! Likely the email processing failed? Check mailGraph logging';
if (req.Status() != 200) { throw JSON.parse(resp).errors[0]; }&#13; }
&#13;
// We expect the message id back from the processing script&#13; // If there was an error, report it and stop
resp = JSON.parse(resp);&#13; if (req.getStatus() != 200) { throw JSON.parse(resp).errors[0]; }
result.tags.__message_id = resp.messageId;&#13;
&#13; // If no datas returned, report it and stop
// Pass the result back to Zabbix&#13; if (resp.charAt(0) == "!") {
return JSON.stringify(result);&#13; throw '[MailGraph Webhook] No data received from mailGraph! Likely the event ID provided does not exist? Check mailGraph logging';
}&#13; }
catch (error)&#13;
{&#13; // We expect the message id back from the processing script
// In case something went wrong in the processing, pass the error back to Zabbix&#13; msg = JSON.parse(resp);
Zabbix.Log(127, 'MailGraph notification failed : '+error);&#13;
throw 'MailGraph notification failed : '+error;&#13; result.tags.__message_id = msg.messageId;
}</script> Zabbix.Log(4, '[MailGraph Webhook] Message sent with identification "' + msg.messageId + '"');
<process_tags>YES</process_tags>
<description>The &quot;URL&quot; must point to the location of the processing script. If a proxy is required, define &quot;HTTPProxy&quot; for the proxy address.&#13; // Pass the result back to Zabbix
&#13; return JSON.stringify(result);
Customization:&#13; }
- &quot;graphWidth&quot; and &quot;graphWidth&quot; can be defined for the image size&#13; catch (error)
- &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; // In case something went wrong in the processing, pass the error back to Zabbix
- &quot;periods&quot; and &quot;periods_headers&quot; can be defined for displaying multiple periods of the same graph, or&#13; Zabbix.Log(127, 'MailGraph notification failed: '+error);
- &quot;period&quot; and &quot;period_header&quot; can be defined to display a single graph&#13; throw 'MailGraph notification failed : '+error;
&#13; }
The html.template and plain.template files can be adjusted (TWIG format).&#13; process_tags: 'YES'
&#13; description: |
More details are available at https://github.com/moudsen/mailGraph</description> The "URL" must point to the location of the processing script. If a proxy is required, define "HTTPProxy" for the proxy address.
<message_templates>
<message_template> Customization:
<event_source>TRIGGERS</event_source> - "graphWidth" and "graphWidth" can be defined for the image size
<operation_mode>PROBLEM</operation_mode> - "showLegend" can be defined to show or hide the legend of the graph
<subject>Problem: {EVENT.NAME}</subject> - "subject" can be defined for a customized subject for the mail message
<message>Problem started at {EVENT.TIME} on {EVENT.DATE}&#13; - "periods" and "periods_headers" can be defined for displaying multiple periods of the same graph, or
Problem name: {EVENT.NAME}&#13; - "period" and "period_header" can be defined to display a single graph
Host: {HOST.NAME}&#13;
Severity: {EVENT.SEVERITY}&#13; The html.template and plain.template files can be adjusted (TWIG format).
Operational data: {EVENT.OPDATA}&#13;
Original problem ID: {EVENT.ID}&#13; More details are available at https://github.com/moudsen/mailGraph
{TRIGGER.URL}&#13; message_templates:
&#13; -
eventId: {EVENT.ID}&#13; event_source: TRIGGERS
TriggerId: {TRIGGER.ID}&#13; operation_mode: PROBLEM
itemId: {ITEM.ID]</message> subject: 'Problem: {EVENT.NAME}'
</message_template> message: |
<message_template> Problem started at {EVENT.TIME} on {EVENT.DATE}
<event_source>TRIGGERS</event_source> Problem name: {EVENT.NAME}
<operation_mode>RECOVERY</operation_mode> Host: {HOST.NAME}
<subject>Resolved in {EVENT.DURATION}: {EVENT.NAME}</subject> Severity: {EVENT.SEVERITY}
<message>Problem has been resolved at {EVENT.RECOVERY.TIME} on {EVENT.RECOVERY.DATE}&#13; Operational data: {EVENT.OPDATA}
Problem name: {EVENT.NAME}&#13; Original problem ID: {EVENT.ID}
Problem duration: {EVENT.DURATION}&#13; {TRIGGER.URL}
Host: {HOST.NAME}&#13;
Severity: {EVENT.SEVERITY}&#13; eventId: {EVENT.ID}
Original problem ID: {EVENT.ID}&#13; TriggerId: {TRIGGER.ID}
{TRIGGER.URL}&#13; itemId: {ITEM.ID]
&#13; -
eventId: {EVENT.ID}&#13; event_source: TRIGGERS
TriggerId: {TRIGGER.ID}&#13; operation_mode: RECOVERY
itemId: {ITEM.ID]</message> subject: 'Resolved in {EVENT.DURATION}: {EVENT.RECOVERY.NAME}'
</message_template> message: |
<message_template> Problem has been resolved at {EVENT.RECOVERY.TIME} on {EVENT.RECOVERY.DATE}
<event_source>TRIGGERS</event_source> Problem name: {EVENT.RECOVERY.NAME}
<operation_mode>UPDATE</operation_mode> Problem duration: {EVENT.DURATION}
<subject>Updated problem in {EVENT.AGE}: {EVENT.NAME}</subject> Host: {HOST.NAME}
<message>{USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}.&#13; Severity: {EVENT.SEVERITY}
{EVENT.UPDATE.MESSAGE}&#13; Original problem ID: {EVENT.ID}
&#13; {TRIGGER.URL}
Current problem status is {EVENT.STATUS}, age is {EVENT.AGE}, acknowledged: {EVENT.ACK.STATUS}.&#13;
&#13; eventId: {EVENT.ID}
eventId: {EVENT.ID}&#13; TriggerId: {TRIGGER.ID}
TriggerId: {TRIGGER.ID}&#13; itemId: {ITEM.ID]
itemId: {ITEM.ID]</message> -
</message_template> event_source: TRIGGERS
</message_templates> operation_mode: UPDATE
</media_type> subject: 'Updated problem in {EVENT.AGE}: {EVENT.NAME}'
</media_types> message: |
</zabbix_export> {USER.FULLNAME} {EVENT.UPDATE.ACTION} problem at {EVENT.UPDATE.DATE} {EVENT.UPDATE.TIME}.
{EVENT.UPDATE.MESSAGE}
Current problem status is {EVENT.STATUS}, age is {EVENT.AGE}, acknowledged: {EVENT.ACK.STATUS}.
eventId: {EVENT.ID}
TriggerId: {TRIGGER.ID}
itemId: {ITEM.ID]