[ZBX-16372] HTML message format in notifications not work Created: 2019 Jul 15 Updated: 2019 Jul 22 Resolved: 2019 Jul 22 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F), Server (S) |
Affects Version/s: | 4.2.4 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Minor |
Reporter: | Pavol Vrba | Assignee: | Edgar Akhmetshin |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Hi everyone, after upgrade to Zabbix 4.2.4 from 3.4 I wanted to test new feature HTML notifications But when I set HTML in annotations, emails going to outlook were in one line and look like this: Outlook Source_code: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">Annotation...<only text> Any idea?
|
Comments |
Comment by Edgar Akhmetshin [ 2019 Jul 15 ] |
Hello Pavol, Thank you for reporting the issue! Could you clarify HTML code used in the the frontend settings? According to the https://www.w3.org/TR/html401/ the correct way to define HTML mail will look like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Valid HTML Zabbix Example</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> </html> Regards, |
Comment by Pavol Vrba [ 2019 Jul 18 ] |
Hi Edgar, where in the the frontend settings? Regards, Pavol |
Comment by Edgar Akhmetshin [ 2019 Jul 19 ] |
Pavol, Could you show email media type settings and message template example used? Regards, |
Comment by Pavol Vrba [ 2019 Jul 19 ] |
Ok, my fault, dont use tags, now all working fine after create new template. // <!DOCTYPE html> <html> <body> <p> <font size="5" face="arial" color="red"> Zabbix Oracle databázový monitoring </font> </p> <p> <font size="3" face="verdana" color="blue"> Problém bol vyriešený. </font> </p> <table style="width:75%"> <tr> <td>Problém:</td> <td>{EVENT.NAME}</td> </tr> <tr> <td>Trigger stav:</td> <td>{TRIGGER.STATUS}</td> </tr> <tr> <td>Host:</td> <td>{HOST.NAME}</td> </tr> <tr> <td>Host IP:</td> <td>{HOST.IP}</td> </tr> <tr> <td>Kritickosť:</td> <td>{TRIGGER.SEVERITY}</td> </tr> <tr> <td>Nastal:</td> <td>{EVENT.TIME} dňa {EVENT.DATE}</td> </tr> <tr> <td>Vyriešený:</td> <td>{EVENT.RECOVERY.TIME} dňa {EVENT.RECOVERY.DATE}</td> </tr> </tr> <tr> <td>URL:</td> <td>{TRIGGER.URL}</td> </tr> </table> <p> <font size="3" face="verdana" color="blue"> Hodnoty položiek: </font> </p> <table style="width:75%"> <tr> <td>{ITEM.NAME1}({HOST.NAME1}:{ITEM.KEY1}):{ITEM.VALUE1}</td> </tr> <tr> <td>{ITEM.NAME2}({HOST.NAME2}:{ITEM.KEY2}):{ITEM.VALUE2}</td> </tr> <tr> <td>{ITEM.NAME3}{HOST.NAME3}{ITEM.KEY3}):{ITEM.VALUE3}</td> </tr> </table> <p> <font size="3" face="verdana" color="blue"> Originálna ID udalosti: </font> {EVENT.ID} </p> <p> <font size="3" face="verdana" color="blue"> Riešenie pre triggers: </font> </p> {TRIGGER.DESCRIPTION} <p> <font size="3" face="arial" color="red"> --------------------------------- Koniec e-mailu ------------------------------ </font> </p> </body> </html> |
Comment by Pavol Vrba [ 2019 Jul 19 ] |
possible to close, thank Edgar |