CR/LF are not recognized for text/plain notifications

Description

CR/LF are not recognized for text/plain notifications. Not to mention the WebUI strips any CR/LF you add.

Here is the output of what the Notifd.log and my notification definition looks like. It worked without issues on 1.6.8

#

  1. Notifd.log
    #
    2010-08-16 14:04:51,377 DEBUG [Thread-578] JavaMailer:
    To: xxxx@xxxx.xxx
    From: xxxx@xxxx.xxx
    Subject is: RESOLVED: Notice #10: DNS down on mynode.mydomain (10.0.1.103) on node mynode.mydomain.
    File: no file attached

RESOLVED: The DNS service poll on interface mynode.mydomain (10.0.1.103) on node mynode.mydomain failed at Monday, August 16, 2010 1:54:19 PM MST. ------------ | Extra Info | ------------ Notification Time: Monday, August 16, 2010 1:54:19 PM MST Notification URL: http://10.0.6.7:8980/opennms/notification/detail.jsp?notice=10 Event URL: http://10.0.6.7:8980/opennms/event/detail.jsp?id=3063 Node Detail URL: http://10.0.6.7:8980/opennms/element/node.jsp?node=13 All Alarms URL: http://10.0.6.7:8980/opennms/alarm/list.htm?filter=node=13 All Outages URL: http://10.0.6.7:8980/opennms/outage/list.htm?filter=node=13 Possible Services Affected: DNS

#

  1. Notifications.xml
    #
    <notification name="nodeLostService" status="on">
    <uei>uei.opennms.org/nodes/nodeLostService</uei>
    <rule>IPADDR != '0.0.0.0'</rule>
    <destinationPath>Email-Admin</destinationPath>
    <text-message>The %service% service poll on interface %interfaceresolve% (%interface%) &#xd;
    on node %nodelabel% failed at %time%. &#xd;
    &#xd;
    ------------&#xd;
    | Extra Info |&#xd;
    ------------&#xd;
    Notification Time: %time%&#xd;
    Notification URL: http://10.0.6.7:8980/opennms/notification/detail.jsp?notice=%noticeid%&#xd;
    Event URL: http://10.0.6.7:8980/opennms/event/detail.jsp?id=%eventid%&#xd;
    Node Detail URL: http://10.0.6.7:8980/opennms/element/node.jsp?node=%nodeid%&#xd;
    All Alarms URL: http://10.0.6.7:8980/opennms/alarm/list.htm?filter=node=%nodeid%&#xd;
    All Outages URL: http://10.0.6.7:8980/opennms/outage/list.htm?filter=node=%nodeid%&#xd;
    Possible Services Affected: %service%</text-message>
    <subject>Notice #%noticeid%: %service% down on %interfaceresolve% (%interface%) on node %nodelabel%.</subject>
    <numeric-message>111-%noticeid%</numeric-message>
    </notification>

Environment

Operating System: All Platform: PC

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Benjamin Reed September 24, 2010 at 9:38 AM

  •  

    •  

      • has been marked as a duplicate of this bug. ***

Benjamin Reed August 17, 2010 at 3:47 PM

fixed; the CastorUtils API now allows specifying whether whitespace should be preserved or not, and the notifications factory has been changed to do so.

[1.8 74c956a] : fix notif whitespace preservation
[master cd7aafb] : fix notif whitespace preservation

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created August 16, 2010 at 9:04 PM
Updated January 27, 2017 at 4:25 PM
Resolved September 24, 2010 at 9:38 AM