Discussion:
HTML notifications not really html
thomas
2013-09-09 11:22:10 UTC
Permalink
thomas [http://community.zenoss.org/people/thomas] created the discussion

"HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/74586#74586

--------------------------------------------------------------
Hi

I have a zenoss 4.2.4 install which I'm preparing for production use, however when I enable HTML notifications, the mails I receive doesn't contain the formatting that has been setup in  Event -> triggers
Device: ${evt/device}
Component: ${evt/component}
Severity: ${evt/severityString}
Time: ${evt/lastTime}
${evt/message}
<a href="${urls/eventUrl}">Event Detail</a>
<a href="${urls/ackUrl}">Acknowledge</a>
<a href="${urls/closeUrl}">Close</a>
<a href="${urls/eventsUrl}">Device Events</a>
--===============1826512158553474856==
Content-Type: multipart/alternative;
boundary="===============2737890482476227527=="
MIME-Version: 1.0
--===============2737890482476227527==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Device: Alerthostname
Component: Website
Severity: Warning
Time: 2013/09/09 13:08:34.000
HTTP WARNING: HTTP/1.0 404 File not found - 344 bytes in 0.003 second response time
Event Detail: http://my.zenoss.host:8080/zport/dmd/Events/viewDetail?evid=005056b9-0997-8159-11e3-19402b0bed45 http://my.zenoss.host:8080/zport/dmd/Events/viewDetail?evid=005056b9-0997-8159-11e3-19402b0bed45
Acknowledge: http://my.zenoss.host:8080/zport/dmd/Events/manage_ackEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewEvents http://my.zenoss.host:8080/zport/dmd/Events/manage_ackEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewEvents
Close: http://my.zenoss.host:8080/zport/dmd/Events/manage_deleteEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewHistoryEvents http://my.zenoss.host:8080/zport/dmd/Events/manage_deleteEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewHistoryEvents
Device Events: http://my.zenoss.host:8080/zport/dmd/Devices/Server/Linux/devices/Alerthostname/devicedetail#deviceDetailNav:device_events http://my.zenoss.host:8080/zport/dmd/Devices/Server/Linux/devices/Alerthostname/devicedetail#deviceDetailNav:device_events
--===============2737890482476227527==
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
<br />
Device: Alerthostname<br />
Component: Website<br />
Severity: Warning<br />
Time: 2013/09/09 13:08:34.000<br />
Message:<br />
HTTP WARNING: HTTP/1.0 404 File not found - 344 bytes in 0.003 second response time <br />
Event Detail: http://my.zenoss.host:8080/zport/dmd/Events/viewDetail?evid=005056b9-0997-8159-11e3-19402b0bed45 http://my.zenoss.host:8080/zport/dmd/Events/viewDetail?evid=005056b9-0997-8159-11e3-19402b0bed45<br />
Acknowledge: http://my.zenoss.host:8080/zport/dmd/Events/manage_ackEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewEvents http://my.zenoss.host:8080/zport/dmd/Events/manage_ackEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewEvents<br />
Close: http://my.zenoss.host:8080/zport/dmd/Events/manage_deleteEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewHistoryEvents http://my.zenoss.host:8080/zport/dmd/Events/manage_deleteEvents?evids=005056b9-0997-8159-11e3-19402b0bed45&zenScreenName=viewHistoryEvents<br />
Device Events: http://my.zenoss.host:8080/zport/dmd/Devices/Server/Linux/devices/Alerthostname/devicedetail#deviceDetailNav:device_events http://my.zenoss.host:8080/zport/dmd/Devices/Server/Linux/devices/Alerthostname/devicedetail#deviceDetailNav:device_events<br />
This formatting isn't really displayed nicely...

Anybody knows what may be the problem?

Regards
Thomas
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74586#74586]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
hydruid
2013-09-12 18:01:42 UTC
Permalink
hydruid [http://community.zenoss.org/people/hydruid] created the discussion

"Re: HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/74605#74605

--------------------------------------------------------------
Perhaps your email client doesn't work with HTML or it's disabled for security? What email client do you use?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74605#74605]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
thomas
2013-09-13 08:39:58 UTC
Permalink
thomas [http://community.zenoss.org/people/thomas] created the discussion

"Re: HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/74628#74628

--------------------------------------------------------------
No, my mail client supports HTML (Mac Mail.App on OSX), and look at the formatting above, there is no "A HREF" tags for the actions "Event Detail, Acknowledge, Close and Device Events". So it looks as though zenoss strips off the HTML tags.

Thomas
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74628#74628]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
sergevs42
2013-09-28 08:09:39 UTC
Permalink
sergevs42 [http://community.zenoss.org/people/sergevs42] created the discussion

"Re: HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/74762#74762

--------------------------------------------------------------
html notifications  broken in 4.2.4
here is patch that fix it:
--- /opt/zenoss/Products/ZenModel/actions.py     2013-07-31 16:57:15.000000000 +0100
+++ /tmp/actions.py     2013-08-12 17:31:05.000000000 +0100
@@ -316,8 +316,9 @@

         log.debug('Sending this subject: %s' % subject)
         log.debug('Sending this body: %s' % body)
-        body = self._stripTags(body)
-        plain_body = self._encodeBody(body)
+        log.debug('Sending in format: %s' % notification.content['body_content_type'])
+#        body = self._stripTags(body)
+        plain_body = self._encodeBody(self._stripTags(body))

         email_message = plain_body
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74762#74762]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
thomas
2013-10-01 11:28:40 UTC
Permalink
thomas [http://community.zenoss.org/people/thomas] created the discussion

"Re: HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/74794#74794

--------------------------------------------------------------
thanks alot, that does fix our problem... hope that the fix has been submitted to zenoss so that it will reach the next version too.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/74794#74794]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Amit Sanaye
2014-01-02 08:04:22 UTC
Permalink
Amit Sanaye [http://community.zenoss.org/people/amitsanaye] created the discussion

"Re: HTML notifications not really html"

To view the discussion, visit: http://community.zenoss.org/message/75572#75572

--------------------------------------------------------------
Hello i am getting following error, installing the patch

[***@tzenoss01 download]$ patch /opt/zenoss/Products/ZenModel/actions.py < zenoss.notifications.patch
patching file /opt/zenoss/Products/ZenModel/actions.py
Hunk #1 FAILED at 316.
1 out of 1 hunk FAILED -- saving rejects to file /opt/zenoss/Products/ZenModel/actions.py.rej
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75572#75572]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...