[ZBX-19008] Official integration between Zabbix and Itop not working Created: 2021 Feb 11  Updated: 2022 Oct 02

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 5.2.4
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Eduardo Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have tried to do the integration (following de official documentation) between Zabbix and Itop, but they are showing the following error:

181:20210210:172252.383 [ iTop Webhook ] ERROR: Incorrect iTop ticket ID given: {EVENT.TAGS.__zbx_itop_id}
181:20210210:172357.106 [ iTop Webhook ] ERROR: Failed to parse response received from iTop.
Request status code 200. Check debug log for more information.

The official integration is: https://www.zabbix.com/br/integrations/itop
The source code: https://git.zabbix.com/projects/ZBX/...tes/media/itop

I'm using the following software:

running on xammp on a Windows Server 2016
iTop-2.7.3-664
PHP 7.1.33 (tried 5.2.6 too)

running on a Ubuntu Server
Zabbix 5.4.0alpha2 (Docker Image Official - trunk) - Already tried with Zabbix 5.2 (same error)

Configs on Media of Zabbix

The ticket is opened on Itop, but the response gives a parse error on Zabbix!

In Actions, from the Event generated:

Partial Success. Ticket opened on ITOP, but presents error and not do the ACK the event.

 

Code used by the integration

 



 Comments   
Comment by Dmitry Krupornitsky [ 2021 Apr 19 ]

Dear Eduardo,

Could you please provide some additional info on your case:

  • Debug log from iTop
  • Log from Zabbix server

The message from server is "ERROR: Incorrect iTop ticket ID given: {EVENT.TAGS.__zbx_itop_id}" - the macro should be substituted with value on this stage, please check if it is correct.

Please note that there are no screenshots enclosed with this case, please fix that issue with separate message. 

 

Comment by Eduardo [ 2021 Apr 20 ]

Hi Dmitry,

Logs from Zabbix Server

