I would like to send zabbix alerts in a good format instead of the default one.
I haven't installed zabbix from sources so I can't modify the file src/libs/zbxemail/email.c.
to change plaintext
with html
.
Is there another way to do that please ?
There is no way, I'm afraid (or that I know of). However, you can use an external call / new media type to send mails, via PHPmailer or python or even a shell-script, using whatever message body you like - even HTML. It's not really nice, but it works. I've done it myself, but not recently, check this howto.
Main info:
Create script in
/etc/zabbix/alert.d/
, e.g.zabbix_html_mail.sh
.Edit the script, enter the following (or similar):
Create new media type in zabbix, using
script
astype
, enter path of your script, then enter your message in HTML format, using{TRIGGER.STATUS}
,{TRIGGER.URL}
,{TRIGGER.XXXXXXX}
in your message body / subject and so on.