1. Create media type withe the following configuration:
and Javascript body (3 seconds delay during problem operation):
var params = JSON.parse(value),
result = {tags: {}};
if (params.event_value === '0' || params.event_update_status === '1') {
throw 'Recovery ' + params.servicenow_sys_id;
}
else {
var now = new Date().getTime();
while(new Date().getTime() < now + 3000){ }
result.tags.__zbx_servicenow_number = 'test';
}
return JSON.stringify(result);
2. Configure standard action with the following operations:
3. Create a simple trigger for Zabbix trapper item:
4. Send 1 using zabbix_sender, and during 3 seconds send 0 to resolve the problem
5. Finally Problem operation and Recovery operation will b executed, but in recovery operation __zbx_servicenow_number tag is missing!
Problem log:
Recovery log:
Expected:
1. Recovery must be executed only when problem operation is finished;
2. Tags from problem operations must be exist during recovery operations.
|