Source
Zabbix.log(4, '[Zendesk Webhook] Received response with status code ' + request.getStatus() + '. ' + response);
zabbix_export
version'7.2'
media_types
-
name Zendesk
type WEBHOOK
parameters
-
name alert_message
value'{ALERT.MESSAGE}'
-
name alert_subject
value'{ALERT.SUBJECT}'
-
name event_id
value'{EVENT.ID}'
-
name event_nseverity
value'{EVENT.NSEVERITY}'
-
name event_source
value'{EVENT.SOURCE}'
-
name event_tags
value'{EVENT.TAGS}'
-
name event_update_status
value'{EVENT.UPDATE.STATUS}'
-
name event_value
value'{EVENT.VALUE}'
-
name severity_average
value normal
-
name severity_default
value'-'
-
name severity_disaster
value urgent
-
name severity_high
value high
-
name severity_information
value low
-
name severity_not_classified
value low
-
name severity_warning
value normal
-
name trigger_id
value'{TRIGGER.ID}'
-
name zbxurl
value'{$ZABBIX.URL}'
-
name zendesk_issue_key
value'{EVENT.TAGS.__zbx_zdk_issuekey}'
-
name zendesk_token
value'<put your {enduser_email_address}/token:{api_token}>'
-
name zendesk_type
value incident
-
name zendesk_url
value'<put your Zendesk URL>'
script
var Zendesk = {
params: {},
setParams: function (params) {
if (typeof params !== 'object') {
return;
}
Zendesk.params = params;
if (typeof Zendesk.params.url === 'string') {
if (!Zendesk.params.url.endsWith('/')) {
Zendesk.params.url += '/';
}
Zendesk.params.url += 'api/v2/';
}
},
addCustomFields: function (data, fields) {
if (typeof fields === 'object' && Object.keys(fields).length) {
var schema = Zendesk.getSchema(),