[ZBX-16173] Links doesn't work in HTML event emails in Zabbix 4.2 Created: 2019 May 27  Updated: 2019 Jun 04  Resolved: 2019 May 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 4.2.1
Fix Version/s: None

Type: Problem report Priority: Minor
Reporter: Peter Danko Assignee: Aleksandrs Petrovs-Gavrilovs
Resolution: Workaround proposed Votes: 0
Labels: email, event, html, links
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Running on OS:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

In virtualization.
It was installed from packages.


Attachments: Zip Archive attachment.zip    

 Description   

Steps to reproduce:

  1. I have set the email event messages to HTML format...
  2. Then have created an HTML test template and added there links to Zabbix sites (it was needed to play with it,m that it will use the login credentials)...
  3. Creating event to test the email events...
  4. Click on longer links...

Result:
See screenshot for the 3 ling in HTML emails...
When I click on the links, I dont know why, it isnt get a whole link, but only a part of it and then Zabbix can't follow the longer links and show the asked page (when I give the link directly to web browser, then is shoe corectly)...

Use links:
[http://IP/zabbix/history.php?action=showgraph&itemids[]=63205|http://ip/zabbix/history.php?action=showgraph&itemids[]=63205]
this one is show correctly.

This one not:
[http://IP/zabbix/index.php?name=user&password=passwd&enter=Sign%20in&request=history.php?action=showgraph&itemids[]=63205|http://ip/zabbix/index.php?name=user&password=passwd&enter=Sign%20in&request=history.php?action=showgraph&itemids[]=63205]
while I receive only a page without any content while it will remove me this part of the link:

&itemids[]=63205

The same is with links to images which are used in HTML emails...
Expected:
When I use the links (all) to Zabbix sites in email, that the link will be show corectly....
The same will be great to have with links to pictures...

 



 Comments   
Comment by Aleksandrs Petrovs-Gavrilovs [ 2019 May 28 ]

Hello Alfista,

We will look in to this.

For now as a workaround, you can replace "&" symbol with "%26" starting with the 4th "&". i.e. replace this url:

http://IP/zabbix/index.php?name=user&password=passwd&enter=Sign%20in&request=tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID}

with this:

http://IP/zabbix/index.php?name=user&password=passwd&enter=Sign%20in&request=tr_events.php?triggerid={TRIGGER.ID}%26eventid={EVENT.ID}

And the link should be working

Best Regards,

Comment by Peter Danko [ 2019 May 29 ]

Hi Aleksandrs,

 

OK I will try it.

Comment by Peter Danko [ 2019 May 30 ]

Hi Aleksandrs,

 

now the links are working.

Thats a great help. It was needed to change on all "&" after the replace parameter.

 

Thanks.

Comment by Aleksandrs Petrovs-Gavrilovs [ 2019 May 30 ]

Hello Alfista

Glad I could be of help!

Let us know if any other issues arise, but as for now I will be closing the ticket since the issue is solved.

Best Regards,
Aleksandrs

Comment by Peter Danko [ 2019 Jun 04 ]

Thanks.

Generated at Fri Mar 29 04:02:55 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.