Source
throw 'Request failed with status code ' + request.getStatus() + '. Check debug log for more information.';
zabbix_export
version'7.0'
media_types
name iTop
type WEBHOOK
parameters
name alert_message
value'{ALERT.MESSAGE}'
name alert_subject
value'{ALERT.SUBJECT}'
name event_recovery_value
value'{EVENT.RECOVERY.VALUE}'
name event_source
value'{EVENT.SOURCE}'
name event_update_status
value'{EVENT.UPDATE.STATUS}'
name event_value
value'{EVENT.VALUE}'
name itop_api_version
value'1.3'
name itop_class
value UserRequest
name itop_comment
value'Created by Zabbix action {ACTION.NAME}'
name itop_id
value'{EVENT.TAGS.__zbx_itop_id}'
name itop_log
value private_log
name itop_organization_id
value'<PLACE ORGANIZATION ID>'
name itop_password
value'<PLACE PASSWORD OR TOKEN>'
name itop_url
value'<PLACE YOUR ITOP URL>'
name itop_user
value'<PLACE LOGIN>'
status DISABLED
script
var Itop = {
params: {},
setParams: function (params) {
if (typeof params !== 'object') {
return;
}
if (params.log !== 'private_log' && params.log !== 'public_log') {
throw 'Incorrect "itop_log" parameter given: ' + params.log + '\nMust be "private_log" or "public_log".';
}
Itop.params = params;
if (typeof Itop.params.url === 'string') {
if (!Itop.params.url.endsWith('/')) {
Itop.params.url += '/';
}
Itop.params.url += 'webservices/rest.php?version=' + encodeURIComponent(Itop.params.api_version);
}
},
setProxy: function (HTTPProxy) {
Itop.HTTPProxy = HTTPProxy;
},