199:20210215:204923.323 [ iTop Webhook ] ERROR: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}
 199:20210215:204923.323 End of zbx_es_execute():FAIL Sending failed: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}
 197:20210215:204923.323 In am_db_update_alert() alertid:84 status:2 retries:3 value: error:Sending failed: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}
 208:20210215:204924.321 query [txnlev:1] [update alerts set status=2,retries=3,error='Sending failed: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}' where alertid=83;
 200:20210215:204923.312 In zbx_es_execute() param:{"alert_message":"Problem has been resolved in 5m 0s at 20:48:58 on 2021.02.15\r\nProblem name: Zabbix agent is not
 available (for 3m)\r\nHost: windows-itop\r\nSeverity: Average\r\nOriginal problem ID: 4947\r\n","alert_subject":"[RESOLVED] Zabbix agent is not available (for 3m)","ev
ent_recovery_value":"0","event_source":"0","event_update_status":"0","event_value":"0","itop_api_version":"1.3","itop_class":"Problem","itop_comment":"Created by Zabbix
 action Itop Tickets","itop_id":"\{EVENT.TAGS.__zbx_itop_id}","itop_log":"private_log","itop_organization_id":"3","itop_password":"xxxxx","itop_url":"http://192.168.1
.148/web/","itop_user":"zabbix"}
 200:20210215:204923.313 [ iTop Webhook ] ERROR: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}
 200:20210215:204923.313 End of zbx_es_execute():FAIL Sending failed: Incorrect iTop ticket ID given: \{EVENT.TAGS.__zbx_itop_id}

Apache logs from iTOP:

[Tue Mar 30 13:56:57.939385 2021] [php7:warn] [pid 4472:tid 1804] [client 192.168.1.250:53400] PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0
[Tue Mar 30 13:59:35.735422 2021] [php7:warn] [pid 4472:tid 1800] [client 192.168.1.250:53716] PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0
[Tue Mar 30 13:59:45.875106 2021] [php7:warn] [pid 4472:tid 1800] [client 192.168.1.250:53728] PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0
[Tue Mar 30 13:59:55.890453 2021] [php7:warn] [pid 4472:tid 1800] [client 192.168.1.250:53746] PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0

Logs from Zabbix Apache:

192.168.1.250 - zabbix [30/Mar/2021:13:49:29 -0700] "POST /web/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcreate%22%2C%22class%22%3A%22Problem%22%2C%22comment%22%3A%22Created%20by%20Zabbix%20action%20Itop%20Tickets%22%2C%22output_fields%22%3A%22id%2C%20friendlyname%22%2C%22fields%22%3A%7B%22org_id%22%3A%223%22%2C%22title%22%3A%22%5BPROBLEM%5D%20Zabbix%20agent%20is%20not%20available%20(for%203m)%22%2C%22description%22%3A%22Problem%20started%20at%2020%3A43%3A58%20on%202021.02.15%3Cbr%3EProblem%20name%3A%20Zabbix%20agent%20is%20not%20available%20(for%203m)%3Cbr%3EHost%3A%20windows-itop%3Cbr%3ESeverity%3A%20Average%3Cbr%3EOperational%20data%3A%20not%20available%20(0)%3Cbr%3EOriginal%20problem%20ID%3A%204947%3Cbr%3E%22%7D%7D HTTP/1.1" 200 273 "-" "-"
192.168.1.250 - zabbix [30/Mar/2021:13:49:39 -0700] "POST /web/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcreate%22%2C%22class%22%3A%22Problem%22%2C%22comment%22%3A%22Created%20by%20Zabbix%20action%20Itop%20Tickets%22%2C%22output_fields%22%3A%22id%2C%20friendlyname%22%2C%22fields%22%3A%7B%22org_id%22%3A%223%22%2C%22title%22%3A%22%5BPROBLEM%5D%20Zabbix%20agent%20is%20not%20available%20(for%203m)%22%2C%22description%22%3A%22Problem%20started%20at%2020%3A43%3A58%20on%202021.02.15%3Cbr%3EProblem%20name%3A%20Zabbix%20agent%20is%20not%20available%20(for%203m)%3Cbr%3EHost%3A%20windows-itop%3Cbr%3ESeverity%3A%20Average%3Cbr%3EOperational%20data%3A%20not%20available%20(0)%3Cbr%3EOriginal%20problem%20ID%3A%204947%3Cbr%3E%22%7D%7D HTTP/1.1" 200 273 "-" "-"
192.168.1.250 - zabbix [30/Mar/2021:13:56:37 -0700] "POST /web/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcreate%22%2C%22class%22%3A%22Problem%22%2C%22comment%22%3A%22Created%20by%20Zabbix%20action%20Itop%20Tickets%22%2C%22output_fields%22%3A%22id%2C%20friendlyname%22%2C%22fields%22%3A%7B%22org_id%22%3A%223%22%2C%22title%22%3A%22%5BPROBLEM%5D%20Zabbix%20agent%20is%20not%20available%20(for%203m)%22%2C%22description%22%3A%22Problem%20started%20at%2020%3A51%3A13%20on%202021.02.15%3Cbr%3EProblem%20name%3A%20Zabbix%20agent%20is%20not%20available%20(for%203m)%3Cbr%3EHost%3A%20windows-itop%3Cbr%3ESeverity%3A%20Disaster%3Cbr%3EOperational%20data%3A%20not%20available%20(0)%3Cbr%3EOriginal%20problem%20ID%3A%204973%3Cbr%3E%22%7D%7D HTTP/1.1" 200 273 "-" "-"
192.168.1.250 - zabbix [30/Mar/2021:13:56:47 -0700] "POST /web/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcreate%22%2C%22class%22%3A%22Problem%22%2C%22comment%22%3A%22Created%20by%20Zabbix%20action%20Itop%20Tickets%22%2C%22output_fields%22%3A%22id%2C%20friendlyname%22%2C%22fields%22%3A%7B%22org_id%22%3A%223%22%2C%22title%22%3A%22%5BPROBLEM%5D%20Zabbix%20agent%20is%20not%20available%20(for%203m)%22%2C%22description%22%3A%22Problem%20started%20at%2020%3A51%3A13%20on%202021.02.15%3Cbr%3EProblem%20name%3A%20Zabbix%20agent%20is%20not%20available%20(for%203m)%3Cbr%3EHost%3A%20windows-itop%3Cbr%3ESeverity%3A%20Disaster%3Cbr%3EOperational%20data%3A%20not%20available%20(0)%3Cbr%3EOriginal%20problem%20ID%3A%204973%3Cbr%3E%22%7D%7D HTTP/1.1" 200 273 "-" "-"
192.168.1.250 - zabbix [30/Mar/2021:13:56:57 -0700] "POST /web/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcreate%22%2C%22class%22%3A%22Problem%22%2C%22comment%22%3A%22Created%20by%20Zabbix%20action%20Itop%20Tickets%22%2C%22output_fields%22%3A%22id%2C%20friendlyname%22%2C%22fields%22%3A%7B%22org_id%22%3A%223%22%2C%22title%22%3A%22%5BPROBLEM%5D%20Zabbix%20agent%20is%20not%20available%20(for%203m)%22%2C%22description%22%3A%22Problem%20started%20at%2020%3A51%3A13%20on%202021.02.15%3Cbr%3EProblem%20name%3A%20Zabbix%20agent%20is%20not%20available%20(for%203m)%3Cbr%3EHost%3A%20windows-itop%3Cbr%3ESeverity%3A%20Disaster%3Cbr%3EOperational%20data%3A%20not%20available%20(0)%3Cbr%3EOriginal%20problem%20ID%3A%204973%3Cbr%3E%22%7D%7D HTTP/1.1" 200 273 "-" "-

Thank you!

Comment by Oleksii Zagorskyi [ 2021 Apr 21 ]

Looked into JavaScript code and looks like the solution requires that for Update action it wants a tag "__zbx_itop_id" to be set.
It gets it from iTOP when created tickets but I do not see what's next with it?

I suppose that for Update action the solution will not expand the macro, so we will the the error.

Something is strange here:

// Create issue for trigger-based events.
 else if (params.event_value === '1' && params.event_update_status === '0'
 && Itop.params.id === '\{EVENT.TAGS.__zbx_itop_id}') {
 Itop.setCreatePayload();

var response = Itop.request(json_data);

result.tags.__zbx_itop_id = response.response.id;
 result.tags.__zbx_itop_key = response.response.friendlyname;
 result.tags.__zbx_itop_link = params.itop_url + (params.itop_url.endsWith('/') ? '' : '/') +
 'pages/UI.php?operation=details&class=' + encodeURIComponent(Itop.params.class) + '&id=' +
 encodeURIComponent(response.response.id);
 }
 // Update created issue for trigger-based event.
 else {
 if (Itop.params.id === '\{EVENT.TAGS.__zbx_itop_id}') {
 throw 'Incorrect iTop ticket ID given: ' + Itop.params.id;
 }

Based on said - CONFIRMED.

Comment by Bharani [ 2022 Oct 02 ]

How to populate caller id, Team id, agent id and ticket priority? 

Generated at Fri May 02 07:03:27 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.